Update from https://crrev.com/320931
- Add IsFlat() definition to ui/gfx/transform
- Change sky's uses of skia's FilterLevel to FilterQuality
- Update cc_strip_video.patch
R=jamesr@chromium.org
Review URL: https://codereview.chromium.org/1013463003
diff --git a/DEPS b/DEPS
index 930c1de..8280b31 100644
--- a/DEPS
+++ b/DEPS
@@ -21,11 +21,11 @@
'chromium_git': 'https://chromium.googlesource.com',
'dart_svn': 'https://dart.googlecode.com',
'sfntly_revision': '1bdaae8fc788a5ac8936d68bf24f37d977a13dac',
- 'skia_revision': 'd1783aefcc0da86c5ff1d124c54704252d817621',
+ 'skia_revision': 'cdeca446197329de91d87d12ad689d03d7e4d261',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling Skia
# and V8 without interference from each other.
- 'v8_revision': '8f7dfb46871191fa9c96f9030d88be6757d46eab',
+ 'v8_revision': '2a8ff45e5c7fce5037cf975c4997718c324744dd',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling ANGLE
# and whatever else without interference from each other.
@@ -49,7 +49,7 @@
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling lss
# and whatever else without interference from each other.
- 'lss_revision': '952107fa7cea0daaabead28c0e92d579bee517eb',
+ 'lss_revision': 'e079768b7e3a94dcbe7d338496c0c3bde7151b6e',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling nss
# and whatever else without interference from each other.
@@ -124,7 +124,7 @@
'https://boringssl.googlesource.com/boringssl.git' + '@' + Var('boringssl_revision'),
'src/tools/gyp':
- Var('chromium_git') + '/external/gyp.git' + '@' + '4a9b712d5cb4a5ba7a9950128a7219569caf7263',
+ Var('chromium_git') + '/external/gyp.git' + '@' + 'd174d75bf69c682cb62af9187879e01513b35e52',
}
@@ -150,7 +150,7 @@
Var('chromium_git') + '/external/jsr-305.git' + '@' + '642c508235471f7220af6d5df2d3210e3bfc0919',
'src/third_party/android_tools':
- Var('chromium_git') + '/android_tools.git' + '@' + 'fd5a8ec0c75d487635f7e6bd3bdc90eb23eba941',
+ Var('chromium_git') + '/android_tools.git' + '@' + '98a434576d8d9a65f9bdb8ea161e158142c0c5e5',
'src/third_party/appurify-python/src':
Var('chromium_git') + '/external/github.com/appurify/appurify-python.git' + '@' + 'ee7abd5c5ae3106f72b2a0b9d2cb55094688e867',
diff --git a/base/BUILD.gn b/base/BUILD.gn
index 69f366e..f103446 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -9,6 +9,10 @@
import("//build/config/android/rules.gni")
}
+config("base_implementation") {
+ defines = [ "BASE_IMPLEMENTATION" ]
+}
+
source_set("base_paths") {
sources = [
"base_paths.cc",
@@ -34,7 +38,7 @@
]
}
- defines = [ "BASE_IMPLEMENTATION" ]
+ configs += [ ":base_implementation" ]
deps = [
"//base/memory",
@@ -607,7 +611,7 @@
"sys_info_openbsd.cc",
]
- defines = [ "BASE_IMPLEMENTATION" ]
+ configs += [ ":base_implementation" ]
deps = [
":base_static",
@@ -630,7 +634,7 @@
# Allow more direct string conversions on platforms with native utf8
# strings
if (is_mac || is_ios || is_chromeos) {
- defines += [ "SYSTEM_NATIVE_UTF8" ]
+ defines = [ "SYSTEM_NATIVE_UTF8" ]
}
if (is_android) {
@@ -758,12 +762,9 @@
configs += linux_configs
all_dependent_configs = linux_configs
- defines += [ "USE_SYMBOLIZE" ]
-
# These dependencies are not required on Android, and in the case
# of xdg_mime must be excluded due to licensing restrictions.
deps += [
- "//base/third_party/symbolize",
"//base/third_party/xdg_mime",
"//base/third_party/xdg_user_dirs",
]
@@ -1135,7 +1136,6 @@
"mac/scoped_sending_event_unittest.mm",
"md5_unittest.cc",
"memory/aligned_memory_unittest.cc",
- "memory/discardable_memory_unittest.cc",
"memory/discardable_shared_memory_unittest.cc",
"memory/linked_ptr_unittest.cc",
"memory/ref_counted_memory_unittest.cc",
@@ -1283,8 +1283,6 @@
"win/wrapped_window_proc_unittest.cc",
]
- defines = []
-
deps = [
":base",
":i18n",
@@ -1304,7 +1302,7 @@
# Allow more direct string conversions on platforms with native utf8
# strings
if (is_mac || is_ios || is_chromeos) {
- defines += [ "SYSTEM_NATIVE_UTF8" ]
+ defines = [ "SYSTEM_NATIVE_UTF8" ]
}
if (is_android) {
@@ -1341,7 +1339,6 @@
if (is_linux) {
sources -= [ "file_version_info_unittest.cc" ]
sources += [ "nix/xdg_util_unittest.cc" ]
- defines += [ "USE_SYMBOLIZE" ]
if (use_glib) {
configs += [ "//build/config/linux:glib" ]
}
diff --git a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
index c7d8527..484c6bc 100644
--- a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
+++ b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
@@ -5,6 +5,8 @@
package org.chromium.base.library_loader;
import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.os.AsyncTask;
import android.os.SystemClock;
import android.util.Log;
@@ -13,6 +15,13 @@
import org.chromium.base.JNINamespace;
import org.chromium.base.TraceEvent;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.nio.MappedByteBuffer;
+import java.nio.channels.FileChannel;
+import java.util.HashMap;
import java.util.Locale;
import javax.annotation.Nullable;
@@ -87,6 +96,9 @@
// final (like now) or be protected in some way (volatile of synchronized).
private final int mLibraryProcessType;
+ // Library -> Path it has been loaded from.
+ private final HashMap<String, String> mLoadedFrom;
+
/**
* @param libraryProcessType the process the shared library is loaded in. refer to
* LibraryProcessType for possible values.
@@ -106,6 +118,7 @@
private LibraryLoader(int libraryProcessType) {
mLibraryProcessType = libraryProcessType;
+ mLoadedFrom = new HashMap<String, String>();
}
/**
@@ -189,6 +202,68 @@
}
}
+ private void prefetchLibraryToMemory(Context context, String library) {
+ String libFilePath = mLoadedFrom.get(library);
+ if (libFilePath == null) {
+ Log.i(TAG, "File path not found for " + library);
+ return;
+ }
+ String apkFilePath = context.getApplicationInfo().sourceDir;
+ if (libFilePath.equals(apkFilePath)) {
+ // TODO(lizeb): Make pre-faulting work with libraries loaded from the APK.
+ return;
+ }
+ try {
+ TraceEvent.begin("LibraryLoader.prefetchLibraryToMemory");
+ File file = new File(libFilePath);
+ int size = (int) file.length();
+ FileChannel channel = new RandomAccessFile(file, "r").getChannel();
+ MappedByteBuffer buffer = channel.map(FileChannel.MapMode.READ_ONLY, 0, size);
+ // TODO(lizeb): Figure out whether walking the entire library is really necessary.
+ // Page size is 4096 for all current Android architectures.
+ for (int index = 0; index < size; index += 4096) {
+ // Note: Testing shows that neither the Java compiler nor
+ // Dalvik/ART eliminates this loop.
+ buffer.get(index);
+ }
+ } catch (FileNotFoundException e) {
+ Log.w(TAG, "Library file not found: " + e);
+ } catch (IOException e) {
+ Log.w(TAG, "Impossible to map the file: " + e);
+ } finally {
+ TraceEvent.end("LibraryLoader.prefetchLibraryToMemory");
+ }
+ }
+
+ /** Prefetches the native libraries in a background thread.
+ *
+ * Launches an AsyncTask that maps the native libraries into memory, reads a
+ * part of each page from it, than unmaps it. This is done to warm up the
+ * page cache, turning hard page faults into soft ones.
+ *
+ * This is done this way, as testing shows that fadvise(FADV_WILLNEED) is
+ * detrimental to the startup time.
+ *
+ * @param context the application context.
+ */
+ public void asyncPrefetchLibrariesToMemory(final Context context) {
+ new AsyncTask<Void, Void, Void>() {
+ @Override
+ protected Void doInBackground(Void... params) {
+ // Note: AsyncTasks are executed in a low priority background
+ // thread, which is the desired behavior here since we don't
+ // want to interfere with the rest of the initialization.
+ for (String library : NativeLibraries.LIBRARIES) {
+ if (Linker.isChromiumLinkerLibrary(library)) {
+ continue;
+ }
+ prefetchLibraryToMemory(context, library);
+ }
+ return null;
+ }
+ }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
+ }
+
// Invoke System.loadLibrary(...), triggering JNI_OnLoad in native code
private void loadAlreadyLocked(
Context context, boolean shouldDeleteFallbackLibraries)
@@ -263,6 +338,7 @@
? "using no map executable support fallback"
: "directly")
+ " from within " + apkFilePath);
+ mLoadedFrom.put(library, apkFilePath);
} else {
// Unpack library fallback.
Log.i(TAG, "Loading " + library
@@ -272,10 +348,14 @@
context, library);
fallbackWasUsed = true;
Log.i(TAG, "Built fallback library " + libFilePath);
+ mLoadedFrom.put(library, libFilePath);
}
} else {
// The library is in its own file.
Log.i(TAG, "Loading " + library);
+ ApplicationInfo applicationInfo = context.getApplicationInfo();
+ mLoadedFrom.put(library, new File(applicationInfo.nativeLibraryDir,
+ libFilePath).getAbsolutePath());
}
// Load the library.
diff --git a/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java b/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java
index 08c314f..c1f6d36 100644
--- a/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java
+++ b/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java
@@ -43,6 +43,16 @@
}
/**
+ * Records a sample in a count histogram of the given name. This is the Java equivalent of the
+ * UMA_HISTOGRAM_COUNTS C++ macro.
+ * @param name name of the histogram
+ * @param sample sample to be recorded, at least 1 and at most 999999
+ */
+ public static void recordCountHistogram(String name, int sample) {
+ nativeRecordCountHistogram(name, System.identityHashCode(name), sample);
+ }
+
+ /**
* Records a sample in a histogram of times. Useful for recording short durations. This is the
* Java equivalent of the UMA_HISTOGRAM_TIMES C++ macro.
* @param name name of the histogram
@@ -123,6 +133,7 @@
private static native void nativeRecordBooleanHistogram(String name, int key, boolean sample);
private static native void nativeRecordEnumeratedHistogram(
String name, int key, int sample, int boundary);
+ private static native void nativeRecordCountHistogram(String name, int key, int sample);
private static native int nativeGetHistogramValueCountForTesting(String name, int sample);
private static native void nativeInitialize();
diff --git a/base/android/javatests/src/org/chromium/base/metrics/RecordHistogramTest.java b/base/android/javatests/src/org/chromium/base/metrics/RecordHistogramTest.java
index f0489d3..24af056 100644
--- a/base/android/javatests/src/org/chromium/base/metrics/RecordHistogramTest.java
+++ b/base/android/javatests/src/org/chromium/base/metrics/RecordHistogramTest.java
@@ -80,6 +80,47 @@
}
/**
+ * Tests recording of count histograms.
+ */
+ @SmallTest
+ public void testRecordCountHistogram() {
+ String histogram = "HelloWorld.CountMetric";
+ HistogramDelta zeroCount = new HistogramDelta(histogram, 0);
+ HistogramDelta oneCount = new HistogramDelta(histogram, 1);
+ HistogramDelta twoCount = new HistogramDelta(histogram, 2);
+ HistogramDelta eightThousandCount = new HistogramDelta(histogram, 8000);
+
+ assertEquals(0, zeroCount.getDelta());
+ assertEquals(0, oneCount.getDelta());
+ assertEquals(0, twoCount.getDelta());
+ assertEquals(0, eightThousandCount.getDelta());
+
+ RecordHistogram.recordCountHistogram(histogram, 0);
+ assertEquals(1, zeroCount.getDelta());
+ assertEquals(0, oneCount.getDelta());
+ assertEquals(0, twoCount.getDelta());
+ assertEquals(0, eightThousandCount.getDelta());
+
+ RecordHistogram.recordCountHistogram(histogram, 0);
+ assertEquals(2, zeroCount.getDelta());
+ assertEquals(0, oneCount.getDelta());
+ assertEquals(0, twoCount.getDelta());
+ assertEquals(0, eightThousandCount.getDelta());
+
+ RecordHistogram.recordCountHistogram(histogram, 2);
+ assertEquals(2, zeroCount.getDelta());
+ assertEquals(0, oneCount.getDelta());
+ assertEquals(1, twoCount.getDelta());
+ assertEquals(0, eightThousandCount.getDelta());
+
+ RecordHistogram.recordCountHistogram(histogram, 8000);
+ assertEquals(2, zeroCount.getDelta());
+ assertEquals(0, oneCount.getDelta());
+ assertEquals(1, twoCount.getDelta());
+ assertEquals(1, eightThousandCount.getDelta());
+ }
+
+ /**
* Tests recording of custom times histograms.
*/
@SmallTest
diff --git a/base/android/jni_android.cc b/base/android/jni_android.cc
index a2de00a..1b715dc 100644
--- a/base/android/jni_android.cc
+++ b/base/android/jni_android.cc
@@ -159,10 +159,25 @@
ScopedJavaLocalRef<jclass> GetClass(JNIEnv* env, const char* class_name) {
jclass clazz;
if (!g_class_loader.Get().is_null()) {
+ // ClassLoader.loadClass expects a classname with components separated by
+ // dots instead of the slashes that JNIEnv::FindClass expects. The JNI
+ // generator generates names with slashes, so we have to replace them here.
+ // TODO(torne): move to an approach where we always use ClassLoader except
+ // for the special case of base::android::GetClassLoader(), and change the
+ // JNI generator to generate dot-separated names. http://crbug.com/461773
+ size_t bufsize = strlen(class_name) + 1;
+ char dotted_name[bufsize];
+ memmove(dotted_name, class_name, bufsize);
+ for (size_t i = 0; i < bufsize; ++i) {
+ if (dotted_name[i] == '/') {
+ dotted_name[i] = '.';
+ }
+ }
+
clazz = static_cast<jclass>(
env->CallObjectMethod(g_class_loader.Get().obj(),
g_class_loader_load_class_method_id,
- ConvertUTF8ToJavaString(env, class_name).obj()));
+ ConvertUTF8ToJavaString(env, dotted_name).obj()));
} else {
clazz = env->FindClass(class_name);
}
diff --git a/base/android/record_histogram.cc b/base/android/record_histogram.cc
index 0df0487..8b7f7bd 100644
--- a/base/android/record_histogram.cc
+++ b/base/android/record_histogram.cc
@@ -60,6 +60,31 @@
return InsertLocked(j_histogram_key, histogram);
}
+ HistogramBase* CountHistogram(JNIEnv* env,
+ jstring j_histogram_name,
+ jint j_histogram_key) {
+ // These values are based on the hard-coded constants in the
+ // UMA_HISTOGRAM_COUNTS macro from base/metrics/histogram_macros.h.
+ const int histogram_min = 1;
+ const int histogram_max = 1000000;
+ const int histogram_num_buckets = 50;
+
+ DCHECK(j_histogram_name);
+ DCHECK(j_histogram_key);
+ HistogramBase* histogram = FindLocked(j_histogram_key);
+ if (histogram) {
+ DCHECK(histogram->HasConstructionArguments(histogram_min, histogram_max,
+ histogram_num_buckets));
+ return histogram;
+ }
+
+ std::string histogram_name = ConvertJavaStringToUTF8(env, j_histogram_name);
+ histogram = Histogram::FactoryGet(histogram_name, histogram_min,
+ histogram_max, histogram_num_buckets,
+ HistogramBase::kUmaTargetedHistogramFlag);
+ return InsertLocked(j_histogram_key, histogram);
+ }
+
HistogramBase* CustomTimesHistogram(JNIEnv* env,
jstring j_histogram_name,
jint j_histogram_key,
@@ -133,6 +158,18 @@
->Add(sample);
}
+void RecordCountHistogram(JNIEnv* env,
+ jclass clazz,
+ jstring j_histogram_name,
+ jint j_histogram_key,
+ jint j_sample) {
+ int sample = static_cast<int>(j_sample);
+
+ g_histograms.Get()
+ .CountHistogram(env, j_histogram_name, j_histogram_key)
+ ->Add(sample);
+}
+
void RecordCustomTimesHistogramMilliseconds(JNIEnv* env,
jclass clazz,
jstring j_histogram_name,
diff --git a/base/base.gyp b/base/base.gyp
index 5f640d8..c7a2481 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -541,7 +541,6 @@
'mac/scoped_sending_event_unittest.mm',
'md5_unittest.cc',
'memory/aligned_memory_unittest.cc',
- 'memory/discardable_memory_unittest.cc',
'memory/discardable_shared_memory_unittest.cc',
'memory/linked_ptr_unittest.cc',
'memory/ref_counted_memory_unittest.cc',
@@ -976,6 +975,8 @@
'test/simple_test_tick_clock.h',
'test/task_runner_test_template.cc',
'test/task_runner_test_template.h',
+ 'test/test_discardable_memory_shmem_allocator.cc',
+ 'test/test_discardable_memory_shmem_allocator.h',
'test/test_file_util.cc',
'test/test_file_util.h',
'test/test_file_util_android.cc',
diff --git a/base/base.gypi b/base/base.gypi
index ebc7e3e..13cba85 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -318,14 +318,10 @@
'memory/aligned_memory.h',
'memory/discardable_memory.cc',
'memory/discardable_memory.h',
- 'memory/discardable_memory_android.cc',
- 'memory/discardable_memory_linux.cc',
- 'memory/discardable_memory_mac.cc',
'memory/discardable_memory_shmem.cc',
'memory/discardable_memory_shmem.h',
'memory/discardable_memory_shmem_allocator.cc',
'memory/discardable_memory_shmem_allocator.h',
- 'memory/discardable_memory_win.cc',
'memory/discardable_shared_memory.cc',
'memory/discardable_shared_memory.h',
'memory/linked_ptr.h',
@@ -889,7 +885,6 @@
['include', '^mac/scoped_mach_vm\\.'],
['include', '^mac/scoped_nsautorelease_pool\\.'],
['include', '^mac/scoped_nsobject\\.'],
- ['include', '^memory/discardable_memory_mac\\.'],
['include', '^message_loop/message_pump_mac\\.'],
['include', '^strings/sys_string_conversions_mac\\.'],
['include', '^threading/platform_thread_mac\\.'],
diff --git a/base/base_paths_win.cc b/base/base_paths_win.cc
index 5bef310..4ecb59d 100644
--- a/base/base_paths_win.cc
+++ b/base/base_paths_win.cc
@@ -6,8 +6,10 @@
#include <shlobj.h>
#include "base/base_paths.h"
+#include "base/environment.h"
#include "base/files/file_path.h"
#include "base/path_service.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/scoped_co_mem.h"
#include "base/win/windows_version.h"
@@ -65,6 +67,27 @@
return false;
cur = FilePath(system_buffer);
break;
+ case base::DIR_PROGRAM_FILES6432:
+#if !defined(_WIN64)
+ if (base::win::OSInfo::GetInstance()->wow64_status() ==
+ base::win::OSInfo::WOW64_ENABLED) {
+ scoped_ptr<base::Environment> env(base::Environment::Create());
+ std::string programfiles_w6432;
+ // 32-bit process running in WOW64 sets ProgramW6432 environment
+ // variable. See
+ // https://msdn.microsoft.com/library/windows/desktop/aa384274.aspx.
+ if (!env->GetVar("ProgramW6432", &programfiles_w6432))
+ return false;
+ // GetVar returns UTF8 - convert back to Wide.
+ cur = FilePath(UTF8ToWide(programfiles_w6432));
+ break;
+ }
+#endif
+ if (FAILED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL,
+ SHGFP_TYPE_CURRENT, system_buffer)))
+ return false;
+ cur = FilePath(system_buffer);
+ break;
case base::DIR_IE_INTERNET_CACHE:
if (FAILED(SHGetFolderPath(NULL, CSIDL_INTERNET_CACHE, NULL,
SHGFP_TYPE_CURRENT, system_buffer)))
diff --git a/base/base_paths_win.h b/base/base_paths_win.h
index 032de34..4ab6af1 100644
--- a/base/base_paths_win.h
+++ b/base/base_paths_win.h
@@ -16,8 +16,14 @@
DIR_WINDOWS, // Windows directory, usually "c:\windows"
DIR_SYSTEM, // Usually c:\windows\system32"
- DIR_PROGRAM_FILES, // Usually c:\program files
- DIR_PROGRAM_FILESX86, // Usually c:\program files or c:\program files (x86)
+ // 32-bit 32-bit on 64-bit 64-bit on 64-bit
+ // DIR_PROGRAM_FILES 1 2 1
+ // DIR_PROGRAM_FILESX86 1 2 2
+ // DIR_PROGRAM_FILES6432 1 1 1
+ // 1 - C:\Program Files 2 - C:\Program Files (x86)
+ DIR_PROGRAM_FILES, // See table above.
+ DIR_PROGRAM_FILESX86, // See table above.
+ DIR_PROGRAM_FILES6432, // See table above.
DIR_IE_INTERNET_CACHE, // Temporary Internet Files directory.
DIR_COMMON_START_MENU, // Usually "C:\Documents and Settings\All Users\
diff --git a/base/compiler_specific.h b/base/compiler_specific.h
index 47ca977..034cf06 100644
--- a/base/compiler_specific.h
+++ b/base/compiler_specific.h
@@ -175,9 +175,17 @@
// Mark a memory region fully initialized.
// Use this to annotate code that deliberately reads uninitialized data, for
// example a GC scavenging root set pointers from the stack.
-#define MSAN_UNPOISON(p, s) __msan_unpoison(p, s)
+#define MSAN_UNPOISON(p, size) __msan_unpoison(p, size)
+
+// Check a memory region for initializedness, as if it was being used here.
+// If any bits are uninitialized, crash with an MSan report.
+// Use this to sanitize data which MSan won't be able to track, e.g. before
+// passing data to another process via shared memory.
+#define MSAN_CHECK_MEM_IS_INITIALIZED(p, size) \
+ __msan_check_mem_is_initialized(p, size)
#else // MEMORY_SANITIZER
-#define MSAN_UNPOISON(p, s)
+#define MSAN_UNPOISON(p, size)
+#define MSAN_CHECK_MEM_IS_INITIALIZED(p, size)
#endif // MEMORY_SANITIZER
// Macro useful for writing cross-platform function pointers.
diff --git a/base/debug/BUILD.gn b/base/debug/BUILD.gn
index 37a0ab2..8ed623b 100644
--- a/base/debug/BUILD.gn
+++ b/base/debug/BUILD.gn
@@ -55,7 +55,7 @@
]
}
- defines = [ "BASE_IMPLEMENTATION" ]
+ configs += [ "//base:base_implementation" ]
deps = [
"//base/memory",
@@ -63,6 +63,7 @@
]
if (is_linux) {
+ defines = [ "USE_SYMBOLIZE" ]
deps += [ "//base/third_party/symbolize" ]
}
diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc
index 245ea6a..663f099 100644
--- a/base/files/file_posix.cc
+++ b/base/files/file_posix.cc
@@ -471,12 +471,15 @@
case EROFS:
case EPERM:
return FILE_ERROR_ACCESS_DENIED;
+ case EBUSY:
#if !defined(OS_NACL) // ETXTBSY not defined by NaCl.
case ETXTBSY:
- return FILE_ERROR_IN_USE;
#endif
+ return FILE_ERROR_IN_USE;
case EEXIST:
return FILE_ERROR_EXISTS;
+ case EIO:
+ return FILE_ERROR_IO;
case ENOENT:
return FILE_ERROR_NOT_FOUND;
case EMFILE:
diff --git a/base/ios/weak_nsobject.h b/base/ios/weak_nsobject.h
index a1984bb..fc3a7c3 100644
--- a/base/ios/weak_nsobject.h
+++ b/base/ios/weak_nsobject.h
@@ -117,7 +117,9 @@
}
WeakNSProtocol& operator=(const WeakNSProtocol<NST>& that) {
- DCHECK(checker_.CalledOnValidThread());
+ // A WeakNSProtocol object can be copied on one thread and used on
+ // another.
+ checker_.DetachFromThread();
container_ = that.container_;
return *this;
}
diff --git a/base/ios/weak_nsobject_unittest.mm b/base/ios/weak_nsobject_unittest.mm
index 325dcd2..81de993 100644
--- a/base/ios/weak_nsobject_unittest.mm
+++ b/base/ios/weak_nsobject_unittest.mm
@@ -109,8 +109,12 @@
// the weak object on its original thread.
void CopyWeakNSObjectAndPost(const WeakNSObject<NSMutableData>& weak_object,
scoped_refptr<SingleThreadTaskRunner> runner) {
- WeakNSObject<NSMutableData> weak_copy(weak_object);
- runner->PostTask(FROM_HERE, Bind(&TouchWeakData, weak_copy));
+ // Copy using constructor.
+ WeakNSObject<NSMutableData> weak_copy1(weak_object);
+ runner->PostTask(FROM_HERE, Bind(&TouchWeakData, weak_copy1));
+ // Copy using assignment operator.
+ WeakNSObject<NSMutableData> weak_copy2 = weak_object;
+ runner->PostTask(FROM_HERE, Bind(&TouchWeakData, weak_copy2));
}
// Tests that the weak object can be copied on a different thread.
@@ -128,8 +132,8 @@
other_thread.Stop();
loop.RunUntilIdle();
- // Check that TouchWeakData was called.
- EXPECT_EQ(1u, [data length]);
+ // Check that TouchWeakData was called and the object touched twice.
+ EXPECT_EQ(2u, [data length]);
}
} // namespace
diff --git a/base/json/BUILD.gn b/base/json/BUILD.gn
index 0310ea9..70830c1 100644
--- a/base/json/BUILD.gn
+++ b/base/json/BUILD.gn
@@ -27,7 +27,7 @@
]
}
- defines = [ "BASE_IMPLEMENTATION" ]
+ configs += [ "//base:base_implementation" ]
deps = [
"//base/memory",
diff --git a/base/location.cc b/base/location.cc
index 8b32b97..1333e6e 100644
--- a/base/location.cc
+++ b/base/location.cc
@@ -31,6 +31,13 @@
program_counter_(NULL) {
}
+Location::Location(const Location& other)
+ : function_name_(other.function_name_),
+ file_name_(other.file_name_),
+ line_number_(other.line_number_),
+ program_counter_(other.program_counter_) {
+}
+
std::string Location::ToString() const {
return std::string(function_name_) + "@" + file_name_ + ":" +
base::IntToString(line_number_);
diff --git a/base/location.h b/base/location.h
index 05a4f66..477dc02 100644
--- a/base/location.h
+++ b/base/location.h
@@ -5,10 +5,12 @@
#ifndef BASE_LOCATION_H_
#define BASE_LOCATION_H_
+#include <cassert>
#include <string>
#include "base/base_export.h"
#include "base/basictypes.h"
+#include "base/containers/hash_tables.h"
namespace tracked_objects {
@@ -27,18 +29,15 @@
// Provide a default constructor for easy of debugging.
Location();
- // Comparison operator for insertion into a std::map<> hash tables.
- // All we need is *some* (any) hashing distinction. Strings should already
- // be unique, so we don't bother with strcmp or such.
- // Use line number as the primary key (because it is fast, and usually gets us
- // a difference), and then pointers as secondary keys (just to get some
- // distinctions).
- bool operator < (const Location& other) const {
- if (line_number_ != other.line_number_)
- return line_number_ < other.line_number_;
- if (file_name_ != other.file_name_)
- return file_name_ < other.file_name_;
- return function_name_ < other.function_name_;
+ // Copy constructor.
+ Location(const Location& other);
+
+ // Comparator for hash map insertion.
+ // No need to use |function_name_| since the other two fields uniquely
+ // identify this location.
+ bool operator==(const Location& other) const {
+ return line_number_ == other.line_number_ &&
+ file_name_ == other.file_name_;
}
const char* function_name() const { return function_name_; }
@@ -48,6 +47,26 @@
std::string ToString() const;
+ // Hash operator for hash maps.
+ struct Hash {
+ size_t operator()(const Location& location) const {
+ // Compute the hash value using file name pointer and line number.
+ // No need to use |function_name_| since the other two fields uniquely
+ // identify this location.
+
+ // The file name will always be uniquely identified by its pointer since
+ // it comes from __FILE__, so no need to check the contents of the string.
+ // See the definition of FROM_HERE in location.h, and how it is used
+ // elsewhere.
+
+ // Due to inconsistent definitions of uint64_t and uintptr_t, casting the
+ // file name pointer to a uintptr_t causes a compiler error for some
+ // platforms. The solution is to explicitly cast it to a uint64_t.
+ return base::HashPair(reinterpret_cast<uint64_t>(location.file_name()),
+ location.line_number());
+ }
+ };
+
// Translate the some of the state in this instance into a human readable
// string with HTML characters in the function names escaped, and append that
// string to |output|. Inclusion of the file_name_ and function_name_ are
diff --git a/base/mac/scoped_mach_port.h b/base/mac/scoped_mach_port.h
index 9ef90d6..beb62b0 100644
--- a/base/mac/scoped_mach_port.h
+++ b/base/mac/scoped_mach_port.h
@@ -20,7 +20,7 @@
return MACH_PORT_NULL;
}
- static void Free(mach_port_t port);
+ BASE_EXPORT static void Free(mach_port_t port);
};
struct BASE_EXPORT ReceiveRightTraits {
@@ -28,7 +28,7 @@
return MACH_PORT_NULL;
}
- static void Free(mach_port_t port);
+ BASE_EXPORT static void Free(mach_port_t port);
};
struct PortSetTraits {
@@ -36,7 +36,7 @@
return MACH_PORT_NULL;
}
- static void Free(mach_port_t port);
+ BASE_EXPORT static void Free(mach_port_t port);
};
} // namespace internal
diff --git a/base/memory/BUILD.gn b/base/memory/BUILD.gn
index 5d016ff..3d4c22c 100644
--- a/base/memory/BUILD.gn
+++ b/base/memory/BUILD.gn
@@ -8,14 +8,10 @@
"aligned_memory.h",
"discardable_memory.cc",
"discardable_memory.h",
- "discardable_memory_android.cc",
- "discardable_memory_linux.cc",
- "discardable_memory_mac.cc",
"discardable_memory_shmem.cc",
"discardable_memory_shmem.h",
"discardable_memory_shmem_allocator.cc",
"discardable_memory_shmem_allocator.h",
- "discardable_memory_win.cc",
"discardable_shared_memory.cc",
"discardable_shared_memory.h",
"linked_ptr.h",
@@ -58,7 +54,7 @@
sources -= [ "shared_memory_nacl.cc" ]
}
- defines = [ "BASE_IMPLEMENTATION" ]
+ configs += [ "//base:base_implementation" ]
visibility = [ "//base/*" ]
}
diff --git a/base/memory/discardable_memory.cc b/base/memory/discardable_memory.cc
index 7d19f9a..0e3b58a 100644
--- a/base/memory/discardable_memory.cc
+++ b/base/memory/discardable_memory.cc
@@ -4,80 +4,14 @@
#include "base/memory/discardable_memory.h"
-#include "base/lazy_instance.h"
-#include "base/logging.h"
+#include "base/memory/discardable_memory_shmem.h"
namespace base {
-namespace {
-
-const struct TypeNamePair {
- DiscardableMemoryType type;
- const char* name;
-} kTypeNamePairs[] = {
- { DISCARDABLE_MEMORY_TYPE_SHMEM, "shmem" }
-};
-
-DiscardableMemoryType g_preferred_type = DISCARDABLE_MEMORY_TYPE_NONE;
-
-struct DefaultPreferredType {
- DefaultPreferredType() : value(DISCARDABLE_MEMORY_TYPE_NONE) {
- std::vector<DiscardableMemoryType> supported_types;
- DiscardableMemory::GetSupportedTypes(&supported_types);
- DCHECK(!supported_types.empty());
- value = supported_types[0];
- }
- DiscardableMemoryType value;
-};
-LazyInstance<DefaultPreferredType>::Leaky g_default_preferred_type =
- LAZY_INSTANCE_INITIALIZER;
-
-} // namespace
-
-// static
-DiscardableMemoryType DiscardableMemory::GetNamedType(
- const std::string& name) {
- for (size_t i = 0; i < arraysize(kTypeNamePairs); ++i) {
- if (name == kTypeNamePairs[i].name)
- return kTypeNamePairs[i].type;
- }
-
- return DISCARDABLE_MEMORY_TYPE_NONE;
-}
-
-// static
-const char* DiscardableMemory::GetTypeName(DiscardableMemoryType type) {
- for (size_t i = 0; i < arraysize(kTypeNamePairs); ++i) {
- if (type == kTypeNamePairs[i].type)
- return kTypeNamePairs[i].name;
- }
-
- return "unknown";
-}
-
-// static
-void DiscardableMemory::SetPreferredType(DiscardableMemoryType type) {
- // NONE is a reserved value and not a valid default type.
- DCHECK_NE(DISCARDABLE_MEMORY_TYPE_NONE, type);
-
- // Make sure this function is only called once before the first call
- // to GetPreferredType().
- DCHECK_EQ(DISCARDABLE_MEMORY_TYPE_NONE, g_preferred_type);
-
- g_preferred_type = type;
-}
-
-// static
-DiscardableMemoryType DiscardableMemory::GetPreferredType() {
- if (g_preferred_type == DISCARDABLE_MEMORY_TYPE_NONE)
- g_preferred_type = g_default_preferred_type.Get().value;
-
- return g_preferred_type;
-}
// static
scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemory(
size_t size) {
- return CreateLockedMemoryWithType(GetPreferredType(), size);
+ return make_scoped_ptr(new internal::DiscardableMemoryShmem(size));
}
} // namespace base
diff --git a/base/memory/discardable_memory.h b/base/memory/discardable_memory.h
index 4e5a9af..ce0f0bb 100644
--- a/base/memory/discardable_memory.h
+++ b/base/memory/discardable_memory.h
@@ -15,11 +15,6 @@
namespace base {
-enum DiscardableMemoryType {
- DISCARDABLE_MEMORY_TYPE_NONE,
- DISCARDABLE_MEMORY_TYPE_SHMEM
-};
-
// Platform abstraction for discardable memory. DiscardableMemory is used to
// cache large objects without worrying about blowing out memory, both on mobile
// devices where there is no swap, and desktop devices where unused free memory
@@ -55,29 +50,7 @@
public:
virtual ~DiscardableMemory() {}
- // Gets the discardable memory type with a given name.
- static DiscardableMemoryType GetNamedType(const std::string& name);
-
- // Gets the name of a discardable memory type.
- static const char* GetTypeName(DiscardableMemoryType type);
-
- // Gets system supported discardable memory types. Default preferred type
- // at the front of vector.
- static void GetSupportedTypes(std::vector<DiscardableMemoryType>* types);
-
- // Sets the preferred discardable memory type. This overrides the default
- // preferred type. Can only be called once prior to GetPreferredType()
- // or CreateLockedMemory(). Caller is responsible for correct ordering.
- static void SetPreferredType(DiscardableMemoryType type);
-
- // Gets the preferred discardable memory type.
- static DiscardableMemoryType GetPreferredType();
-
- // Create a DiscardableMemory instance with specified |type| and |size|.
- static scoped_ptr<DiscardableMemory> CreateLockedMemoryWithType(
- DiscardableMemoryType type, size_t size);
-
- // Create a DiscardableMemory instance with preferred type and |size|.
+ // Create a DiscardableMemory instance with |size|.
static scoped_ptr<DiscardableMemory> CreateLockedMemory(size_t size);
// Locks the memory so that it will not be purged by the system. Returns
diff --git a/base/memory/discardable_memory_android.cc b/base/memory/discardable_memory_android.cc
deleted file mode 100644
index a36f54e..0000000
--- a/base/memory/discardable_memory_android.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/discardable_memory.h"
-
-#include "base/logging.h"
-#include "base/memory/discardable_memory_shmem.h"
-
-namespace base {
-
-// static
-void DiscardableMemory::GetSupportedTypes(
- std::vector<DiscardableMemoryType>* types) {
- const DiscardableMemoryType supported_types[] = {
- DISCARDABLE_MEMORY_TYPE_SHMEM
- };
- types->assign(supported_types, supported_types + arraysize(supported_types));
-}
-
-// static
-scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemoryWithType(
- DiscardableMemoryType type, size_t size) {
- switch (type) {
- case DISCARDABLE_MEMORY_TYPE_SHMEM:
- return make_scoped_ptr(new internal::DiscardableMemoryShmem(size));
- case DISCARDABLE_MEMORY_TYPE_NONE:
- NOTREACHED();
- return nullptr;
- }
-
- NOTREACHED();
- return nullptr;
-}
-
-} // namespace base
diff --git a/base/memory/discardable_memory_linux.cc b/base/memory/discardable_memory_linux.cc
deleted file mode 100644
index b394e07..0000000
--- a/base/memory/discardable_memory_linux.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/discardable_memory.h"
-
-#include "base/logging.h"
-#include "base/memory/discardable_memory_shmem.h"
-
-namespace base {
-
-// static
-void DiscardableMemory::GetSupportedTypes(
- std::vector<DiscardableMemoryType>* types) {
- const DiscardableMemoryType supported_types[] = {
- DISCARDABLE_MEMORY_TYPE_SHMEM
- };
- types->assign(supported_types, supported_types + arraysize(supported_types));
-}
-
-// static
-scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemoryWithType(
- DiscardableMemoryType type, size_t size) {
- switch (type) {
- case DISCARDABLE_MEMORY_TYPE_SHMEM:
- return make_scoped_ptr(new internal::DiscardableMemoryShmem(size));
- case DISCARDABLE_MEMORY_TYPE_NONE:
- NOTREACHED();
- return nullptr;
- }
-
- NOTREACHED();
- return nullptr;
-}
-
-} // namespace base
diff --git a/base/memory/discardable_memory_mac.cc b/base/memory/discardable_memory_mac.cc
deleted file mode 100644
index d7e6345..0000000
--- a/base/memory/discardable_memory_mac.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/discardable_memory.h"
-
-#include "base/logging.h"
-#include "base/memory/discardable_memory_shmem.h"
-#include "base/memory/scoped_ptr.h"
-
-namespace base {
-
-// static
-void DiscardableMemory::GetSupportedTypes(
- std::vector<DiscardableMemoryType>* types) {
- const DiscardableMemoryType supported_types[] = {
- DISCARDABLE_MEMORY_TYPE_SHMEM
- };
- types->assign(supported_types, supported_types + arraysize(supported_types));
-}
-
-// static
-scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemoryWithType(
- DiscardableMemoryType type, size_t size) {
- switch (type) {
- case DISCARDABLE_MEMORY_TYPE_SHMEM:
- return make_scoped_ptr(new internal::DiscardableMemoryShmem(size));
- case DISCARDABLE_MEMORY_TYPE_NONE:
- NOTREACHED();
- return nullptr;
- }
-
- NOTREACHED();
- return nullptr;
-}
-
-} // namespace base
diff --git a/base/memory/discardable_memory_shmem_allocator.cc b/base/memory/discardable_memory_shmem_allocator.cc
index 761204f..a87c58d 100644
--- a/base/memory/discardable_memory_shmem_allocator.cc
+++ b/base/memory/discardable_memory_shmem_allocator.cc
@@ -11,45 +11,6 @@
namespace base {
namespace {
-class DiscardableMemoryShmemChunkImpl : public DiscardableMemoryShmemChunk {
- public:
- explicit DiscardableMemoryShmemChunkImpl(
- scoped_ptr<DiscardableSharedMemory> shared_memory)
- : shared_memory_(shared_memory.Pass()) {}
-
- // Overridden from DiscardableMemoryShmemChunk:
- bool Lock() override { return false; }
- void Unlock() override {
- shared_memory_->Unlock(0, 0);
- shared_memory_.reset();
- }
- void* Memory() const override { return shared_memory_->memory(); }
-
- private:
- scoped_ptr<DiscardableSharedMemory> shared_memory_;
-
- DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryShmemChunkImpl);
-};
-
-// Default allocator implementation that allocates in-process
-// DiscardableSharedMemory instances.
-class DiscardableMemoryShmemAllocatorImpl
- : public DiscardableMemoryShmemAllocator {
- public:
- // Overridden from DiscardableMemoryShmemAllocator:
- scoped_ptr<DiscardableMemoryShmemChunk>
- AllocateLockedDiscardableMemory(size_t size) override {
- scoped_ptr<DiscardableSharedMemory> memory(new DiscardableSharedMemory);
- if (!memory->CreateAndMap(size))
- return nullptr;
-
- return make_scoped_ptr(new DiscardableMemoryShmemChunkImpl(memory.Pass()));
- }
-};
-
-LazyInstance<DiscardableMemoryShmemAllocatorImpl>::Leaky g_default_allocator =
- LAZY_INSTANCE_INITIALIZER;
-
DiscardableMemoryShmemAllocator* g_allocator = nullptr;
} // namespace
@@ -69,9 +30,7 @@
// static
DiscardableMemoryShmemAllocator*
DiscardableMemoryShmemAllocator::GetInstance() {
- if (!g_allocator)
- g_allocator = g_default_allocator.Pointer();
-
+ DCHECK(g_allocator);
return g_allocator;
}
diff --git a/base/memory/discardable_memory_unittest.cc b/base/memory/discardable_memory_unittest.cc
deleted file mode 100644
index a769e17..0000000
--- a/base/memory/discardable_memory_unittest.cc
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/discardable_memory.h"
-
-#include <algorithm>
-
-#include "testing/gtest/include/gtest/gtest.h"
-
-#if defined(OS_ANDROID)
-#include <limits>
-#endif
-
-namespace base {
-namespace {
-
-class DiscardableMemoryTest
- : public testing::TestWithParam<DiscardableMemoryType> {
- public:
- DiscardableMemoryTest() {}
- virtual ~DiscardableMemoryTest() {
- }
-
- protected:
- scoped_ptr<DiscardableMemory> CreateLockedMemory(size_t size) {
- return DiscardableMemory::CreateLockedMemoryWithType(
- GetParam(), size).Pass();
- }
-};
-
-const size_t kSize = 1024;
-
-TEST_P(DiscardableMemoryTest, IsNamed) {
- std::string type_name(DiscardableMemory::GetTypeName(GetParam()));
- EXPECT_NE("unknown", type_name);
- EXPECT_EQ(GetParam(), DiscardableMemory::GetNamedType(type_name));
-}
-
-bool IsNativeType(DiscardableMemoryType type) {
-#if defined(OS_ANDROID)
- // SHMEM is backed by native discardable memory on Android.
- return type == DISCARDABLE_MEMORY_TYPE_SHMEM;
-#else
- return false;
-#endif
-}
-
-TEST_P(DiscardableMemoryTest, SupportedNatively) {
- std::vector<DiscardableMemoryType> supported_types;
- DiscardableMemory::GetSupportedTypes(&supported_types);
-#if defined(DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY)
- EXPECT_NE(0, std::count_if(supported_types.begin(),
- supported_types.end(),
- IsNativeType));
-#else
- // If we ever have a platform that decides at runtime if it can support
- // discardable memory natively, then we'll have to add a 'never supported
- // natively' define for this case. At present, if it's not always supported
- // natively, it's never supported.
- EXPECT_EQ(0, std::count_if(supported_types.begin(),
- supported_types.end(),
- IsNativeType));
-#endif
-}
-
-// Test Lock() and Unlock() functionalities.
-TEST_P(DiscardableMemoryTest, LockAndUnLock) {
- const scoped_ptr<DiscardableMemory> memory(CreateLockedMemory(kSize));
- ASSERT_TRUE(memory);
- void* addr = memory->Memory();
- EXPECT_NE(nullptr, addr);
- memory->Unlock();
-}
-
-// Test delete a discardable memory while it is locked.
-TEST_P(DiscardableMemoryTest, DeleteWhileLocked) {
- const scoped_ptr<DiscardableMemory> memory(CreateLockedMemory(kSize));
- ASSERT_TRUE(memory);
-}
-
-#if !defined(NDEBUG) && !defined(OS_ANDROID)
-// Death tests are not supported with Android APKs.
-TEST_P(DiscardableMemoryTest, UnlockedMemoryAccessCrashesInDebugMode) {
- const scoped_ptr<DiscardableMemory> memory(CreateLockedMemory(kSize));
- ASSERT_TRUE(memory);
- memory->Unlock();
- ASSERT_DEATH_IF_SUPPORTED(
- { *static_cast<int*>(memory->Memory()) = 0xdeadbeef; }, ".*");
-}
-#endif
-
-// Test behavior when creating enough instances that could use up a 32-bit
-// address space.
-// This is disabled under AddressSanitizer on Windows as it crashes (by design)
-// on OOM. See http://llvm.org/PR22026 for the details.
-#if !defined(ADDRESS_SANITIZER) || !defined(OS_WIN)
-TEST_P(DiscardableMemoryTest, AddressSpace) {
- const size_t kLargeSize = 4 * 1024 * 1024; // 4MiB.
- const size_t kNumberOfInstances = 1024 + 1; // >4GiB total.
-
- scoped_ptr<DiscardableMemory> instances[kNumberOfInstances];
- for (auto& memory : instances) {
- memory = CreateLockedMemory(kLargeSize);
- ASSERT_TRUE(memory);
- void* addr = memory->Memory();
- EXPECT_NE(nullptr, addr);
- memory->Unlock();
- }
-}
-#endif
-
-std::vector<DiscardableMemoryType> GetSupportedDiscardableMemoryTypes() {
- std::vector<DiscardableMemoryType> supported_types;
- DiscardableMemory::GetSupportedTypes(&supported_types);
- return supported_types;
-}
-
-INSTANTIATE_TEST_CASE_P(
- DiscardableMemoryTests,
- DiscardableMemoryTest,
- ::testing::ValuesIn(GetSupportedDiscardableMemoryTypes()));
-
-} // namespace
-} // namespace base
diff --git a/base/memory/discardable_memory_win.cc b/base/memory/discardable_memory_win.cc
deleted file mode 100644
index b394e07..0000000
--- a/base/memory/discardable_memory_win.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/discardable_memory.h"
-
-#include "base/logging.h"
-#include "base/memory/discardable_memory_shmem.h"
-
-namespace base {
-
-// static
-void DiscardableMemory::GetSupportedTypes(
- std::vector<DiscardableMemoryType>* types) {
- const DiscardableMemoryType supported_types[] = {
- DISCARDABLE_MEMORY_TYPE_SHMEM
- };
- types->assign(supported_types, supported_types + arraysize(supported_types));
-}
-
-// static
-scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemoryWithType(
- DiscardableMemoryType type, size_t size) {
- switch (type) {
- case DISCARDABLE_MEMORY_TYPE_SHMEM:
- return make_scoped_ptr(new internal::DiscardableMemoryShmem(size));
- case DISCARDABLE_MEMORY_TYPE_NONE:
- NOTREACHED();
- return nullptr;
- }
-
- NOTREACHED();
- return nullptr;
-}
-
-} // namespace base
diff --git a/base/metrics/BUILD.gn b/base/metrics/BUILD.gn
index 804e59b..0202637 100644
--- a/base/metrics/BUILD.gn
+++ b/base/metrics/BUILD.gn
@@ -37,7 +37,7 @@
sources -= [ "field_trial.cc" ]
}
- defines = [ "BASE_IMPLEMENTATION" ]
+ configs += [ "//base:base_implementation" ]
deps = [
"//base/debug",
diff --git a/base/path_service_unittest.cc b/base/path_service_unittest.cc
index 543deb6..7551d67 100644
--- a/base/path_service_unittest.cc
+++ b/base/path_service_unittest.cc
@@ -220,3 +220,55 @@
EXPECT_TRUE(PathService::Get(base::DIR_TEMP, &new_user_data_dir));
EXPECT_EQ(original_user_data_dir, new_user_data_dir);
}
+
+#if defined(OS_WIN)
+TEST_F(PathServiceTest, GetProgramFiles) {
+ base::FilePath programfiles_dir;
+#if defined(_WIN64)
+ // 64-bit on 64-bit.
+ EXPECT_TRUE(PathService::Get(base::DIR_PROGRAM_FILES,
+ &programfiles_dir));
+ EXPECT_EQ(programfiles_dir.value(),
+ FILE_PATH_LITERAL("C:\\Program Files"));
+ EXPECT_TRUE(PathService::Get(base::DIR_PROGRAM_FILESX86,
+ &programfiles_dir));
+ EXPECT_EQ(programfiles_dir.value(),
+ FILE_PATH_LITERAL("C:\\Program Files (x86)"));
+ EXPECT_TRUE(PathService::Get(base::DIR_PROGRAM_FILES6432,
+ &programfiles_dir));
+ EXPECT_EQ(programfiles_dir.value(),
+ FILE_PATH_LITERAL("C:\\Program Files"));
+#else
+ if (base::win::OSInfo::GetInstance()->wow64_status() ==
+ base::win::OSInfo::WOW64_ENABLED) {
+ // 32-bit on 64-bit.
+ EXPECT_TRUE(PathService::Get(base::DIR_PROGRAM_FILES,
+ &programfiles_dir));
+ EXPECT_EQ(programfiles_dir.value(),
+ FILE_PATH_LITERAL("C:\\Program Files (x86)"));
+ EXPECT_TRUE(PathService::Get(base::DIR_PROGRAM_FILESX86,
+ &programfiles_dir));
+ EXPECT_EQ(programfiles_dir.value(),
+ FILE_PATH_LITERAL("C:\\Program Files (x86)"));
+ EXPECT_TRUE(PathService::Get(base::DIR_PROGRAM_FILES6432,
+ &programfiles_dir));
+ EXPECT_EQ(programfiles_dir.value(),
+ FILE_PATH_LITERAL("C:\\Program Files"));
+ } else {
+ // 32-bit on 32-bit.
+ EXPECT_TRUE(PathService::Get(base::DIR_PROGRAM_FILES,
+ &programfiles_dir));
+ EXPECT_EQ(programfiles_dir.value(),
+ FILE_PATH_LITERAL("C:\\Program Files"));
+ EXPECT_TRUE(PathService::Get(base::DIR_PROGRAM_FILESX86,
+ &programfiles_dir));
+ EXPECT_EQ(programfiles_dir.value(),
+ FILE_PATH_LITERAL("C:\\Program Files"));
+ EXPECT_TRUE(PathService::Get(base::DIR_PROGRAM_FILES6432,
+ &programfiles_dir));
+ EXPECT_EQ(programfiles_dir.value(),
+ FILE_PATH_LITERAL("C:\\Program Files"));
+ }
+#endif
+}
+#endif
diff --git a/base/pickle.cc b/base/pickle.cc
index 6eb207f..112ddc3 100644
--- a/base/pickle.cc
+++ b/base/pickle.cc
@@ -358,6 +358,7 @@
inline void Pickle::WriteBytesCommon(const void* data, size_t length) {
DCHECK_NE(kCapacityReadOnly, capacity_after_header_)
<< "oops: pickle is readonly";
+ MSAN_CHECK_MEM_IS_INITIALIZED(data, length);
size_t data_len = AlignInt(length, sizeof(uint32));
DCHECK_GE(data_len, length);
#ifdef ARCH_CPU_64_BITS
diff --git a/base/process/BUILD.gn b/base/process/BUILD.gn
index 125b451..e570647 100644
--- a/base/process/BUILD.gn
+++ b/base/process/BUILD.gn
@@ -94,7 +94,7 @@
]
}
- defines = [ "BASE_IMPLEMENTATION" ]
+ configs += [ "//base:base_implementation" ]
deps = [
"//base/memory",
diff --git a/base/process/launch.cc b/base/process/launch.cc
index 1c752bd..c179b2f 100644
--- a/base/process/launch.cc
+++ b/base/process/launch.cc
@@ -27,6 +27,7 @@
#if defined(OS_LINUX)
, clone_flags(0)
, allow_new_privs(false)
+ , kill_on_parent_death(false)
#endif // OS_LINUX
#if defined(OS_POSIX)
, pre_exec_delegate(NULL)
diff --git a/base/process/launch.h b/base/process/launch.h
index 775e65c..56f27a8 100644
--- a/base/process/launch.h
+++ b/base/process/launch.h
@@ -141,6 +141,9 @@
// By default, child processes will have the PR_SET_NO_NEW_PRIVS bit set. If
// true, then this bit will not be set in the new child process.
bool allow_new_privs;
+
+ // Sets parent process death signal to SIGKILL.
+ bool kill_on_parent_death;
#endif // defined(OS_LINUX)
#if defined(OS_POSIX)
diff --git a/base/process/launch_posix.cc b/base/process/launch_posix.cc
index f9963fa..77edc12 100644
--- a/base/process/launch_posix.cc
+++ b/base/process/launch_posix.cc
@@ -523,6 +523,13 @@
RAW_LOG(FATAL, "prctl(PR_SET_NO_NEW_PRIVS) failed");
}
}
+
+ if (options.kill_on_parent_death) {
+ if (prctl(PR_SET_PDEATHSIG, SIGKILL) != 0) {
+ RAW_LOG(ERROR, "prctl(PR_SET_PDEATHSIG) failed");
+ _exit(127);
+ }
+ }
#endif
if (current_directory != nullptr) {
diff --git a/base/process/process.h b/base/process/process.h
index 41eef10..045f870 100644
--- a/base/process/process.h
+++ b/base/process/process.h
@@ -55,7 +55,7 @@
// Returns a Process for the given |pid|. On Windows the handle is opened
// with more access rights and must only be used by trusted code (can read the
// address space and duplicate handles).
- static Process OpenWithExtraPriviles(ProcessId pid);
+ static Process OpenWithExtraPrivileges(ProcessId pid);
#if defined(OS_WIN)
// Returns a Process for the given |pid|, using some |desired_access|.
diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc
index 1c4210b..a083123 100644
--- a/base/process/process_posix.cc
+++ b/base/process/process_posix.cc
@@ -238,7 +238,7 @@
}
// static
-Process Process::OpenWithExtraPriviles(ProcessId pid) {
+Process Process::OpenWithExtraPrivileges(ProcessId pid) {
// On POSIX there are no privileges to set.
return Open(pid);
}
diff --git a/base/process/process_win.cc b/base/process/process_win.cc
index 32da8ab..d72dd49 100644
--- a/base/process/process_win.cc
+++ b/base/process/process_win.cc
@@ -54,7 +54,7 @@
}
// static
-Process Process::OpenWithExtraPriviles(ProcessId pid) {
+Process Process::OpenWithExtraPrivileges(ProcessId pid) {
DWORD access = kBasicProcessAccess | PROCESS_DUP_HANDLE | PROCESS_VM_READ;
return Process(::OpenProcess(access, FALSE, pid));
}
diff --git a/base/test/BUILD.gn b/base/test/BUILD.gn
index 55e710d..f5d2e4c 100644
--- a/base/test/BUILD.gn
+++ b/base/test/BUILD.gn
@@ -81,6 +81,8 @@
"simple_test_tick_clock.h",
"task_runner_test_template.cc",
"task_runner_test_template.h",
+ "test_discardable_memory_shmem_allocator.cc",
+ "test_discardable_memory_shmem_allocator.h",
"test_file_util.cc",
"test_file_util.h",
"test_file_util_android.cc",
diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc
index 667d1eb..1d48060 100644
--- a/base/test/launcher/test_launcher.cc
+++ b/base/test/launcher/test_launcher.cc
@@ -383,6 +383,9 @@
}
#elif defined(OS_POSIX)
options.new_process_group = true;
+#if defined(OS_LINUX)
+ options.kill_on_parent_death = true;
+#endif // defined(OS_LINUX)
FileHandleMappingVector fds_mapping;
ScopedFD output_file_fd;
diff --git a/base/test/test_discardable_memory_shmem_allocator.cc b/base/test/test_discardable_memory_shmem_allocator.cc
new file mode 100644
index 0000000..24185a2
--- /dev/null
+++ b/base/test/test_discardable_memory_shmem_allocator.cc
@@ -0,0 +1,40 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/test/test_discardable_memory_shmem_allocator.h"
+
+#include <stdint.h>
+
+namespace base {
+namespace {
+
+class DiscardableMemoryShmemChunkImpl : public DiscardableMemoryShmemChunk {
+ public:
+ explicit DiscardableMemoryShmemChunkImpl(size_t size)
+ : memory_(new uint8_t[size]) {}
+
+ // Overridden from DiscardableMemoryShmemChunk:
+ bool Lock() override { return false; }
+ void Unlock() override {}
+ void* Memory() const override { return memory_.get(); }
+
+ private:
+ scoped_ptr<uint8_t[]> memory_;
+};
+
+} // namespace
+
+TestDiscardableMemoryShmemAllocator::TestDiscardableMemoryShmemAllocator() {
+}
+
+TestDiscardableMemoryShmemAllocator::~TestDiscardableMemoryShmemAllocator() {
+}
+
+scoped_ptr<DiscardableMemoryShmemChunk>
+TestDiscardableMemoryShmemAllocator::AllocateLockedDiscardableMemory(
+ size_t size) {
+ return make_scoped_ptr(new DiscardableMemoryShmemChunkImpl(size));
+}
+
+} // namespace base
diff --git a/base/test/test_discardable_memory_shmem_allocator.h b/base/test/test_discardable_memory_shmem_allocator.h
new file mode 100644
index 0000000..a40960e
--- /dev/null
+++ b/base/test/test_discardable_memory_shmem_allocator.h
@@ -0,0 +1,28 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_TEST_TEST_DISCARDABLE_MEMORY_SHMEM_ALLOCATOR_H_
+#define BASE_TEST_TEST_DISCARDABLE_MEMORY_SHMEM_ALLOCATOR_H_
+
+#include "base/memory/discardable_memory_shmem_allocator.h"
+
+namespace base {
+
+class TestDiscardableMemoryShmemAllocator
+ : public DiscardableMemoryShmemAllocator {
+ public:
+ TestDiscardableMemoryShmemAllocator();
+ ~TestDiscardableMemoryShmemAllocator() override;
+
+ // Overridden from DiscardableMemoryShmemAllocator:
+ scoped_ptr<DiscardableMemoryShmemChunk> AllocateLockedDiscardableMemory(
+ size_t size) override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TestDiscardableMemoryShmemAllocator);
+};
+
+} // namespace base
+
+#endif // BASE_TEST_TEST_DISCARDABLE_MEMORY_SHMEM_ALLOCATOR_H_
diff --git a/base/third_party/nspr/BUILD.gn b/base/third_party/nspr/BUILD.gn
index a67e168..034f37b 100644
--- a/base/third_party/nspr/BUILD.gn
+++ b/base/third_party/nspr/BUILD.gn
@@ -12,7 +12,7 @@
# In GYP this project is part of base, so it uses the base implementation
# define. TODO(brettw) rename this define.
- defines = [ "BASE_IMPLEMENTATION" ]
+ configs += [ "//base:base_implementation" ]
if (is_android && !is_debug) {
configs -= [ "//build/config/compiler:optimize" ]
diff --git a/base/threading/sequenced_worker_pool.cc b/base/threading/sequenced_worker_pool.cc
index f20d997..52b178b 100644
--- a/base/threading/sequenced_worker_pool.cc
+++ b/base/threading/sequenced_worker_pool.cc
@@ -803,6 +803,20 @@
delete_these_outside_lock.clear();
break;
}
+
+ // No work was found, but there are tasks that need deletion. The
+ // deletion must happen outside of the lock.
+ if (delete_these_outside_lock.size()) {
+ AutoUnlock unlock(lock_);
+ delete_these_outside_lock.clear();
+
+ // Since the lock has been released, |status| may no longer be
+ // accurate. It might read GET_WORK_WAIT even if there are tasks
+ // ready to perform work. Jump to the top of the loop to recalculate
+ // |status|.
+ continue;
+ }
+
waiting_thread_count_++;
switch (status) {
diff --git a/base/threading/sequenced_worker_pool_unittest.cc b/base/threading/sequenced_worker_pool_unittest.cc
index c132731..5d0880c 100644
--- a/base/threading/sequenced_worker_pool_unittest.cc
+++ b/base/threading/sequenced_worker_pool_unittest.cc
@@ -148,6 +148,17 @@
FROM_HERE, reposting_task, SequencedWorkerPool::SKIP_ON_SHUTDOWN);
}
+ // This task reposts itself back onto the SequencedWorkerPool before it
+ // finishes running.
+ void PostRepostingBlockingTask(
+ const scoped_refptr<SequencedWorkerPool>& pool,
+ const SequencedWorkerPool::SequenceToken& token) {
+ Closure reposting_task =
+ base::Bind(&TestTracker::PostRepostingBlockingTask, this, pool, token);
+ pool->PostSequencedWorkerTaskWithShutdownBehavior(token,
+ FROM_HERE, reposting_task, SequencedWorkerPool::BLOCK_SHUTDOWN);
+ }
+
// Waits until the given number of tasks have started executing.
void WaitUntilTasksBlocked(size_t count) {
{
@@ -795,6 +806,26 @@
pool()->Shutdown();
}
+// Similar to the test AvoidsDeadlockOnShutdown, but there are now also
+// sequenced, blocking tasks in the queue during shutdown.
+TEST_F(SequencedWorkerPoolTest,
+ AvoidsDeadlockOnShutdownWithSequencedBlockingTasks) {
+ const std::string sequence_token_name("name");
+ for (int i = 0; i < 4; ++i) {
+ scoped_refptr<DestructionDeadlockChecker> checker(
+ new DestructionDeadlockChecker(pool()));
+ tracker()->PostRepostingTask(pool(), checker);
+
+ SequencedWorkerPool::SequenceToken token1 =
+ pool()->GetNamedSequenceToken(sequence_token_name);
+ tracker()->PostRepostingBlockingTask(pool(), token1);
+ }
+
+ // Shutting down the pool should destroy the DestructionDeadlockCheckers,
+ // which in turn should not deadlock in their destructors.
+ pool()->Shutdown();
+}
+
// Verify that FlushForTesting works as intended.
TEST_F(SequencedWorkerPoolTest, FlushForTesting) {
// Should be fine to call on a new instance.
diff --git a/base/time/time.h b/base/time/time.h
index b18c0b2..6a45b81 100644
--- a/base/time/time.h
+++ b/base/time/time.h
@@ -233,13 +233,16 @@
// Represents a wall clock time in UTC.
class BASE_EXPORT Time {
public:
+ static const int64 kHoursPerDay = 24;
static const int64 kMillisecondsPerSecond = 1000;
+ static const int64 kMillisecondsPerDay = kMillisecondsPerSecond * 60 * 60 *
+ kHoursPerDay;
static const int64 kMicrosecondsPerMillisecond = 1000;
static const int64 kMicrosecondsPerSecond = kMicrosecondsPerMillisecond *
kMillisecondsPerSecond;
static const int64 kMicrosecondsPerMinute = kMicrosecondsPerSecond * 60;
static const int64 kMicrosecondsPerHour = kMicrosecondsPerMinute * 60;
- static const int64 kMicrosecondsPerDay = kMicrosecondsPerHour * 24;
+ static const int64 kMicrosecondsPerDay = kMicrosecondsPerHour * kHoursPerDay;
static const int64 kMicrosecondsPerWeek = kMicrosecondsPerDay * 7;
static const int64 kNanosecondsPerMicrosecond = 1000;
static const int64 kNanosecondsPerSecond = kNanosecondsPerMicrosecond *
diff --git a/base/trace_event/BUILD.gn b/base/trace_event/BUILD.gn
index eec607b..10f7ec9 100644
--- a/base/trace_event/BUILD.gn
+++ b/base/trace_event/BUILD.gn
@@ -41,7 +41,7 @@
]
}
- defines = [ "BASE_IMPLEMENTATION" ]
+ configs += [ "//base:base_implementation" ]
deps = [
"//base/debug",
diff --git a/base/trace_event/trace_event.h b/base/trace_event/trace_event.h
index b90a3ea..9d8e7d1 100644
--- a/base/trace_event/trace_event.h
+++ b/base/trace_event/trace_event.h
@@ -520,6 +520,27 @@
value1_name, static_cast<int>(value1_val), \
value2_name, static_cast<int>(value2_val))
+// TRACE_EVENT_SAMPLE_* events are injected by the sampling profiler.
+#define TRACE_EVENT_SAMPLE_WITH_TID_AND_TIMESTAMP0(category_group, name, \
+ thread_id, timestamp) \
+ INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
+ TRACE_EVENT_PHASE_SAMPLE, category_group, name, 0, thread_id, timestamp, \
+ TRACE_EVENT_FLAG_NONE)
+
+#define TRACE_EVENT_SAMPLE_WITH_TID_AND_TIMESTAMP1( \
+ category_group, name, thread_id, timestamp, arg1_name, arg1_val) \
+ INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
+ TRACE_EVENT_PHASE_SAMPLE, category_group, name, 0, thread_id, timestamp, \
+ TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
+
+#define TRACE_EVENT_SAMPLE_WITH_TID_AND_TIMESTAMP2(category_group, name, \
+ thread_id, timestamp, \
+ arg1_name, arg1_val, \
+ arg2_name, arg2_val) \
+ INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
+ TRACE_EVENT_PHASE_SAMPLE, category_group, name, 0, thread_id, timestamp, \
+ TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
+
// ASYNC_STEP_* APIs should be only used by legacy code. New code should
// consider using NESTABLE_ASYNC_* APIs to describe substeps within an async
// event.
diff --git a/base/tracked_objects.h b/base/tracked_objects.h
index 7840fec..34c3667 100644
--- a/base/tracked_objects.h
+++ b/base/tracked_objects.h
@@ -14,6 +14,7 @@
#include "base/base_export.h"
#include "base/basictypes.h"
+#include "base/containers/hash_tables.h"
#include "base/gtest_prod_util.h"
#include "base/lazy_instance.h"
#include "base/location.h"
@@ -357,7 +358,7 @@
STATUS_LAST = PROFILING_CHILDREN_ACTIVE
};
- typedef std::map<Location, Births*> BirthMap;
+ typedef base::hash_map<Location, Births*, Location::Hash> BirthMap;
typedef std::map<const Births*, DeathData> DeathMap;
typedef std::pair<const Births*, const Births*> ParentChildPair;
typedef std::set<ParentChildPair> ParentChildSet;
diff --git a/build/all.gyp b/build/all.gyp
index 4108962..2813ca2 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -163,6 +163,7 @@
['OS=="mac"', {
'dependencies': [
'../sandbox/sandbox.gyp:*',
+ '../third_party/crashpad/crashpad/crashpad.gyp:*',
'../third_party/ocmock/ocmock.gyp:*',
],
}],
diff --git a/build/android/gyp/javac.py b/build/android/gyp/javac.py
index 3738062..a0fcda8 100755
--- a/build/android/gyp/javac.py
+++ b/build/android/gyp/javac.py
@@ -80,7 +80,8 @@
'-classpath', ':'.join(classpath),
'-d', classes_dir]
if chromium_code:
- javac_args.extend(['-Xlint:unchecked', '-Xlint:deprecation'])
+ # TODO(aurimas): re-enable '-Xlint:deprecation' checks once they are fixed.
+ javac_args.extend(['-Xlint:unchecked'])
else:
# XDignore.symbol.file makes javac compile against rt.jar instead of
# ct.sym. This means that using a java internal package/class will not
diff --git a/build/android/gyp/package_resources.py b/build/android/gyp/package_resources.py
index 9b6ec68..2251de0 100755
--- a/build/android/gyp/package_resources.py
+++ b/build/android/gyp/package_resources.py
@@ -100,11 +100,11 @@
multiple targets. If it is multiple targets merged into one, the actual
resource directories will be contained in the subdirectories 0, 1, 2, ...
"""
- res_dirs = []
subdirs = [os.path.join(d, s) for s in os.listdir(d)]
- subdirs = sorted([s for s in subdirs if os.path.isdir(s)])
- if subdirs and os.path.basename(subdirs[0]) == '0':
- res_dirs = subdirs
+ subdirs = [s for s in subdirs if os.path.isdir(s)]
+ is_multi = '0' in [os.path.basename(s) for s in subdirs]
+ if is_multi:
+ res_dirs = sorted(subdirs, key=lambda p : int(os.path.basename(p)))
else:
res_dirs = [d]
package_command = []
diff --git a/build/android/gyp/write_build_config.py b/build/android/gyp/write_build_config.py
index bf887e3..5fc8955 100755
--- a/build/android/gyp/write_build_config.py
+++ b/build/android/gyp/write_build_config.py
@@ -139,6 +139,9 @@
direct_resources_deps = DepsOfType('android_resources', direct_deps_configs)
all_resources_deps = DepsOfType('android_resources', all_deps_configs)
+ # Resources should be ordered with the highest-level dependency first so that
+ # overrides are done correctly.
+ all_resources_deps.reverse()
# Initialize some common config.
config = {
diff --git a/build/android/pylib/constants.py b/build/android/pylib/constants.py
index b849a8d..34dbf19 100644
--- a/build/android/pylib/constants.py
+++ b/build/android/pylib/constants.py
@@ -167,9 +167,10 @@
KITKAT = 19
KITKAT_WATCH = 20
LOLLIPOP = 21
+ LOLLIPOP_MR1 = 22
-ANDROID_SDK_VERSION = ANDROID_SDK_VERSION_CODES.LOLLIPOP
-ANDROID_SDK_BUILD_TOOLS_VERSION = '21.0.1'
+ANDROID_SDK_VERSION = ANDROID_SDK_VERSION_CODES.LOLLIPOP_MR1
+ANDROID_SDK_BUILD_TOOLS_VERSION = '22.0.0'
ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT,
'third_party/android_tools/sdk')
ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT,
diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py
index b6fd732..292752a 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -13,7 +13,9 @@
import logging
import multiprocessing
import os
+import posixpath
import re
+import shutil
import sys
import tempfile
import time
@@ -129,6 +131,7 @@
class DeviceUtils(object):
_MAX_ADB_COMMAND_LENGTH = 512
+ _MAX_ADB_OUTPUT_LENGTH = 32768
_VALID_SHELL_VARIABLE = re.compile('^[a-zA-Z_][a-zA-Z0-9_]*$')
# Property in /data/local.prop that controls Java assertions.
@@ -937,6 +940,21 @@
os.makedirs(dirname)
self.adb.Pull(device_path, host_path)
+ def _ReadFileWithPull(self, device_path):
+ try:
+ d = tempfile.mkdtemp()
+ host_temp_path = os.path.join(d, 'tmp_ReadFileWithPull')
+ self.adb.Pull(device_path, host_temp_path)
+ with open(host_temp_path, 'r') as host_temp:
+ return host_temp.read()
+ finally:
+ if os.path.exists(d):
+ shutil.rmtree(d)
+
+ _LS_RE = re.compile(
+ r'(?P<perms>\S+) +(?P<owner>\S+) +(?P<group>\S+) +(?:(?P<size>\d+) +)?'
+ + r'(?P<date>\S+) +(?P<time>\S+) +(?P<name>.+)$')
+
@decorators.WithTimeoutAndRetriesFromInstance()
def ReadFile(self, device_path, as_root=False,
timeout=None, retries=None):
@@ -960,8 +978,29 @@
CommandTimeoutError on timeout.
DeviceUnreachableError on missing device.
"""
- return _JoinLines(self.RunShellCommand(
- ['cat', device_path], as_root=as_root, check_return=True))
+ # TODO(jbudorick): Implement a generic version of Stat() that handles
+ # as_root=True, then switch this implementation to use that.
+ size = None
+ ls_out = self.RunShellCommand(['ls', '-l', device_path], as_root=as_root,
+ check_return=True)
+ for line in ls_out:
+ m = self._LS_RE.match(line)
+ if m and m.group('name') == posixpath.basename(device_path):
+ size = int(m.group('size'))
+ break
+ else:
+ logging.warning('Could not determine size of %s.', device_path)
+
+ if size is None or size <= self._MAX_ADB_OUTPUT_LENGTH:
+ return _JoinLines(self.RunShellCommand(
+ ['cat', device_path], as_root=as_root, check_return=True))
+ elif as_root and self.NeedsSU():
+ with device_temp_file.DeviceTempFile(self.adb) as device_temp:
+ self.RunShellCommand(['cp', device_path, device_temp.name],
+ as_root=True, check_return=True)
+ return self._ReadFileWithPull(device_temp.name)
+ else:
+ return self._ReadFileWithPull(device_path)
def _WriteFileWithPush(self, device_path, contents):
with tempfile.NamedTemporaryFile() as host_temp:
diff --git a/build/android/pylib/device/device_utils_test.py b/build/android/pylib/device/device_utils_test.py
index b7e807e..7c20f0d 100755
--- a/build/android/pylib/device/device_utils_test.py
+++ b/build/android/pylib/device/device_utils_test.py
@@ -1046,31 +1046,100 @@
class DeviceUtilsReadFileTest(DeviceUtilsTest):
+ def testReadFileWithPull_success(self):
+ tmp_host_dir = '/tmp/dir/on.host/'
+ tmp_host = MockTempFile('/tmp/dir/on.host/tmp_ReadFileWithPull')
+ tmp_host.file.read.return_value = 'some interesting contents'
+ with self.assertCalls(
+ (mock.call.tempfile.mkdtemp(), tmp_host_dir),
+ (self.call.adb.Pull('/path/to/device/file', mock.ANY)),
+ (mock.call.__builtin__.open(mock.ANY, 'r'), tmp_host),
+ (mock.call.os.path.exists(tmp_host_dir), True),
+ (mock.call.shutil.rmtree(tmp_host_dir), None)):
+ self.assertEquals('some interesting contents',
+ self.device._ReadFileWithPull('/path/to/device/file'))
+ tmp_host.file.read.assert_called_once_with()
+
+ def testReadFileWithPull_rejected(self):
+ tmp_host_dir = '/tmp/dir/on.host/'
+ with self.assertCalls(
+ (mock.call.tempfile.mkdtemp(), tmp_host_dir),
+ (self.call.adb.Pull('/path/to/device/file', mock.ANY),
+ self.CommandError()),
+ (mock.call.os.path.exists(tmp_host_dir), True),
+ (mock.call.shutil.rmtree(tmp_host_dir), None)):
+ with self.assertRaises(device_errors.CommandFailedError):
+ self.device._ReadFileWithPull('/path/to/device/file')
+
def testReadFile_exists(self):
- with self.assertCall(
- self.call.adb.Shell('cat /read/this/test/file'),
- 'this is a test file\r\n'):
+ with self.assertCalls(
+ (self.call.device.RunShellCommand(
+ ['ls', '-l', '/read/this/test/file'],
+ as_root=False, check_return=True),
+ ['-rw-rw---- root foo 256 1970-01-01 00:00 file']),
+ (self.call.device.RunShellCommand(
+ ['cat', '/read/this/test/file'], as_root=False, check_return=True),
+ ['this is a test file'])):
self.assertEqual('this is a test file\n',
self.device.ReadFile('/read/this/test/file'))
def testReadFile_doesNotExist(self):
with self.assertCall(
- self.call.adb.Shell('cat /this/file/does.not.exist'),
- self.ShellError('/system/bin/sh: cat: /this/file/does.not.exist: '
- 'No such file or directory')):
- with self.assertRaises(device_errors.AdbCommandFailedError):
+ self.call.device.RunShellCommand(
+ ['ls', '-l', '/this/file/does.not.exist'],
+ as_root=False, check_return=True),
+ self.CommandError('File does not exist')):
+ with self.assertRaises(device_errors.CommandFailedError):
self.device.ReadFile('/this/file/does.not.exist')
def testReadFile_withSU(self):
with self.assertCalls(
- (self.call.device.NeedsSU(), True),
- (self.call.adb.Shell("su -c sh -c 'cat /this/file/can.be.read.with.su'"),
- 'this is a test file\nread with su')):
+ (self.call.device.RunShellCommand(
+ ['ls', '-l', '/this/file/can.be.read.with.su'],
+ as_root=True, check_return=True),
+ ['-rw------- root root 256 1970-01-01 00:00 can.be.read.with.su']),
+ (self.call.device.RunShellCommand(
+ ['cat', '/this/file/can.be.read.with.su'],
+ as_root=True, check_return=True),
+ ['this is a test file', 'read with su'])):
self.assertEqual(
'this is a test file\nread with su\n',
self.device.ReadFile('/this/file/can.be.read.with.su',
as_root=True))
+ def testReadFile_withPull(self):
+ contents = 'a' * 123456
+ with self.assertCalls(
+ (self.call.device.RunShellCommand(
+ ['ls', '-l', '/read/this/big/test/file'],
+ as_root=False, check_return=True),
+ ['-rw-rw---- root foo 123456 1970-01-01 00:00 file']),
+ (self.call.device._ReadFileWithPull('/read/this/big/test/file'),
+ contents)):
+ self.assertEqual(
+ contents, self.device.ReadFile('/read/this/big/test/file'))
+
+ def testReadFile_withPullAndSU(self):
+ contents = 'b' * 123456
+ with self.assertCalls(
+ (self.call.device.RunShellCommand(
+ ['ls', '-l', '/this/big/file/can.be.read.with.su'],
+ as_root=True, check_return=True),
+ ['-rw------- root root 123456 1970-01-01 00:00 can.be.read.with.su']),
+ (self.call.device.NeedsSU(), True),
+ (mock.call.pylib.utils.device_temp_file.DeviceTempFile(self.adb),
+ MockTempFile('/sdcard/tmp/on.device')),
+ self.call.device.RunShellCommand(
+ ['cp', '/this/big/file/can.be.read.with.su',
+ '/sdcard/tmp/on.device'],
+ as_root=True, check_return=True),
+ (self.call.device._ReadFileWithPull('/sdcard/tmp/on.device'),
+ contents)):
+ self.assertEqual(
+ contents,
+ self.device.ReadFile('/this/big/file/can.be.read.with.su',
+ as_root=True))
+
class DeviceUtilsWriteFileTest(DeviceUtilsTest):
diff --git a/build/android/tombstones.py b/build/android/tombstones.py
index 7449a73..9b8a8b2 100755
--- a/build/android/tombstones.py
+++ b/build/android/tombstones.py
@@ -18,9 +18,12 @@
import optparse
from pylib import android_commands
+from pylib.device import device_errors
from pylib.device import device_utils
+_TZ_UTC = {'TZ': 'UTC'}
+
def _ListTombstones(device):
"""List the tombstone files on the device.
@@ -30,7 +33,9 @@
Yields:
Tuples of (tombstone filename, date time of file on device).
"""
- lines = device.RunShellCommand('TZ=UTC su -c ls -a -l /data/tombstones')
+ lines = device.RunShellCommand(
+ ['ls', '-a', '-l', '/data/tombstones'],
+ as_root=True, check_return=True, env=_TZ_UTC, timeout=60)
for line in lines:
if 'tombstone' in line and not 'No such file or directory' in line:
details = line.split()
@@ -48,7 +53,8 @@
Returns:
A datetime instance.
"""
- device_now_string = device.RunShellCommand('TZ=UTC date')
+ device_now_string = device.RunShellCommand(
+ ['date'], check_return=True, env=_TZ_UTC)
return datetime.datetime.strptime(
device_now_string[0], '%a %b %d %H:%M:%S %Z %Y')
@@ -75,7 +81,8 @@
tombstone_file: the tombstone to delete.
"""
return device.RunShellCommand(
- 'rm /data/tombstones/' + tombstone_file, as_root=True)
+ ['rm', '/data/tombstones/' + tombstone_file],
+ as_root=True, check_return=True)
def _DeviceAbiToArch(device_abi):
@@ -172,14 +179,21 @@
tombstones = all_tombstones if options.all_tombstones else [all_tombstones[0]]
device_now = _GetDeviceDateTime(device)
- for tombstone_file, tombstone_time in tombstones:
- ret += [{'serial': str(device),
- 'device_abi': device.product_cpu_abi,
- 'device_now': device_now,
- 'time': tombstone_time,
- 'file': tombstone_file,
- 'stack': options.stack,
- 'data': _GetTombstoneData(device, tombstone_file)}]
+ try:
+ for tombstone_file, tombstone_time in tombstones:
+ ret += [{'serial': str(device),
+ 'device_abi': device.product_cpu_abi,
+ 'device_now': device_now,
+ 'time': tombstone_time,
+ 'file': tombstone_file,
+ 'stack': options.stack,
+ 'data': _GetTombstoneData(device, tombstone_file)}]
+ except device_errors.CommandFailedError:
+ for line in device.RunShellCommand(
+ ['ls', '-a', '-l', '/data/tombstones'],
+ as_root=True, check_return=True, env=_TZ_UTC, timeout=60):
+ print '%s: %s' % (str(device), line)
+ raise
# Erase all the tombstones if desired.
if options.wipe_tombstones:
diff --git a/build/common.gypi b/build/common.gypi
index 043dd92..61224ba 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -581,7 +581,7 @@
# Use experimental lld linker instead of the platform's default linker.
'use_lld%': 0,
- # Enable plug-in installation by default.
+ # Enable plugin installation by default.
'enable_plugin_installation%': 1,
# Specifies whether to use canvas_skia.cc in place of platform
@@ -603,9 +603,6 @@
# Supervised users are enabled by default.
'enable_supervised_users%': 1,
- # Platform natively supports discardable memory.
- 'native_discardable_memory%': 0,
-
# Platform sends memory pressure signals natively.
'native_memory_pressure_signals%': 0,
@@ -760,7 +757,6 @@
'remoting%': 0,
'arm_neon%': 0,
'arm_neon_optional%': 1,
- 'native_discardable_memory%': 1,
'native_memory_pressure_signals%': 1,
'enable_basic_printing%': 1,
'enable_print_preview%': 0,
@@ -1201,7 +1197,6 @@
'google_default_client_id%': '<(google_default_client_id)',
'google_default_client_secret%': '<(google_default_client_secret)',
'enable_supervised_users%': '<(enable_supervised_users)',
- 'native_discardable_memory%': '<(native_discardable_memory)',
'native_memory_pressure_signals%': '<(native_memory_pressure_signals)',
'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)',
@@ -1502,6 +1497,7 @@
# Ozone platforms to include in the build.
'ozone_platform_caca%': 0,
'ozone_platform_dri%': 0,
+ 'ozone_platform_drm%': 0,
'ozone_platform_egltest%': 0,
'ozone_platform_gbm%': 0,
'ozone_platform_ozonex%': 0,
@@ -1523,7 +1519,7 @@
'dont_embed_build_metadata%': 0,
}],
# Enable the Syzygy optimization step for the official builds.
- ['OS=="win" and buildtype=="Official" and syzyasan!=1', {
+ ['OS=="win" and buildtype=="Official" and syzyasan!=1 and clang!=1', {
'syzygy_optimize%': 1,
}, {
'syzygy_optimize%': 0,
@@ -1686,8 +1682,8 @@
'android_ndk_absolute_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
'android_host_arch%': '<!(uname -m)',
# Android API-level of the SDK used for compilation.
- 'android_sdk_version%': '21',
- 'android_sdk_build_tools_version%': '21.0.1',
+ 'android_sdk_version%': '22',
+ 'android_sdk_build_tools_version%': '22.0.0',
'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')",
},
# Copy conditionally-set variables out one scope.
@@ -1955,7 +1951,9 @@
'win_use_allocator_shim%': 0,
}],
['syzyasan==1', {
- 'kasko%': 1,
+ # Uncomment the following line to enable Kasko for
+ # SyzyASAN-instrumented releases.
+ # 'kasko%': 1,
}],
['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
# Only enabled by default for ninja because it's buggy in VS.
@@ -2350,6 +2348,7 @@
# Build all platforms whose deps are in install-build-deps.sh.
# Only these platforms will be compile tested by buildbots.
'ozone_platform_dri%': 1,
+ 'ozone_platform_drm%': 1,
'ozone_platform_test%': 1,
'ozone_platform_egltest%': 1,
}],
@@ -2719,9 +2718,6 @@
['enable_hidpi==1', {
'defines': ['ENABLE_HIDPI=1'],
}],
- ['native_discardable_memory==1', {
- 'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'],
- }],
['native_memory_pressure_signals==1', {
'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'],
}],
diff --git a/build/config/android/config.gni b/build/config/android/config.gni
index cebf4de..5a27e78 100644
--- a/build/config/android/config.gni
+++ b/build/config/android/config.gni
@@ -16,8 +16,8 @@
if (!defined(default_android_sdk_root)) {
default_android_sdk_root = "//third_party/android_tools/sdk"
- default_android_sdk_version = "21"
- default_android_sdk_build_tools_version = "21.0.1"
+ default_android_sdk_version = "22"
+ default_android_sdk_build_tools_version = "22.0.0"
}
if (!defined(google_play_services_library)) {
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index 28608cb..a056997 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -1216,6 +1216,11 @@
invoker.enable_relocation_packing) {
_enable_relocation_packing = true
}
+
+ _native_lib_version_name = ""
+ if (defined(invoker.native_lib_version_name)) {
+ _native_lib_version_name = invoker.native_lib_version_name
+ }
}
_rebased_build_config = rebase_path(_build_config, root_build_dir)
@@ -1252,8 +1257,6 @@
_enable_chromium_linker_tests = invoker.enable_chromium_linker_tests
}
- _native_lib_version_name = ""
-
java_cpp_template("${_template_name}__native_libraries_java") {
package_name = "org/chromium/base/library_loader"
sources = [
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index f75ad06..42dc584 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -726,6 +726,7 @@
if (is_win) {
cflags = [
"/WX", # Treat warnings as errors.
+
# Warnings permanently disabled:
# TODO(GYP) The GYP build doesn't have this globally enabled but disabled
@@ -780,6 +781,7 @@
# have to turn off this warning (and be careful about how object
# destruction happens in such cases).
"/wd4611",
+
# Warnings to evaluate and possibly fix/reenable later:
"/wd4100", # Unreferenced formal function parameter.
@@ -923,6 +925,8 @@
#
# Note that this can be applied regardless of platform and architecture to
# clean up the call sites. This will only apply the flag when necessary.
+#
+# TODO(jschuh): crbug.com/167187 fix this and delete this config.
config("no_size_t_to_int_warning") {
if (is_win && current_cpu == "x64") {
cflags = [ "/wd4267" ]
diff --git a/build/config/features.gni b/build/config/features.gni
index ee61da5..783e32d 100644
--- a/build/config/features.gni
+++ b/build/config/features.gni
@@ -72,6 +72,8 @@
enable_google_now = !is_ios && !is_android
enable_one_click_signin = is_win || is_mac || (is_linux && !is_chromeos)
+
+ enable_remoting = !is_ios && !is_android
}
# Additional dependent variables -----------------------------------------------
@@ -158,8 +160,6 @@
# Image loader extension is enabled on ChromeOS only.
enable_image_loader_extension = is_chromeos
-enable_remoting = !is_ios && !is_android
-
# Chrome OS: whether to also build the upcoming version of
# ChromeVox, which can then be enabled via a command-line switch.
enable_chromevox_next = false
diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn
index 202fd73..3d65937 100644
--- a/build/config/linux/BUILD.gn
+++ b/build/config/linux/BUILD.gn
@@ -35,6 +35,25 @@
}
}
+pkg_config("atk") {
+ packages = [ "atk" ]
+ atk_lib_dir = exec_script(pkg_config_script,
+ [
+ "--libdir",
+ "atk",
+ ],
+ "string")
+ defines = [ "ATK_LIB_DIR=\"$atk_lib_dir\"" ]
+}
+
+# gn orders flags on a target before flags from configs. The default config
+# adds -Wall, and these flags have to be after -Wall -- so they need to come
+# from a config and can't be on the target directly.
+config("atk_warnings") {
+ # glib uses the pre-c++11 typedef-as-static_assert hack.
+ cflags = [ "-Wno-unused-local-typedef" ]
+}
+
config("fontconfig") {
libs = [ "fontconfig" ]
}
diff --git a/build/config/linux/pkg-config.py b/build/config/linux/pkg-config.py
index a4f4703..fadcc0b 100644
--- a/build/config/linux/pkg-config.py
+++ b/build/config/linux/pkg-config.py
@@ -112,6 +112,7 @@
parser.add_option('-a', action='store', dest='arch', type='string')
parser.add_option('--atleast-version', action='store',
dest='atleast_version', type='string')
+parser.add_option('--libdir', action='store_true', dest='libdir')
(options, args) = parser.parse_args()
# Make a list of regular expressions to strip out.
@@ -138,6 +139,18 @@
print "false"
sys.exit(0)
+if options.libdir:
+ try:
+ libdir = subprocess.check_output([options.pkg_config,
+ "--variable=libdir"] +
+ args,
+ env=os.environ)
+ except:
+ print "Error from pkg-config."
+ sys.exit(1)
+ sys.stdout.write(libdir.strip())
+ sys.exit(0)
+
try:
flag_string = subprocess.check_output(
[ options.pkg_config, "--cflags", "--libs-only-l", "--libs-only-L" ] +
diff --git a/build/filename_rules.gypi b/build/filename_rules.gypi
index bc657d8..48c8027 100644
--- a/build/filename_rules.gypi
+++ b/build/filename_rules.gypi
@@ -106,11 +106,6 @@
['exclude', '(^|/)evdev/'],
]
}],
- ['<(ozone_platform_dri)==0 or >(nacl_untrusted_build)==1', {
- 'sources/': [ ['exclude', '_dri(_browsertest|_unittest)?\\.(h|cc)$'],
- ['exclude', '(^|/)dri/'],
- ]
- }],
['<(use_pango)==0', {
'sources/': [ ['exclude', '(^|_)pango(_util|_browsertest|_unittest)?\\.(h|cc)$'], ],
}],
diff --git a/build/gn_migration.gypi b/build/gn_migration.gypi
index 92c050f..8413002 100644
--- a/build/gn_migration.gypi
+++ b/build/gn_migration.gypi
@@ -112,6 +112,10 @@
'../net/net.gyp:dump_cache',
'../net/net.gyp:gdig',
'../net/net.gyp:get_server_time',
+ '../net/net.gyp:hpack_example_generator',
+ '../net/net.gyp:hpack_fuzz_mutator',
+ '../net/net.gyp:hpack_fuzz_wrapper',
+ '../net/net.gyp:net_perftests',
'../net/net.gyp:net_unittests',
'../net/net.gyp:net_watcher', # TODO(GYP): This should be conditional on use_v8_in_net
'../net/net.gyp:run_testserver',
@@ -227,7 +231,7 @@
}],
['OS=="android"', {
'dependencies': [
- '../base/base.gyp:chromium_android_linker',
+ '../base/base.gyp:chromium_android_linker',
'../breakpad/breakpad.gyp:dump_syms',
'../build/android/rezip.gyp:rezip_apk_jar',
'../chrome/chrome.gyp:chrome_shell_apk',
@@ -235,7 +239,7 @@
#"//clank" TODO(GYP) - conditional somehow?
'../tools/imagediff/image_diff.gyp:image_diff#host',
'../tools/telemetry/telemetry.gyp:bitmaptools#host',
-
+
# TODO(GYP): Remove these when the components_unittests work.
#"//components/history/core/test:test",
#"//components/policy:policy_component_test_support",
@@ -247,7 +251,7 @@
#"//components/wallpaper",
'../content/content_shell_and_tests.gyp:content_shell_apk',
-
+
# TODO(GYP): Are these needed, or will they be pulled in automatically?
#"//third_party/android_tools:android_gcm_java",
#"//third_party/android_tools:uiautomator_java",
@@ -408,7 +412,6 @@
'../device/device_tests.gyp:device_unittests',
'../gin/gin.gyp:gin_v8_snapshot_fingerprint',
'../gin/gin.gyp:gin_shell',
- '../google_apis/gcm/gcm.gyp:mcs_probe',
'../gpu/gpu.gyp:gl_tests',
'../gpu/gles2_conform_support/gles2_conform_support.gyp:gles2_conform_support',
'../gpu/gles2_conform_support/gles2_conform_test.gyp:gles2_conform_test',
@@ -418,10 +421,6 @@
'../media/cast/cast.gyp:generate_timecode_audio',
'../media/cast/cast.gyp:tap_proxy',
'../mojo/mojo_base.gyp:mojo_application_chromium',
- '../net/net.gyp:hpack_example_generator',
- '../net/net.gyp:hpack_fuzz_mutator',
- '../net/net.gyp:hpack_fuzz_wrapper',
- '../net/net.gyp:net_perftests',
'../ppapi/ppapi_internal.gyp:ppapi_unittests',
'../ppapi/tools/ppapi_tools.gyp:pepper_hash_for_uma',
'../sandbox/sandbox.gyp:sandbox_linux_jni_unittests',
diff --git a/build/gyp_helper.py b/build/gyp_helper.py
index a2cc7e1..9be2b9e 100644
--- a/build/gyp_helper.py
+++ b/build/gyp_helper.py
@@ -44,11 +44,17 @@
if var in os.environ:
behavior = 'replaces'
if var == 'GYP_DEFINES':
- os.environ[var] = file_val + ' ' + os.environ[var]
- behavior = 'overrides'
+ result = file_val + ' ' + os.environ[var]
+ behavior = 'merges with, and individual components override,'
+ else:
+ result = os.environ[var]
print 'INFO: Environment value for "%s" %s value in %s' % (
var, behavior, os.path.abspath(file_path)
)
+ string_padding = max(len(var), len(file_path), len('result'))
+ print ' %s: %s' % (var.rjust(string_padding), os.environ[var])
+ print ' %s: %s' % (file_path.rjust(string_padding), file_val)
+ os.environ[var] = result
else:
os.environ[var] = file_val
diff --git a/build/install-build-deps.sh b/build/install-build-deps.sh
index 43b5545..32dd744 100755
--- a/build/install-build-deps.sh
+++ b/build/install-build-deps.sh
@@ -102,16 +102,15 @@
language-pack-fr language-pack-he language-pack-zh-hant
libapache2-mod-php5 libasound2-dev libbrlapi-dev libav-tools
libbz2-dev libcairo2-dev libcap-dev libcups2-dev libcurl4-gnutls-dev
- libdrm-dev libelf-dev libexif-dev libgconf2-dev libgl1-mesa-dev
- libglib2.0-dev libglu1-mesa-dev libgnome-keyring-dev libgtk2.0-dev
- libkrb5-dev libnspr4-dev libnss3-dev libpam0g-dev libpci-dev
- libpulse-dev libsctp-dev libspeechd-dev libsqlite3-dev libssl-dev
- libudev-dev libwww-perl libxslt1-dev libxss-dev libxt-dev libxtst-dev
- mesa-common-dev openbox patch perl php5-cgi pkg-config python
- python-cherrypy3 python-crypto python-dev python-numpy python-opencv
- python-openssl python-psutil rpm ruby subversion ttf-dejavu-core
- ttf-indic-fonts ttf-kochi-gothic ttf-kochi-mincho wdiff xfonts-mathml
- zip $chromeos_dev_list"
+ libdrm-dev libelf-dev libexif-dev libgconf2-dev libglib2.0-dev
+ libglu1-mesa-dev libgnome-keyring-dev libgtk2.0-dev libkrb5-dev
+ libnspr4-dev libnss3-dev libpam0g-dev libpci-dev libpulse-dev
+ libsctp-dev libspeechd-dev libsqlite3-dev libssl-dev libudev-dev
+ libwww-perl libxslt1-dev libxss-dev libxt-dev libxtst-dev openbox
+ patch perl php5-cgi pkg-config python python-cherrypy3 python-crypto
+ python-dev python-numpy python-opencv python-openssl python-psutil
+ rpm ruby subversion ttf-dejavu-core ttf-indic-fonts ttf-kochi-gothic
+ ttf-kochi-mincho wdiff xfonts-mathml zip $chromeos_dev_list"
# 64-bit systems need a minimum set of 32-bit compat packages for the pre-built
# NaCl binaries.
@@ -164,14 +163,16 @@
# it depends on mesa, and only one version of mesa can exists on the system.
# Hence we must match the same version or this entire script will fail.
mesa_variant=""
-for variant in "-lts-quantal" "-lts-raring" "-lts-saucy" "-lts-trusty"; do
+for variant in "-lts-quantal" "-lts-raring" "-lts-saucy" "-lts-trusty" \
+ "-lts-utopic"; do
if $(dpkg-query -Wf'${Status}' libgl1-mesa-glx${variant} 2>/dev/null | \
grep -q " ok installed"); then
mesa_variant="${variant}"
fi
done
dev_list="${dev_list} libgbm-dev${mesa_variant}
- libgles2-mesa-dev${mesa_variant}"
+ libgles2-mesa-dev${mesa_variant} libgl1-mesa-dev${mesa_variant}
+ mesa-common-dev${mesa_variant}"
nacl_list="${nacl_list} libgl1-mesa-glx${mesa_variant}:i386"
# Some package names have changed over time
diff --git a/build/ios/grit_whitelist.txt b/build/ios/grit_whitelist.txt
index 0d19361..28407eb 100644
--- a/build/ios/grit_whitelist.txt
+++ b/build/ios/grit_whitelist.txt
@@ -273,7 +273,6 @@
IDS_CRASHES_NO_CRASHES_MESSAGE
IDS_CRASHES_TITLE
IDS_CRASHES_UPLOAD_MESSAGE
-IDS_CREDIT_CARD_NUMBER_PREVIEW_FORMAT
IDS_DATA_REDUCTION_PROXY_BACK_BUTTON
IDS_DATA_REDUCTION_PROXY_CANNOT_PROXY_HEADING
IDS_DATA_REDUCTION_PROXY_CANNOT_PROXY_PRIMARY_PARAGRAPH
diff --git a/build/linux/system.gyp b/build/linux/system.gyp
index a71a5c5..5333798 100644
--- a/build/linux/system.gyp
+++ b/build/linux/system.gyp
@@ -91,6 +91,30 @@
# added back to Chrome OS and Ozone. Don't try to use GTK on Chrome OS and Ozone.
'targets': [
{
+ 'target_name': 'atk',
+ 'type': 'none',
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags atk)',
+ ],
+ 'defines': [
+ 'ATK_LIB_DIR="<!@(<(pkg-config) --variable=libdir atk)"',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other atk)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l atk)',
+ ],
+ },
+ }],
+ ],
+ },
+ {
'target_name': 'gdk',
'type': 'none',
'conditions': [
@@ -508,7 +532,7 @@
},
],
}],
- ['ozone_platform_dri==1 or ozone_platform_gbm==1', {
+ ['ozone_platform_dri==1 or ozone_platform_drm==1 or ozone_platform_gbm==1', {
'targets': [
{
'target_name': 'libdrm',
diff --git a/build/secondary/tools/grit/grit_rule.gni b/build/secondary/tools/grit/grit_rule.gni
index 626fd74..777c3dc 100644
--- a/build/secondary/tools/grit/grit_rule.gni
+++ b/build/secondary/tools/grit/grit_rule.gni
@@ -364,8 +364,21 @@
action(grit_custom_target) {
script = "//tools/grit/grit.py"
inputs = grit_inputs
- outputs = grit_outputs
- depfile = "$output_dir/${grit_output_name}.d"
+
+ # TODO(knn): Remove this once grit has rolled to recognize the flag.
+ depend_on_stamp =
+ defined(invoker.depend_on_stamp) && invoker.depend_on_stamp
+ if (depend_on_stamp) {
+ # Need this for migrating existing targets without clobbering.
+ depfile = "$output_dir/${grit_output_name}_stamp.d"
+ outputs = [
+ "${depfile}.stamp",
+ ]
+ } else {
+ depfile = "$output_dir/${grit_output_name}.d"
+ outputs = []
+ }
+ outputs += grit_outputs
args = [
"-i",
@@ -379,14 +392,18 @@
]
}
args += [
- "-o",
- rebased_output_dir,
- "--depdir",
- ".",
- "--depfile",
- rebase_path(depfile, root_build_dir),
- "--write-only-new=1",
- ] + grit_defines
+ "-o",
+ rebased_output_dir,
+ "--depdir",
+ ".",
+ "--depfile",
+ rebase_path(depfile, root_build_dir),
+ "--write-only-new=1",
+ ]
+ if (depend_on_stamp) {
+ args += [ "--depend-on-stamp" ]
+ }
+ args += grit_defines
# Add extra defines with -D flags.
if (defined(invoker.defines)) {
diff --git a/build/whitespace_file.txt b/build/whitespace_file.txt
index 7191150..ea82f4e 100644
--- a/build/whitespace_file.txt
+++ b/build/whitespace_file.txt
@@ -152,3 +152,5 @@
In the BUILD we trust.
^_^
+
+In the masters we don't.
diff --git a/cc/BUILD.gn b/cc/BUILD.gn
index 4ee07db..ad33651 100644
--- a/cc/BUILD.gn
+++ b/cc/BUILD.gn
@@ -38,39 +38,6 @@
"animation/transform_operation.h",
"animation/transform_operations.cc",
"animation/transform_operations.h",
- "base/completion_event.h",
- "base/delayed_unique_notifier.cc",
- "base/delayed_unique_notifier.h",
- "base/invalidation_region.cc",
- "base/invalidation_region.h",
- "base/latency_info_swap_promise.cc",
- "base/latency_info_swap_promise.h",
- "base/latency_info_swap_promise_monitor.cc",
- "base/latency_info_swap_promise_monitor.h",
- "base/math_util.cc",
- "base/math_util.h",
- "base/ref_counted_managed.h",
- "base/region.cc",
- "base/region.h",
- "base/rolling_time_delta_history.cc",
- "base/rolling_time_delta_history.h",
- "base/scoped_ptr_algorithm.h",
- "base/scoped_ptr_deque.h",
- "base/scoped_ptr_vector.h",
- "base/simple_enclosed_region.cc",
- "base/simple_enclosed_region.h",
- "base/swap_promise.h",
- "base/swap_promise_monitor.cc",
- "base/swap_promise_monitor.h",
- "base/switches.cc",
- "base/switches.h",
- "base/synced_property.h",
- "base/tiling_data.cc",
- "base/tiling_data.h",
- "base/time_util.h",
- "base/unique_notifier.cc",
- "base/unique_notifier.h",
- "base/util.h",
"debug/benchmark_instrumentation.cc",
"debug/benchmark_instrumentation.h",
"debug/debug_colors.cc",
@@ -260,6 +227,8 @@
"output/gl_renderer.h",
"output/gl_renderer_draw_cache.cc",
"output/gl_renderer_draw_cache.h",
+ "output/latency_info_swap_promise.cc",
+ "output/latency_info_swap_promise.h",
"output/managed_memory_policy.cc",
"output/managed_memory_policy.h",
"output/output_surface.cc",
@@ -278,6 +247,8 @@
"output/render_surface_filters.h",
"output/renderer.cc",
"output/renderer.h",
+ "output/renderer_capabilities.cc",
+ "output/renderer_capabilities.h",
"output/renderer_settings.cc",
"output/renderer_settings.h",
"output/shader.cc",
@@ -290,6 +261,7 @@
"output/software_renderer.h",
"output/static_geometry_binding.cc",
"output/static_geometry_binding.h",
+ "output/swap_promise.h",
"output/viewport_selection_bound.cc",
"output/viewport_selection_bound.h",
"output/vsync_parameter_observer.h",
@@ -499,6 +471,8 @@
"trees/damage_tracker.h",
"trees/draw_property_utils.cc",
"trees/draw_property_utils.h",
+ "trees/latency_info_swap_promise_monitor.cc",
+ "trees/latency_info_swap_promise_monitor.h",
"trees/layer_tree_host.cc",
"trees/layer_tree_host.h",
"trees/layer_tree_host_client.h",
@@ -526,6 +500,8 @@
"trees/scoped_abort_remaining_swap_promises.h",
"trees/single_thread_proxy.cc",
"trees/single_thread_proxy.h",
+ "trees/swap_promise_monitor.cc",
+ "trees/swap_promise_monitor.h",
"trees/thread_proxy.cc",
"trees/thread_proxy.h",
"trees/tree_synchronizer.cc",
@@ -536,6 +512,7 @@
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
public_deps = [
+ "//cc/base",
"//skia",
]
deps = [
diff --git a/cc/base/BUILD.gn b/cc/base/BUILD.gn
new file mode 100644
index 0000000..203f84a
--- /dev/null
+++ b/cc/base/BUILD.gn
@@ -0,0 +1,51 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+source_set("base") {
+ visibility = [ "//cc" ]
+
+ sources = [
+ "completion_event.h",
+ "delayed_unique_notifier.cc",
+ "delayed_unique_notifier.h",
+ "invalidation_region.cc",
+ "invalidation_region.h",
+ "math_util.cc",
+ "math_util.h",
+ "ref_counted_managed.h",
+ "region.cc",
+ "region.h",
+ "rolling_time_delta_history.cc",
+ "rolling_time_delta_history.h",
+ "scoped_ptr_algorithm.h",
+ "scoped_ptr_deque.h",
+ "scoped_ptr_vector.h",
+ "simple_enclosed_region.cc",
+ "simple_enclosed_region.h",
+ "switches.cc",
+ "switches.h",
+ "synced_property.h",
+ "tiling_data.cc",
+ "tiling_data.h",
+ "time_util.h",
+ "unique_notifier.cc",
+ "unique_notifier.h",
+ "util.h",
+ ]
+
+ deps = [
+ "//base",
+ "//base/third_party/dynamic_annotations",
+ "//skia",
+ "//ui/gfx",
+ "//ui/gfx/geometry",
+ ]
+
+ defines = [ "CC_IMPLEMENTATION=1" ]
+
+ if (!is_debug && (is_win || is_android)) {
+ configs -= [ "//build/config/compiler:optimize" ]
+ configs += [ "//build/config/compiler:optimize_max" ]
+ }
+}
diff --git a/cc/base/DEPS b/cc/base/DEPS
new file mode 100644
index 0000000..33b4e8f
--- /dev/null
+++ b/cc/base/DEPS
@@ -0,0 +1,12 @@
+# Things within cc/base should not depend on things in cc/ outside of cc/base.
+include_rules = [
+ "-cc",
+ "+cc/base",
+]
+
+# Tests can use things in cc/test
+specific_include_rules = {
+ ".*unittest\.cc": [
+ "+cc/test",
+ ]
+}
diff --git a/cc/base/latency_info_swap_promise.cc b/cc/base/latency_info_swap_promise.cc
deleted file mode 100644
index 8c6ee0e..0000000
--- a/cc/base/latency_info_swap_promise.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "cc/base/latency_info_swap_promise.h"
-
-#include "base/logging.h"
-
-namespace {
- ui::LatencyComponentType DidNotSwapReasonToLatencyComponentType(
- cc::SwapPromise::DidNotSwapReason reason) {
- switch (reason) {
- case cc::SwapPromise::DID_NOT_SWAP_UNKNOWN:
- case cc::SwapPromise::SWAP_FAILS:
- return ui::INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT;
- case cc::SwapPromise::COMMIT_FAILS:
- return ui::INPUT_EVENT_LATENCY_TERMINATED_COMMIT_FAILED_COMPONENT;
- case cc::SwapPromise::COMMIT_NO_UPDATE:
- return ui::INPUT_EVENT_LATENCY_TERMINATED_COMMIT_NO_UPDATE_COMPONENT;
- }
- NOTREACHED() << "Unhandled DidNotSwapReason.";
- return ui::INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT;
- }
-} // namespace
-
-namespace cc {
-
-LatencyInfoSwapPromise::LatencyInfoSwapPromise(const ui::LatencyInfo& latency)
- : latency_(latency) {
-}
-
-LatencyInfoSwapPromise::~LatencyInfoSwapPromise() {
-}
-
-void LatencyInfoSwapPromise::DidSwap(CompositorFrameMetadata* metadata) {
- DCHECK(!latency_.terminated);
- metadata->latency_info.push_back(latency_);
-}
-
-void LatencyInfoSwapPromise::DidNotSwap(DidNotSwapReason reason) {
- latency_.AddLatencyNumber(DidNotSwapReasonToLatencyComponentType(reason),
- 0, 0);
- // TODO(miletus): Turn this back on once per-event LatencyInfo tracking
- // is enabled in GPU side.
- // DCHECK(latency_.terminated);
-}
-
-int64 LatencyInfoSwapPromise::TraceId() const {
- return latency_.trace_id;
-}
-
-} // namespace cc
diff --git a/cc/cc.gyp b/cc/cc.gyp
index bc83b1f..c796e7d 100644
--- a/cc/cc.gyp
+++ b/cc/cc.gyp
@@ -69,10 +69,6 @@
'base/delayed_unique_notifier.h',
'base/invalidation_region.cc',
'base/invalidation_region.h',
- 'base/latency_info_swap_promise.cc',
- 'base/latency_info_swap_promise.h',
- 'base/latency_info_swap_promise_monitor.cc',
- 'base/latency_info_swap_promise_monitor.h',
'base/math_util.cc',
'base/math_util.h',
'base/ref_counted_managed.h',
@@ -85,9 +81,6 @@
'base/scoped_ptr_vector.h',
'base/simple_enclosed_region.cc',
'base/simple_enclosed_region.h',
- 'base/swap_promise.h',
- 'base/swap_promise_monitor.cc',
- 'base/swap_promise_monitor.h',
'base/switches.cc',
'base/switches.h',
'base/synced_property.h',
@@ -293,6 +286,8 @@
'output/gl_renderer.h',
'output/gl_renderer_draw_cache.cc',
'output/gl_renderer_draw_cache.h',
+ 'output/latency_info_swap_promise.cc',
+ 'output/latency_info_swap_promise.h',
'output/managed_memory_policy.cc',
'output/managed_memory_policy.h',
'output/output_surface.cc',
@@ -311,6 +306,8 @@
'output/render_surface_filters.h',
'output/renderer.cc',
'output/renderer.h',
+ 'output/renderer_capabilities.cc',
+ 'output/renderer_capabilities.h',
'output/renderer_settings.cc',
'output/renderer_settings.h',
'output/shader.cc',
@@ -323,6 +320,7 @@
'output/software_renderer.h',
'output/static_geometry_binding.cc',
'output/static_geometry_binding.h',
+ 'output/swap_promise.h',
'output/viewport_selection_bound.cc',
'output/viewport_selection_bound.h',
'output/vsync_parameter_observer.h',
@@ -535,6 +533,8 @@
'trees/damage_tracker.h',
'trees/draw_property_utils.cc',
'trees/draw_property_utils.h',
+ 'trees/latency_info_swap_promise_monitor.cc',
+ 'trees/latency_info_swap_promise_monitor.h',
'trees/layer_tree_host.cc',
'trees/layer_tree_host.h',
'trees/layer_tree_host_client.h',
@@ -562,6 +562,8 @@
'trees/scoped_abort_remaining_swap_promises.h',
'trees/single_thread_proxy.cc',
'trees/single_thread_proxy.h',
+ 'trees/swap_promise_monitor.cc',
+ 'trees/swap_promise_monitor.h',
'trees/thread_proxy.cc',
'trees/thread_proxy.h',
'trees/tree_synchronizer.cc',
diff --git a/cc/cc_unittests.isolate b/cc/cc_unittests.isolate
index 7c359d0..dc6c449 100644
--- a/cc/cc_unittests.isolate
+++ b/cc/cc_unittests.isolate
@@ -84,6 +84,5 @@
],
'includes': [
'../base/base.isolate',
- '../third_party/angle/angle.isolate',
],
}
diff --git a/cc/input/input_handler.h b/cc/input/input_handler.h
index 954f8d7..81d91b8 100644
--- a/cc/input/input_handler.h
+++ b/cc/input/input_handler.h
@@ -9,8 +9,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "cc/base/cc_export.h"
-#include "cc/base/swap_promise_monitor.h"
#include "cc/input/scrollbar.h"
+#include "cc/trees/swap_promise_monitor.h"
namespace gfx {
class Point;
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index bf2f26a..12773a1 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -52,6 +52,7 @@
transform_tree_index_(-1),
opacity_tree_index_(-1),
clip_tree_index_(-1),
+ should_flatten_transform_from_property_tree_(false),
should_scroll_on_main_thread_(false),
have_wheel_event_handlers_(false),
have_scroll_event_handlers_(false),
@@ -1294,6 +1295,8 @@
if (transform_tree_index() >= 0) {
gfx::Transform ssxform = tree.Node(transform_tree_index())->data.to_screen;
xform.ConcatTransform(ssxform);
+ if (should_flatten_transform_from_property_tree_)
+ xform.FlattenTo2d();
}
xform.Scale(1.0 / contents_scale_x(), 1.0 / contents_scale_y());
return xform;
@@ -1313,6 +1316,8 @@
// If you're not the root, or you don't own a surface, you need to apply
// your local offset.
xform = node->data.to_target;
+ if (should_flatten_transform_from_property_tree_)
+ xform.FlattenTo2d();
xform.Translate(offset_to_transform_parent().x(),
offset_to_transform_parent().y());
} else {
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index a82da24..e0288c7 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -174,6 +174,10 @@
void SetIsContainerForFixedPositionLayers(bool container);
bool IsContainerForFixedPositionLayers() const;
+ gfx::Vector2dF FixedContainerSizeDelta() const {
+ return gfx::Vector2dF();
+ }
+
void SetPositionConstraint(const LayerPositionConstraint& constraint);
const LayerPositionConstraint& position_constraint() const {
return position_constraint_;
@@ -504,6 +508,10 @@
const TransformTree& tree) const;
float DrawOpacityFromPropertyTrees(const OpacityTree& tree) const;
+ void set_should_flatten_transform_from_property_tree(bool should_flatten) {
+ should_flatten_transform_from_property_tree_ = should_flatten;
+ }
+
// TODO(vollick): These values are temporary and will be removed as soon as
// render surface determinations are moved out of CDP. They only exist because
// certain logic depends on whether or not a layer would render to a separate
@@ -654,6 +662,7 @@
int opacity_tree_index_;
int clip_tree_index_;
gfx::Vector2dF offset_to_transform_parent_;
+ bool should_flatten_transform_from_property_tree_ : 1;
bool should_scroll_on_main_thread_ : 1;
bool have_wheel_event_handlers_ : 1;
bool have_scroll_event_handlers_ : 1;
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index 80d36d8..672aab4 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -9,6 +9,7 @@
#include "cc/layers/picture_layer_impl.h"
#include "cc/resources/display_list_recording_source.h"
#include "cc/resources/picture_pile.h"
+#include "cc/trees/layer_tree_host.h"
#include "cc/trees/layer_tree_impl.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"
#include "ui/gfx/geometry/rect_conversions.h"
diff --git a/cc/layers/surface_layer.cc b/cc/layers/surface_layer.cc
index ab6289e..1a690b6 100644
--- a/cc/layers/surface_layer.cc
+++ b/cc/layers/surface_layer.cc
@@ -4,8 +4,8 @@
#include "cc/layers/surface_layer.h"
-#include "cc/base/swap_promise.h"
#include "cc/layers/surface_layer_impl.h"
+#include "cc/output/swap_promise.h"
#include "cc/trees/layer_tree_host.h"
namespace cc {
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 3813e1d..b49ac8e 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -2073,7 +2073,7 @@
// un-antialiased quad should have and which vertex this is and the float
// quad passed in via uniform is the actual geometry that gets used to draw
// it. This is why this centered rect is used and not the original quad_rect.
- gfx::RectF tile_rect = quad->visible_rect;
+ gfx::RectF tile_rect = quad->rect;
GLC(gl_, gl_->UniformMatrix3fv(yuv_matrix_location, 1, 0, yuv_to_rgb));
GLC(gl_, gl_->Uniform3fv(yuv_adj_location, 1, yuv_adjust));
diff --git a/cc/output/gl_renderer.cc.rej b/cc/output/gl_renderer.cc.rej
new file mode 100644
index 0000000..3cf4e17
--- /dev/null
+++ b/cc/output/gl_renderer.cc.rej
@@ -0,0 +1,9 @@
+diff a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc (rejected hunks)
+@@ -18,7 +18,6 @@
+ #include "build/build_config.h"
+ #include "base/trace_event/trace_event.h"
+ #include "cc/base/math_util.h"
+-#include "cc/layers/video_layer_impl.h"
+ #include "cc/output/compositor_frame.h"
+ #include "cc/output/compositor_frame_metadata.h"
+ #include "cc/output/context_provider.h"
diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc
index cec0882..62bff6f 100644
--- a/cc/output/gl_renderer_unittest.cc
+++ b/cc/output/gl_renderer_unittest.cc
@@ -169,7 +169,7 @@
namespace {
-#if !defined(OS_ANDROID)
+#if !defined(OS_ANDROID) && !defined(OS_WIN)
TEST_F(GLRendererShaderPixelTest, AllShadersCompile) { TestShaders(); }
#endif
diff --git a/cc/output/latency_info_swap_promise.cc b/cc/output/latency_info_swap_promise.cc
new file mode 100644
index 0000000..3c07162
--- /dev/null
+++ b/cc/output/latency_info_swap_promise.cc
@@ -0,0 +1,52 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/output/latency_info_swap_promise.h"
+
+#include "base/logging.h"
+
+namespace {
+ui::LatencyComponentType DidNotSwapReasonToLatencyComponentType(
+ cc::SwapPromise::DidNotSwapReason reason) {
+ switch (reason) {
+ case cc::SwapPromise::DID_NOT_SWAP_UNKNOWN:
+ case cc::SwapPromise::SWAP_FAILS:
+ return ui::INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT;
+ case cc::SwapPromise::COMMIT_FAILS:
+ return ui::INPUT_EVENT_LATENCY_TERMINATED_COMMIT_FAILED_COMPONENT;
+ case cc::SwapPromise::COMMIT_NO_UPDATE:
+ return ui::INPUT_EVENT_LATENCY_TERMINATED_COMMIT_NO_UPDATE_COMPONENT;
+ }
+ NOTREACHED() << "Unhandled DidNotSwapReason.";
+ return ui::INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT;
+}
+} // namespace
+
+namespace cc {
+
+LatencyInfoSwapPromise::LatencyInfoSwapPromise(const ui::LatencyInfo& latency)
+ : latency_(latency) {
+}
+
+LatencyInfoSwapPromise::~LatencyInfoSwapPromise() {
+}
+
+void LatencyInfoSwapPromise::DidSwap(CompositorFrameMetadata* metadata) {
+ DCHECK(!latency_.terminated);
+ metadata->latency_info.push_back(latency_);
+}
+
+void LatencyInfoSwapPromise::DidNotSwap(DidNotSwapReason reason) {
+ latency_.AddLatencyNumber(DidNotSwapReasonToLatencyComponentType(reason), 0,
+ 0);
+ // TODO(miletus): Turn this back on once per-event LatencyInfo tracking
+ // is enabled in GPU side.
+ // DCHECK(latency_.terminated);
+}
+
+int64 LatencyInfoSwapPromise::TraceId() const {
+ return latency_.trace_id;
+}
+
+} // namespace cc
diff --git a/cc/base/latency_info_swap_promise.h b/cc/output/latency_info_swap_promise.h
similarity index 78%
rename from cc/base/latency_info_swap_promise.h
rename to cc/output/latency_info_swap_promise.h
index a7941f1..afd1633 100644
--- a/cc/base/latency_info_swap_promise.h
+++ b/cc/output/latency_info_swap_promise.h
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CC_BASE_LATENCY_INFO_SWAP_PROMISE_H_
-#define CC_BASE_LATENCY_INFO_SWAP_PROMISE_H_
+#ifndef CC_OUTPUT_LATENCY_INFO_SWAP_PROMISE_H_
+#define CC_OUTPUT_LATENCY_INFO_SWAP_PROMISE_H_
#include "base/compiler_specific.h"
-#include "cc/base/swap_promise.h"
+#include "cc/output/swap_promise.h"
#include "ui/events/latency_info.h"
namespace cc {
@@ -27,4 +27,4 @@
} // namespace cc
-#endif // CC_BASE_LATENCY_INFO_SWAP_PROMISE_H_
+#endif // CC_OUTPUT_LATENCY_INFO_SWAP_PROMISE_H_
diff --git a/cc/output/overlay_unittest.cc b/cc/output/overlay_unittest.cc
index 9090621..75fbb6e 100644
--- a/cc/output/overlay_unittest.cc
+++ b/cc/output/overlay_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "cc/base/scoped_ptr_vector.h"
+#include "cc/output/compositor_frame_metadata.h"
#include "cc/output/gl_renderer.h"
#include "cc/output/output_surface.h"
#include "cc/output/output_surface_client.h"
diff --git a/cc/output/renderer.h b/cc/output/renderer.h
index c92ce6f..b775285 100644
--- a/cc/output/renderer.h
+++ b/cc/output/renderer.h
@@ -8,7 +8,9 @@
#include "base/basictypes.h"
#include "cc/base/cc_export.h"
#include "cc/base/scoped_ptr_vector.h"
-#include "cc/trees/layer_tree_host.h"
+#include "cc/output/renderer_capabilities.h"
+#include "cc/output/renderer_settings.h"
+#include "ui/gfx/geometry/rect.h"
namespace cc {
diff --git a/cc/output/renderer_capabilities.cc b/cc/output/renderer_capabilities.cc
new file mode 100644
index 0000000..36e012b
--- /dev/null
+++ b/cc/output/renderer_capabilities.cc
@@ -0,0 +1,29 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/output/renderer_capabilities.h"
+
+namespace cc {
+
+RendererCapabilities::RendererCapabilities(ResourceFormat best_texture_format,
+ bool allow_partial_texture_updates,
+ int max_texture_size,
+ bool using_shared_memory_resources)
+ : best_texture_format(best_texture_format),
+ allow_partial_texture_updates(allow_partial_texture_updates),
+ max_texture_size(max_texture_size),
+ using_shared_memory_resources(using_shared_memory_resources) {
+}
+
+RendererCapabilities::RendererCapabilities()
+ : best_texture_format(RGBA_8888),
+ allow_partial_texture_updates(false),
+ max_texture_size(0),
+ using_shared_memory_resources(false) {
+}
+
+RendererCapabilities::~RendererCapabilities() {
+}
+
+} // namespace cc
diff --git a/cc/output/renderer_capabilities.h b/cc/output/renderer_capabilities.h
new file mode 100644
index 0000000..f03d51c
--- /dev/null
+++ b/cc/output/renderer_capabilities.h
@@ -0,0 +1,32 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_OUTPUT_RENDERER_CAPABILITIES_H_
+#define CC_OUTPUT_RENDERER_CAPABILITIES_H_
+
+#include "cc/base/cc_export.h"
+#include "cc/resources/resource_format.h"
+
+namespace cc {
+
+// Represents the set of capabilities that a particular Renderer has.
+struct CC_EXPORT RendererCapabilities {
+ RendererCapabilities(ResourceFormat best_texture_format,
+ bool allow_partial_texture_updates,
+ int max_texture_size,
+ bool using_shared_memory_resources);
+
+ RendererCapabilities();
+ ~RendererCapabilities();
+
+ // Duplicate any modification to this list to RendererCapabilitiesImpl.
+ ResourceFormat best_texture_format;
+ bool allow_partial_texture_updates;
+ int max_texture_size;
+ bool using_shared_memory_resources;
+};
+
+} // namespace cc
+
+#endif // CC_OUTPUT_RENDERER_CAPABILITIES_H_
diff --git a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc
index ebda8d6..9166ea8 100644
--- a/cc/output/renderer_pixeltest.cc
+++ b/cc/output/renderer_pixeltest.cc
@@ -3,7 +3,6 @@
// found in the LICENSE file.
#include "base/message_loop/message_loop.h"
-#include "cc/layers/append_quads_data.h"
#include "cc/output/gl_renderer.h"
#include "cc/quads/draw_quad.h"
#include "cc/quads/picture_draw_quad.h"
@@ -199,6 +198,7 @@
RenderPass* render_pass,
VideoResourceUpdater* video_resource_updater,
const gfx::Rect& rect,
+ const gfx::Rect& visible_rect,
ResourceProvider* resource_provider) {
const bool with_alpha = (video_frame->format() == media::VideoFrame::YV12A);
const YUVVideoDrawQuad::ColorSpace color_space =
@@ -248,9 +248,9 @@
YUVVideoDrawQuad* yuv_quad =
render_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>();
- yuv_quad->SetNew(shared_state, rect, opaque_rect, rect, tex_coord_rect,
- video_frame->coded_size(), y_resource, u_resource,
- v_resource, a_resource, color_space);
+ yuv_quad->SetNew(shared_state, rect, opaque_rect, visible_rect,
+ tex_coord_rect, video_frame->coded_size(), y_resource,
+ u_resource, v_resource, a_resource, color_space);
}
void CreateTestYUVVideoDrawQuad_Striped(
@@ -261,6 +261,7 @@
RenderPass* render_pass,
VideoResourceUpdater* video_resource_updater,
const gfx::Rect& rect,
+ const gfx::Rect& visible_rect,
ResourceProvider* resource_provider) {
scoped_refptr<media::VideoFrame> video_frame = media::VideoFrame::CreateFrame(
format, rect.size(), rect, rect.size(), base::TimeDelta());
@@ -292,7 +293,7 @@
uint8 alpha_value = is_transparent ? 0 : 128;
CreateTestYUVVideoDrawQuad_FromVideoFrame(
shared_state, video_frame, alpha_value, tex_coord_rect, render_pass,
- video_resource_updater, rect, resource_provider);
+ video_resource_updater, rect, visible_rect, resource_provider);
}
// Creates a video frame of size background_size filled with yuv_background,
@@ -305,6 +306,7 @@
bool is_transparent,
const gfx::RectF& tex_coord_rect,
const gfx::Size& background_size,
+ const gfx::Rect& visible_rect,
uint8 y_background,
uint8 u_background,
uint8 v_background,
@@ -356,7 +358,7 @@
uint8 alpha_value = 255;
CreateTestYUVVideoDrawQuad_FromVideoFrame(
shared_state, video_frame, alpha_value, tex_coord_rect, render_pass,
- video_resource_updater, rect, resource_provider);
+ video_resource_updater, rect, visible_rect, resource_provider);
}
void CreateTestYUVVideoDrawQuad_Solid(
@@ -370,6 +372,7 @@
RenderPass* render_pass,
VideoResourceUpdater* video_resource_updater,
const gfx::Rect& rect,
+ const gfx::Rect& visible_rect,
ResourceProvider* resource_provider) {
scoped_refptr<media::VideoFrame> video_frame = media::VideoFrame::CreateFrame(
format, rect.size(), rect, rect.size(), base::TimeDelta());
@@ -389,7 +392,7 @@
uint8 alpha_value = is_transparent ? 0 : 128;
CreateTestYUVVideoDrawQuad_FromVideoFrame(
shared_state, video_frame, alpha_value, tex_coord_rect, render_pass,
- video_resource_updater, rect, resource_provider);
+ video_resource_updater, rect, visible_rect, resource_provider);
}
typedef ::testing::Types<GLRenderer,
@@ -821,15 +824,17 @@
CreateTestYUVVideoDrawQuad_TwoColor(
this->front_quad_state_, media::VideoFrame::YV12J, false,
- gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), this->quad_rect_.size(), 0, 128, 128,
- inner_rect, 29, 255, 107, this->render_pass_.get(),
- this->video_resource_updater_.get(), this->resource_provider_.get());
+ gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), this->quad_rect_.size(),
+ this->quad_rect_, 0, 128, 128, inner_rect, 29, 255, 107,
+ this->render_pass_.get(), this->video_resource_updater_.get(),
+ this->resource_provider_.get());
CreateTestYUVVideoDrawQuad_TwoColor(
this->back_quad_state_, media::VideoFrame::YV12J, false,
- gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), this->quad_rect_.size(), 149, 43, 21,
- inner_rect, 0, 128, 128, this->render_pass_.get(),
- this->video_resource_updater2_.get(), this->resource_provider_.get());
+ gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), this->quad_rect_.size(),
+ this->quad_rect_, 149, 43, 21, inner_rect, 0, 128, 128,
+ this->render_pass_.get(), this->video_resource_updater2_.get(),
+ this->resource_provider_.get());
SCOPED_TRACE("IntersectingVideoQuads");
this->template AppendBackgroundAndRunTest<YUVVideoDrawQuad>(
@@ -2077,7 +2082,7 @@
scoped_ptr<FakePicturePile> recording =
FakePicturePile::CreateFilledPile(pile_tile_size, viewport.size());
SkPaint paint;
- paint.setFilterLevel(SkPaint::kLow_FilterLevel);
+ paint.setFilterQuality(kLow_SkFilterQuality);
recording->add_draw_bitmap_with_paint(bitmap, gfx::Point(), paint);
recording->RerecordPile();
scoped_refptr<FakePicturePileImpl> pile =
@@ -2129,7 +2134,7 @@
scoped_ptr<FakePicturePile> recording =
FakePicturePile::CreateFilledPile(pile_tile_size, viewport.size());
SkPaint paint;
- paint.setFilterLevel(SkPaint::kLow_FilterLevel);
+ paint.setFilterQuality(kLow_SkFilterQuality);
recording->add_draw_bitmap_with_paint(bitmap, gfx::Point(), paint);
recording->RerecordPile();
scoped_refptr<FakePicturePileImpl> pile =
diff --git a/cc/output/renderer_pixeltest.cc.rej b/cc/output/renderer_pixeltest.cc.rej
new file mode 100644
index 0000000..13d6779
--- /dev/null
+++ b/cc/output/renderer_pixeltest.cc.rej
@@ -0,0 +1,245 @@
+diff a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc (rejected hunks)
+@@ -902,243 +901,6 @@ TEST_F(GLRendererPixelTest, NonPremultipliedTextureWithBackground) {
+ FuzzyPixelOffByOneComparator(true)));
+ }
+
+-class VideoGLRendererPixelTest : public GLRendererPixelTest {
+- protected:
+- void CreateEdgeBleedPass(media::VideoFrame::Format format,
+- RenderPassList* pass_list) {
+- gfx::Rect rect(200, 200);
+-
+- RenderPassId id(1, 1);
+- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+-
+- // Scale the video up so that bilinear filtering kicks in to sample more
+- // than just nearest neighbor would.
+- gfx::Transform scale_by_2;
+- scale_by_2.Scale(2.f, 2.f);
+- gfx::Rect half_rect(100, 100);
+- SharedQuadState* shared_state =
+- CreateTestSharedQuadState(scale_by_2, half_rect, pass.get());
+-
+- gfx::Size background_size(200, 200);
+- gfx::Rect green_rect(16, 20, 100, 100);
+- gfx::RectF tex_coord_rect(
+- static_cast<float>(green_rect.x()) / background_size.width(),
+- static_cast<float>(green_rect.y()) / background_size.height(),
+- static_cast<float>(green_rect.width()) / background_size.width(),
+- static_cast<float>(green_rect.height()) / background_size.height());
+-
+- // YUV of (149,43,21) should be green (0,255,0) in RGB.
+- // Create a video frame that has a non-green background rect, with a
+- // green sub-rectangle that should be the only thing displayed in
+- // the final image. Bleeding will appear on all four sides of the video
+- // if the tex coords are not clamped.
+- CreateTestYUVVideoDrawQuad_TwoColor(
+- shared_state, format, false, tex_coord_rect, background_size, 0, 0, 0,
+- green_rect, 149, 43, 21, pass.get(), video_resource_updater_.get(),
+- resource_provider_.get());
+- pass_list->push_back(pass.Pass());
+- }
+-
+- void SetUp() override {
+- GLRendererPixelTest::SetUp();
+- video_resource_updater_.reset(new VideoResourceUpdater(
+- output_surface_->context_provider(), resource_provider_.get()));
+- }
+-
+- scoped_ptr<VideoResourceUpdater> video_resource_updater_;
+-};
+-
+-TEST_F(VideoGLRendererPixelTest, SimpleYUVRect) {
+- gfx::Rect rect(this->device_viewport_size_);
+-
+- RenderPassId id(1, 1);
+- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+-
+- SharedQuadState* shared_state =
+- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
+-
+- CreateTestYUVVideoDrawQuad_Striped(shared_state, media::VideoFrame::YV12,
+- false, gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f),
+- pass.get(), video_resource_updater_.get(),
+- rect, resource_provider_.get());
+-
+- RenderPassList pass_list;
+- pass_list.push_back(pass.Pass());
+-
+- EXPECT_TRUE(
+- this->RunPixelTest(&pass_list,
+- base::FilePath(FILE_PATH_LITERAL("yuv_stripes.png")),
+- FuzzyPixelOffByOneComparator(true)));
+-}
+-
+-TEST_F(VideoGLRendererPixelTest, OffsetYUVRect) {
+- gfx::Rect rect(this->device_viewport_size_);
+-
+- RenderPassId id(1, 1);
+- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+-
+- SharedQuadState* shared_state =
+- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
+-
+- // Intentionally sets frame format to I420 for testing coverage.
+- CreateTestYUVVideoDrawQuad_Striped(
+- shared_state, media::VideoFrame::I420, false,
+- gfx::RectF(0.125f, 0.25f, 0.75f, 0.5f), pass.get(),
+- video_resource_updater_.get(), rect, resource_provider_.get());
+-
+- RenderPassList pass_list;
+- pass_list.push_back(pass.Pass());
+-
+- EXPECT_TRUE(this->RunPixelTest(
+- &pass_list,
+- base::FilePath(FILE_PATH_LITERAL("yuv_stripes_offset.png")),
+- FuzzyPixelOffByOneComparator(true)));
+-}
+-
+-TEST_F(VideoGLRendererPixelTest, SimpleYUVRectBlack) {
+- gfx::Rect rect(this->device_viewport_size_);
+-
+- RenderPassId id(1, 1);
+- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+-
+- SharedQuadState* shared_state =
+- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
+-
+- // In MPEG color range YUV values of (15,128,128) should produce black.
+- CreateTestYUVVideoDrawQuad_Solid(
+- shared_state, media::VideoFrame::YV12, false,
+- gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), 15, 128, 128, pass.get(),
+- video_resource_updater_.get(), rect, resource_provider_.get());
+-
+- RenderPassList pass_list;
+- pass_list.push_back(pass.Pass());
+-
+- // If we didn't get black out of the YUV values above, then we probably have a
+- // color range issue.
+- EXPECT_TRUE(this->RunPixelTest(&pass_list,
+- base::FilePath(FILE_PATH_LITERAL("black.png")),
+- FuzzyPixelOffByOneComparator(true)));
+-}
+-
+-TEST_F(VideoGLRendererPixelTest, SimpleYUVJRect) {
+- gfx::Rect rect(this->device_viewport_size_);
+-
+- RenderPassId id(1, 1);
+- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+-
+- SharedQuadState* shared_state =
+- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
+-
+- // YUV of (149,43,21) should be green (0,255,0) in RGB.
+- CreateTestYUVVideoDrawQuad_Solid(
+- shared_state, media::VideoFrame::YV12J, false,
+- gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), 149, 43, 21, pass.get(),
+- video_resource_updater_.get(), rect, resource_provider_.get());
+-
+- RenderPassList pass_list;
+- pass_list.push_back(pass.Pass());
+-
+- EXPECT_TRUE(this->RunPixelTest(&pass_list,
+- base::FilePath(FILE_PATH_LITERAL("green.png")),
+- FuzzyPixelOffByOneComparator(true)));
+-}
+-
+-// Test that a YUV video doesn't bleed outside of its tex coords when the
+-// tex coord rect is only a partial subrectangle of the coded contents.
+-TEST_F(VideoGLRendererPixelTest, YUVEdgeBleed) {
+- RenderPassList pass_list;
+- CreateEdgeBleedPass(media::VideoFrame::YV12J, &pass_list);
+- EXPECT_TRUE(this->RunPixelTest(&pass_list,
+- base::FilePath(FILE_PATH_LITERAL("green.png")),
+- FuzzyPixelOffByOneComparator(true)));
+-}
+-
+-TEST_F(VideoGLRendererPixelTest, YUVAEdgeBleed) {
+- RenderPassList pass_list;
+- CreateEdgeBleedPass(media::VideoFrame::YV12A, &pass_list);
+- EXPECT_TRUE(this->RunPixelTest(&pass_list,
+- base::FilePath(FILE_PATH_LITERAL("green.png")),
+- FuzzyPixelOffByOneComparator(true)));
+-}
+-
+-TEST_F(VideoGLRendererPixelTest, SimpleYUVJRectGrey) {
+- gfx::Rect rect(this->device_viewport_size_);
+-
+- RenderPassId id(1, 1);
+- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+-
+- SharedQuadState* shared_state =
+- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
+-
+- // Dark grey in JPEG color range (in MPEG, this is black).
+- CreateTestYUVVideoDrawQuad_Solid(
+- shared_state, media::VideoFrame::YV12J, false,
+- gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), 15, 128, 128, pass.get(),
+- video_resource_updater_.get(), rect, resource_provider_.get());
+-
+- RenderPassList pass_list;
+- pass_list.push_back(pass.Pass());
+-
+- EXPECT_TRUE(
+- this->RunPixelTest(&pass_list,
+- base::FilePath(FILE_PATH_LITERAL("dark_grey.png")),
+- FuzzyPixelOffByOneComparator(true)));
+-}
+-
+-TEST_F(VideoGLRendererPixelTest, SimpleYUVARect) {
+- gfx::Rect rect(this->device_viewport_size_);
+-
+- RenderPassId id(1, 1);
+- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+-
+- SharedQuadState* shared_state =
+- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
+-
+- CreateTestYUVVideoDrawQuad_Striped(shared_state, media::VideoFrame::YV12A,
+- false, gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f),
+- pass.get(), video_resource_updater_.get(),
+- rect, resource_provider_.get());
+-
+- SolidColorDrawQuad* color_quad =
+- pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
+- color_quad->SetNew(shared_state, rect, rect, SK_ColorWHITE, false);
+-
+- RenderPassList pass_list;
+- pass_list.push_back(pass.Pass());
+-
+- EXPECT_TRUE(this->RunPixelTest(
+- &pass_list,
+- base::FilePath(FILE_PATH_LITERAL("yuv_stripes_alpha.png")),
+- FuzzyPixelOffByOneComparator(true)));
+-}
+-
+-TEST_F(VideoGLRendererPixelTest, FullyTransparentYUVARect) {
+- gfx::Rect rect(this->device_viewport_size_);
+-
+- RenderPassId id(1, 1);
+- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
+-
+- SharedQuadState* shared_state =
+- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
+-
+- CreateTestYUVVideoDrawQuad_Striped(shared_state, media::VideoFrame::YV12A,
+- true, gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f),
+- pass.get(), video_resource_updater_.get(),
+- rect, resource_provider_.get());
+-
+- SolidColorDrawQuad* color_quad =
+- pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
+- color_quad->SetNew(shared_state, rect, rect, SK_ColorBLACK, false);
+-
+- RenderPassList pass_list;
+- pass_list.push_back(pass.Pass());
+-
+- EXPECT_TRUE(this->RunPixelTest(
+- &pass_list,
+- base::FilePath(FILE_PATH_LITERAL("black.png")),
+- ExactPixelComparator(true)));
+-}
+-
+ TYPED_TEST(RendererPixelTest, FastPassColorFilterAlpha) {
+ gfx::Rect viewport_rect(this->device_viewport_size_);
+
diff --git a/cc/output/software_renderer.cc b/cc/output/software_renderer.cc
index 19c4fa3..cecd633 100644
--- a/cc/output/software_renderer.cc
+++ b/cc/output/software_renderer.cc
@@ -266,7 +266,7 @@
if (settings_->allow_antialiasing &&
(settings_->force_antialiasing || all_four_edges_are_exterior))
current_paint_.setAntiAlias(true);
- current_paint_.setFilterLevel(SkPaint::kLow_FilterLevel);
+ current_paint_.setFilterQuality(kLow_SkFilterQuality);
}
if (quad->ShouldDrawWithBlending() ||
@@ -487,9 +487,8 @@
QuadVertexRect(), quad->rect, quad->visible_rect);
SkRect uv_rect = gfx::RectFToSkRect(visible_tex_coord_rect);
- current_paint_.setFilterLevel(quad->nearest_neighbor
- ? SkPaint::kNone_FilterLevel
- : SkPaint::kLow_FilterLevel);
+ current_paint_.setFilterQuality(
+ quad->nearest_neighbor ? kNone_SkFilterQuality : kLow_SkFilterQuality);
current_canvas_->drawBitmapRectToRect(
*lock.sk_bitmap(),
&uv_rect,
diff --git a/cc/base/swap_promise.h b/cc/output/swap_promise.h
similarity index 94%
rename from cc/base/swap_promise.h
rename to cc/output/swap_promise.h
index a406fda..1d6dabc 100644
--- a/cc/base/swap_promise.h
+++ b/cc/output/swap_promise.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CC_BASE_SWAP_PROMISE_H_
-#define CC_BASE_SWAP_PROMISE_H_
+#ifndef CC_OUTPUT_SWAP_PROMISE_H_
+#define CC_OUTPUT_SWAP_PROMISE_H_
#include "cc/output/compositor_frame_metadata.h"
@@ -50,4 +50,4 @@
} // namespace cc
-#endif // CC_BASE_SWAP_PROMISE_H_
+#endif // CC_OUTPUT_SWAP_PROMISE_H_
diff --git a/cc/quads/yuv_video_draw_quad.h.rej b/cc/quads/yuv_video_draw_quad.h.rej
new file mode 100644
index 0000000..a838a4d
--- /dev/null
+++ b/cc/quads/yuv_video_draw_quad.h.rej
@@ -0,0 +1,9 @@
+diff a/cc/quads/yuv_video_draw_quad.h b/cc/quads/yuv_video_draw_quad.h (rejected hunks)
+@@ -8,7 +8,6 @@
+ #include "base/basictypes.h"
+ #include "base/memory/scoped_ptr.h"
+ #include "cc/base/cc_export.h"
+-#include "cc/layers/video_layer_impl.h"
+ #include "cc/quads/draw_quad.h"
+
+ namespace cc {
diff --git a/cc/resources/display_item_list.cc b/cc/resources/display_item_list.cc
index 48f8c66..f8ffbfd 100644
--- a/cc/resources/display_item_list.cc
+++ b/cc/resources/display_item_list.cc
@@ -138,8 +138,8 @@
void DisplayItemList::EmitTraceSnapshot() const {
TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(
- TRACE_DISABLED_BY_DEFAULT("cc.debug") "," TRACE_DISABLED_BY_DEFAULT(
- "devtools.timeline.picture"),
+ TRACE_DISABLED_BY_DEFAULT("cc.debug.picture") ","
+ TRACE_DISABLED_BY_DEFAULT("devtools.timeline.picture"),
"cc::DisplayItemList", this, AsValue());
}
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index 00ae3da..7ea86f0 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -148,6 +148,10 @@
// This will cause the image referred to by pixel ref to be decoded.
pixel_ref_->lockPixels();
pixel_ref_->unlockPixels();
+
+ // Release the reference after decoding image to ensure that it is not
+ // kept alive unless needed.
+ pixel_ref_.clear();
}
// Overridden from TileTask:
diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
index 70d726d..3b20b79 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -380,8 +380,7 @@
TRACE_EVENT1("cc,benchmark", "Scheduler::BeginFrame", "args", args.AsValue());
// Deliver BeginFrames to children.
- if (settings_.forward_begin_frames_to_children &&
- state_machine_.children_need_begin_frames()) {
+ if (state_machine_.children_need_begin_frames()) {
BeginFrameArgs adjusted_args_for_children(args);
// Adjust a deadline for child schedulers.
// TODO(simonhong): Once we have commitless update, we can get rid of
@@ -431,7 +430,6 @@
}
void Scheduler::SetChildrenNeedBeginFrames(bool children_need_begin_frames) {
- DCHECK(settings_.forward_begin_frames_to_children);
state_machine_.SetChildrenNeedBeginFrames(children_need_begin_frames);
ProcessScheduledActions();
}
diff --git a/cc/scheduler/scheduler_settings.cc b/cc/scheduler/scheduler_settings.cc
index 8713391..39a98b4 100644
--- a/cc/scheduler/scheduler_settings.cc
+++ b/cc/scheduler/scheduler_settings.cc
@@ -11,22 +11,18 @@
SchedulerSettings::SchedulerSettings()
: use_external_begin_frame_source(false),
- forward_begin_frames_to_children(false),
main_frame_before_activation_enabled(false),
impl_side_painting(false),
timeout_and_draw_when_animation_checkerboards(true),
maximum_number_of_failed_draws_before_draw_is_forced_(3),
using_synchronous_renderer_compositor(false),
throttle_frame_production(true),
- disable_hi_res_timer_tasks_on_battery(false),
main_thread_should_always_be_low_latency(false),
background_frame_interval(base::TimeDelta::FromSeconds(1)) {
}
SchedulerSettings::SchedulerSettings(const LayerTreeSettings& settings)
: use_external_begin_frame_source(settings.use_external_begin_frame_source),
- forward_begin_frames_to_children(
- settings.forward_begin_frames_to_children),
main_frame_before_activation_enabled(
settings.main_frame_before_activation_enabled),
impl_side_painting(settings.impl_side_painting),
@@ -37,8 +33,6 @@
using_synchronous_renderer_compositor(
settings.using_synchronous_renderer_compositor),
throttle_frame_production(settings.throttle_frame_production),
- disable_hi_res_timer_tasks_on_battery(
- settings.disable_hi_res_timer_tasks_on_battery),
main_thread_should_always_be_low_latency(false),
background_frame_interval(base::TimeDelta::FromSecondsD(
1.0 / settings.background_animation_rate)) {
@@ -52,8 +46,6 @@
new base::trace_event::TracedValue();
state->SetBoolean("use_external_begin_frame_source",
use_external_begin_frame_source);
- state->SetBoolean("forward_begin_frames_to_children",
- forward_begin_frames_to_children);
state->SetBoolean("main_frame_before_activation_enabled",
main_frame_before_activation_enabled);
state->SetBoolean("impl_side_painting", impl_side_painting);
@@ -64,8 +56,6 @@
state->SetBoolean("using_synchronous_renderer_compositor",
using_synchronous_renderer_compositor);
state->SetBoolean("throttle_frame_production", throttle_frame_production);
- state->SetBoolean("disable_hi_res_timer_tasks_on_battery",
- disable_hi_res_timer_tasks_on_battery);
state->SetBoolean("main_thread_should_always_be_low_latency",
main_thread_should_always_be_low_latency);
state->SetInteger("background_frame_interval",
diff --git a/cc/scheduler/scheduler_settings.h b/cc/scheduler/scheduler_settings.h
index fe90f43..85f64e1 100644
--- a/cc/scheduler/scheduler_settings.h
+++ b/cc/scheduler/scheduler_settings.h
@@ -26,14 +26,12 @@
~SchedulerSettings();
bool use_external_begin_frame_source;
- bool forward_begin_frames_to_children;
bool main_frame_before_activation_enabled;
bool impl_side_painting;
bool timeout_and_draw_when_animation_checkerboards;
int maximum_number_of_failed_draws_before_draw_is_forced_;
bool using_synchronous_renderer_compositor;
bool throttle_frame_production;
- bool disable_hi_res_timer_tasks_on_battery;
// In main thread low latency mode the entire
// BeginMainFrame->Commit->Activation->Draw cycle should complete before
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
index f2f6636..189387c 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -768,7 +768,6 @@
void SchedulerStateMachine::SetChildrenNeedBeginFrames(
bool children_need_begin_frames) {
- DCHECK(settings_.forward_begin_frames_to_children);
children_need_begin_frames_ = children_need_begin_frames;
}
diff --git a/cc/scheduler/scheduler_state_machine_unittest.cc b/cc/scheduler/scheduler_state_machine_unittest.cc
index ca0e441..98d5b18 100644
--- a/cc/scheduler/scheduler_state_machine_unittest.cc
+++ b/cc/scheduler/scheduler_state_machine_unittest.cc
@@ -1804,7 +1804,6 @@
TEST(SchedulerStateMachineTest, TestForwardBeginFramesToChildren) {
SchedulerSettings settings;
- settings.forward_begin_frames_to_children = true;
StateMachine state(settings);
SET_UP_STATE(state)
diff --git a/cc/scheduler/scheduler_unittest.cc b/cc/scheduler/scheduler_unittest.cc
index 9346536..55f2164 100644
--- a/cc/scheduler/scheduler_unittest.cc
+++ b/cc/scheduler/scheduler_unittest.cc
@@ -407,7 +407,6 @@
TEST_F(SchedulerTest, SendBeginFramesToChildren) {
scheduler_settings_.use_external_begin_frame_source = true;
- scheduler_settings_.forward_begin_frames_to_children = true;
SetUpScheduler(true);
EXPECT_FALSE(client_->begin_frame_is_sent_to_children());
@@ -428,7 +427,6 @@
TEST_F(SchedulerTest, SendBeginFramesToChildrenWithoutCommit) {
scheduler_settings_.use_external_begin_frame_source = true;
- scheduler_settings_.forward_begin_frames_to_children = true;
SetUpScheduler(true);
EXPECT_FALSE(client_->needs_begin_frames());
@@ -503,10 +501,6 @@
scheduler_settings_.use_external_begin_frame_source = true;
SetUpScheduler(true);
- scheduler_->SetCanStart();
- scheduler_->SetVisible(true);
- scheduler_->SetCanDraw(true);
-
scheduler_->SetDeferCommits(true);
scheduler_->SetNeedsCommit();
@@ -539,10 +533,6 @@
scheduler_settings_.use_external_begin_frame_source = true;
SetUpScheduler(true);
- scheduler_->SetCanStart();
- scheduler_->SetVisible(true);
- scheduler_->SetCanDraw(true);
-
scheduler_->SetDeferCommits(true);
scheduler_->SetNeedsCommit();
diff --git a/cc/surfaces/display.h b/cc/surfaces/display.h
index ed96d07..30db259 100644
--- a/cc/surfaces/display.h
+++ b/cc/surfaces/display.h
@@ -15,6 +15,11 @@
#include "cc/surfaces/surface_id.h"
#include "cc/surfaces/surface_manager.h"
#include "cc/surfaces/surfaces_export.h"
+#include "ui/events/latency_info.h"
+
+namespace gpu {
+class GpuMemoryBufferManager;
+}
namespace gfx {
class Size;
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc
index 4f00ff3..21ec6db 100644
--- a/cc/surfaces/surface_aggregator.cc
+++ b/cc/surfaces/surface_aggregator.cc
@@ -228,6 +228,8 @@
bool merge_pass = surface_quad->opacity() == 1.f && copy_requests.empty();
+ gfx::Rect surface_damage = DamageRectForSurface(
+ surface, *render_pass_list.back(), surface_quad->visible_rect);
const RenderPassList& referenced_passes = render_pass_list;
size_t passes_to_copy =
merge_pass ? referenced_passes.size() - 1 : referenced_passes.size();
@@ -240,9 +242,7 @@
RenderPassId remapped_pass_id = RemapPassId(source.id, surface_id);
- copy_pass->SetAll(remapped_pass_id,
- source.output_rect,
- source.damage_rect,
+ copy_pass->SetAll(remapped_pass_id, source.output_rect, gfx::Rect(),
source.transform_to_root_target,
source.has_transparent_background);
@@ -261,6 +261,9 @@
CopyQuadsToPass(source.quad_list, source.shared_quad_state_list,
gfx::Transform(), ClipData(), copy_pass.get(), surface_id);
+ if (j == referenced_passes.size() - 1)
+ surface_damage = gfx::UnionRects(surface_damage, copy_pass->damage_rect);
+
dest_pass_list_->push_back(copy_pass.Pass());
}
@@ -309,9 +312,7 @@
dest_pass->damage_rect =
gfx::UnionRects(dest_pass->damage_rect,
MathUtil::MapEnclosingClippedRect(
- surface_quad->quadTransform(),
- DamageRectForSurface(surface, last_pass,
- surface_quad->visible_rect)));
+ surface_quad->quadTransform(), surface_damage));
referenced_surfaces_.erase(it);
}
@@ -375,10 +376,20 @@
RenderPassId remapped_pass_id =
RemapPassId(original_pass_id, surface_id);
- dest_pass->CopyFromAndAppendRenderPassDrawQuad(
- pass_quad,
- dest_pass->shared_quad_state_list.back(),
+ gfx::Rect pass_damage;
+ for (const auto* pass : *dest_pass_list_) {
+ if (pass->id == remapped_pass_id) {
+ pass_damage = pass->damage_rect;
+ break;
+ }
+ }
+
+ DrawQuad* rpdq = dest_pass->CopyFromAndAppendRenderPassDrawQuad(
+ pass_quad, dest_pass->shared_quad_state_list.back(),
remapped_pass_id);
+ dest_pass->damage_rect = gfx::UnionRects(
+ dest_pass->damage_rect, MathUtil::MapEnclosingClippedRect(
+ rpdq->quadTransform(), pass_damage));
} else {
dest_pass->CopyFromAndAppendDrawQuad(
quad, dest_pass->shared_quad_state_list.back());
@@ -411,8 +422,11 @@
RenderPassId remapped_pass_id =
RemapPassId(source.id, surface->surface_id());
- copy_pass->SetAll(remapped_pass_id, source.output_rect,
- DamageRectForSurface(surface, source, source.output_rect),
+ gfx::Rect damage_rect =
+ (i < source_pass_list.size() - 1)
+ ? gfx::Rect()
+ : DamageRectForSurface(surface, source, source.output_rect);
+ copy_pass->SetAll(remapped_pass_id, source.output_rect, damage_rect,
source.transform_to_root_target,
source.has_transparent_background);
diff --git a/cc/surfaces/surface_aggregator_unittest.cc b/cc/surfaces/surface_aggregator_unittest.cc
index cf54568..72aa3f1 100644
--- a/cc/surfaces/surface_aggregator_unittest.cc
+++ b/cc/surfaces/surface_aggregator_unittest.cc
@@ -1083,8 +1083,13 @@
factory_.SubmitFrame(child_surface_id, child_frame.Pass(),
SurfaceFactory::DrawCallback());
- test::Quad root_quads[] = {test::Quad::SurfaceQuad(child_surface_id, 1.f)};
- test::Pass root_passes[] = {test::Pass(root_quads, arraysize(root_quads))};
+ RenderPassId pass_id(5, 10);
+ test::Quad first_quads[] = {test::Quad::SurfaceQuad(child_surface_id, 1.f)};
+ test::Quad root_quads[] = {test::Quad::RenderPassQuad(pass_id)};
+
+ test::Pass root_passes[] = {
+ test::Pass(first_quads, arraysize(first_quads), pass_id),
+ test::Pass(root_quads, arraysize(root_quads))};
RenderPassList root_pass_list;
AddPasses(&root_pass_list,
@@ -1096,6 +1101,7 @@
->shared_quad_state_list.front()
->content_to_target_transform.Translate(0, 10);
root_pass_list.at(0)->damage_rect = gfx::Rect(5, 5, 10, 10);
+ root_pass_list.at(1)->damage_rect = gfx::Rect(5, 5, 100, 100);
scoped_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData);
root_pass_list.swap(root_frame_data->render_pass_list);
@@ -1116,11 +1122,11 @@
const RenderPassList& aggregated_pass_list = frame_data->render_pass_list;
- ASSERT_EQ(1u, aggregated_pass_list.size());
+ ASSERT_EQ(2u, aggregated_pass_list.size());
// Damage rect for first aggregation should contain entire root surface.
EXPECT_TRUE(
- aggregated_pass_list[0]->damage_rect.Contains(gfx::Rect(SurfaceSize())));
+ aggregated_pass_list[1]->damage_rect.Contains(gfx::Rect(SurfaceSize())));
{
AddPasses(&child_pass_list,
@@ -1154,12 +1160,12 @@
const RenderPassList& aggregated_pass_list = frame_data->render_pass_list;
- ASSERT_EQ(1u, aggregated_pass_list.size());
+ ASSERT_EQ(2u, aggregated_pass_list.size());
// Outer surface didn't change, so transformed inner damage rect should be
// used.
EXPECT_EQ(gfx::Rect(10, 20, 10, 10).ToString(),
- aggregated_pass_list[0]->damage_rect.ToString());
+ aggregated_pass_list[1]->damage_rect.ToString());
}
{
@@ -1216,11 +1222,11 @@
const RenderPassList& aggregated_pass_list = frame_data->render_pass_list;
- ASSERT_EQ(1u, aggregated_pass_list.size());
+ ASSERT_EQ(2u, aggregated_pass_list.size());
// The root surface was enqueued without being aggregated once, so it should
// be treated as completely damaged.
- EXPECT_TRUE(aggregated_pass_list[0]->damage_rect.Contains(
+ EXPECT_TRUE(aggregated_pass_list[1]->damage_rect.Contains(
gfx::Rect(SurfaceSize())));
}
diff --git a/cc/surfaces/surface_display_output_surface.cc b/cc/surfaces/surface_display_output_surface.cc
index ac60271..c07eece 100644
--- a/cc/surfaces/surface_display_output_surface.cc
+++ b/cc/surfaces/surface_display_output_surface.cc
@@ -4,6 +4,7 @@
#include "cc/surfaces/surface_display_output_surface.h"
+#include "base/bind.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/compositor_frame_ack.h"
#include "cc/surfaces/display.h"
diff --git a/cc/test/data/image_mask_of_layer.png b/cc/test/data/image_mask_of_layer.png
index 8f186ad..f64c085 100644
--- a/cc/test/data/image_mask_of_layer.png
+++ b/cc/test/data/image_mask_of_layer.png
Binary files differ
diff --git a/cc/test/data/mask_of_background_filter.png b/cc/test/data/mask_of_background_filter.png
index 35a9b93..cd1eab6 100644
--- a/cc/test/data/mask_of_background_filter.png
+++ b/cc/test/data/mask_of_background_filter.png
Binary files differ
diff --git a/cc/test/data/mask_of_clipped_layer.png b/cc/test/data/mask_of_clipped_layer.png
index 9f4483e..c2c40da 100644
--- a/cc/test/data/mask_of_clipped_layer.png
+++ b/cc/test/data/mask_of_clipped_layer.png
Binary files differ
diff --git a/cc/test/data/mask_of_layer.png b/cc/test/data/mask_of_layer.png
index 8f186ad..f64c085 100644
--- a/cc/test/data/mask_of_layer.png
+++ b/cc/test/data/mask_of_layer.png
Binary files differ
diff --git a/cc/test/data/mask_of_layer_with_blend.png b/cc/test/data/mask_of_layer_with_blend.png
index 1f2bedd..a737361 100644
--- a/cc/test/data/mask_of_layer_with_blend.png
+++ b/cc/test/data/mask_of_layer_with_blend.png
Binary files differ
diff --git a/cc/test/data/mask_of_replica.png b/cc/test/data/mask_of_replica.png
index ee581a1..94e261d 100644
--- a/cc/test/data/mask_of_replica.png
+++ b/cc/test/data/mask_of_replica.png
Binary files differ
diff --git a/cc/test/data/mask_of_replica_of_clipped_layer.png b/cc/test/data/mask_of_replica_of_clipped_layer.png
index 1a3a828..598da07 100644
--- a/cc/test/data/mask_of_replica_of_clipped_layer.png
+++ b/cc/test/data/mask_of_replica_of_clipped_layer.png
Binary files differ
diff --git a/cc/test/data/mask_with_replica.png b/cc/test/data/mask_with_replica.png
index aa765c3..a330b08 100644
--- a/cc/test/data/mask_with_replica.png
+++ b/cc/test/data/mask_with_replica.png
Binary files differ
diff --git a/cc/test/data/mask_with_replica_of_clipped_layer.png b/cc/test/data/mask_with_replica_of_clipped_layer.png
index 922ad73..2b786a7 100644
--- a/cc/test/data/mask_with_replica_of_clipped_layer.png
+++ b/cc/test/data/mask_with_replica_of_clipped_layer.png
Binary files differ
diff --git a/cc/test/data/yuv_stripes_clipped.png b/cc/test/data/yuv_stripes_clipped.png
new file mode 100644
index 0000000..58b69ef
--- /dev/null
+++ b/cc/test/data/yuv_stripes_clipped.png
Binary files differ
diff --git a/cc/test/fake_ui_resource_layer_tree_host_impl.cc b/cc/test/fake_ui_resource_layer_tree_host_impl.cc
index c95ad89..9e7adde 100644
--- a/cc/test/fake_ui_resource_layer_tree_host_impl.cc
+++ b/cc/test/fake_ui_resource_layer_tree_host_impl.cc
@@ -4,6 +4,7 @@
#include "cc/test/fake_ui_resource_layer_tree_host_impl.h"
+#include "cc/resources/ui_resource_bitmap.h"
#include "cc/test/fake_layer_tree_host_impl.h"
namespace cc {
diff --git a/cc/test/pixel_test.h b/cc/test/pixel_test.h
index 3562699..08bad36 100644
--- a/cc/test/pixel_test.h
+++ b/cc/test/pixel_test.h
@@ -7,6 +7,7 @@
#include "cc/output/software_renderer.h"
#include "cc/quads/render_pass.h"
#include "cc/test/pixel_comparator.h"
+#include "cc/trees/layer_tree_settings.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gl/gl_implementation.h"
diff --git a/cc/base/latency_info_swap_promise_monitor.cc b/cc/trees/latency_info_swap_promise_monitor.cc
similarity index 87%
rename from cc/base/latency_info_swap_promise_monitor.cc
rename to cc/trees/latency_info_swap_promise_monitor.cc
index de065d1..10d9380 100644
--- a/cc/base/latency_info_swap_promise_monitor.cc
+++ b/cc/trees/latency_info_swap_promise_monitor.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "cc/base/latency_info_swap_promise_monitor.h"
+#include "cc/trees/latency_info_swap_promise_monitor.h"
#include "base/threading/platform_thread.h"
-#include "cc/base/latency_info_swap_promise.h"
+#include "cc/output/latency_info_swap_promise.h"
#include "cc/trees/layer_tree_host.h"
#include "cc/trees/layer_tree_host_impl.h"
#include "cc/trees/layer_tree_impl.h"
@@ -14,9 +14,9 @@
bool AddRenderingScheduledComponent(ui::LatencyInfo* latency_info,
bool on_main) {
- ui::LatencyComponentType type = on_main ?
- ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN_COMPONENT :
- ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL_COMPONENT;
+ ui::LatencyComponentType type =
+ on_main ? ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN_COMPONENT
+ : ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL_COMPONENT;
if (latency_info->FindLatency(type, 0, nullptr))
return false;
latency_info->AddLatencyNumber(type, 0, 0);
@@ -25,13 +25,11 @@
bool AddForwardingScrollUpdateToMainComponent(ui::LatencyInfo* latency_info) {
if (latency_info->FindLatency(
- ui::INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT,
- 0,
+ ui::INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT, 0,
nullptr))
return false;
latency_info->AddLatencyNumber(
- ui::INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT,
- 0,
+ ui::INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT, 0,
latency_info->trace_id);
return true;
}
@@ -45,9 +43,11 @@
LayerTreeHost* layer_tree_host,
LayerTreeHostImpl* layer_tree_host_impl)
: SwapPromiseMonitor(layer_tree_host, layer_tree_host_impl),
- latency_(latency) {}
+ latency_(latency) {
+}
-LatencyInfoSwapPromiseMonitor::~LatencyInfoSwapPromiseMonitor() {}
+LatencyInfoSwapPromiseMonitor::~LatencyInfoSwapPromiseMonitor() {
+}
void LatencyInfoSwapPromiseMonitor::OnSetNeedsCommitOnMain() {
if (AddRenderingScheduledComponent(latency_, true /* on_main */)) {
@@ -68,8 +68,7 @@
int64 new_sequence_number = 0;
for (ui::LatencyInfo::LatencyMap::const_iterator it =
latency_->latency_components.begin();
- it != latency_->latency_components.end();
- ++it) {
+ it != latency_->latency_components.end(); ++it) {
if (it->first.first == ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT) {
new_sequence_number =
(static_cast<int64>(base::PlatformThread::CurrentId()) << 32) |
@@ -82,8 +81,7 @@
return;
ui::LatencyInfo new_latency;
new_latency.AddLatencyNumber(
- ui::INPUT_EVENT_LATENCY_BEGIN_SCROLL_UPDATE_MAIN_COMPONENT,
- 0,
+ ui::INPUT_EVENT_LATENCY_BEGIN_SCROLL_UPDATE_MAIN_COMPONENT, 0,
new_sequence_number);
new_latency.TraceEventType("ScrollUpdate");
new_latency.CopyLatencyFrom(
diff --git a/cc/base/latency_info_swap_promise_monitor.h b/cc/trees/latency_info_swap_promise_monitor.h
similarity index 82%
rename from cc/base/latency_info_swap_promise_monitor.h
rename to cc/trees/latency_info_swap_promise_monitor.h
index d9e71fb..c1d9973 100644
--- a/cc/base/latency_info_swap_promise_monitor.h
+++ b/cc/trees/latency_info_swap_promise_monitor.h
@@ -3,10 +3,10 @@
// found in the LICENSE file.
#include "base/compiler_specific.h"
-#include "cc/base/swap_promise_monitor.h"
+#include "cc/trees/swap_promise_monitor.h"
-#ifndef CC_BASE_LATENCY_INFO_SWAP_PROMISE_MONITOR_H_
-#define CC_BASE_LATENCY_INFO_SWAP_PROMISE_MONITOR_H_
+#ifndef CC_TREES_LATENCY_INFO_SWAP_PROMISE_MONITOR_H_
+#define CC_TREES_LATENCY_INFO_SWAP_PROMISE_MONITOR_H_
namespace ui {
struct LatencyInfo;
@@ -34,4 +34,4 @@
} // namespace cc
-#endif // CC_BASE_LATENCY_INFO_SWAP_PROMISE_MONITOR_H_
+#endif // CC_TREES_LATENCY_INFO_SWAP_PROMISE_MONITOR_H_
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 2ac7ebe..8a3e644 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -51,23 +51,6 @@
namespace cc {
-RendererCapabilities::RendererCapabilities(ResourceFormat best_texture_format,
- bool allow_partial_texture_updates,
- int max_texture_size,
- bool using_shared_memory_resources)
- : best_texture_format(best_texture_format),
- allow_partial_texture_updates(allow_partial_texture_updates),
- max_texture_size(max_texture_size),
- using_shared_memory_resources(using_shared_memory_resources) {}
-
-RendererCapabilities::RendererCapabilities()
- : best_texture_format(RGBA_8888),
- allow_partial_texture_updates(false),
- max_texture_size(0),
- using_shared_memory_resources(false) {}
-
-RendererCapabilities::~RendererCapabilities() {}
-
scoped_ptr<LayerTreeHost> LayerTreeHost::CreateThreaded(
LayerTreeHostClient* client,
SharedBitmapManager* shared_bitmap_manager,
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index 840a4fa..1379d08 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -21,8 +21,6 @@
#include "cc/animation/animation_events.h"
#include "cc/base/cc_export.h"
#include "cc/base/scoped_ptr_vector.h"
-#include "cc/base/swap_promise.h"
-#include "cc/base/swap_promise_monitor.h"
#include "cc/debug/micro_benchmark.h"
#include "cc/debug/micro_benchmark_controller.h"
#include "cc/input/input_handler.h"
@@ -31,6 +29,8 @@
#include "cc/input/top_controls_state.h"
#include "cc/layers/layer_lists.h"
#include "cc/output/output_surface.h"
+#include "cc/output/renderer_capabilities.h"
+#include "cc/output/swap_promise.h"
#include "cc/resources/resource_format.h"
#include "cc/resources/scoped_ui_resource.h"
#include "cc/surfaces/surface_sequence.h"
@@ -38,6 +38,7 @@
#include "cc/trees/layer_tree_host_common.h"
#include "cc/trees/layer_tree_settings.h"
#include "cc/trees/proxy.h"
+#include "cc/trees/swap_promise_monitor.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/geometry/rect.h"
@@ -67,24 +68,6 @@
struct ScrollAndScaleSet;
enum class GpuRasterizationStatus;
-// Provides information on an Impl's rendering capabilities back to the
-// LayerTreeHost.
-struct CC_EXPORT RendererCapabilities {
- RendererCapabilities(ResourceFormat best_texture_format,
- bool allow_partial_texture_updates,
- int max_texture_size,
- bool using_shared_memory_resources);
-
- RendererCapabilities();
- ~RendererCapabilities();
-
- // Duplicate any modification to this list to RendererCapabilitiesImpl.
- ResourceFormat best_texture_format;
- bool allow_partial_texture_updates;
- int max_texture_size;
- bool using_shared_memory_resources;
-};
-
class CC_EXPORT LayerTreeHost {
public:
// The SharedBitmapManager will be used on the compositor thread.
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 064e91e..aa115f7 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -681,9 +681,10 @@
// This function returns a translation matrix that can be applied on a vector
// that's in the layer's target surface coordinate, while the position offset is
// specified in some ancestor layer's coordinate.
+template <typename LayerType>
gfx::Transform ComputeSizeDeltaCompensation(
- LayerImpl* layer,
- LayerImpl* container,
+ LayerType* layer,
+ LayerType* container,
const gfx::Vector2dF& position_offset) {
gfx::Transform result_transform;
@@ -698,8 +699,8 @@
gfx::Transform target_surface_space_to_container_layer_space;
// Calculate step 1a
- LayerImpl* container_target_surface = container->render_target();
- for (LayerImpl* current_target_surface = NextTargetSurface(layer);
+ LayerType* container_target_surface = container->render_target();
+ for (LayerType* current_target_surface = NextTargetSurface(layer);
current_target_surface &&
current_target_surface != container_target_surface;
current_target_surface = NextTargetSurface(current_target_surface)) {
@@ -746,14 +747,10 @@
return result_transform;
}
+template <typename LayerType>
void ApplyPositionAdjustment(
- Layer* layer,
- Layer* container,
- const gfx::Transform& scroll_compensation,
- gfx::Transform* combined_transform) {}
-void ApplyPositionAdjustment(
- LayerImpl* layer,
- LayerImpl* container,
+ LayerType* layer,
+ LayerType* container,
const gfx::Transform& scroll_compensation,
gfx::Transform* combined_transform) {
if (!layer->position_constraint().is_fixed_position())
@@ -784,8 +781,9 @@
ComputeSizeDeltaCompensation(layer, container, position_offset));
}
+template <typename LayerType>
gfx::Transform ComputeScrollCompensationForThisLayer(
- LayerImpl* scrolling_layer,
+ LayerType* scrolling_layer,
const gfx::Transform& parent_matrix,
const gfx::Vector2dF& scroll_delta) {
// For every layer that has non-zero scroll_delta, we have to compute a
@@ -823,18 +821,9 @@
return scroll_compensation_for_this_layer;
}
+template <typename LayerType>
gfx::Transform ComputeScrollCompensationMatrixForChildren(
- Layer* current_layer,
- const gfx::Transform& current_parent_matrix,
- const gfx::Transform& current_scroll_compensation,
- const gfx::Vector2dF& scroll_delta) {
- // The main thread (i.e. Layer) does not need to worry about scroll
- // compensation. So we can just return an identity matrix here.
- return gfx::Transform();
-}
-
-gfx::Transform ComputeScrollCompensationMatrixForChildren(
- LayerImpl* layer,
+ LayerType* layer,
const gfx::Transform& parent_matrix,
const gfx::Transform& current_scroll_compensation_matrix,
const gfx::Vector2dF& scroll_delta) {
diff --git a/cc/trees/layer_tree_host_common.h b/cc/trees/layer_tree_host_common.h
index 6c03511..88197da 100644
--- a/cc/trees/layer_tree_host_common.h
+++ b/cc/trees/layer_tree_host_common.h
@@ -172,12 +172,14 @@
// A layer will either contribute its own content, or its render surface's
// content, to the target surface. The layer contributes its surface's content
// when both the following are true:
- // (1) The layer actually has a render surface, and
+ // (1) The layer actually has a render surface and rendering into that
+ // surface, and
// (2) The layer's render surface is not the same as the target surface.
//
// Otherwise, the layer just contributes itself to the target surface.
- return layer->render_surface() && layer->id() != target_surface_layer_id;
+ return layer->render_target() == layer &&
+ layer->id() != target_surface_layer_id;
}
template <typename LayerType>
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index d2c473e..dd797d5 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -1006,6 +1006,8 @@
scoped_refptr<Layer> child = Layer::Create();
scoped_refptr<LayerWithForcedDrawsContent> grand_child =
make_scoped_refptr(new LayerWithForcedDrawsContent());
+ scoped_refptr<LayerWithForcedDrawsContent> great_grand_child =
+ make_scoped_refptr(new LayerWithForcedDrawsContent());
gfx::Transform rotation_about_y_axis;
rotation_about_y_axis.RotateAboutYAxis(30.0);
@@ -1032,9 +1034,13 @@
gfx::Size(10, 10),
true,
false);
+ SetLayerPropertiesForTesting(great_grand_child.get(), identity_matrix,
+ gfx::Point3F(), gfx::PointF(), gfx::Size(10, 10),
+ true, false);
root->AddChild(child);
child->AddChild(grand_child);
+ grand_child->AddChild(great_grand_child);
child->SetForceRenderSurface(true);
scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
@@ -1044,6 +1050,7 @@
ASSERT_TRUE(root->should_flatten_transform());
ASSERT_TRUE(child->should_flatten_transform());
ASSERT_TRUE(grand_child->should_flatten_transform());
+ ASSERT_TRUE(great_grand_child->should_flatten_transform());
gfx::Transform expected_child_draw_transform = rotation_about_y_axis;
gfx::Transform expected_child_screen_space_transform = rotation_about_y_axis;
@@ -1053,6 +1060,10 @@
flattened_rotation_about_y.FlattenTo2d();
gfx::Transform expected_grand_child_screen_space_transform =
flattened_rotation_about_y * rotation_about_y_axis;
+ gfx::Transform expected_great_grand_child_draw_transform =
+ flattened_rotation_about_y;
+ gfx::Transform expected_great_grand_child_screen_space_transform =
+ flattened_rotation_about_y * flattened_rotation_about_y;
ExecuteCalculateDrawProperties(root.get());
@@ -1070,6 +1081,11 @@
grand_child->draw_transform());
EXPECT_TRANSFORMATION_MATRIX_EQ(expected_grand_child_screen_space_transform,
grand_child->screen_space_transform());
+ EXPECT_TRANSFORMATION_MATRIX_EQ(expected_great_grand_child_draw_transform,
+ great_grand_child->draw_transform());
+ EXPECT_TRANSFORMATION_MATRIX_EQ(
+ expected_great_grand_child_screen_space_transform,
+ great_grand_child->screen_space_transform());
}
TEST_F(LayerTreeHostCommonTest, TransformsForDegenerateIntermediateLayer) {
@@ -7015,6 +7031,27 @@
LayerTreeHostCommon::CalculateDrawProperties(&inputs);
EXPECT_EQ(2u, render_surface_layer_list.size());
+
+ int count_represents_target_render_surface = 0;
+ int count_represents_contributing_render_surface = 0;
+ int count_represents_itself = 0;
+ auto end = LayerIterator<LayerImpl>::End(&render_surface_layer_list);
+ for (auto it = LayerIterator<LayerImpl>::Begin(&render_surface_layer_list);
+ it != end; ++it) {
+ if (it.represents_target_render_surface())
+ count_represents_target_render_surface++;
+ if (it.represents_contributing_render_surface())
+ count_represents_contributing_render_surface++;
+ if (it.represents_itself())
+ count_represents_itself++;
+ }
+
+ // Two render surfaces.
+ EXPECT_EQ(2, count_represents_target_render_surface);
+ // Second render surface contributes to root render surface.
+ EXPECT_EQ(1, count_represents_contributing_render_surface);
+ // All 4 layers represent itself.
+ EXPECT_EQ(4, count_represents_itself);
}
{
@@ -7025,6 +7062,27 @@
LayerTreeHostCommon::CalculateDrawProperties(&inputs);
EXPECT_EQ(1u, render_surface_layer_list.size());
+
+ int count_represents_target_render_surface = 0;
+ int count_represents_contributing_render_surface = 0;
+ int count_represents_itself = 0;
+ auto end = LayerIterator<LayerImpl>::End(&render_surface_layer_list);
+ for (auto it = LayerIterator<LayerImpl>::Begin(&render_surface_layer_list);
+ it != end; ++it) {
+ if (it.represents_target_render_surface())
+ count_represents_target_render_surface++;
+ if (it.represents_contributing_render_surface())
+ count_represents_contributing_render_surface++;
+ if (it.represents_itself())
+ count_represents_itself++;
+ }
+
+ // Only root layer has a render surface.
+ EXPECT_EQ(1, count_represents_target_render_surface);
+ // No layer contributes a render surface to root render surface.
+ EXPECT_EQ(0, count_represents_contributing_render_surface);
+ // All 4 layers represent itself.
+ EXPECT_EQ(4, count_represents_itself);
}
}
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index f81a3b1..a8d4294 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -18,7 +18,6 @@
#include "cc/animation/scroll_offset_animation_curve.h"
#include "cc/animation/scrollbar_animation_controller.h"
#include "cc/animation/timing_function.h"
-#include "cc/base/latency_info_swap_promise_monitor.h"
#include "cc/base/math_util.h"
#include "cc/base/util.h"
#include "cc/debug/benchmark_instrumentation.h"
@@ -65,15 +64,17 @@
#include "cc/resources/zero_copy_tile_task_worker_pool.h"
#include "cc/scheduler/delay_based_time_source.h"
#include "cc/trees/damage_tracker.h"
+#include "cc/trees/latency_info_swap_promise_monitor.h"
#include "cc/trees/layer_tree_host.h"
#include "cc/trees/layer_tree_host_common.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/single_thread_proxy.h"
#include "cc/trees/tree_synchronizer.h"
-#include "gpu/command_buffer/client/gles2_interface.h"
#include "gpu/GLES2/gl2extchromium.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
#include "ui/gfx/frame_time.h"
#include "ui/gfx/geometry/rect_conversions.h"
+#include "ui/gfx/geometry/scroll_offset.h"
#include "ui/gfx/geometry/size_conversions.h"
#include "ui/gfx/geometry/vector2d_conversions.h"
@@ -2435,26 +2436,9 @@
const gfx::Point& viewport_point,
const gfx::Vector2dF& scroll_delta) {
if (LayerImpl* layer_impl = CurrentlyScrollingLayer()) {
- Animation* animation =
- layer_impl->layer_animation_controller()->GetAnimation(
- Animation::SCROLL_OFFSET);
- if (!animation)
- return SCROLL_IGNORED;
-
- ScrollOffsetAnimationCurve* curve =
- animation->curve()->ToScrollOffsetAnimationCurve();
-
- gfx::ScrollOffset new_target =
- gfx::ScrollOffsetWithDelta(curve->target_value(), scroll_delta);
- new_target.SetToMax(gfx::ScrollOffset());
- new_target.SetToMin(layer_impl->MaxScrollOffset());
-
- curve->UpdateTarget(
- animation->TrimTimeToCurrentIteration(
- CurrentBeginFrameArgs().frame_time).InSecondsF(),
- new_target);
-
- return SCROLL_STARTED;
+ return ScrollAnimationUpdateTarget(layer_impl, scroll_delta)
+ ? SCROLL_STARTED
+ : SCROLL_IGNORED;
}
// ScrollAnimated is only used for wheel scrolls. We use the same bubbling
// behavior as ScrollBy to determine which layer to animate, but we do not
@@ -2486,17 +2470,7 @@
active_tree_->SetCurrentlyScrollingLayer(layer_impl);
- scoped_ptr<ScrollOffsetAnimationCurve> curve =
- ScrollOffsetAnimationCurve::Create(target_offset,
- EaseInOutTimingFunction::Create());
- curve->SetInitialValue(current_offset);
-
- scoped_ptr<Animation> animation = Animation::Create(
- curve.Pass(), AnimationIdProvider::NextAnimationId(),
- AnimationIdProvider::NextGroupId(), Animation::SCROLL_OFFSET);
- animation->set_is_impl_only(true);
-
- layer_impl->layer_animation_controller()->AddAnimation(animation.Pass());
+ ScrollAnimationCreate(layer_impl, target_offset, current_offset);
SetNeedsAnimate();
return SCROLL_STARTED;
@@ -3459,4 +3433,47 @@
(*it)->OnForwardScrollUpdateToMainThreadOnImpl();
}
+void LayerTreeHostImpl::ScrollAnimationCreate(
+ LayerImpl* layer_impl,
+ const gfx::ScrollOffset& target_offset,
+ const gfx::ScrollOffset& current_offset) {
+ scoped_ptr<ScrollOffsetAnimationCurve> curve =
+ ScrollOffsetAnimationCurve::Create(target_offset,
+ EaseInOutTimingFunction::Create());
+ curve->SetInitialValue(current_offset);
+
+ scoped_ptr<Animation> animation = Animation::Create(
+ curve.Pass(), AnimationIdProvider::NextAnimationId(),
+ AnimationIdProvider::NextGroupId(), Animation::SCROLL_OFFSET);
+ animation->set_is_impl_only(true);
+
+ layer_impl->layer_animation_controller()->AddAnimation(animation.Pass());
+}
+
+bool LayerTreeHostImpl::ScrollAnimationUpdateTarget(
+ LayerImpl* layer_impl,
+ const gfx::Vector2dF& scroll_delta) {
+ Animation* animation =
+ layer_impl->layer_animation_controller()
+ ? layer_impl->layer_animation_controller()->GetAnimation(
+ Animation::SCROLL_OFFSET)
+ : nullptr;
+ if (!animation)
+ return false;
+
+ ScrollOffsetAnimationCurve* curve =
+ animation->curve()->ToScrollOffsetAnimationCurve();
+
+ gfx::ScrollOffset new_target =
+ gfx::ScrollOffsetWithDelta(curve->target_value(), scroll_delta);
+ new_target.SetToMax(gfx::ScrollOffset());
+ new_target.SetToMin(layer_impl->MaxScrollOffset());
+
+ curve->UpdateTarget(
+ animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time)
+ .InSecondsF(),
+ new_target);
+
+ return true;
+}
} // namespace cc
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 94012e0..defe796 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -33,12 +33,19 @@
#include "cc/resources/rasterizer.h"
#include "cc/resources/resource_provider.h"
#include "cc/resources/tile_manager.h"
+#include "cc/resources/ui_resource_client.h"
#include "cc/scheduler/commit_earlyout_reason.h"
#include "cc/scheduler/draw_result.h"
+#include "cc/trees/layer_tree_settings.h"
+#include "cc/trees/proxy.h"
#include "skia/ext/refptr.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/geometry/rect.h"
+namespace gfx {
+class ScrollOffset;
+}
+
namespace cc {
class CompletionEvent;
@@ -59,11 +66,13 @@
class ResourcePool;
class ScrollElasticityHelper;
class ScrollbarLayerImplBase;
+class SwapPromise;
+class SwapPromiseMonitor;
class TextureMailboxDeleter;
class TopControlsManager;
class UIResourceBitmap;
class UIResourceRequest;
-struct RendererCapabilitiesImpl;
+struct ScrollAndScaleSet;
enum class GpuRasterizationStatus {
ON,
@@ -593,6 +602,12 @@
void NotifySwapPromiseMonitorsOfSetNeedsRedraw();
void NotifySwapPromiseMonitorsOfForwardingToMainThread();
+ void ScrollAnimationCreate(LayerImpl* layer_impl,
+ const gfx::ScrollOffset& target_offset,
+ const gfx::ScrollOffset& current_offset);
+ bool ScrollAnimationUpdateTarget(LayerImpl* layer_impl,
+ const gfx::Vector2dF& scroll_delta);
+
typedef base::hash_map<UIResourceId, UIResourceData>
UIResourceMap;
UIResourceMap ui_resource_map_;
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 4e3230b..e8471e2 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -12,7 +12,6 @@
#include "base/containers/hash_tables.h"
#include "base/containers/scoped_ptr_hash_map.h"
#include "cc/animation/scrollbar_animation_controller_thinning.h"
-#include "cc/base/latency_info_swap_promise.h"
#include "cc/base/math_util.h"
#include "cc/input/page_scale_animation.h"
#include "cc/input/top_controls_manager.h"
@@ -33,6 +32,7 @@
#include "cc/output/copy_output_request.h"
#include "cc/output/copy_output_result.h"
#include "cc/output/gl_renderer.h"
+#include "cc/output/latency_info_swap_promise.h"
#include "cc/quads/render_pass_draw_quad.h"
#include "cc/quads/solid_color_draw_quad.h"
#include "cc/quads/texture_draw_quad.h"
diff --git a/cc/trees/layer_tree_host_pixeltest_masks.cc b/cc/trees/layer_tree_host_pixeltest_masks.cc
index b9491bb..97765bd 100644
--- a/cc/trees/layer_tree_host_pixeltest_masks.cc
+++ b/cc/trees/layer_tree_host_pixeltest_masks.cc
@@ -12,9 +12,6 @@
#if !defined(OS_ANDROID)
-// TODO(enne): these time out on Windows. http://crbug.com/435632
-#if !defined(OS_WIN)
-
namespace cc {
namespace {
@@ -62,13 +59,13 @@
TEST_P(LayerTreeHostMasksPixelTest, MaskOfLayer) {
scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer(
- gfx::Rect(200, 200), SK_ColorWHITE);
+ gfx::Rect(100, 100), SK_ColorWHITE);
scoped_refptr<SolidColorLayer> green = CreateSolidColorLayerWithBorder(
- gfx::Rect(50, 50, 100, 100), kCSSGreen, 1, SK_ColorBLACK);
+ gfx::Rect(25, 25, 50, 50), kCSSGreen, 1, SK_ColorBLACK);
background->AddChild(green);
- gfx::Size mask_bounds(100, 100);
+ gfx::Size mask_bounds(50, 50);
MaskContentLayerClient client(mask_bounds);
scoped_refptr<PictureLayer> mask = PictureLayer::Create(&client);
mask->SetBounds(mask_bounds);
@@ -82,9 +79,9 @@
TEST_P(LayerTreeHostMasksPixelTest, ImageMaskOfLayer) {
scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer(
- gfx::Rect(200, 200), SK_ColorWHITE);
+ gfx::Rect(100, 100), SK_ColorWHITE);
- gfx::Size mask_bounds(100, 100);
+ gfx::Size mask_bounds(50, 50);
scoped_refptr<PictureImageLayer> mask = PictureImageLayer::Create();
mask->SetIsDrawable(true);
@@ -92,7 +89,7 @@
mask->SetBounds(mask_bounds);
SkBitmap bitmap;
- bitmap.allocN32Pixels(400, 400);
+ bitmap.allocN32Pixels(200, 200);
SkCanvas canvas(bitmap);
canvas.scale(SkIntToScalar(4), SkIntToScalar(4));
MaskContentLayerClient client(mask_bounds);
@@ -101,7 +98,7 @@
mask->SetBitmap(bitmap);
scoped_refptr<SolidColorLayer> green = CreateSolidColorLayerWithBorder(
- gfx::Rect(50, 50, 100, 100), kCSSGreen, 1, SK_ColorBLACK);
+ gfx::Rect(25, 25, 50, 50), kCSSGreen, 1, SK_ColorBLACK);
green->SetMaskLayer(mask.get());
background->AddChild(green);
@@ -111,20 +108,20 @@
TEST_P(LayerTreeHostMasksPixelTest, MaskOfClippedLayer) {
scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer(
- gfx::Rect(200, 200), SK_ColorWHITE);
+ gfx::Rect(100, 100), SK_ColorWHITE);
// Clip to the top half of the green layer.
scoped_refptr<Layer> clip = Layer::Create();
clip->SetPosition(gfx::Point(0, 0));
- clip->SetBounds(gfx::Size(200, 100));
+ clip->SetBounds(gfx::Size(100, 50));
clip->SetMasksToBounds(true);
background->AddChild(clip);
scoped_refptr<SolidColorLayer> green = CreateSolidColorLayerWithBorder(
- gfx::Rect(50, 50, 100, 100), kCSSGreen, 1, SK_ColorBLACK);
+ gfx::Rect(25, 25, 50, 50), kCSSGreen, 1, SK_ColorBLACK);
clip->AddChild(green);
- gfx::Size mask_bounds(100, 100);
+ gfx::Size mask_bounds(50, 50);
MaskContentLayerClient client(mask_bounds);
scoped_refptr<PictureLayer> mask = PictureLayer::Create(&client);
mask->SetBounds(mask_bounds);
@@ -139,9 +136,9 @@
TEST_P(LayerTreeHostMasksPixelTest, MaskWithReplica) {
scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer(
- gfx::Rect(200, 200), SK_ColorWHITE);
+ gfx::Rect(100, 100), SK_ColorWHITE);
- gfx::Size mask_bounds(100, 100);
+ gfx::Size mask_bounds(50, 50);
MaskContentLayerClient client(mask_bounds);
scoped_refptr<PictureLayer> mask = PictureLayer::Create(&client);
mask->SetBounds(mask_bounds);
@@ -149,7 +146,7 @@
mask->SetIsMask(true);
scoped_refptr<SolidColorLayer> green = CreateSolidColorLayerWithBorder(
- gfx::Rect(0, 0, 100, 100), kCSSGreen, 1, SK_ColorBLACK);
+ gfx::Rect(0, 0, 50, 50), kCSSGreen, 1, SK_ColorBLACK);
background->AddChild(green);
green->SetMaskLayer(mask.get());
@@ -157,8 +154,8 @@
replica_transform.Rotate(-90.0);
scoped_refptr<Layer> replica = Layer::Create();
- replica->SetTransformOrigin(gfx::Point3F(50.f, 50.f, 0.f));
- replica->SetPosition(gfx::Point(100, 100));
+ replica->SetTransformOrigin(gfx::Point3F(25.f, 25.f, 0.f));
+ replica->SetPosition(gfx::Point(50, 50));
replica->SetTransform(replica_transform);
green->SetReplicaLayer(replica.get());
@@ -168,9 +165,9 @@
TEST_P(LayerTreeHostMasksPixelTest, MaskWithReplicaOfClippedLayer) {
scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer(
- gfx::Rect(200, 200), SK_ColorWHITE);
+ gfx::Rect(100, 100), SK_ColorWHITE);
- gfx::Size mask_bounds(100, 100);
+ gfx::Size mask_bounds(50, 50);
MaskContentLayerClient client(mask_bounds);
scoped_refptr<PictureLayer> mask = PictureLayer::Create(&client);
mask->SetBounds(mask_bounds);
@@ -180,13 +177,13 @@
// Clip to the bottom half of the green layer, and the left half of the
// replica.
scoped_refptr<Layer> clip = Layer::Create();
- clip->SetPosition(gfx::Point(0, 50));
- clip->SetBounds(gfx::Size(150, 150));
+ clip->SetPosition(gfx::Point(0, 25));
+ clip->SetBounds(gfx::Size(75, 75));
clip->SetMasksToBounds(true);
background->AddChild(clip);
scoped_refptr<SolidColorLayer> green = CreateSolidColorLayerWithBorder(
- gfx::Rect(0, -50, 100, 100), kCSSGreen, 1, SK_ColorBLACK);
+ gfx::Rect(0, -25, 50, 50), kCSSGreen, 1, SK_ColorBLACK);
clip->AddChild(green);
green->SetMaskLayer(mask.get());
@@ -194,8 +191,8 @@
replica_transform.Rotate(-90.0);
scoped_refptr<Layer> replica = Layer::Create();
- replica->SetTransformOrigin(gfx::Point3F(50.f, 50.f, 0.f));
- replica->SetPosition(gfx::Point(100, 100));
+ replica->SetTransformOrigin(gfx::Point3F(25.f, 25.f, 0.f));
+ replica->SetPosition(gfx::Point(50, 50));
replica->SetTransform(replica_transform);
green->SetReplicaLayer(replica.get());
@@ -206,9 +203,9 @@
TEST_P(LayerTreeHostMasksPixelTest, MaskOfReplica) {
scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer(
- gfx::Rect(200, 200), SK_ColorWHITE);
+ gfx::Rect(100, 100), SK_ColorWHITE);
- gfx::Size mask_bounds(100, 100);
+ gfx::Size mask_bounds(50, 50);
MaskContentLayerClient client(mask_bounds);
scoped_refptr<PictureLayer> mask = PictureLayer::Create(&client);
mask->SetBounds(mask_bounds);
@@ -216,19 +213,19 @@
mask->SetIsMask(true);
scoped_refptr<SolidColorLayer> green = CreateSolidColorLayerWithBorder(
- gfx::Rect(50, 0, 100, 100), kCSSGreen, 1, SK_ColorBLACK);
+ gfx::Rect(25, 0, 50, 50), kCSSGreen, 1, SK_ColorBLACK);
background->AddChild(green);
scoped_refptr<SolidColorLayer> orange = CreateSolidColorLayer(
- gfx::Rect(-50, 50, 50, 50), kCSSOrange);
+ gfx::Rect(-25, 25, 25, 25), kCSSOrange);
green->AddChild(orange);
gfx::Transform replica_transform;
replica_transform.Rotate(180.0);
- replica_transform.Translate(100.0, 0.0);
+ replica_transform.Translate(50.0, 0.0);
scoped_refptr<Layer> replica = Layer::Create();
- replica->SetTransformOrigin(gfx::Point3F(100.f, 100.f, 0.f));
+ replica->SetTransformOrigin(gfx::Point3F(50.f, 50.f, 0.f));
replica->SetPosition(gfx::Point());
replica->SetTransform(replica_transform);
replica->SetMaskLayer(mask.get());
@@ -240,9 +237,9 @@
TEST_P(LayerTreeHostMasksPixelTest, MaskOfReplicaOfClippedLayer) {
scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer(
- gfx::Rect(200, 200), SK_ColorWHITE);
+ gfx::Rect(100, 100), SK_ColorWHITE);
- gfx::Size mask_bounds(100, 100);
+ gfx::Size mask_bounds(50, 50);
MaskContentLayerClient client(mask_bounds);
scoped_refptr<PictureLayer> mask = PictureLayer::Create(&client);
mask->SetBounds(mask_bounds);
@@ -251,25 +248,25 @@
// Clip to the bottom 3/4 of the green layer, and the top 3/4 of the replica.
scoped_refptr<Layer> clip = Layer::Create();
- clip->SetPosition(gfx::Point(0, 25));
- clip->SetBounds(gfx::Size(200, 150));
+ clip->SetPosition(gfx::Point(0, 12));
+ clip->SetBounds(gfx::Size(100, 75));
clip->SetMasksToBounds(true);
background->AddChild(clip);
scoped_refptr<SolidColorLayer> green = CreateSolidColorLayerWithBorder(
- gfx::Rect(50, -25, 100, 100), kCSSGreen, 1, SK_ColorBLACK);
+ gfx::Rect(25, -12, 50, 50), kCSSGreen, 1, SK_ColorBLACK);
clip->AddChild(green);
scoped_refptr<SolidColorLayer> orange = CreateSolidColorLayer(
- gfx::Rect(-50, 50, 50, 50), kCSSOrange);
+ gfx::Rect(-25, 25, 25, 25), kCSSOrange);
green->AddChild(orange);
gfx::Transform replica_transform;
replica_transform.Rotate(180.0);
- replica_transform.Translate(100.0, 0.0);
+ replica_transform.Translate(50.0, 0.0);
scoped_refptr<Layer> replica = Layer::Create();
- replica->SetTransformOrigin(gfx::Point3F(100.f, 100.f, 0.f));
+ replica->SetTransformOrigin(gfx::Point3F(50.f, 50.f, 0.f));
replica->SetPosition(gfx::Point());
replica->SetTransform(replica_transform);
replica->SetMaskLayer(mask.get());
@@ -368,24 +365,24 @@
TEST_P(LayerTreeHostMasksForBackgroundFiltersPixelTest,
MaskOfLayerWithBackgroundFilter) {
scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer(
- gfx::Rect(256, 256), SK_ColorWHITE);
+ gfx::Rect(100, 100), SK_ColorWHITE);
- gfx::Size picture_bounds(256, 256);
+ gfx::Size picture_bounds(100, 100);
CheckerContentLayerClient picture_client(picture_bounds, SK_ColorGREEN, true);
scoped_refptr<PictureLayer> picture = PictureLayer::Create(&picture_client);
picture->SetBounds(picture_bounds);
picture->SetIsDrawable(true);
scoped_refptr<SolidColorLayer> blur = CreateSolidColorLayer(
- gfx::Rect(256, 256), SK_ColorTRANSPARENT);
+ gfx::Rect(100, 100), SK_ColorTRANSPARENT);
background->AddChild(picture);
background->AddChild(blur);
FilterOperations filters;
- filters.Append(FilterOperation::CreateBlurFilter(2.f));
+ filters.Append(FilterOperation::CreateBlurFilter(1.5f));
blur->SetBackgroundFilters(filters);
- gfx::Size mask_bounds(256, 256);
+ gfx::Size mask_bounds(100, 100);
CircleContentLayerClient mask_client(mask_bounds);
scoped_refptr<PictureLayer> mask = PictureLayer::Create(&mask_client);
mask->SetBounds(mask_bounds);
@@ -393,7 +390,7 @@
mask->SetIsMask(true);
blur->SetMaskLayer(mask.get());
- float percentage_pixels_large_error = 2.5f; // 2.5%, ~1600px / (256*256)
+ float percentage_pixels_large_error = 2.5f; // 2.5%, ~250px / (100*100)
float percentage_pixels_small_error = 0.0f;
float average_error_allowed_in_bad_pixels = 100.0f;
int large_error_allowed = 256;
@@ -414,9 +411,9 @@
TEST_P(LayerTreeHostMasksForBackgroundFiltersPixelTest,
MaskOfLayerWithBlend) {
scoped_refptr<SolidColorLayer> background = CreateSolidColorLayer(
- gfx::Rect(256, 256), SK_ColorWHITE);
+ gfx::Rect(128, 128), SK_ColorWHITE);
- gfx::Size picture_bounds(256, 256);
+ gfx::Size picture_bounds(128, 128);
CheckerContentLayerClient picture_client_vertical(
picture_bounds, SK_ColorGREEN, true);
scoped_refptr<PictureLayer> picture_vertical =
@@ -436,7 +433,7 @@
background->AddChild(picture_vertical);
background->AddChild(picture_horizontal);
- gfx::Size mask_bounds(256, 256);
+ gfx::Size mask_bounds(128, 128);
CircleContentLayerClient mask_client(mask_bounds);
scoped_refptr<PictureLayer> mask = PictureLayer::Create(&mask_client);
mask->SetBounds(mask_bounds);
@@ -444,7 +441,7 @@
mask->SetIsMask(true);
picture_horizontal->SetMaskLayer(mask.get());
- float percentage_pixels_large_error = 0.01f; // 0.01%, ~6px / (256*256)
+ float percentage_pixels_large_error = 0.04f; // 0.04%, ~6px / (128*128)
float percentage_pixels_small_error = 0.0f;
float average_error_allowed_in_bad_pixels = 256.0f;
int large_error_allowed = 256;
@@ -465,5 +462,4 @@
} // namespace
} // namespace cc
-#endif // !defined(OS_WIN)
#endif // !defined(OS_ANDROID)
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 2ec6e66..9416474 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -9,7 +9,6 @@
#include "base/auto_reset.h"
#include "base/synchronization/lock.h"
#include "cc/animation/timing_function.h"
-#include "cc/base/swap_promise.h"
#include "cc/debug/frame_rate_counter.h"
#include "cc/layers/content_layer.h"
#include "cc/layers/content_layer_client.h"
@@ -23,6 +22,7 @@
#include "cc/output/copy_output_request.h"
#include "cc/output/copy_output_result.h"
#include "cc/output/output_surface.h"
+#include "cc/output/swap_promise.h"
#include "cc/quads/draw_quad.h"
#include "cc/quads/io_surface_draw_quad.h"
#include "cc/quads/tile_draw_quad.h"
@@ -2958,6 +2958,92 @@
MULTI_THREAD_TEST_F(LayerTreeHostTestDeferredInitialize);
+class LayerTreeHostTestResourcelessSoftwareDraw : public LayerTreeHostTest {
+ public:
+ void SetupTree() override {
+ root_layer_ = FakePictureLayer::Create(&client_);
+ root_layer_->SetIsDrawable(true);
+ root_layer_->SetBounds(gfx::Size(50, 50));
+
+ parent_layer_ = FakePictureLayer::Create(&client_);
+ parent_layer_->SetIsDrawable(true);
+ parent_layer_->SetBounds(gfx::Size(50, 50));
+ parent_layer_->SetForceRenderSurface(true);
+
+ child_layer_ = FakePictureLayer::Create(&client_);
+ child_layer_->SetIsDrawable(true);
+ child_layer_->SetBounds(gfx::Size(50, 50));
+
+ root_layer_->AddChild(parent_layer_);
+ parent_layer_->AddChild(child_layer_);
+ layer_tree_host()->SetRootLayer(root_layer_);
+
+ LayerTreeHostTest::SetupTree();
+ }
+
+ scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface() override {
+ return FakeOutputSurface::CreateDeferredGL(
+ make_scoped_ptr(new SoftwareOutputDevice), delegating_renderer());
+ }
+
+ void BeginTest() override {
+ PostSetNeedsCommitToMainThread();
+ swap_count_ = 0;
+ }
+
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame_data,
+ DrawResult draw_result) override {
+ if (host_impl->GetDrawMode() == DRAW_MODE_RESOURCELESS_SOFTWARE) {
+ EXPECT_EQ(1u, frame_data->render_passes.size());
+ // Has at least 3 quads for each layer.
+ RenderPass* render_pass = frame_data->render_passes[0];
+ EXPECT_GE(render_pass->quad_list.size(), 3u);
+ } else {
+ EXPECT_EQ(2u, frame_data->render_passes.size());
+
+ // At least root layer quad in root render pass.
+ EXPECT_GE(frame_data->render_passes[0]->quad_list.size(), 1u);
+ // At least parent and child layer quads in parent render pass.
+ EXPECT_GE(frame_data->render_passes[1]->quad_list.size(), 2u);
+ }
+ return draw_result;
+ }
+
+ void SwapBuffersCompleteOnThread(LayerTreeHostImpl* host_impl) override {
+ swap_count_++;
+ switch (swap_count_) {
+ case 1: {
+ gfx::Transform identity;
+ gfx::Rect empty_rect;
+ bool resourceless_software_draw = true;
+ host_impl->SetExternalDrawConstraints(identity, empty_rect, empty_rect,
+ empty_rect, identity,
+ resourceless_software_draw);
+ host_impl->SetFullRootLayerDamage();
+ host_impl->SetNeedsRedraw();
+ break;
+ }
+ case 2:
+ EndTest();
+ break;
+ default:
+ NOTREACHED();
+ }
+ }
+
+ void AfterTest() override {}
+
+ private:
+ FakeContentLayerClient client_;
+ scoped_refptr<Layer> root_layer_;
+ scoped_refptr<Layer> parent_layer_;
+ scoped_refptr<Layer> child_layer_;
+ int swap_count_;
+};
+
+MULTI_THREAD_IMPL_TEST_F(LayerTreeHostTestResourcelessSoftwareDraw);
+
class LayerTreeHostTestDeferredInitializeWithGpuRasterization
: public LayerTreeHostTestDeferredInitialize {
void InitializeSettings(LayerTreeSettings* settings) override {
@@ -5262,10 +5348,6 @@
: begin_frame_sent_to_children_(false) {
}
- void InitializeSettings(LayerTreeSettings* settings) override {
- settings->forward_begin_frames_to_children = true;
- }
-
void BeginTest() override {
// Kick off the test with a commit.
PostSetNeedsCommitToMainThread();
@@ -5302,7 +5384,6 @@
void InitializeSettings(LayerTreeSettings* settings) override {
settings->use_external_begin_frame_source = true;
- settings->forward_begin_frames_to_children = true;
}
void BeginTest() override {
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
index 3105e6f..15e0f0c 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -12,11 +12,14 @@
#include "base/containers/hash_tables.h"
#include "base/values.h"
#include "cc/base/scoped_ptr_vector.h"
-#include "cc/base/swap_promise.h"
#include "cc/base/synced_property.h"
+#include "cc/input/layer_selection_bound.h"
#include "cc/layers/layer_impl.h"
+#include "cc/output/begin_frame_args.h"
#include "cc/output/renderer.h"
+#include "cc/output/swap_promise.h"
#include "cc/resources/ui_resource_client.h"
+#include "cc/trees/layer_tree_host_impl.h"
namespace base {
namespace trace_event {
@@ -32,7 +35,6 @@
class HeadsUpDisplayLayerImpl;
class LayerScrollOffsetDelegateProxy;
class LayerTreeDebugState;
-class LayerTreeHostImpl;
class LayerTreeImpl;
class LayerTreeSettings;
class MemoryHistory;
diff --git a/cc/trees/layer_tree_settings.cc b/cc/trees/layer_tree_settings.cc
index 213ad28..96c9d16 100644
--- a/cc/trees/layer_tree_settings.cc
+++ b/cc/trees/layer_tree_settings.cc
@@ -19,10 +19,8 @@
throttle_frame_production(true),
single_thread_proxy_scheduler(true),
use_external_begin_frame_source(false),
- forward_begin_frames_to_children(false),
main_frame_before_activation_enabled(false),
using_synchronous_renderer_compositor(false),
- disable_hi_res_timer_tasks_on_battery(false),
report_overscroll_only_for_scrollable_axes(false),
per_tile_painting_enabled(false),
accelerated_animation_enabled(true),
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
index 373f704..4554362 100644
--- a/cc/trees/layer_tree_settings.h
+++ b/cc/trees/layer_tree_settings.h
@@ -25,10 +25,8 @@
bool throttle_frame_production;
bool single_thread_proxy_scheduler;
bool use_external_begin_frame_source;
- bool forward_begin_frames_to_children;
bool main_frame_before_activation_enabled;
bool using_synchronous_renderer_compositor;
- bool disable_hi_res_timer_tasks_on_battery;
bool report_overscroll_only_for_scrollable_axes;
bool per_tile_painting_enabled;
bool accelerated_animation_enabled;
diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc
index 8e8ef50..544755b 100644
--- a/cc/trees/property_tree.cc
+++ b/cc/trees/property_tree.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include <set>
+#include <vector>
#include "base/logging.h"
#include "cc/base/math_util.h"
@@ -44,7 +45,7 @@
is_animated(false),
to_screen_is_animated(false),
flattens_inherited_transform(false),
- flattens_local_transform(false),
+ node_and_ancestors_are_flat(true),
scrolls(false),
needs_sublayer_scale(false),
layer_scale_factor(1.0f) {
@@ -135,7 +136,18 @@
gfx::Transform* transform) const {
const TransformNode* current = Node(source_id);
const TransformNode* dest = Node(dest_id);
- if (!dest || dest->data.ancestors_are_invertible) {
+ // Combine transforms to and from the screen when possible. Since flattening
+ // is a non-linear operation, we cannot use this approach when there is
+ // non-trivial flattening between the source and destination nodes. For
+ // example, consider the tree R->A->B->C, where B flattens its inherited
+ // transform, and A has a non-flat transform. Suppose C is the source and A is
+ // the destination. The expected result is C * B. But C's to_screen
+ // transform is C * B * flattened(A * R), and A's from_screen transform is
+ // R^{-1} * A^{-1}. If at least one of A and R isn't flat, the inverse of
+ // flattened(A * R) won't be R^{-1} * A{-1}, so multiplying C's to_screen and
+ // A's from_screen will not produce the correct result.
+ if (!dest || (dest->data.ancestors_are_invertible &&
+ current->data.node_and_ancestors_are_flat)) {
transform->ConcatTransform(current->data.to_screen);
if (dest)
transform->ConcatTransform(dest->data.from_screen);
@@ -143,12 +155,43 @@
}
bool all_are_invertible = true;
+
+ // Flattening is defined in a way that requires it to be applied while
+ // traversing downward in the tree. We first identify nodes that are on the
+ // path from the source to the destination (this is traversing upward), and
+ // then we visit these nodes in reverse order, flattening as needed. We
+ // early-out if we get to a node whose target node is the destination, since
+ // we can then re-use the target space transform stored at that node.
+ std::vector<int> source_to_destination;
+ source_to_destination.push_back(current->id);
+ current = parent(current);
for (; current && current->id > dest_id; current = parent(current)) {
- transform->ConcatTransform(current->data.to_parent);
- if (!current->data.is_invertible)
+ if (current->data.target_id == dest_id &&
+ current->data.content_target_id == dest_id)
+ break;
+ source_to_destination.push_back(current->id);
+ }
+
+ gfx::Transform combined_transform;
+ if (current->id > dest_id) {
+ combined_transform = current->data.to_target;
+ // The stored target space transform has sublayer scale baked in, but we
+ // need the unscaled transform.
+ combined_transform.Scale(1.0f / dest->data.sublayer_scale.x(),
+ 1.0f / dest->data.sublayer_scale.y());
+ }
+
+ for (int i = source_to_destination.size() - 1; i >= 0; i--) {
+ const TransformNode* node = Node(source_to_destination[i]);
+ if (node->data.flattens_inherited_transform)
+ combined_transform.FlattenTo2d();
+ combined_transform.PreconcatTransform(node->data.to_parent);
+
+ if (!node->data.is_invertible)
all_are_invertible = false;
}
+ transform->ConcatTransform(combined_transform);
return all_are_invertible;
}
@@ -157,20 +200,27 @@
gfx::Transform* transform) const {
const TransformNode* current = Node(dest_id);
const TransformNode* dest = Node(source_id);
- if (current->data.ancestors_are_invertible) {
+ // Just as in CombineTransformsBetween, we can use screen space transforms in
+ // this computation only when there isn't any non-trivial flattening
+ // involved.
+ if (current->data.ancestors_are_invertible &&
+ current->data.node_and_ancestors_are_flat) {
transform->PreconcatTransform(current->data.from_screen);
if (dest)
transform->PreconcatTransform(dest->data.to_screen);
return true;
}
- bool all_are_invertible = true;
- for (; current && current->id > source_id; current = parent(current)) {
- transform->PreconcatTransform(current->data.from_parent);
- if (!current->data.is_invertible)
- all_are_invertible = false;
- }
-
+ // Inverting a flattening is not equivalent to flattening an inverse. This
+ // means we cannot, for example, use the inverse of each node's to_parent
+ // transform, flattening where needed. Instead, we must compute the transform
+ // from the destination to the source, with flattening, and then invert the
+ // result.
+ gfx::Transform dest_to_source;
+ CombineTransformsBetween(dest_id, source_id, &dest_to_source);
+ gfx::Transform source_to_dest;
+ bool all_are_invertible = dest_to_source.GetInverse(&source_to_dest);
+ transform->PreconcatTransform(source_to_dest);
return all_are_invertible;
}
@@ -191,28 +241,17 @@
node->data.to_screen = node->data.to_parent;
node->data.ancestors_are_invertible = true;
node->data.to_screen_is_animated = false;
- } else if (parent_node->data.flattens_local_transform ||
- node->data.flattens_inherited_transform) {
- // Flattening is tricky. Once a layer is drawn into its render target, it
- // cannot escape, so we only need to consider transforms between the layer
- // and its target when flattening (i.e., its draw transform). To compute the
- // screen space transform when flattening is involved we combine three
- // transforms, A * B * C, where A is the screen space transform of the
- // target, B is the flattened draw transform of the layer's parent, and C is
- // the local transform.
- node->data.to_screen = target_node->data.to_screen;
- gfx::Transform flattened;
- ComputeTransform(parent_node->id, target_node->id, &flattened);
- flattened.FlattenTo2d();
- node->data.to_screen.PreconcatTransform(flattened);
- node->data.to_screen.PreconcatTransform(node->data.to_parent);
- node->data.ancestors_are_invertible =
- parent_node->data.ancestors_are_invertible;
+ node->data.node_and_ancestors_are_flat = node->data.to_parent.IsFlat();
} else {
node->data.to_screen = parent_node->data.to_screen;
+ if (node->data.flattens_inherited_transform)
+ node->data.to_screen.FlattenTo2d();
node->data.to_screen.PreconcatTransform(node->data.to_parent);
node->data.ancestors_are_invertible =
parent_node->data.ancestors_are_invertible;
+ node->data.node_and_ancestors_are_flat =
+ parent_node->data.node_and_ancestors_are_flat &&
+ node->data.to_parent.IsFlat();
}
if (!node->data.to_screen.GetInverse(&node->data.from_screen))
@@ -287,7 +326,6 @@
// Now that we have our scroll delta, we must apply it to each of our
// combined, to/from matrices.
node->data.to_parent.PreconcatTransform(delta);
- node->data.from_parent.ConcatTransform(inverse_delta);
node->data.to_target.PreconcatTransform(delta);
node->data.from_target.ConcatTransform(inverse_delta);
node->data.to_screen.PreconcatTransform(delta);
diff --git a/cc/trees/property_tree.h b/cc/trees/property_tree.h
index cb00e8a..a79ce55 100644
--- a/cc/trees/property_tree.h
+++ b/cc/trees/property_tree.h
@@ -47,7 +47,6 @@
gfx::Transform post_local;
gfx::Transform to_parent;
- gfx::Transform from_parent;
gfx::Transform to_target;
gfx::Transform from_target;
@@ -69,13 +68,14 @@
bool is_animated;
bool to_screen_is_animated;
- // We don't necessarily create a transform node to apply flattening. If we've
- // skipped flattening for an ancestor, we must flatten the transform we
- // inherit, but we don't necessarily need to flatten our local transform. We
- // must therefore use two values to describe the flattening required for the
- // local and inherited transforms.
+ // Flattening, when needed, is only applied to a node's inherited transform,
+ // never to its local transform.
bool flattens_inherited_transform;
- bool flattens_local_transform;
+
+ // This is true if the to_parent transform at every node on the path to the
+ // root is flat.
+ bool node_and_ancestors_are_flat;
+
bool scrolls;
bool needs_sublayer_scale;
@@ -89,7 +89,7 @@
void set_to_parent(const gfx::Transform& transform) {
to_parent = transform;
- is_invertible = to_parent.GetInverse(&from_parent);
+ is_invertible = to_parent.IsInvertible();
}
};
diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc
index 8352ab8..0db2ad7 100644
--- a/cc/trees/property_tree_builder.cc
+++ b/cc/trees/property_tree_builder.cc
@@ -173,6 +173,8 @@
gfx::Vector2dF local_offset = layer->position().OffsetFromOrigin() +
layer->transform().To2dTranslation();
layer->set_offset_to_transform_parent(parent_offset + local_offset);
+ layer->set_should_flatten_transform_from_property_tree(
+ data_from_ancestor.should_flatten);
layer->set_transform_tree_index(transform_parent->transform_tree_index());
return;
}
@@ -188,8 +190,10 @@
node->data.scrolls = is_scrollable;
node->data.flattens_inherited_transform = data_for_children->should_flatten;
- node->data.flattens_local_transform = layer->should_flatten_transform();
- data_for_children->should_flatten = false;
+
+ // Surfaces inherently flatten transforms.
+ data_for_children->should_flatten =
+ layer->should_flatten_transform() || has_surface;
node->data.target_id =
data_from_ancestor.render_target->transform_tree_index();
node->data.content_target_id =
@@ -233,6 +237,9 @@
data_from_ancestor.transform_tree->UpdateTransforms(node->id);
layer->set_offset_to_transform_parent(gfx::Vector2dF());
+
+ // Flattening (if needed) will be handled by |node|.
+ layer->set_should_flatten_transform_from_property_tree(false);
}
void AddOpacityNodeIfNeeded(const DataForRecursion& data_from_ancestor,
diff --git a/cc/trees/property_tree_unittest.cc b/cc/trees/property_tree_unittest.cc
index 014bfcb..4b64050 100644
--- a/cc/trees/property_tree_unittest.cc
+++ b/cc/trees/property_tree_unittest.cc
@@ -5,6 +5,7 @@
#include "cc/trees/property_tree.h"
#include "cc/test/geometry_test_utils.h"
+#include "cc/trees/draw_property_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace cc {
@@ -168,6 +169,75 @@
EXPECT_TRANSFORMATION_MATRIX_EQ(expected, transform);
}
+TEST(PropertyTreeTest, TransformsWithFlattening) {
+ TransformTree tree;
+
+ int grand_parent = tree.Insert(TransformNode(), 0);
+ tree.Node(grand_parent)->data.content_target_id = grand_parent;
+ tree.Node(grand_parent)->data.target_id = grand_parent;
+
+ gfx::Transform rotation_about_x;
+ rotation_about_x.RotateAboutXAxis(15);
+
+ int parent = tree.Insert(TransformNode(), grand_parent);
+ tree.Node(parent)->data.needs_sublayer_scale = true;
+ tree.Node(parent)->data.target_id = grand_parent;
+ tree.Node(parent)->data.content_target_id = parent;
+ tree.Node(parent)->data.local = rotation_about_x;
+
+ int child = tree.Insert(TransformNode(), parent);
+ tree.Node(child)->data.target_id = parent;
+ tree.Node(child)->data.content_target_id = parent;
+ tree.Node(child)->data.flattens_inherited_transform = true;
+ tree.Node(child)->data.local = rotation_about_x;
+
+ int grand_child = tree.Insert(TransformNode(), child);
+ tree.Node(grand_child)->data.target_id = parent;
+ tree.Node(grand_child)->data.content_target_id = parent;
+ tree.Node(grand_child)->data.flattens_inherited_transform = true;
+ tree.Node(grand_child)->data.local = rotation_about_x;
+
+ ComputeTransforms(&tree);
+
+ gfx::Transform flattened_rotation_about_x = rotation_about_x;
+ flattened_rotation_about_x.FlattenTo2d();
+
+ EXPECT_TRANSFORMATION_MATRIX_EQ(rotation_about_x,
+ tree.Node(child)->data.to_target);
+
+ EXPECT_TRANSFORMATION_MATRIX_EQ(flattened_rotation_about_x * rotation_about_x,
+ tree.Node(child)->data.to_screen);
+
+ EXPECT_TRANSFORMATION_MATRIX_EQ(flattened_rotation_about_x * rotation_about_x,
+ tree.Node(grand_child)->data.to_target);
+
+ EXPECT_TRANSFORMATION_MATRIX_EQ(flattened_rotation_about_x *
+ flattened_rotation_about_x *
+ rotation_about_x,
+ tree.Node(grand_child)->data.to_screen);
+
+ gfx::Transform grand_child_to_child;
+ bool success =
+ tree.ComputeTransform(grand_child, child, &grand_child_to_child);
+ EXPECT_TRUE(success);
+ EXPECT_TRANSFORMATION_MATRIX_EQ(rotation_about_x, grand_child_to_child);
+
+ // Remove flattening at grand_child, and recompute transforms.
+ tree.Node(grand_child)->data.flattens_inherited_transform = false;
+ ComputeTransforms(&tree);
+
+ EXPECT_TRANSFORMATION_MATRIX_EQ(rotation_about_x * rotation_about_x,
+ tree.Node(grand_child)->data.to_target);
+
+ EXPECT_TRANSFORMATION_MATRIX_EQ(
+ flattened_rotation_about_x * rotation_about_x * rotation_about_x,
+ tree.Node(grand_child)->data.to_screen);
+
+ success = tree.ComputeTransform(grand_child, child, &grand_child_to_child);
+ EXPECT_TRUE(success);
+ EXPECT_TRANSFORMATION_MATRIX_EQ(rotation_about_x, grand_child_to_child);
+}
+
TEST(PropertyTreeTest, MultiplicationOrder) {
TransformTree tree;
TransformNode& root = *tree.Node(0);
diff --git a/cc/trees/scoped_abort_remaining_swap_promises.h b/cc/trees/scoped_abort_remaining_swap_promises.h
index f8dfc01..e35fbf9 100644
--- a/cc/trees/scoped_abort_remaining_swap_promises.h
+++ b/cc/trees/scoped_abort_remaining_swap_promises.h
@@ -5,7 +5,7 @@
#ifndef CC_TREES_SCOPED_ABORT_REMAINING_SWAP_PROMISES_H_
#define CC_TREES_SCOPED_ABORT_REMAINING_SWAP_PROMISES_H_
-#include "cc/base/swap_promise.h"
+#include "cc/output/swap_promise.h"
#include "cc/trees/layer_tree_host.h"
namespace cc {
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 81c70f0..1ecce4d 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -488,6 +488,11 @@
scheduler_on_impl_thread_->CommitVSyncParameters(timebase, interval);
}
+void SingleThreadProxy::SetEstimatedParentDrawTime(base::TimeDelta draw_time) {
+ if (scheduler_on_impl_thread_)
+ scheduler_on_impl_thread_->SetEstimatedParentDrawTime(draw_time);
+}
+
void SingleThreadProxy::DidSwapBuffersOnImplThread() {
TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersOnImplThread");
if (scheduler_on_impl_thread_)
diff --git a/cc/trees/single_thread_proxy.h b/cc/trees/single_thread_proxy.h
index 5bc6d3d..cfc746a 100644
--- a/cc/trees/single_thread_proxy.h
+++ b/cc/trees/single_thread_proxy.h
@@ -23,6 +23,7 @@
class ContextProvider;
class LayerTreeHost;
class LayerTreeHostSingleThreadClient;
+class ResourceUpdateQueue;
class CC_EXPORT SingleThreadProxy : public Proxy,
NON_EXPORTED_BASE(LayerTreeHostImplClient),
@@ -85,7 +86,7 @@
void DidLoseOutputSurfaceOnImplThread() override;
void CommitVSyncParameters(base::TimeTicks timebase,
base::TimeDelta interval) override;
- void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override {}
+ void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override;
void SetMaxSwapsPendingOnImplThread(int max) override {}
void DidSwapBuffersOnImplThread() override;
void DidSwapBuffersCompleteOnImplThread() override;
diff --git a/cc/base/swap_promise_monitor.cc b/cc/trees/swap_promise_monitor.cc
similarity index 95%
rename from cc/base/swap_promise_monitor.cc
rename to cc/trees/swap_promise_monitor.cc
index 0c04f35..84d8a9f 100644
--- a/cc/base/swap_promise_monitor.cc
+++ b/cc/trees/swap_promise_monitor.cc
@@ -3,9 +3,9 @@
// found in the LICENSE file.
#include "base/logging.h"
-#include "cc/base/swap_promise_monitor.h"
#include "cc/trees/layer_tree_host.h"
#include "cc/trees/layer_tree_host_impl.h"
+#include "cc/trees/swap_promise_monitor.h"
namespace cc {
diff --git a/cc/base/swap_promise_monitor.h b/cc/trees/swap_promise_monitor.h
similarity index 92%
rename from cc/base/swap_promise_monitor.h
rename to cc/trees/swap_promise_monitor.h
index cf06bee..d163af5 100644
--- a/cc/base/swap_promise_monitor.h
+++ b/cc/trees/swap_promise_monitor.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CC_BASE_SWAP_PROMISE_MONITOR_H_
-#define CC_BASE_SWAP_PROMISE_MONITOR_H_
+#ifndef CC_TREES_SWAP_PROMISE_MONITOR_H_
+#define CC_TREES_SWAP_PROMISE_MONITOR_H_
#include "cc/base/cc_export.h"
@@ -42,4 +42,4 @@
} // namespace cc
-#endif // CC_BASE_SWAP_PROMISE_MONITOR_H_
+#endif // CC_TREES_SWAP_PROMISE_MONITOR_H_
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 7452520..6e1a0d9 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -12,12 +12,12 @@
#include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_event_argument.h"
#include "base/trace_event/trace_event_synthetic_delay.h"
-#include "cc/base/swap_promise.h"
#include "cc/debug/benchmark_instrumentation.h"
#include "cc/debug/devtools_instrumentation.h"
#include "cc/input/input_handler.h"
#include "cc/output/context_provider.h"
#include "cc/output/output_surface.h"
+#include "cc/output/swap_promise.h"
#include "cc/quads/draw_quad.h"
#include "cc/resources/prioritized_resource_manager.h"
#include "cc/scheduler/commit_earlyout_reason.h"
diff --git a/cc/trees/thread_proxy.h b/cc/trees/thread_proxy.h
index 927caab..51cc18c 100644
--- a/cc/trees/thread_proxy.h
+++ b/cc/trees/thread_proxy.h
@@ -30,6 +30,7 @@
class ContextProvider;
class InputHandlerClient;
class LayerTreeHost;
+class PrioritizedResourceManager;
class ResourceUpdateQueue;
class Scheduler;
class ScopedThreadProxy;
diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn
index 502bc0a..79919df 100644
--- a/gpu/BUILD.gn
+++ b/gpu/BUILD.gn
@@ -35,6 +35,10 @@
import("//testing/test.gni")
import("//build/config/ui.gni")
+config("gpu_implementation") {
+ defines = [ "GPU_IMPLEMENTATION" ]
+}
+
component("gpu") {
public_deps = [
"//gpu/command_buffer/client",
@@ -54,6 +58,8 @@
"command_buffer/service/gles2_cmd_decoder_mock.cc",
]
+ configs += [ ":gpu_implementation" ]
+
public_deps = [
":gpu",
"//gpu/command_buffer/client:gles2_interface",
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index bf5b19e..d5b799e 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -547,6 +547,8 @@
# valid_es3: The list of values that are valid in OpenGL ES 3, but not ES 2.
# invalid: Examples of invalid values for the type. At least these values
# should be tested to be invalid.
+# deprecated_es3: The list of values that are valid in OpenGL ES 2, but
+# deprecated in ES 3.
# is_complete: The list of valid values of type are final and will not be
# modified during runtime.
_NAMED_TYPE_INFO = {
@@ -776,6 +778,10 @@
'GL_TEXTURE_2D',
'GL_TEXTURE_CUBE_MAP',
],
+ 'valid_es3': [
+ 'GL_TEXTURE_3D',
+ 'GL_TEXTURE_2D_ARRAY',
+ ],
'invalid': [
'GL_TEXTURE_1D',
'GL_TEXTURE_3D',
@@ -1223,9 +1229,22 @@
'GL_UNSIGNED_SHORT_4_4_4_4',
'GL_UNSIGNED_SHORT_5_5_5_1',
],
- 'invalid': [
+ 'valid_es3': [
+ 'GL_BYTE',
+ 'GL_UNSIGNED_SHORT',
'GL_SHORT',
+ 'GL_UNSIGNED_INT',
'GL_INT',
+ 'GL_HALF_FLOAT',
+ 'GL_FLOAT',
+ 'GL_UNSIGNED_INT_2_10_10_10_REV',
+ 'GL_UNSIGNED_INT_10F_11F_11F_REV',
+ 'GL_UNSIGNED_INT_5_9_9_9_REV',
+ 'GL_UNSIGNED_INT_24_8',
+ 'GL_FLOAT_32_UNSIGNED_INT_24_8_REV',
+ ],
+ 'invalid': [
+ 'GL_UNSIGNED_BYTE_3_3_2',
],
},
'ReadPixelType': {
@@ -1278,6 +1297,16 @@
'GL_RGB',
'GL_RGBA',
],
+ 'valid_es3': [
+ 'GL_RED',
+ 'GL_RED_INTEGER',
+ 'GL_RG',
+ 'GL_RG_INTEGER',
+ 'GL_RGB_INTEGER',
+ 'GL_RGBA_INTEGER',
+ 'GL_DEPTH_COMPONENT',
+ 'GL_DEPTH_STENCIL',
+ ],
'invalid': [
'GL_BGRA',
'GL_BGR',
@@ -1292,6 +1321,64 @@
'GL_RGB',
'GL_RGBA',
],
+ 'valid_es3': [
+ 'GL_R8',
+ 'GL_R8_SNORM',
+ 'GL_R16F',
+ 'GL_R32F',
+ 'GL_R8UI',
+ 'GL_R8I',
+ 'GL_R16UI',
+ 'GL_R16I',
+ 'GL_R32UI',
+ 'GL_R32I',
+ 'GL_RG8',
+ 'GL_RG8_SNORM',
+ 'GL_RG16F',
+ 'GL_RG32F',
+ 'GL_RG8UI',
+ 'GL_RG8I',
+ 'GL_RG16UI',
+ 'GL_RG16I',
+ 'GL_RG32UI',
+ 'GL_RG32I',
+ 'GL_RGB8',
+ 'GL_SRGB8',
+ 'GL_RGB565',
+ 'GL_RGB8_SNORM',
+ 'GL_R11F_G11F_B10F',
+ 'GL_RGB9_E5',
+ 'GL_RGB16F',
+ 'GL_RGB32F',
+ 'GL_RGB8UI',
+ 'GL_RGB8I',
+ 'GL_RGB16UI',
+ 'GL_RGB16I',
+ 'GL_RGB32UI',
+ 'GL_RGB32I',
+ 'GL_RGBA8',
+ 'GL_SRGB8_ALPHA8',
+ 'GL_RGBA8_SNORM',
+ 'GL_RGB5_A1',
+ 'GL_RGBA4',
+ 'GL_RGB10_A2',
+ 'GL_RGBA16F',
+ 'GL_RGBA32F',
+ 'GL_RGBA8UI',
+ 'GL_RGBA8I',
+ 'GL_RGB10_A2UI',
+ 'GL_RGBA16UI',
+ 'GL_RGBA16I',
+ 'GL_RGBA32UI',
+ 'GL_RGBA32I',
+ # The DEPTH/STENCIL formats are not supported in CopyTexImage2D.
+ # We will reject them dynamically in GPU command buffer.
+ 'GL_DEPTH_COMPONENT16',
+ 'GL_DEPTH_COMPONENT24',
+ 'GL_DEPTH_COMPONENT32F',
+ 'GL_DEPTH24_STENCIL8',
+ 'GL_DEPTH32F_STENCIL8',
+ ],
'invalid': [
'GL_BGRA',
'GL_BGR',
@@ -1309,6 +1396,78 @@
'GL_RGB8_OES',
'GL_RGBA8_OES',
],
+ 'valid_es3': [
+ 'GL_R8',
+ 'GL_R8_SNORM',
+ 'GL_R16F',
+ 'GL_R32F',
+ 'GL_R8UI',
+ 'GL_R8I',
+ 'GL_R16UI',
+ 'GL_R16I',
+ 'GL_R32UI',
+ 'GL_R32I',
+ 'GL_RG8',
+ 'GL_RG8_SNORM',
+ 'GL_RG16F',
+ 'GL_RG32F',
+ 'GL_RG8UI',
+ 'GL_RG8I',
+ 'GL_RG16UI',
+ 'GL_RG16I',
+ 'GL_RG32UI',
+ 'GL_RG32I',
+ 'GL_SRGB8',
+ 'GL_RGB8_SNORM',
+ 'GL_R11F_G11F_B10F',
+ 'GL_RGB9_E5',
+ 'GL_RGB16F',
+ 'GL_RGB32F',
+ 'GL_RGB8UI',
+ 'GL_RGB8I',
+ 'GL_RGB16UI',
+ 'GL_RGB16I',
+ 'GL_RGB32UI',
+ 'GL_RGB32I',
+ 'GL_SRGB8_ALPHA8',
+ 'GL_RGBA8_SNORM',
+ 'GL_RGB10_A2',
+ 'GL_RGBA16F',
+ 'GL_RGBA32F',
+ 'GL_RGBA8UI',
+ 'GL_RGBA8I',
+ 'GL_RGB10_A2UI',
+ 'GL_RGBA16UI',
+ 'GL_RGBA16I',
+ 'GL_RGBA32UI',
+ 'GL_RGBA32I',
+ 'GL_DEPTH_COMPONENT16',
+ 'GL_DEPTH_COMPONENT24',
+ 'GL_DEPTH_COMPONENT32F',
+ 'GL_DEPTH24_STENCIL8',
+ 'GL_DEPTH32F_STENCIL8',
+ 'GL_COMPRESSED_R11_EAC',
+ 'GL_COMPRESSED_SIGNED_R11_EAC',
+ 'GL_COMPRESSED_RG11_EAC',
+ 'GL_COMPRESSED_SIGNED_RG11_EAC',
+ 'GL_COMPRESSED_RGB8_ETC2',
+ 'GL_COMPRESSED_SRGB8_ETC2',
+ 'GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2',
+ 'GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2',
+ 'GL_COMPRESSED_RGBA8_ETC2_EAC',
+ 'GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC',
+ ],
+ 'deprecated_es3': [
+ 'GL_ALPHA8_EXT',
+ 'GL_LUMINANCE8_EXT',
+ 'GL_LUMINANCE8_ALPHA8_EXT',
+ 'GL_ALPHA16F_EXT',
+ 'GL_LUMINANCE16F_EXT',
+ 'GL_LUMINANCE_ALPHA16F_EXT',
+ 'GL_ALPHA32F_EXT',
+ 'GL_LUMINANCE32F_EXT',
+ 'GL_LUMINANCE_ALPHA32F_EXT',
+ ],
},
'ImageInternalFormat': {
'type': 'GLenum',
@@ -7553,6 +7712,10 @@
self.valid_es3 = info['valid_es3']
else:
self.valid_es3 = []
+ if 'deprecated_es3' in info:
+ self.deprecated_es3 = info['deprecated_es3']
+ else:
+ self.deprecated_es3 = []
def GetType(self):
return self.info['type']
@@ -7566,6 +7729,9 @@
def GetValidValuesES3(self):
return self.valid_es3
+ def GetDeprecatedValuesES3(self):
+ return self.deprecated_es3
+
def IsConstant(self):
if not 'is_complete' in self.info:
return False
@@ -9872,6 +10038,13 @@
file.Write(" %s,\n" % value)
file.Write("};\n")
file.Write("\n")
+ if named_type.GetDeprecatedValuesES3():
+ file.Write("static const %s deprecated_%s_table_es3[] = {\n" %
+ (named_type.GetType(), ToUnderscore(name)))
+ for value in named_type.GetDeprecatedValuesES3():
+ file.Write(" %s,\n" % value)
+ file.Write("};\n")
+ file.Write("\n")
file.Write("Validators::Validators()")
pre = ' : '
for count, name in enumerate(names):
@@ -9891,9 +10064,16 @@
file.Write(" {\n");
file.Write("}\n\n");
- file.Write("void Validators::AddES3Values() {\n")
+ file.Write("void Validators::UpdateValuesES3() {\n")
for name in names:
named_type = NamedType(_NAMED_TYPE_INFO[name])
+ if named_type.GetDeprecatedValuesES3():
+ code = """ %(name)s.RemoveValues(
+ deprecated_%(name)s_table_es3, arraysize(deprecated_%(name)s_table_es3));
+"""
+ file.Write(code % {
+ 'name': ToUnderscore(name),
+ })
if named_type.GetValidValuesES3():
code = """ %(name)s.AddValues(
valid_%(name)s_table_es3, arraysize(valid_%(name)s_table_es3));
diff --git a/gpu/command_buffer/client/BUILD.gn b/gpu/command_buffer/client/BUILD.gn
index 23d5a8c..d86edd4 100644
--- a/gpu/command_buffer/client/BUILD.gn
+++ b/gpu/command_buffer/client/BUILD.gn
@@ -17,10 +17,11 @@
"transfer_buffer.h",
]
- defines = [ "GPU_IMPLEMENTATION" ]
-
- # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
- configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
+ configs += [
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ "//build/config/compiler:no_size_t_to_int_warning",
+ "//gpu:gpu_implementation",
+ ]
all_dependent_configs = [ "//third_party/khronos:khronos_headers" ]
@@ -52,10 +53,11 @@
"gles2_cmd_helper_autogen.h",
]
- defines = [ "GPU_IMPLEMENTATION" ]
-
- # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
- configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
+ configs += [
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ "//build/config/compiler:no_size_t_to_int_warning",
+ "//gpu:gpu_implementation",
+ ]
deps = [
":client",
@@ -116,6 +118,7 @@
"gpu_memory_buffer_manager.cc",
"gpu_memory_buffer_manager.h",
]
+ configs += [ "//gpu:gpu_implementation" ]
deps = [
"//ui/gfx",
]
diff --git a/gpu/command_buffer/cmd_buffer_functions.txt b/gpu/command_buffer/cmd_buffer_functions.txt
index 1dd35fd..87eed68 100644
--- a/gpu/command_buffer/cmd_buffer_functions.txt
+++ b/gpu/command_buffer/cmd_buffer_functions.txt
@@ -133,7 +133,7 @@
GL_APICALL void GL_APIENTRY glPixelStorei (GLenumPixelStore pname, GLintPixelStoreAlignment param);
GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src);
-GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenumReadPixelFormat format, GLenumPixelType type, void* pixels);
+GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenumReadPixelFormat format, GLenumReadPixelType type, void* pixels);
GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenumRenderBufferTarget target, GLenumRenderBufferFormat internalformat, GLsizei width, GLsizei height);
GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void);
diff --git a/gpu/command_buffer/common/BUILD.gn b/gpu/command_buffer/common/BUILD.gn
index 68c3c84..57935ac 100644
--- a/gpu/command_buffer/common/BUILD.gn
+++ b/gpu/command_buffer/common/BUILD.gn
@@ -32,7 +32,7 @@
"value_state.h",
]
- defines = [ "GPU_IMPLEMENTATION" ]
+ configs += [ "//gpu:gpu_implementation" ]
deps = [
":gles2_utils",
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index 14d6a21..22f826f 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -711,6 +711,16 @@
case GL_RGB16F_EXT:
case GL_RGB32F_EXT:
case GL_SRGB_EXT:
+ case GL_SRGB8:
+ case GL_RGB8_SNORM:
+ case GL_R11F_G11F_B10F:
+ case GL_RGB9_E5:
+ case GL_RGB8UI:
+ case GL_RGB8I:
+ case GL_RGB16UI:
+ case GL_RGB16I:
+ case GL_RGB32UI:
+ case GL_RGB32I:
return kRGB;
case GL_BGRA_EXT:
case GL_BGRA8_EXT:
@@ -722,20 +732,51 @@
case GL_RGB5_A1:
case GL_SRGB_ALPHA_EXT:
case GL_SRGB8_ALPHA8_EXT:
+ case GL_RGBA8_SNORM:
+ case GL_RGB10_A2:
+ case GL_RGBA8UI:
+ case GL_RGBA8I:
+ case GL_RGB10_A2UI:
+ case GL_RGBA16UI:
+ case GL_RGBA16I:
+ case GL_RGBA32UI:
+ case GL_RGBA32I:
return kRGBA;
case GL_DEPTH_COMPONENT32_OES:
case GL_DEPTH_COMPONENT24_OES:
case GL_DEPTH_COMPONENT16:
case GL_DEPTH_COMPONENT:
+ case GL_DEPTH_COMPONENT32F:
return kDepth;
case GL_STENCIL_INDEX8:
return kStencil;
case GL_DEPTH_STENCIL_OES:
case GL_DEPTH24_STENCIL8_OES:
+ case GL_DEPTH32F_STENCIL8:
return kDepth | kStencil;
case GL_RED_EXT:
+ case GL_R8:
+ case GL_R8_SNORM:
+ case GL_R16F:
+ case GL_R32F:
+ case GL_R8UI:
+ case GL_R8I:
+ case GL_R16UI:
+ case GL_R16I:
+ case GL_R32UI:
+ case GL_R32I:
return kRed;
case GL_RG_EXT:
+ case GL_RG8:
+ case GL_RG8_SNORM:
+ case GL_RG16F:
+ case GL_RG32F:
+ case GL_RG8UI:
+ case GL_RG8I:
+ case GL_RG16UI:
+ case GL_RG16I:
+ case GL_RG32UI:
+ case GL_RG32I:
return kRed | kGreen;
default:
return 0x0000;
diff --git a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
index 52511ed..fade8fa 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
@@ -4887,6 +4887,18 @@
{GL_UNSIGNED_SHORT_5_6_5, "GL_UNSIGNED_SHORT_5_6_5"},
{GL_UNSIGNED_SHORT_4_4_4_4, "GL_UNSIGNED_SHORT_4_4_4_4"},
{GL_UNSIGNED_SHORT_5_5_5_1, "GL_UNSIGNED_SHORT_5_5_5_1"},
+ {GL_BYTE, "GL_BYTE"},
+ {GL_UNSIGNED_SHORT, "GL_UNSIGNED_SHORT"},
+ {GL_SHORT, "GL_SHORT"},
+ {GL_UNSIGNED_INT, "GL_UNSIGNED_INT"},
+ {GL_INT, "GL_INT"},
+ {GL_HALF_FLOAT, "GL_HALF_FLOAT"},
+ {GL_FLOAT, "GL_FLOAT"},
+ {GL_UNSIGNED_INT_2_10_10_10_REV, "GL_UNSIGNED_INT_2_10_10_10_REV"},
+ {GL_UNSIGNED_INT_10F_11F_11F_REV, "GL_UNSIGNED_INT_10F_11F_11F_REV"},
+ {GL_UNSIGNED_INT_5_9_9_9_REV, "GL_UNSIGNED_INT_5_9_9_9_REV"},
+ {GL_UNSIGNED_INT_24_8, "GL_UNSIGNED_INT_24_8"},
+ {GL_FLOAT_32_UNSIGNED_INT_24_8_REV, "GL_FLOAT_32_UNSIGNED_INT_24_8_REV"},
};
return GLES2Util::GetQualifiedEnumString(string_table,
arraysize(string_table), value);
@@ -5152,6 +5164,8 @@
static const EnumToString string_table[] = {
{GL_TEXTURE_2D, "GL_TEXTURE_2D"},
{GL_TEXTURE_CUBE_MAP, "GL_TEXTURE_CUBE_MAP"},
+ {GL_TEXTURE_3D, "GL_TEXTURE_3D"},
+ {GL_TEXTURE_2D_ARRAY, "GL_TEXTURE_2D_ARRAY"},
};
return GLES2Util::GetQualifiedEnumString(string_table,
arraysize(string_table), value);
@@ -5164,6 +5178,14 @@
{GL_LUMINANCE_ALPHA, "GL_LUMINANCE_ALPHA"},
{GL_RGB, "GL_RGB"},
{GL_RGBA, "GL_RGBA"},
+ {GL_RED, "GL_RED"},
+ {GL_RED_INTEGER, "GL_RED_INTEGER"},
+ {GL_RG, "GL_RG"},
+ {GL_RG_INTEGER, "GL_RG_INTEGER"},
+ {GL_RGB_INTEGER, "GL_RGB_INTEGER"},
+ {GL_RGBA_INTEGER, "GL_RGBA_INTEGER"},
+ {GL_DEPTH_COMPONENT, "GL_DEPTH_COMPONENT"},
+ {GL_DEPTH_STENCIL, "GL_DEPTH_STENCIL"},
};
return GLES2Util::GetQualifiedEnumString(string_table,
arraysize(string_table), value);
@@ -5176,6 +5198,60 @@
{GL_LUMINANCE_ALPHA, "GL_LUMINANCE_ALPHA"},
{GL_RGB, "GL_RGB"},
{GL_RGBA, "GL_RGBA"},
+ {GL_R8, "GL_R8"},
+ {GL_R8_SNORM, "GL_R8_SNORM"},
+ {GL_R16F, "GL_R16F"},
+ {GL_R32F, "GL_R32F"},
+ {GL_R8UI, "GL_R8UI"},
+ {GL_R8I, "GL_R8I"},
+ {GL_R16UI, "GL_R16UI"},
+ {GL_R16I, "GL_R16I"},
+ {GL_R32UI, "GL_R32UI"},
+ {GL_R32I, "GL_R32I"},
+ {GL_RG8, "GL_RG8"},
+ {GL_RG8_SNORM, "GL_RG8_SNORM"},
+ {GL_RG16F, "GL_RG16F"},
+ {GL_RG32F, "GL_RG32F"},
+ {GL_RG8UI, "GL_RG8UI"},
+ {GL_RG8I, "GL_RG8I"},
+ {GL_RG16UI, "GL_RG16UI"},
+ {GL_RG16I, "GL_RG16I"},
+ {GL_RG32UI, "GL_RG32UI"},
+ {GL_RG32I, "GL_RG32I"},
+ {GL_RGB8, "GL_RGB8"},
+ {GL_SRGB8, "GL_SRGB8"},
+ {GL_RGB565, "GL_RGB565"},
+ {GL_RGB8_SNORM, "GL_RGB8_SNORM"},
+ {GL_R11F_G11F_B10F, "GL_R11F_G11F_B10F"},
+ {GL_RGB9_E5, "GL_RGB9_E5"},
+ {GL_RGB16F, "GL_RGB16F"},
+ {GL_RGB32F, "GL_RGB32F"},
+ {GL_RGB8UI, "GL_RGB8UI"},
+ {GL_RGB8I, "GL_RGB8I"},
+ {GL_RGB16UI, "GL_RGB16UI"},
+ {GL_RGB16I, "GL_RGB16I"},
+ {GL_RGB32UI, "GL_RGB32UI"},
+ {GL_RGB32I, "GL_RGB32I"},
+ {GL_RGBA8, "GL_RGBA8"},
+ {GL_SRGB8_ALPHA8, "GL_SRGB8_ALPHA8"},
+ {GL_RGBA8_SNORM, "GL_RGBA8_SNORM"},
+ {GL_RGB5_A1, "GL_RGB5_A1"},
+ {GL_RGBA4, "GL_RGBA4"},
+ {GL_RGB10_A2, "GL_RGB10_A2"},
+ {GL_RGBA16F, "GL_RGBA16F"},
+ {GL_RGBA32F, "GL_RGBA32F"},
+ {GL_RGBA8UI, "GL_RGBA8UI"},
+ {GL_RGBA8I, "GL_RGBA8I"},
+ {GL_RGB10_A2UI, "GL_RGB10_A2UI"},
+ {GL_RGBA16UI, "GL_RGBA16UI"},
+ {GL_RGBA16I, "GL_RGBA16I"},
+ {GL_RGBA32UI, "GL_RGBA32UI"},
+ {GL_RGBA32I, "GL_RGBA32I"},
+ {GL_DEPTH_COMPONENT16, "GL_DEPTH_COMPONENT16"},
+ {GL_DEPTH_COMPONENT24, "GL_DEPTH_COMPONENT24"},
+ {GL_DEPTH_COMPONENT32F, "GL_DEPTH_COMPONENT32F"},
+ {GL_DEPTH24_STENCIL8, "GL_DEPTH24_STENCIL8"},
+ {GL_DEPTH32F_STENCIL8, "GL_DEPTH32F_STENCIL8"},
};
return GLES2Util::GetQualifiedEnumString(string_table,
arraysize(string_table), value);
@@ -5191,6 +5267,68 @@
{GL_LUMINANCE8_ALPHA8_EXT, "GL_LUMINANCE8_ALPHA8_EXT"},
{GL_RGB8_OES, "GL_RGB8_OES"},
{GL_RGBA8_OES, "GL_RGBA8_OES"},
+ {GL_R8, "GL_R8"},
+ {GL_R8_SNORM, "GL_R8_SNORM"},
+ {GL_R16F, "GL_R16F"},
+ {GL_R32F, "GL_R32F"},
+ {GL_R8UI, "GL_R8UI"},
+ {GL_R8I, "GL_R8I"},
+ {GL_R16UI, "GL_R16UI"},
+ {GL_R16I, "GL_R16I"},
+ {GL_R32UI, "GL_R32UI"},
+ {GL_R32I, "GL_R32I"},
+ {GL_RG8, "GL_RG8"},
+ {GL_RG8_SNORM, "GL_RG8_SNORM"},
+ {GL_RG16F, "GL_RG16F"},
+ {GL_RG32F, "GL_RG32F"},
+ {GL_RG8UI, "GL_RG8UI"},
+ {GL_RG8I, "GL_RG8I"},
+ {GL_RG16UI, "GL_RG16UI"},
+ {GL_RG16I, "GL_RG16I"},
+ {GL_RG32UI, "GL_RG32UI"},
+ {GL_RG32I, "GL_RG32I"},
+ {GL_SRGB8, "GL_SRGB8"},
+ {GL_RGB8_SNORM, "GL_RGB8_SNORM"},
+ {GL_R11F_G11F_B10F, "GL_R11F_G11F_B10F"},
+ {GL_RGB9_E5, "GL_RGB9_E5"},
+ {GL_RGB16F, "GL_RGB16F"},
+ {GL_RGB32F, "GL_RGB32F"},
+ {GL_RGB8UI, "GL_RGB8UI"},
+ {GL_RGB8I, "GL_RGB8I"},
+ {GL_RGB16UI, "GL_RGB16UI"},
+ {GL_RGB16I, "GL_RGB16I"},
+ {GL_RGB32UI, "GL_RGB32UI"},
+ {GL_RGB32I, "GL_RGB32I"},
+ {GL_SRGB8_ALPHA8, "GL_SRGB8_ALPHA8"},
+ {GL_RGBA8_SNORM, "GL_RGBA8_SNORM"},
+ {GL_RGB10_A2, "GL_RGB10_A2"},
+ {GL_RGBA16F, "GL_RGBA16F"},
+ {GL_RGBA32F, "GL_RGBA32F"},
+ {GL_RGBA8UI, "GL_RGBA8UI"},
+ {GL_RGBA8I, "GL_RGBA8I"},
+ {GL_RGB10_A2UI, "GL_RGB10_A2UI"},
+ {GL_RGBA16UI, "GL_RGBA16UI"},
+ {GL_RGBA16I, "GL_RGBA16I"},
+ {GL_RGBA32UI, "GL_RGBA32UI"},
+ {GL_RGBA32I, "GL_RGBA32I"},
+ {GL_DEPTH_COMPONENT16, "GL_DEPTH_COMPONENT16"},
+ {GL_DEPTH_COMPONENT24, "GL_DEPTH_COMPONENT24"},
+ {GL_DEPTH_COMPONENT32F, "GL_DEPTH_COMPONENT32F"},
+ {GL_DEPTH24_STENCIL8, "GL_DEPTH24_STENCIL8"},
+ {GL_DEPTH32F_STENCIL8, "GL_DEPTH32F_STENCIL8"},
+ {GL_COMPRESSED_R11_EAC, "GL_COMPRESSED_R11_EAC"},
+ {GL_COMPRESSED_SIGNED_R11_EAC, "GL_COMPRESSED_SIGNED_R11_EAC"},
+ {GL_COMPRESSED_RG11_EAC, "GL_COMPRESSED_RG11_EAC"},
+ {GL_COMPRESSED_SIGNED_RG11_EAC, "GL_COMPRESSED_SIGNED_RG11_EAC"},
+ {GL_COMPRESSED_RGB8_ETC2, "GL_COMPRESSED_RGB8_ETC2"},
+ {GL_COMPRESSED_SRGB8_ETC2, "GL_COMPRESSED_SRGB8_ETC2"},
+ {GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
+ "GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2"},
+ {GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
+ "GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2"},
+ {GL_COMPRESSED_RGBA8_ETC2_EAC, "GL_COMPRESSED_RGBA8_ETC2_EAC"},
+ {GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"},
};
return GLES2Util::GetQualifiedEnumString(string_table,
arraysize(string_table), value);
diff --git a/gpu/command_buffer/service/BUILD.gn b/gpu/command_buffer/service/BUILD.gn
index ee92509..44b0909 100644
--- a/gpu/command_buffer/service/BUILD.gn
+++ b/gpu/command_buffer/service/BUILD.gn
@@ -119,9 +119,10 @@
"vertex_attrib_manager.h",
]
- defines = [ "GPU_IMPLEMENTATION" ]
-
- configs += [ "//third_party/khronos:khronos_headers" ]
+ configs += [
+ "//gpu:gpu_implementation",
+ "//third_party/khronos:khronos_headers",
+ ]
# Prefer mesa GL headers to system headers, which cause problems on Win.
include_dirs = [ "//third_party/mesa/src/include" ]
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index 2452954..6675ba7 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -1070,7 +1070,7 @@
void FeatureInfo::EnableES3Validators() {
DCHECK(IsES3Capable());
- validators_.AddES3Values();
+ validators_.UpdateValuesES3();
}
void FeatureInfo::AddExtensionString(const char* s) {
diff --git a/gpu/command_buffer/service/gl_context_virtual.cc b/gpu/command_buffer/service/gl_context_virtual.cc
index 7747407..0857a52 100644
--- a/gpu/command_buffer/service/gl_context_virtual.cc
+++ b/gpu/command_buffer/service/gl_context_virtual.cc
@@ -6,6 +6,7 @@
#include "gpu/command_buffer/service/gl_state_restorer_impl.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
+#include "ui/gl/gl_gl_api_implementation.h"
#include "ui/gl/gl_surface.h"
#include "ui/gl/gpu_timing.h"
@@ -114,6 +115,21 @@
shared_context_->SetUnbindFboOnMakeCurrent();
}
+base::Closure GLContextVirtual::GetStateWasDirtiedExternallyCallback() {
+ return shared_context_->GetStateWasDirtiedExternallyCallback();
+}
+
+void GLContextVirtual::RestoreStateIfDirtiedExternally() {
+ // The dirty bit should only be cleared after the state has been restored,
+ // which should be done only when the context is current.
+ DCHECK(IsCurrent(NULL));
+ if (!shared_context_->GetStateWasDirtiedExternally())
+ return;
+ gfx::ScopedSetGLToRealGLApi scoped_set_gl_api;
+ GetGLStateRestorer()->RestoreState(NULL);
+ shared_context_->SetStateWasDirtiedExternally(false);
+}
+
GLContextVirtual::~GLContextVirtual() {
Destroy();
}
diff --git a/gpu/command_buffer/service/gl_context_virtual.h b/gpu/command_buffer/service/gl_context_virtual.h
index 42c6d42..d8cf77f 100644
--- a/gpu/command_buffer/service/gl_context_virtual.h
+++ b/gpu/command_buffer/service/gl_context_virtual.h
@@ -48,6 +48,8 @@
void SetSafeToForceGpuSwitch() override;
bool WasAllocatedUsingRobustnessExtension() override;
void SetUnbindFboOnMakeCurrent() override;
+ base::Closure GetStateWasDirtiedExternallyCallback() override;
+ void RestoreStateIfDirtiedExternally() override;
protected:
~GLContextVirtual() override;
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 3e568e3..319e37d 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -7116,6 +7116,7 @@
if (!program) {
return;
}
+ program->TransformFeedbackVaryings(count, varyings, buffer_mode);
glTransformFeedbackVaryings(
program->service_id(), count, varyings, buffer_mode);
}
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
index e07a8ee..cae6c00 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
@@ -443,10 +443,10 @@
GenHelper<GenQueriesEXTImmediate>(kNewClientId);
// Test valid parameters work.
- EXPECT_CALL(*gl_, GenQueriesARB(1, _))
+ EXPECT_CALL(*gl_, GenQueries(1, _))
.WillOnce(SetArgumentPointee<1>(kNewServiceId))
.RetiresOnSaturation();
- EXPECT_CALL(*gl_, BeginQueryARB(GL_ANY_SAMPLES_PASSED_EXT, kNewServiceId))
+ EXPECT_CALL(*gl_, BeginQuery(GL_ANY_SAMPLES_PASSED_EXT, kNewServiceId))
.Times(1)
.RetiresOnSaturation();
@@ -486,7 +486,7 @@
EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
// Test end succeeds
- EXPECT_CALL(*gl_, EndQueryARB(GL_ANY_SAMPLES_PASSED_EXT))
+ EXPECT_CALL(*gl_, EndQuery(GL_ANY_SAMPLES_PASSED_EXT))
.Times(1)
.RetiresOnSaturation();
end_cmd.Init(GL_ANY_SAMPLES_PASSED_EXT, 1);
@@ -494,7 +494,7 @@
EXPECT_EQ(GL_NO_ERROR, GetGLError());
EXPECT_TRUE(query->pending());
- EXPECT_CALL(*gl_, DeleteQueriesARB(1, _)).Times(1).RetiresOnSaturation();
+ EXPECT_CALL(*gl_, DeleteQueries(1, _)).Times(1).RetiresOnSaturation();
}
struct QueryType {
@@ -534,10 +534,10 @@
test->GenHelper<GenQueriesEXTImmediate>(client_id);
if (query_type.is_gl) {
- EXPECT_CALL(*gl, GenQueriesARB(1, _))
+ EXPECT_CALL(*gl, GenQueries(1, _))
.WillOnce(SetArgumentPointee<1>(service_id))
.RetiresOnSaturation();
- EXPECT_CALL(*gl, BeginQueryARB(query_type.type, service_id))
+ EXPECT_CALL(*gl, BeginQuery(query_type.type, service_id))
.Times(1)
.RetiresOnSaturation();
}
@@ -547,7 +547,7 @@
error::Error error1 = test->ExecuteCmd(begin_cmd);
if (query_type.is_gl) {
- EXPECT_CALL(*gl, EndQueryARB(query_type.type))
+ EXPECT_CALL(*gl, EndQuery(query_type.type))
.Times(1)
.RetiresOnSaturation();
}
@@ -575,10 +575,10 @@
if (query_type.is_gl) {
EXPECT_CALL(
- *gl, GetQueryObjectuivARB(service_id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
+ *gl, GetQueryObjectuiv(service_id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
.WillOnce(SetArgumentPointee<2>(1))
.RetiresOnSaturation();
- EXPECT_CALL(*gl, GetQueryObjectuivARB(service_id, GL_QUERY_RESULT_EXT, _))
+ EXPECT_CALL(*gl, GetQueryObjectuiv(service_id, GL_QUERY_RESULT_EXT, _))
.WillOnce(SetArgumentPointee<2>(1))
.RetiresOnSaturation();
}
@@ -601,7 +601,7 @@
!process_success);
if (query_type.is_gl) {
- EXPECT_CALL(*gl, DeleteQueriesARB(1, _)).Times(1).RetiresOnSaturation();
+ EXPECT_CALL(*gl, DeleteQueries(1, _)).Times(1).RetiresOnSaturation();
}
if (query_type.type == GL_COMMANDS_COMPLETED_CHROMIUM) {
#if DCHECK_IS_ON()
diff --git a/gpu/command_buffer/service/gles2_cmd_validation.h b/gpu/command_buffer/service/gles2_cmd_validation.h
index 8ca9861..f4059ed 100644
--- a/gpu/command_buffer/service/gles2_cmd_validation.h
+++ b/gpu/command_buffer/service/gles2_cmd_validation.h
@@ -37,6 +37,17 @@
}
}
+ void RemoveValues(const T* invalid_values, int num_values) {
+ for (int ii = 0; ii < num_values; ++ii) {
+ auto iter = std::find(
+ valid_values_.begin(), valid_values_.end(), invalid_values[ii]);
+ if (iter != valid_values_.end()) {
+ valid_values_.erase(iter);
+ DCHECK(!IsValid(invalid_values[ii]));
+ }
+ }
+ }
+
bool IsValid(const T value) const {
return std::find(valid_values_.begin(), valid_values_.end(), value) !=
valid_values_.end();
@@ -53,7 +64,7 @@
struct Validators {
Validators();
- void AddES3Values();
+ void UpdateValuesES3();
#include "gpu/command_buffer/service/gles2_cmd_validation_autogen.h"
};
diff --git a/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h b/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h
index 2f83240..ee63b3a 100644
--- a/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h
@@ -325,6 +325,21 @@
GL_UNSIGNED_SHORT_5_5_5_1,
};
+static const GLenum valid_pixel_type_table_es3[] = {
+ GL_BYTE,
+ GL_UNSIGNED_SHORT,
+ GL_SHORT,
+ GL_UNSIGNED_INT,
+ GL_INT,
+ GL_HALF_FLOAT,
+ GL_FLOAT,
+ GL_UNSIGNED_INT_2_10_10_10_REV,
+ GL_UNSIGNED_INT_10F_11F_11F_REV,
+ GL_UNSIGNED_INT_5_9_9_9_REV,
+ GL_UNSIGNED_INT_24_8,
+ GL_FLOAT_32_UNSIGNED_INT_24_8_REV,
+};
+
static const GLenum valid_program_parameter_table[] = {
GL_DELETE_STATUS,
GL_LINK_STATUS,
@@ -497,6 +512,11 @@
GL_TEXTURE_CUBE_MAP,
};
+static const GLenum valid_texture_bind_target_table_es3[] = {
+ GL_TEXTURE_3D,
+ GL_TEXTURE_2D_ARRAY,
+};
+
static const GLenum valid_texture_format_table[] = {
GL_ALPHA,
GL_LUMINANCE,
@@ -505,6 +525,17 @@
GL_RGBA,
};
+static const GLenum valid_texture_format_table_es3[] = {
+ GL_RED,
+ GL_RED_INTEGER,
+ GL_RG,
+ GL_RG_INTEGER,
+ GL_RGB_INTEGER,
+ GL_RGBA_INTEGER,
+ GL_DEPTH_COMPONENT,
+ GL_DEPTH_STENCIL,
+};
+
static const GLenum valid_texture_internal_format_table[] = {
GL_ALPHA,
GL_LUMINANCE,
@@ -513,6 +544,63 @@
GL_RGBA,
};
+static const GLenum valid_texture_internal_format_table_es3[] = {
+ GL_R8,
+ GL_R8_SNORM,
+ GL_R16F,
+ GL_R32F,
+ GL_R8UI,
+ GL_R8I,
+ GL_R16UI,
+ GL_R16I,
+ GL_R32UI,
+ GL_R32I,
+ GL_RG8,
+ GL_RG8_SNORM,
+ GL_RG16F,
+ GL_RG32F,
+ GL_RG8UI,
+ GL_RG8I,
+ GL_RG16UI,
+ GL_RG16I,
+ GL_RG32UI,
+ GL_RG32I,
+ GL_RGB8,
+ GL_SRGB8,
+ GL_RGB565,
+ GL_RGB8_SNORM,
+ GL_R11F_G11F_B10F,
+ GL_RGB9_E5,
+ GL_RGB16F,
+ GL_RGB32F,
+ GL_RGB8UI,
+ GL_RGB8I,
+ GL_RGB16UI,
+ GL_RGB16I,
+ GL_RGB32UI,
+ GL_RGB32I,
+ GL_RGBA8,
+ GL_SRGB8_ALPHA8,
+ GL_RGBA8_SNORM,
+ GL_RGB5_A1,
+ GL_RGBA4,
+ GL_RGB10_A2,
+ GL_RGBA16F,
+ GL_RGBA32F,
+ GL_RGBA8UI,
+ GL_RGBA8I,
+ GL_RGB10_A2UI,
+ GL_RGBA16UI,
+ GL_RGBA16I,
+ GL_RGBA32UI,
+ GL_RGBA32I,
+ GL_DEPTH_COMPONENT16,
+ GL_DEPTH_COMPONENT24,
+ GL_DEPTH_COMPONENT32F,
+ GL_DEPTH24_STENCIL8,
+ GL_DEPTH32F_STENCIL8,
+};
+
static const GLenum valid_texture_internal_format_storage_table[] = {
GL_RGB565,
GL_RGBA4,
@@ -524,6 +612,80 @@
GL_RGBA8_OES,
};
+static const GLenum valid_texture_internal_format_storage_table_es3[] = {
+ GL_R8,
+ GL_R8_SNORM,
+ GL_R16F,
+ GL_R32F,
+ GL_R8UI,
+ GL_R8I,
+ GL_R16UI,
+ GL_R16I,
+ GL_R32UI,
+ GL_R32I,
+ GL_RG8,
+ GL_RG8_SNORM,
+ GL_RG16F,
+ GL_RG32F,
+ GL_RG8UI,
+ GL_RG8I,
+ GL_RG16UI,
+ GL_RG16I,
+ GL_RG32UI,
+ GL_RG32I,
+ GL_SRGB8,
+ GL_RGB8_SNORM,
+ GL_R11F_G11F_B10F,
+ GL_RGB9_E5,
+ GL_RGB16F,
+ GL_RGB32F,
+ GL_RGB8UI,
+ GL_RGB8I,
+ GL_RGB16UI,
+ GL_RGB16I,
+ GL_RGB32UI,
+ GL_RGB32I,
+ GL_SRGB8_ALPHA8,
+ GL_RGBA8_SNORM,
+ GL_RGB10_A2,
+ GL_RGBA16F,
+ GL_RGBA32F,
+ GL_RGBA8UI,
+ GL_RGBA8I,
+ GL_RGB10_A2UI,
+ GL_RGBA16UI,
+ GL_RGBA16I,
+ GL_RGBA32UI,
+ GL_RGBA32I,
+ GL_DEPTH_COMPONENT16,
+ GL_DEPTH_COMPONENT24,
+ GL_DEPTH_COMPONENT32F,
+ GL_DEPTH24_STENCIL8,
+ GL_DEPTH32F_STENCIL8,
+ GL_COMPRESSED_R11_EAC,
+ GL_COMPRESSED_SIGNED_R11_EAC,
+ GL_COMPRESSED_RG11_EAC,
+ GL_COMPRESSED_SIGNED_RG11_EAC,
+ GL_COMPRESSED_RGB8_ETC2,
+ GL_COMPRESSED_SRGB8_ETC2,
+ GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
+ GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
+ GL_COMPRESSED_RGBA8_ETC2_EAC,
+ GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,
+};
+
+static const GLenum deprecated_texture_internal_format_storage_table_es3[] = {
+ GL_ALPHA8_EXT,
+ GL_LUMINANCE8_EXT,
+ GL_LUMINANCE8_ALPHA8_EXT,
+ GL_ALPHA16F_EXT,
+ GL_LUMINANCE16F_EXT,
+ GL_LUMINANCE_ALPHA16F_EXT,
+ GL_ALPHA32F_EXT,
+ GL_LUMINANCE32F_EXT,
+ GL_LUMINANCE_ALPHA32F_EXT,
+};
+
static const GLenum valid_texture_mag_filter_mode_table[] = {
GL_NEAREST,
GL_LINEAR,
@@ -771,9 +933,24 @@
arraysize(valid_vertex_pointer_table)) {
}
-void Validators::AddES3Values() {
+void Validators::UpdateValuesES3() {
buffer_target.AddValues(valid_buffer_target_table_es3,
arraysize(valid_buffer_target_table_es3));
+ pixel_type.AddValues(valid_pixel_type_table_es3,
+ arraysize(valid_pixel_type_table_es3));
+ texture_bind_target.AddValues(valid_texture_bind_target_table_es3,
+ arraysize(valid_texture_bind_target_table_es3));
+ texture_format.AddValues(valid_texture_format_table_es3,
+ arraysize(valid_texture_format_table_es3));
+ texture_internal_format.AddValues(
+ valid_texture_internal_format_table_es3,
+ arraysize(valid_texture_internal_format_table_es3));
+ texture_internal_format_storage.RemoveValues(
+ deprecated_texture_internal_format_storage_table_es3,
+ arraysize(deprecated_texture_internal_format_storage_table_es3));
+ texture_internal_format_storage.AddValues(
+ valid_texture_internal_format_storage_table_es3,
+ arraysize(valid_texture_internal_format_storage_table_es3));
}
#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_IMPLEMENTATION_AUTOGEN_H_
diff --git a/gpu/command_buffer/service/gpu_tracer_unittest.cc b/gpu/command_buffer/service/gpu_tracer_unittest.cc
index 48a4db9..8aed1c6 100644
--- a/gpu/command_buffer/service/gpu_tracer_unittest.cc
+++ b/gpu/command_buffer/service/gpu_tracer_unittest.cc
@@ -61,21 +61,21 @@
void SetCurrentGLTime(GLint64 current_time) { current_time_ = current_time; }
void SetDisjoint() { disjointed_ = true; }
- void GenQueriesARB(GLsizei n, GLuint* ids) {
+ void GenQueries(GLsizei n, GLuint* ids) {
for (GLsizei i = 0; i < n; i++) {
ids[i] = next_query_id_++;
alloced_queries_.insert(ids[i]);
}
}
- void DeleteQueriesARB(GLsizei n, const GLuint* ids) {
+ void DeleteQueries(GLsizei n, const GLuint* ids) {
for (GLsizei i = 0; i < n; i++) {
alloced_queries_.erase(ids[i]);
query_timestamp_.erase(ids[i]);
}
}
- void GetQueryObjectivARB(GLuint id, GLenum pname, GLint* params) {
+ void GetQueryObjectiv(GLuint id, GLenum pname, GLint* params) {
switch (pname) {
case GL_QUERY_RESULT_AVAILABLE: {
std::map<GLuint, GLint64>::iterator it = query_timestamp_.find(id);
@@ -86,7 +86,7 @@
break;
}
default:
- FAIL() << "Invalid variable passed to GetQueryObjectivARB: " << pname;
+ FAIL() << "Invalid variable passed to GetQueryObjectiv: " << pname;
}
}
@@ -237,14 +237,14 @@
if (gpu_timing_client_->IsAvailable() &&
gpu_timing_client_->IsTimerOffsetAvailable()) {
// Delegate query APIs used by GPUTrace to a GlFakeQueries
- EXPECT_CALL(*gl_, GenQueriesARB(2, NotNull())).Times(AtLeast(1))
+ EXPECT_CALL(*gl_, GenQueries(2, NotNull())).Times(AtLeast(1))
.WillRepeatedly(
- Invoke(&gl_fake_queries_, &GlFakeQueries::GenQueriesARB));
+ Invoke(&gl_fake_queries_, &GlFakeQueries::GenQueries));
- EXPECT_CALL(*gl_, GetQueryObjectivARB(_, GL_QUERY_RESULT_AVAILABLE,
+ EXPECT_CALL(*gl_, GetQueryObjectiv(_, GL_QUERY_RESULT_AVAILABLE,
NotNull()))
.WillRepeatedly(
- Invoke(&gl_fake_queries_, &GlFakeQueries::GetQueryObjectivARB));
+ Invoke(&gl_fake_queries_, &GlFakeQueries::GetQueryObjectiv));
EXPECT_CALL(*gl_, GetInteger64v(GL_TIMESTAMP, _))
.WillRepeatedly(
@@ -259,9 +259,9 @@
Invoke(&gl_fake_queries_,
&GlFakeQueries::GetQueryObjectui64v));
- EXPECT_CALL(*gl_, DeleteQueriesARB(2, NotNull())).Times(AtLeast(1))
+ EXPECT_CALL(*gl_, DeleteQueries(2, NotNull())).Times(AtLeast(1))
.WillRepeatedly(
- Invoke(&gl_fake_queries_, &GlFakeQueries::DeleteQueriesARB));
+ Invoke(&gl_fake_queries_, &GlFakeQueries::DeleteQueries));
}
}
diff --git a/gpu/command_buffer/service/memory_program_cache.cc b/gpu/command_buffer/service/memory_program_cache.cc
index 16509e5..cf3b0ca 100644
--- a/gpu/command_buffer/service/memory_program_cache.cc
+++ b/gpu/command_buffer/service/memory_program_cache.cc
@@ -174,6 +174,8 @@
Shader* shader_a,
Shader* shader_b,
const LocationMap* bind_attrib_location_map,
+ const std::vector<std::string>& transform_feedback_varyings,
+ GLenum transform_feedback_buffer_mode,
const ShaderCacheCallback& shader_callback) {
char a_sha[kHashLength];
char b_sha[kHashLength];
@@ -188,6 +190,8 @@
ComputeProgramHash(a_sha,
b_sha,
bind_attrib_location_map,
+ transform_feedback_varyings,
+ transform_feedback_buffer_mode,
sha);
const std::string sha_string(sha, kHashLength);
@@ -234,6 +238,8 @@
const Shader* shader_a,
const Shader* shader_b,
const LocationMap* bind_attrib_location_map,
+ const std::vector<std::string>& transform_feedback_varyings,
+ GLenum transform_feedback_buffer_mode,
const ShaderCacheCallback& shader_callback) {
GLenum format;
GLsizei length = 0;
@@ -262,6 +268,8 @@
ComputeProgramHash(a_sha,
b_sha,
bind_attrib_location_map,
+ transform_feedback_varyings,
+ transform_feedback_buffer_mode,
sha);
const std::string sha_string(sha, sizeof(sha));
diff --git a/gpu/command_buffer/service/memory_program_cache.h b/gpu/command_buffer/service/memory_program_cache.h
index b5862d2..593625d 100644
--- a/gpu/command_buffer/service/memory_program_cache.h
+++ b/gpu/command_buffer/service/memory_program_cache.h
@@ -30,12 +30,17 @@
Shader* shader_a,
Shader* shader_b,
const LocationMap* bind_attrib_location_map,
+ const std::vector<std::string>& transform_feedback_varyings,
+ GLenum transform_feedback_buffer_mode,
const ShaderCacheCallback& shader_callback) override;
- void SaveLinkedProgram(GLuint program,
- const Shader* shader_a,
- const Shader* shader_b,
- const LocationMap* bind_attrib_location_map,
- const ShaderCacheCallback& shader_callback) override;
+ void SaveLinkedProgram(
+ GLuint program,
+ const Shader* shader_a,
+ const Shader* shader_b,
+ const LocationMap* bind_attrib_location_map,
+ const std::vector<std::string>& transform_feedback_varyings,
+ GLenum transform_feedback_buffer_mode,
+ const ShaderCacheCallback& shader_callback) override;
void LoadProgram(const std::string& program) override;
diff --git a/gpu/command_buffer/service/memory_program_cache_unittest.cc b/gpu/command_buffer/service/memory_program_cache_unittest.cc
index 795b0af..8dba185 100644
--- a/gpu/command_buffer/service/memory_program_cache_unittest.cc
+++ b/gpu/command_buffer/service/memory_program_cache_unittest.cc
@@ -177,6 +177,7 @@
Shader* fragment_shader_;
int32 shader_cache_count_;
std::string shader_cache_shader_;
+ std::vector<std::string> varyings_;
};
TEST_F(MemoryProgramCacheTest, CacheSave) {
@@ -191,14 +192,14 @@
SetExpectationsForSaveLinkedProgram(kProgramId, &emulator);
cache_->SaveLinkedProgram(kProgramId, vertex_shader_,
- fragment_shader_, NULL,
+ fragment_shader_, NULL, varyings_, GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this)));
EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, cache_->GetLinkedProgramStatus(
vertex_shader_->last_compiled_signature(),
fragment_shader_->last_compiled_signature(),
- NULL));
+ NULL, varyings_, GL_NONE));
EXPECT_EQ(1, shader_cache_count());
}
@@ -214,14 +215,14 @@
SetExpectationsForSaveLinkedProgram(kProgramId, &emulator);
cache_->SaveLinkedProgram(kProgramId, vertex_shader_,
- fragment_shader_, NULL,
+ fragment_shader_, NULL, varyings_, GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this)));
EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, cache_->GetLinkedProgramStatus(
vertex_shader_->last_compiled_signature(),
fragment_shader_->last_compiled_signature(),
- NULL));
+ NULL, varyings_, GL_NONE));
EXPECT_EQ(1, shader_cache_count());
cache_->Clear();
@@ -230,7 +231,7 @@
EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, cache_->GetLinkedProgramStatus(
vertex_shader_->last_compiled_signature(),
fragment_shader_->last_compiled_signature(),
- NULL));
+ NULL, varyings_, GL_NONE));
}
TEST_F(MemoryProgramCacheTest, CacheLoadMatchesSave) {
@@ -245,7 +246,7 @@
SetExpectationsForSaveLinkedProgram(kProgramId, &emulator);
cache_->SaveLinkedProgram(kProgramId, vertex_shader_,
- fragment_shader_, NULL,
+ fragment_shader_, NULL, varyings_, GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this)));
EXPECT_EQ(1, shader_cache_count());
@@ -271,6 +272,8 @@
vertex_shader_,
fragment_shader_,
NULL,
+ varyings_,
+ GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this))));
@@ -298,7 +301,7 @@
SetExpectationsForSaveLinkedProgram(kProgramId, &emulator);
cache_->SaveLinkedProgram(kProgramId, vertex_shader_,
- fragment_shader_, NULL,
+ fragment_shader_, NULL, varyings_, GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this)));
EXPECT_EQ(1, shader_cache_count());
@@ -327,6 +330,8 @@
vertex_shader_,
fragment_shader_,
NULL,
+ varyings_,
+ GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this))));
@@ -354,7 +359,7 @@
SetExpectationsForSaveLinkedProgram(kProgramId, &emulator);
cache_->SaveLinkedProgram(kProgramId, vertex_shader_,
- fragment_shader_, NULL,
+ fragment_shader_, NULL, varyings_, GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this)));
@@ -364,6 +369,8 @@
vertex_shader_,
fragment_shader_,
NULL,
+ varyings_,
+ GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this))));
}
@@ -380,7 +387,7 @@
SetExpectationsForSaveLinkedProgram(kProgramId, &emulator);
cache_->SaveLinkedProgram(kProgramId, vertex_shader_,
- fragment_shader_, NULL,
+ fragment_shader_, NULL, varyings_, GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this)));
@@ -392,6 +399,8 @@
vertex_shader_,
fragment_shader_,
NULL,
+ varyings_,
+ GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this))));
@@ -404,6 +413,8 @@
vertex_shader_,
fragment_shader_,
NULL,
+ varyings_,
+ GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this))));
}
@@ -425,6 +436,8 @@
vertex_shader_,
fragment_shader_,
&binding_map,
+ varyings_,
+ GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this)));
@@ -434,6 +447,8 @@
vertex_shader_,
fragment_shader_,
&binding_map,
+ varyings_,
+ GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this))));
EXPECT_EQ(ProgramCache::PROGRAM_LOAD_FAILURE, cache_->LoadLinkedProgram(
@@ -441,6 +456,51 @@
vertex_shader_,
fragment_shader_,
NULL,
+ varyings_,
+ GL_NONE,
+ base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
+ base::Unretained(this))));
+}
+
+TEST_F(MemoryProgramCacheTest, LoadFailOnDifferentTransformFeedbackVaryings) {
+ const GLenum kFormat = 1;
+ const int kProgramId = 10;
+ const int kBinaryLength = 20;
+ char test_binary[kBinaryLength];
+ for (int i = 0; i < kBinaryLength; ++i) {
+ test_binary[i] = i;
+ }
+ ProgramBinaryEmulator emulator(kBinaryLength, kFormat, test_binary);
+
+ SetExpectationsForSaveLinkedProgram(kProgramId, &emulator);
+ varyings_.push_back("test");
+ cache_->SaveLinkedProgram(kProgramId,
+ vertex_shader_,
+ fragment_shader_,
+ NULL,
+ varyings_,
+ GL_INTERLEAVED_ATTRIBS,
+ base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
+ base::Unretained(this)));
+
+ EXPECT_EQ(ProgramCache::PROGRAM_LOAD_FAILURE, cache_->LoadLinkedProgram(
+ kProgramId,
+ vertex_shader_,
+ fragment_shader_,
+ NULL,
+ varyings_,
+ GL_SEPARATE_ATTRIBS,
+ base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
+ base::Unretained(this))));
+
+ varyings_.push_back("different!");
+ EXPECT_EQ(ProgramCache::PROGRAM_LOAD_FAILURE, cache_->LoadLinkedProgram(
+ kProgramId,
+ vertex_shader_,
+ fragment_shader_,
+ NULL,
+ varyings_,
+ GL_INTERLEAVED_ATTRIBS,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this))));
}
@@ -458,7 +518,7 @@
SetExpectationsForSaveLinkedProgram(kProgramId, &emulator1);
cache_->SaveLinkedProgram(kProgramId, vertex_shader_,
- fragment_shader_, NULL,
+ fragment_shader_, NULL, varyings_, GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this)));
@@ -484,17 +544,19 @@
vertex_shader_,
fragment_shader_,
NULL,
+ varyings_,
+ GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this)));
EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, cache_->GetLinkedProgramStatus(
vertex_shader_->last_compiled_signature(),
fragment_shader_->last_compiled_signature(),
- NULL));
+ NULL, varyings_, GL_NONE));
EXPECT_EQ(ProgramCache::LINK_UNKNOWN, cache_->GetLinkedProgramStatus(
old_sig,
fragment_shader_->last_compiled_signature(),
- NULL));
+ NULL, varyings_, GL_NONE));
}
TEST_F(MemoryProgramCacheTest, SaveCorrectProgram) {
@@ -510,14 +572,14 @@
vertex_shader_->set_source("different!");
SetExpectationsForSaveLinkedProgram(kProgramId, &emulator1);
cache_->SaveLinkedProgram(kProgramId, vertex_shader_,
- fragment_shader_, NULL,
+ fragment_shader_, NULL, varyings_, GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this)));
EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, cache_->GetLinkedProgramStatus(
vertex_shader_->last_compiled_signature(),
fragment_shader_->last_compiled_signature(),
- NULL));
+ NULL, varyings_, GL_NONE));
}
TEST_F(MemoryProgramCacheTest, LoadCorrectProgram) {
@@ -532,14 +594,14 @@
SetExpectationsForSaveLinkedProgram(kProgramId, &emulator);
cache_->SaveLinkedProgram(kProgramId, vertex_shader_,
- fragment_shader_, NULL,
+ fragment_shader_, NULL, varyings_, GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this)));
EXPECT_EQ(ProgramCache::LINK_SUCCEEDED, cache_->GetLinkedProgramStatus(
vertex_shader_->last_compiled_signature(),
fragment_shader_->last_compiled_signature(),
- NULL));
+ NULL, varyings_, GL_NONE));
SetExpectationsForLoadLinkedProgram(kProgramId, &emulator);
@@ -549,6 +611,8 @@
vertex_shader_,
fragment_shader_,
NULL,
+ varyings_,
+ GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this))));
}
@@ -565,7 +629,7 @@
SetExpectationsForSaveLinkedProgram(kProgramId, &emulator);
cache_->SaveLinkedProgram(kProgramId, vertex_shader_,
- fragment_shader_, NULL,
+ fragment_shader_, NULL, varyings_, GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this)));
@@ -577,7 +641,7 @@
ProgramBinaryEmulator emulator2(kBinaryLength, kFormat, test_binary2);
SetExpectationsForSaveLinkedProgram(kProgramId, &emulator2);
cache_->SaveLinkedProgram(kProgramId, vertex_shader_,
- fragment_shader_, NULL,
+ fragment_shader_, NULL, varyings_, GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this)));
@@ -587,6 +651,8 @@
vertex_shader_,
fragment_shader_,
NULL,
+ varyings_,
+ GL_NONE,
base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
base::Unretained(this))));
}
diff --git a/gpu/command_buffer/service/mocks.h b/gpu/command_buffer/service/mocks.h
index d5cff51..9cbc378 100644
--- a/gpu/command_buffer/service/mocks.h
+++ b/gpu/command_buffer/service/mocks.h
@@ -114,18 +114,22 @@
MockProgramCache();
virtual ~MockProgramCache();
- MOCK_METHOD5(LoadLinkedProgram, ProgramLoadResult(
+ MOCK_METHOD7(LoadLinkedProgram, ProgramLoadResult(
GLuint program,
Shader* shader_a,
Shader* shader_b,
const LocationMap* bind_attrib_location_map,
+ const std::vector<std::string>& transform_feedback_varyings,
+ GLenum transform_feedback_buffer_mode,
const ShaderCacheCallback& callback));
- MOCK_METHOD5(SaveLinkedProgram, void(
+ MOCK_METHOD7(SaveLinkedProgram, void(
GLuint program,
const Shader* shader_a,
const Shader* shader_b,
const LocationMap* bind_attrib_location_map,
+ const std::vector<std::string>& transform_feedback_varyings,
+ GLenum transform_feedback_buffer_mode,
const ShaderCacheCallback& callback));
MOCK_METHOD1(LoadProgram, void(const std::string&));
diff --git a/gpu/command_buffer/service/program_cache.cc b/gpu/command_buffer/service/program_cache.cc
index b219086..31802de 100644
--- a/gpu/command_buffer/service/program_cache.cc
+++ b/gpu/command_buffer/service/program_cache.cc
@@ -22,7 +22,9 @@
ProgramCache::LinkedProgramStatus ProgramCache::GetLinkedProgramStatus(
const std::string& shader_signature_a,
const std::string& shader_signature_b,
- const std::map<std::string, GLint>* bind_attrib_location_map) const {
+ const std::map<std::string, GLint>* bind_attrib_location_map,
+ const std::vector<std::string>& transform_feedback_varyings,
+ GLenum transform_feedback_buffer_mode) const {
char a_sha[kHashLength];
char b_sha[kHashLength];
ComputeShaderHash(shader_signature_a, a_sha);
@@ -32,6 +34,8 @@
ComputeProgramHash(a_sha,
b_sha,
bind_attrib_location_map,
+ transform_feedback_varyings,
+ transform_feedback_buffer_mode,
sha);
const std::string sha_string(sha, kHashLength);
@@ -46,7 +50,9 @@
void ProgramCache::LinkedProgramCacheSuccess(
const std::string& shader_signature_a,
const std::string& shader_signature_b,
- const LocationMap* bind_attrib_location_map) {
+ const LocationMap* bind_attrib_location_map,
+ const std::vector<std::string>& transform_feedback_varyings,
+ GLenum transform_feedback_buffer_mode) {
char a_sha[kHashLength];
char b_sha[kHashLength];
ComputeShaderHash(shader_signature_a, a_sha);
@@ -55,6 +61,8 @@
ComputeProgramHash(a_sha,
b_sha,
bind_attrib_location_map,
+ transform_feedback_varyings,
+ transform_feedback_buffer_mode,
sha);
const std::string sha_string(sha, kHashLength);
@@ -81,33 +89,43 @@
if (!map) {
return 0;
}
- std::map<std::string, GLint>::const_iterator it;
size_t total = 0;
- for (it = map->begin(); it != map->end(); ++it) {
+ for (auto it = map->begin(); it != map->end(); ++it) {
total += 4 + it->first.length();
}
return total;
}
+
+size_t CalculateVaryingsSize(const std::vector<std::string>& varyings) {
+ size_t total = 0;
+ for (auto& varying : varyings) {
+ total += 1 + varying.length();
+ }
+ return total;
+}
} // anonymous namespace
void ProgramCache::ComputeProgramHash(
const char* hashed_shader_0,
const char* hashed_shader_1,
const std::map<std::string, GLint>* bind_attrib_location_map,
+ const std::vector<std::string>& transform_feedback_varyings,
+ GLenum transform_feedback_buffer_mode,
char* result) const {
const size_t shader0_size = kHashLength;
const size_t shader1_size = kHashLength;
const size_t map_size = CalculateMapSize(bind_attrib_location_map);
- const size_t total_size = shader0_size + shader1_size + map_size;
+ const size_t var_size = CalculateVaryingsSize(transform_feedback_varyings);
+ const size_t total_size = shader0_size + shader1_size + map_size + var_size
+ + sizeof(transform_feedback_buffer_mode);
scoped_ptr<unsigned char[]> buffer(new unsigned char[total_size]);
memcpy(buffer.get(), hashed_shader_0, shader0_size);
memcpy(&buffer[shader0_size], hashed_shader_1, shader1_size);
+ size_t current_pos = shader0_size + shader1_size;
if (map_size != 0) {
// copy our map
- size_t current_pos = shader0_size + shader1_size;
- std::map<std::string, GLint>::const_iterator it;
- for (it = bind_attrib_location_map->begin();
+ for (auto it = bind_attrib_location_map->begin();
it != bind_attrib_location_map->end();
++it) {
const size_t name_size = it->first.length();
@@ -120,6 +138,18 @@
buffer[current_pos++] = static_cast<unsigned char>(value);
}
}
+
+ if (var_size != 0) {
+ // copy transform feedback varyings
+ for (auto& varying : transform_feedback_varyings) {
+ const size_t name_size = varying.length();
+ memcpy(&buffer.get()[current_pos], varying.c_str(), name_size);
+ current_pos += name_size;
+ buffer[current_pos++] = ' ';
+ }
+ }
+ memcpy(&buffer[current_pos], &transform_feedback_buffer_mode,
+ sizeof(transform_feedback_buffer_mode));
base::SHA1HashBytes(buffer.get(),
total_size, reinterpret_cast<unsigned char*>(result));
}
diff --git a/gpu/command_buffer/service/program_cache.h b/gpu/command_buffer/service/program_cache.h
index 624c436..44593df 100644
--- a/gpu/command_buffer/service/program_cache.h
+++ b/gpu/command_buffer/service/program_cache.h
@@ -42,7 +42,9 @@
LinkedProgramStatus GetLinkedProgramStatus(
const std::string& shader_signature_a,
const std::string& shader_signature_b,
- const LocationMap* bind_attrib_location_map) const;
+ const LocationMap* bind_attrib_location_map,
+ const std::vector<std::string>& transform_feedback_varyings,
+ GLenum transform_feedback_buffer_mode) const;
// Loads the linked program from the cache. If the program is not found or
// there was an error, PROGRAM_LOAD_FAILURE should be returned.
@@ -51,6 +53,8 @@
Shader* shader_a,
Shader* shader_b,
const LocationMap* bind_attrib_location_map,
+ const std::vector<std::string>& transform_feedback_varyings,
+ GLenum transform_feedback_buffer_mode,
const ShaderCacheCallback& shader_callback) = 0;
// Saves the program into the cache. If successful, the implementation should
@@ -60,6 +64,8 @@
const Shader* shader_a,
const Shader* shader_b,
const LocationMap* bind_attrib_location_map,
+ const std::vector<std::string>& transform_feedback_varyings,
+ GLenum transform_feedback_buffer_mode,
const ShaderCacheCallback& shader_callback) = 0;
virtual void LoadProgram(const std::string& program) = 0;
@@ -69,8 +75,10 @@
// Only for testing
void LinkedProgramCacheSuccess(const std::string& shader_signature_a,
- const std::string& shader_signature_b,
- const LocationMap* bind_attrib_location_map);
+ const std::string& shader_signature_b,
+ const LocationMap* bind_attrib_location_map,
+ const std::vector<std::string>& transform_feedback_varyings,
+ GLenum transform_feedback_buffer_mode);
protected:
// called by implementing class after a shader was successfully cached
@@ -86,6 +94,8 @@
const char* hashed_shader_0,
const char* hashed_shader_1,
const LocationMap* bind_attrib_location_map,
+ const std::vector<std::string>& transform_feedback_varyings,
+ GLenum transform_feedback_buffer_mode,
char* result) const;
void Evict(const std::string& program_hash);
diff --git a/gpu/command_buffer/service/program_cache_unittest.cc b/gpu/command_buffer/service/program_cache_unittest.cc
index 7a4cbcd..f4949ce 100644
--- a/gpu/command_buffer/service/program_cache_unittest.cc
+++ b/gpu/command_buffer/service/program_cache_unittest.cc
@@ -20,14 +20,19 @@
Shader* /* shader_a */,
Shader* /* shader_b */,
const LocationMap* /* bind_attrib_location_map */,
+ const std::vector<std::string>& /* transform_feedback_varyings */,
+ GLenum /* transform_feedback_buffer_mode */,
const ShaderCacheCallback& /* callback */) override {
return PROGRAM_LOAD_SUCCESS;
}
- void SaveLinkedProgram(GLuint /* program */,
- const Shader* /* shader_a */,
- const Shader* /* shader_b */,
- const LocationMap* /* bind_attrib_location_map */,
- const ShaderCacheCallback& /* callback */) override {}
+ void SaveLinkedProgram(
+ GLuint /* program */,
+ const Shader* /* shader_a */,
+ const Shader* /* shader_b */,
+ const LocationMap* /* bind_attrib_location_map */,
+ const std::vector<std::string>& /* transform_feedback_varyings */,
+ GLenum /* transform_feedback_buffer_mode */,
+ const ShaderCacheCallback& /* callback */) override {}
void LoadProgram(const std::string& /* program */) override {}
@@ -35,7 +40,9 @@
void SaySuccessfullyCached(const std::string& shader1,
const std::string& shader2,
- std::map<std::string, GLint>* attrib_map) {
+ std::map<std::string, GLint>* attrib_map,
+ const std::vector<std::string>& varyings,
+ GLenum buffer_mode) {
char a_sha[kHashLength];
char b_sha[kHashLength];
ComputeShaderHash(shader1, a_sha);
@@ -45,6 +52,8 @@
ComputeProgramHash(a_sha,
b_sha,
attrib_map,
+ varyings,
+ buffer_mode,
sha);
const std::string shaString(sha, kHashLength);
@@ -56,13 +65,18 @@
ProgramCache::ComputeShaderHash(shader, result);
}
- void ComputeProgramHash(const char* hashed_shader_0,
- const char* hashed_shader_1,
- const LocationMap* bind_attrib_location_map,
- char* result) const {
+ void ComputeProgramHash(
+ const char* hashed_shader_0,
+ const char* hashed_shader_1,
+ const LocationMap* bind_attrib_location_map,
+ const std::vector<std::string>& transform_feedback_varyings,
+ GLenum transform_feedback_buffer_mode,
+ char* result) const {
ProgramCache::ComputeProgramHash(hashed_shader_0,
hashed_shader_1,
bind_attrib_location_map,
+ transform_feedback_varyings,
+ transform_feedback_buffer_mode,
result);
}
@@ -78,6 +92,7 @@
protected:
scoped_ptr<NoBackendProgramCache> cache_;
+ std::vector<std::string> varyings_;
};
TEST_F(ProgramCacheTest, LinkStatusSave) {
@@ -88,8 +103,8 @@
std::string shader_b = shader2;
EXPECT_EQ(ProgramCache::LINK_UNKNOWN,
cache_->GetLinkedProgramStatus(
- shader_a, shader_b, NULL));
- cache_->SaySuccessfullyCached(shader_a, shader_b, NULL);
+ shader_a, shader_b, NULL, varyings_, GL_NONE));
+ cache_->SaySuccessfullyCached(shader_a, shader_b, NULL, varyings_, GL_NONE);
shader_a.clear();
shader_b.clear();
@@ -97,33 +112,35 @@
// make sure it was copied
EXPECT_EQ(ProgramCache::LINK_SUCCEEDED,
cache_->GetLinkedProgramStatus(
- shader1, shader2, NULL));
+ shader1, shader2, NULL, varyings_, GL_NONE));
}
TEST_F(ProgramCacheTest, LinkUnknownOnFragmentSourceChange) {
const std::string shader1 = "abcd1234";
std::string shader2 = "abcda sda b1~#4 bbbbb1234";
- cache_->SaySuccessfullyCached(shader1, shader2, NULL);
+ cache_->SaySuccessfullyCached(shader1, shader2, NULL, varyings_, GL_NONE);
shader2 = "different!";
EXPECT_EQ(ProgramCache::LINK_UNKNOWN,
- cache_->GetLinkedProgramStatus(shader1, shader2, NULL));
+ cache_->GetLinkedProgramStatus(shader1, shader2, NULL,
+ varyings_, GL_NONE));
}
TEST_F(ProgramCacheTest, LinkUnknownOnVertexSourceChange) {
std::string shader1 = "abcd1234";
const std::string shader2 = "abcda sda b1~#4 bbbbb1234";
- cache_->SaySuccessfullyCached(shader1, shader2, NULL);
+ cache_->SaySuccessfullyCached(shader1, shader2, NULL, varyings_, GL_NONE);
shader1 = "different!";
EXPECT_EQ(ProgramCache::LINK_UNKNOWN,
- cache_->GetLinkedProgramStatus(shader1, shader2, NULL));
+ cache_->GetLinkedProgramStatus(shader1, shader2, NULL,
+ varyings_, GL_NONE));
}
TEST_F(ProgramCacheTest, StatusEviction) {
const std::string shader1 = "abcd1234";
const std::string shader2 = "abcda sda b1~#4 bbbbb1234";
- cache_->SaySuccessfullyCached(shader1, shader2, NULL);
+ cache_->SaySuccessfullyCached(shader1, shader2, NULL, varyings_, GL_NONE);
char a_sha[ProgramCache::kHashLength];
char b_sha[ProgramCache::kHashLength];
cache_->ComputeShaderHash(shader1, a_sha);
@@ -133,18 +150,21 @@
cache_->ComputeProgramHash(a_sha,
b_sha,
NULL,
+ varyings_,
+ GL_NONE,
sha);
cache_->Evict(std::string(sha, ProgramCache::kHashLength));
EXPECT_EQ(ProgramCache::LINK_UNKNOWN,
- cache_->GetLinkedProgramStatus(shader1, shader2, NULL));
+ cache_->GetLinkedProgramStatus(shader1, shader2, NULL,
+ varyings_, GL_NONE));
}
TEST_F(ProgramCacheTest, EvictionWithReusedShader) {
const std::string shader1 = "abcd1234";
const std::string shader2 = "abcda sda b1~#4 bbbbb1234";
const std::string shader3 = "asbjbbjj239a";
- cache_->SaySuccessfullyCached(shader1, shader2, NULL);
- cache_->SaySuccessfullyCached(shader1, shader3, NULL);
+ cache_->SaySuccessfullyCached(shader1, shader2, NULL, varyings_, GL_NONE);
+ cache_->SaySuccessfullyCached(shader1, shader3, NULL, varyings_, GL_NONE);
char a_sha[ProgramCache::kHashLength];
char b_sha[ProgramCache::kHashLength];
@@ -157,36 +177,63 @@
cache_->ComputeProgramHash(a_sha,
b_sha,
NULL,
+ varyings_,
+ GL_NONE,
sha);
cache_->Evict(std::string(sha, ProgramCache::kHashLength));
EXPECT_EQ(ProgramCache::LINK_UNKNOWN,
- cache_->GetLinkedProgramStatus(shader1, shader2, NULL));
+ cache_->GetLinkedProgramStatus(shader1, shader2, NULL,
+ varyings_, GL_NONE));
EXPECT_EQ(ProgramCache::LINK_SUCCEEDED,
- cache_->GetLinkedProgramStatus(shader1, shader3, NULL));
+ cache_->GetLinkedProgramStatus(shader1, shader3, NULL,
+ varyings_, GL_NONE));
cache_->ComputeProgramHash(a_sha,
c_sha,
NULL,
+ varyings_,
+ GL_NONE,
sha);
cache_->Evict(std::string(sha, ProgramCache::kHashLength));
EXPECT_EQ(ProgramCache::LINK_UNKNOWN,
- cache_->GetLinkedProgramStatus(shader1, shader2, NULL));
+ cache_->GetLinkedProgramStatus(shader1, shader2, NULL,
+ varyings_, GL_NONE));
EXPECT_EQ(ProgramCache::LINK_UNKNOWN,
- cache_->GetLinkedProgramStatus(shader1, shader3, NULL));
+ cache_->GetLinkedProgramStatus(shader1, shader3, NULL,
+ varyings_, GL_NONE));
}
TEST_F(ProgramCacheTest, StatusClear) {
const std::string shader1 = "abcd1234";
const std::string shader2 = "abcda sda b1~#4 bbbbb1234";
const std::string shader3 = "asbjbbjj239a";
- cache_->SaySuccessfullyCached(shader1, shader2, NULL);
- cache_->SaySuccessfullyCached(shader1, shader3, NULL);
+ cache_->SaySuccessfullyCached(shader1, shader2, NULL, varyings_, GL_NONE);
+ cache_->SaySuccessfullyCached(shader1, shader3, NULL, varyings_, GL_NONE);
cache_->Clear();
EXPECT_EQ(ProgramCache::LINK_UNKNOWN,
- cache_->GetLinkedProgramStatus(shader1, shader2, NULL));
+ cache_->GetLinkedProgramStatus(shader1, shader2, NULL,
+ varyings_, GL_NONE));
EXPECT_EQ(ProgramCache::LINK_UNKNOWN,
- cache_->GetLinkedProgramStatus(shader1, shader3, NULL));
+ cache_->GetLinkedProgramStatus(shader1, shader3, NULL,
+ varyings_, GL_NONE));
+}
+
+TEST_F(ProgramCacheTest, LinkUnknownOnTransformFeedbackChange) {
+ const std::string shader1 = "abcd1234";
+ std::string shader2 = "abcda sda b1~#4 bbbbb1234";
+ varyings_.push_back("a");
+ cache_->SaySuccessfullyCached(shader1, shader2, NULL, varyings_,
+ GL_INTERLEAVED_ATTRIBS);
+
+ EXPECT_EQ(ProgramCache::LINK_UNKNOWN,
+ cache_->GetLinkedProgramStatus(shader1, shader2, NULL,
+ varyings_, GL_SEPARATE_ATTRIBS));
+
+ varyings_.push_back("b");
+ EXPECT_EQ(ProgramCache::LINK_UNKNOWN,
+ cache_->GetLinkedProgramStatus(shader1, shader2, NULL,
+ varyings_, GL_INTERLEAVED_ATTRIBS));
}
} // namespace gles2
diff --git a/gpu/command_buffer/service/program_manager.cc b/gpu/command_buffer/service/program_manager.cc
index aef7e44..9187c88 100644
--- a/gpu/command_buffer/service/program_manager.cc
+++ b/gpu/command_buffer/service/program_manager.cc
@@ -211,7 +211,8 @@
valid_(false),
link_status_(false),
uniforms_cleared_(false),
- num_uniforms_(0) {
+ num_uniforms_(0),
+ transform_feedback_buffer_mode_(GL_NONE) {
manager_->StartTracking(this);
}
@@ -532,7 +533,9 @@
ProgramCache::LinkedProgramStatus status = cache->GetLinkedProgramStatus(
attached_shaders_[0]->last_compiled_signature(),
attached_shaders_[1]->last_compiled_signature(),
- &bind_attrib_location_map_);
+ &bind_attrib_location_map_,
+ transform_feedback_varyings_,
+ transform_feedback_buffer_mode_);
if (status == ProgramCache::LINK_SUCCEEDED) {
ProgramCache::ProgramLoadResult success =
@@ -540,6 +543,8 @@
attached_shaders_[0].get(),
attached_shaders_[1].get(),
&bind_attrib_location_map_,
+ transform_feedback_varyings_,
+ transform_feedback_buffer_mode_,
shader_callback);
link = success != ProgramCache::PROGRAM_LOAD_SUCCESS;
UMA_HISTOGRAM_BOOLEAN("GPU.ProgramCache.LoadBinarySuccess", !link);
@@ -608,6 +613,8 @@
attached_shaders_[0].get(),
attached_shaders_[1].get(),
&bind_attrib_location_map_,
+ transform_feedback_varyings_,
+ transform_feedback_buffer_mode_,
shader_callback);
}
UMA_HISTOGRAM_CUSTOM_COUNTS(
@@ -1603,6 +1610,16 @@
return true;
}
+void Program::TransformFeedbackVaryings(GLsizei count,
+ const char* const* varyings,
+ GLenum buffer_mode) {
+ transform_feedback_varyings_.clear();
+ for (GLsizei i = 0; i < count; ++i) {
+ transform_feedback_varyings_.push_back(std::string(varyings[i]));
+ }
+ transform_feedback_buffer_mode_ = buffer_mode;
+}
+
Program::~Program() {
if (manager_) {
if (manager_->have_context_) {
diff --git a/gpu/command_buffer/service/program_manager.h b/gpu/command_buffer/service/program_manager.h
index b8b2d2d..a3de24b 100644
--- a/gpu/command_buffer/service/program_manager.h
+++ b/gpu/command_buffer/service/program_manager.h
@@ -239,11 +239,22 @@
// varying registers.
bool CheckVaryingsPacking(VaryingsPackingOption option) const;
+ void TransformFeedbackVaryings(GLsizei count, const char* const* varyings,
+ GLenum buffer_mode);
+
// Visible for testing
const LocationMap& bind_attrib_location_map() const {
return bind_attrib_location_map_;
}
+ const std::vector<std::string>& transform_feedback_varyings() const {
+ return transform_feedback_varyings_;
+ }
+
+ GLenum transform_feedback_buffer_mode() const {
+ return transform_feedback_buffer_mode_;
+ }
+
private:
friend class base::RefCounted<Program>;
friend class ProgramManager;
@@ -373,6 +384,10 @@
// uniform-location binding map from glBindUniformLocationCHROMIUM() calls.
LocationMap bind_uniform_location_map_;
+
+ std::vector<std::string> transform_feedback_varyings_;
+
+ GLenum transform_feedback_buffer_mode_;
};
// Tracks the Programs.
diff --git a/gpu/command_buffer/service/program_manager_unittest.cc b/gpu/command_buffer/service/program_manager_unittest.cc
index 99678f4..8e83702 100644
--- a/gpu/command_buffer/service/program_manager_unittest.cc
+++ b/gpu/command_buffer/service/program_manager_unittest.cc
@@ -1959,7 +1959,9 @@
cache_->LinkedProgramCacheSuccess(
vertex_shader_->source(),
fragment_shader_->source(),
- &program_->bind_attrib_location_map());
+ &program_->bind_attrib_location_map(),
+ program_->transform_feedback_varyings(),
+ program_->transform_feedback_buffer_mode());
}
void SetExpectationsForProgramCached() {
@@ -1977,6 +1979,8 @@
vertex_shader,
fragment_shader,
&program->bind_attrib_location_map(),
+ program_->transform_feedback_varyings(),
+ program_->transform_feedback_buffer_mode(),
_)).Times(1);
}
@@ -1995,6 +1999,8 @@
vertex_shader,
fragment_shader,
&program->bind_attrib_location_map(),
+ program_->transform_feedback_varyings(),
+ program_->transform_feedback_buffer_mode(),
_)).Times(0);
}
@@ -2017,6 +2023,8 @@
vertex_shader,
fragment_shader,
&program->bind_attrib_location_map(),
+ program_->transform_feedback_varyings(),
+ program_->transform_feedback_buffer_mode(),
_))
.WillOnce(Return(result));
}
diff --git a/gpu/command_buffer/service/query_manager.cc b/gpu/command_buffer/service/query_manager.cc
index c0808c4..c74a650 100644
--- a/gpu/command_buffer/service/query_manager.cc
+++ b/gpu/command_buffer/service/query_manager.cc
@@ -171,13 +171,13 @@
bool AllSamplesPassedQuery::Process(bool did_finish) {
GLuint available = 0;
- glGetQueryObjectuivARB(
+ glGetQueryObjectuiv(
service_id_, GL_QUERY_RESULT_AVAILABLE_EXT, &available);
if (!available) {
return true;
}
GLuint result = 0;
- glGetQueryObjectuivARB(
+ glGetQueryObjectuiv(
service_id_, GL_QUERY_RESULT_EXT, &result);
return MarkAsCompleted(result != 0);
@@ -185,7 +185,7 @@
void AllSamplesPassedQuery::Destroy(bool have_context) {
if (have_context && !IsDeleted()) {
- glDeleteQueriesARB(1, &service_id_);
+ glDeleteQueries(1, &service_id_);
MarkAsDeleted();
}
}
@@ -508,7 +508,7 @@
break;
default: {
GLuint service_id = 0;
- glGenQueriesARB(1, &service_id);
+ glGenQueries(1, &service_id);
DCHECK_NE(0u, service_id);
query = new AllSamplesPassedQuery(
this, target, shm_id, shm_offset, service_id);
@@ -582,12 +582,12 @@
void QueryManager::BeginQueryHelper(GLenum target, GLuint id) {
target = AdjustTargetForEmulation(target);
- glBeginQueryARB(target, id);
+ glBeginQuery(target, id);
}
void QueryManager::EndQueryHelper(GLenum target) {
target = AdjustTargetForEmulation(target);
- glEndQueryARB(target);
+ glEndQuery(target);
}
QueryManager::Query::Query(
diff --git a/gpu/command_buffer/service/query_manager_unittest.cc b/gpu/command_buffer/service/query_manager_unittest.cc
index 9c3dd10..f6e3682 100644
--- a/gpu/command_buffer/service/query_manager_unittest.cc
+++ b/gpu/command_buffer/service/query_manager_unittest.cc
@@ -61,7 +61,7 @@
QueryManager::Query* CreateQuery(
GLenum target, GLuint client_id, int32 shm_id, uint32 shm_offset,
GLuint service_id) {
- EXPECT_CALL(*gl_, GenQueriesARB(1, _))
+ EXPECT_CALL(*gl_, GenQueries(1, _))
.WillOnce(SetArgumentPointee<1>(service_id))
.RetiresOnSaturation();
return manager_->CreateQuery(target, client_id, shm_id, shm_offset);
@@ -70,10 +70,10 @@
void QueueQuery(QueryManager::Query* query,
GLuint service_id,
base::subtle::Atomic32 submit_count) {
- EXPECT_CALL(*gl_, BeginQueryARB(query->target(), service_id))
+ EXPECT_CALL(*gl_, BeginQuery(query->target(), service_id))
.Times(1)
.RetiresOnSaturation();
- EXPECT_CALL(*gl_, EndQueryARB(query->target()))
+ EXPECT_CALL(*gl_, EndQuery(query->target()))
.Times(1)
.RetiresOnSaturation();
EXPECT_TRUE(manager_->BeginQuery(query));
@@ -177,7 +177,7 @@
CreateQuery(GL_ANY_SAMPLES_PASSED_EXT, kClient1Id,
kSharedMemoryId, kSharedMemoryOffset, kService1Id));
ASSERT_TRUE(query.get() != NULL);
- EXPECT_CALL(*gl_, DeleteQueriesARB(1, ::testing::Pointee(kService1Id)))
+ EXPECT_CALL(*gl_, DeleteQueries(1, ::testing::Pointee(kService1Id)))
.Times(1)
.RetiresOnSaturation();
manager_->Destroy(true);
@@ -236,7 +236,7 @@
// Process with return not available.
// Expect 1 GL command.
EXPECT_CALL(*gl_,
- GetQueryObjectuivARB(kService1Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
+ GetQueryObjectuiv(kService1Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
.WillOnce(SetArgumentPointee<2>(0))
.RetiresOnSaturation();
EXPECT_TRUE(manager_->ProcessPendingQueries(false));
@@ -247,11 +247,11 @@
// Process with return available.
// Expect 2 GL commands.
EXPECT_CALL(*gl_,
- GetQueryObjectuivARB(kService1Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
+ GetQueryObjectuiv(kService1Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
.WillOnce(SetArgumentPointee<2>(1))
.RetiresOnSaturation();
EXPECT_CALL(*gl_,
- GetQueryObjectuivARB(kService1Id, GL_QUERY_RESULT_EXT, _))
+ GetQueryObjectuiv(kService1Id, GL_QUERY_RESULT_EXT, _))
.WillOnce(SetArgumentPointee<2>(kResult))
.RetiresOnSaturation();
EXPECT_TRUE(manager_->ProcessPendingQueries(false));
@@ -323,23 +323,23 @@
{
InSequence s;
EXPECT_CALL(*gl_,
- GetQueryObjectuivARB(kService1Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
+ GetQueryObjectuiv(kService1Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
.WillOnce(SetArgumentPointee<2>(1))
.RetiresOnSaturation();
EXPECT_CALL(*gl_,
- GetQueryObjectuivARB(kService1Id, GL_QUERY_RESULT_EXT, _))
+ GetQueryObjectuiv(kService1Id, GL_QUERY_RESULT_EXT, _))
.WillOnce(SetArgumentPointee<2>(kResult1))
.RetiresOnSaturation();
EXPECT_CALL(*gl_,
- GetQueryObjectuivARB(kService2Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
+ GetQueryObjectuiv(kService2Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
.WillOnce(SetArgumentPointee<2>(1))
.RetiresOnSaturation();
EXPECT_CALL(*gl_,
- GetQueryObjectuivARB(kService2Id, GL_QUERY_RESULT_EXT, _))
+ GetQueryObjectuiv(kService2Id, GL_QUERY_RESULT_EXT, _))
.WillOnce(SetArgumentPointee<2>(kResult2))
.RetiresOnSaturation();
EXPECT_CALL(*gl_,
- GetQueryObjectuivARB(kService3Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
+ GetQueryObjectuiv(kService3Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
.WillOnce(SetArgumentPointee<2>(0))
.RetiresOnSaturation();
EXPECT_TRUE(manager_->ProcessPendingQueries(false));
@@ -358,7 +358,7 @@
// Process with renaming query. No result.
// Expect 1 GL commands.
EXPECT_CALL(*gl_,
- GetQueryObjectuivARB(kService3Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
+ GetQueryObjectuiv(kService3Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
.WillOnce(SetArgumentPointee<2>(0))
.RetiresOnSaturation();
EXPECT_TRUE(manager_->ProcessPendingQueries(false));
@@ -370,11 +370,11 @@
// Process with renaming query. With result.
// Expect 2 GL commands.
EXPECT_CALL(*gl_,
- GetQueryObjectuivARB(kService3Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
+ GetQueryObjectuiv(kService3Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
.WillOnce(SetArgumentPointee<2>(1))
.RetiresOnSaturation();
EXPECT_CALL(*gl_,
- GetQueryObjectuivARB(kService3Id, GL_QUERY_RESULT_EXT, _))
+ GetQueryObjectuiv(kService3Id, GL_QUERY_RESULT_EXT, _))
.WillOnce(SetArgumentPointee<2>(kResult3))
.RetiresOnSaturation();
EXPECT_TRUE(manager_->ProcessPendingQueries(false));
@@ -403,11 +403,11 @@
// Process with return available.
// Expect 2 GL commands.
EXPECT_CALL(*gl_,
- GetQueryObjectuivARB(kService1Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
+ GetQueryObjectuiv(kService1Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
.WillOnce(SetArgumentPointee<2>(1))
.RetiresOnSaturation();
EXPECT_CALL(*gl_,
- GetQueryObjectuivARB(kService1Id, GL_QUERY_RESULT_EXT, _))
+ GetQueryObjectuiv(kService1Id, GL_QUERY_RESULT_EXT, _))
.WillOnce(SetArgumentPointee<2>(kResult))
.RetiresOnSaturation();
EXPECT_FALSE(manager_->ProcessPendingQueries(false));
@@ -432,11 +432,11 @@
// Process with return available.
// Expect 2 GL commands.
EXPECT_CALL(*gl_,
- GetQueryObjectuivARB(kService1Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
+ GetQueryObjectuiv(kService1Id, GL_QUERY_RESULT_AVAILABLE_EXT, _))
.WillOnce(SetArgumentPointee<2>(1))
.RetiresOnSaturation();
EXPECT_CALL(*gl_,
- GetQueryObjectuivARB(kService1Id, GL_QUERY_RESULT_EXT, _))
+ GetQueryObjectuiv(kService1Id, GL_QUERY_RESULT_EXT, _))
.WillOnce(SetArgumentPointee<2>(kResult))
.RetiresOnSaturation();
EXPECT_FALSE(manager_->ProcessPendingQueries(false));
@@ -474,17 +474,17 @@
scoped_ptr<QueryManager> manager(
new QueryManager(decoder_.get(), feature_info.get()));
- EXPECT_CALL(*gl_, GenQueriesARB(1, _))
+ EXPECT_CALL(*gl_, GenQueries(1, _))
.WillOnce(SetArgumentPointee<1>(kService1Id))
.RetiresOnSaturation();
QueryManager::Query* query = manager->CreateQuery(
kTarget, kClient1Id, kSharedMemoryId, kSharedMemoryOffset);
ASSERT_TRUE(query != NULL);
- EXPECT_CALL(*gl_, BeginQueryARB(GL_ANY_SAMPLES_PASSED_EXT, kService1Id))
+ EXPECT_CALL(*gl_, BeginQuery(GL_ANY_SAMPLES_PASSED_EXT, kService1Id))
.Times(1)
.RetiresOnSaturation();
- EXPECT_CALL(*gl_, EndQueryARB(GL_ANY_SAMPLES_PASSED_EXT))
+ EXPECT_CALL(*gl_, EndQuery(GL_ANY_SAMPLES_PASSED_EXT))
.Times(1)
.RetiresOnSaturation();
EXPECT_TRUE(manager->BeginQuery(query));
@@ -508,17 +508,17 @@
scoped_ptr<QueryManager> manager(
new QueryManager(decoder_.get(), feature_info.get()));
- EXPECT_CALL(*gl_, GenQueriesARB(1, _))
+ EXPECT_CALL(*gl_, GenQueries(1, _))
.WillOnce(SetArgumentPointee<1>(kService1Id))
.RetiresOnSaturation();
QueryManager::Query* query = manager->CreateQuery(
kTarget, kClient1Id, kSharedMemoryId, kSharedMemoryOffset);
ASSERT_TRUE(query != NULL);
- EXPECT_CALL(*gl_, BeginQueryARB(GL_SAMPLES_PASSED_ARB, kService1Id))
+ EXPECT_CALL(*gl_, BeginQuery(GL_SAMPLES_PASSED_ARB, kService1Id))
.Times(1)
.RetiresOnSaturation();
- EXPECT_CALL(*gl_, EndQueryARB(GL_SAMPLES_PASSED_ARB))
+ EXPECT_CALL(*gl_, EndQuery(GL_SAMPLES_PASSED_ARB))
.Times(1)
.RetiresOnSaturation();
EXPECT_TRUE(manager->BeginQuery(query));
diff --git a/gpu/config/BUILD.gn b/gpu/config/BUILD.gn
index 4d068ed..6139153 100644
--- a/gpu/config/BUILD.gn
+++ b/gpu/config/BUILD.gn
@@ -45,10 +45,11 @@
"software_rendering_list_json.cc",
]
- # TODO(jschuh): size_t to int.
- configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
-
- defines = [ "GPU_IMPLEMENTATION" ]
+ configs += [
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ "//build/config/compiler:no_size_t_to_int_warning",
+ "//gpu:gpu_implementation",
+ ]
deps = [
"//base",
@@ -74,7 +75,7 @@
}
}
if (use_libpci) {
- defines += [ "USE_LIBPCI=1" ]
+ defines = [ "USE_LIBPCI=1" ]
}
if (is_linux && use_libpci && (use_x11 || use_ozone)) {
deps += [ "//build/config/linux:libpci" ]
diff --git a/gpu/config/gpu_info_collector_win.cc b/gpu/config/gpu_info_collector_win.cc
index 4deee7c..e8c8f2f 100644
--- a/gpu/config/gpu_info_collector_win.cc
+++ b/gpu/config/gpu_info_collector_win.cc
@@ -210,161 +210,6 @@
return true;
}
-// Determines whether D3D11 won't work, either because it is not supported on
-// the machine or because it is known it is likely to crash.
-bool D3D11ShouldWork(const GPUInfo& gpu_info) {
- // TODO(apatrick): This is a temporary change to see what impact disabling
- // D3D11 stats collection has on Canary.
-#if 1
- return false;
-#else
- // Windows XP never supports D3D11. It seems to be less stable that D3D9 on
- // Vista.
- if (base::win::GetVersion() <= base::win::VERSION_VISTA)
- return false;
-
- // http://crbug.com/175525.
- if (gpu_info.display_link_version.IsValid())
- return false;
-
- return true;
-#endif
-}
-
-// Collects information about the level of D3D11 support and records it in
-// the UMA stats. Records no stats when D3D11 in not supported at all.
-void CollectD3D11SupportOnWorkerThread() {
- TRACE_EVENT0("gpu", "CollectD3D11Support");
-
- typedef HRESULT (WINAPI *D3D11CreateDeviceFunc)(
- IDXGIAdapter* adapter,
- D3D_DRIVER_TYPE driver_type,
- HMODULE software,
- UINT flags,
- const D3D_FEATURE_LEVEL* feature_levels,
- UINT num_feature_levels,
- UINT sdk_version,
- ID3D11Device** device,
- D3D_FEATURE_LEVEL* feature_level,
- ID3D11DeviceContext** immediate_context);
-
- // This enumeration must be kept in sync with histograms.xml. Do not reorder
- // the members; always add to the end.
- enum FeatureLevel {
- FEATURE_LEVEL_UNKNOWN,
- FEATURE_LEVEL_NO_D3D11_DLL,
- FEATURE_LEVEL_NO_CREATE_DEVICE_ENTRY_POINT,
- FEATURE_LEVEL_DEVICE_CREATION_FAILED,
- FEATURE_LEVEL_9_1,
- FEATURE_LEVEL_9_2,
- FEATURE_LEVEL_9_3,
- FEATURE_LEVEL_10_0,
- FEATURE_LEVEL_10_1,
- FEATURE_LEVEL_11_0,
- NUM_FEATURE_LEVELS
- };
-
- FeatureLevel feature_level = FEATURE_LEVEL_UNKNOWN;
- UINT bgra_support = 0;
-
- // This module is leaked in case it is hooked by third party software.
- base::NativeLibrary d3d11_module = base::LoadNativeLibrary(
- base::FilePath(L"d3d11.dll"),
- NULL);
-
- if (!d3d11_module) {
- feature_level = FEATURE_LEVEL_NO_D3D11_DLL;
- } else {
- D3D11CreateDeviceFunc create_func =
- reinterpret_cast<D3D11CreateDeviceFunc>(
- base::GetFunctionPointerFromNativeLibrary(d3d11_module,
- "D3D11CreateDevice"));
- if (!create_func) {
- feature_level = FEATURE_LEVEL_NO_CREATE_DEVICE_ENTRY_POINT;
- } else {
- static const D3D_FEATURE_LEVEL d3d_feature_levels[] = {
- D3D_FEATURE_LEVEL_11_0,
- D3D_FEATURE_LEVEL_10_1,
- D3D_FEATURE_LEVEL_10_0,
- D3D_FEATURE_LEVEL_9_3,
- D3D_FEATURE_LEVEL_9_2,
- D3D_FEATURE_LEVEL_9_1
- };
-
- base::win::ScopedComPtr<ID3D11Device> device;
- D3D_FEATURE_LEVEL d3d_feature_level;
- base::win::ScopedComPtr<ID3D11DeviceContext> device_context;
- HRESULT hr = create_func(NULL,
- D3D_DRIVER_TYPE_HARDWARE,
- NULL,
- 0,
- d3d_feature_levels,
- arraysize(d3d_feature_levels),
- D3D11_SDK_VERSION,
- device.Receive(),
- &d3d_feature_level,
- device_context.Receive());
- if (FAILED(hr)) {
- feature_level = FEATURE_LEVEL_DEVICE_CREATION_FAILED;
- } else {
- switch (d3d_feature_level) {
- case D3D_FEATURE_LEVEL_11_0:
- feature_level = FEATURE_LEVEL_11_0;
- break;
- case D3D_FEATURE_LEVEL_10_1:
- feature_level = FEATURE_LEVEL_10_1;
- break;
- case D3D_FEATURE_LEVEL_10_0:
- feature_level = FEATURE_LEVEL_10_0;
- break;
- case D3D_FEATURE_LEVEL_9_3:
- feature_level = FEATURE_LEVEL_9_3;
- break;
- case D3D_FEATURE_LEVEL_9_2:
- feature_level = FEATURE_LEVEL_9_2;
- break;
- case D3D_FEATURE_LEVEL_9_1:
- feature_level = FEATURE_LEVEL_9_1;
- break;
- default:
- NOTREACHED();
- break;
- }
-
- hr = device->CheckFormatSupport(DXGI_FORMAT_B8G8R8A8_UNORM,
- &bgra_support);
- DCHECK(SUCCEEDED(hr));
- }
- }
- }
-
- UMA_HISTOGRAM_ENUMERATION("GPU.D3D11_FeatureLevel",
- feature_level,
- NUM_FEATURE_LEVELS);
-
- // ANGLE requires at least feature level 10.0. Do not record any further
- // stats if ANGLE would not work anyway.
- if (feature_level < FEATURE_LEVEL_10_0)
- return;
-
- UMA_HISTOGRAM_BOOLEAN(
- "GPU.D3D11_B8G8R8A8_Texture2DSupport",
- (bgra_support & D3D11_FORMAT_SUPPORT_TEXTURE2D) != 0);
- UMA_HISTOGRAM_BOOLEAN(
- "GPU.D3D11_B8G8R8A8_RenderTargetSupport",
- (bgra_support & D3D11_FORMAT_SUPPORT_RENDER_TARGET) != 0);
-}
-
-// Collects information about the level of D3D11 support and records it in
-// the UMA stats. Records no stats when D3D11 in not supported at all.
-void CollectD3D11Support() {
- // D3D11 takes about 50ms to initialize so do this on a worker thread.
- base::WorkerPool::PostTask(
- FROM_HERE,
- base::Bind(CollectD3D11SupportOnWorkerThread),
- false);
-}
-
void DeviceIDToVendorAndDevice(const std::wstring& id,
uint32* vendor_id,
uint32* device_id) {
@@ -708,26 +553,6 @@
return kCollectInfoNonFatalFailure;
}
- // Collect basic information about supported D3D11 features. Delay for 45
- // seconds so as not to regress performance tests.
- if (D3D11ShouldWork(*gpu_info)) {
- // This is on a field trial so we can turn it off easily if it blows up
- // again in stable channel.
- scoped_refptr<base::FieldTrial> trial(
- base::FieldTrialList::FactoryGetFieldTrial(
- "D3D11Experiment", 100, "Disabled", 2015, 7, 8,
- base::FieldTrial::SESSION_RANDOMIZED, NULL));
- const int enabled_group =
- trial->AppendGroup("Enabled", 0);
-
- if (trial->group() == enabled_group) {
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&CollectD3D11Support),
- base::TimeDelta::FromSeconds(45));
- }
- }
-
gpu_info->basic_info_state = kCollectInfoSuccess;
return kCollectInfoSuccess;
}
diff --git a/gpu/gles2_conform_support/BUILD.gn b/gpu/gles2_conform_support/BUILD.gn
new file mode 100644
index 0000000..853beea
--- /dev/null
+++ b/gpu/gles2_conform_support/BUILD.gn
@@ -0,0 +1,38 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/allocator.gni")
+
+# GYP version: gpu/gles2_conform_support/gles2_conform_support.gyp:gles2_conform_support
+executable("gles2_conform_support") {
+ sources = [
+ "gles2_conform_support.c",
+ "native/egl_native.cc",
+ "native/egl_native_win.cc",
+ "native/main.cc",
+ ]
+ defines = [
+ "GLES2_CONFORM_SUPPORT_ONLY",
+ "GTF_GLES20",
+ "EGLAPI=",
+ "EGLAPIENTRY=",
+ ]
+ deps = [
+ "//base",
+ "//gpu/gles2_conform_support/egl",
+ "//base/third_party/dynamic_annotations",
+ "//ui/gl",
+ "//gpu/command_buffer/client:gles2_c_lib_nocheck",
+ ]
+ if (is_linux) {
+ sources += [
+ "native/egl_native_aura.cc",
+ "native/egl_native_x11.cc",
+ ]
+ }
+ if (use_allocator != "none") {
+ # See http://crbug.com/162998#c4 for why this is needed.
+ deps += [ "//base/allocator" ]
+ }
+}
diff --git a/gpu/gles2_conform_support/egl/BUILD.gn b/gpu/gles2_conform_support/egl/BUILD.gn
index 0216522..32fb870 100644
--- a/gpu/gles2_conform_support/egl/BUILD.gn
+++ b/gpu/gles2_conform_support/egl/BUILD.gn
@@ -24,7 +24,6 @@
deps = [
"//base",
- "//gpu/command_buffer/client:gles2_c_lib",
"//gpu/command_buffer/client:gles2_implementation_no_check",
"//gpu/command_buffer/service",
"//gpu",
diff --git a/gpu/gles2_conform_support/gles2_conform_support.gyp b/gpu/gles2_conform_support/gles2_conform_support.gyp
index 05aa9ac..3835c4b 100644
--- a/gpu/gles2_conform_support/gles2_conform_support.gyp
+++ b/gpu/gles2_conform_support/gles2_conform_support.gyp
@@ -100,6 +100,7 @@
],
},
{
+ # GN version: //gpu/gles2_conform_support
'target_name': 'gles2_conform_support',
'type': 'executable',
'dependencies': [
diff --git a/gpu/gles2_conform_support/native/BUILD.gn b/gpu/gles2_conform_support/native/BUILD.gn
index aeaa6d2..0d1c0ee 100644
--- a/gpu/gles2_conform_support/native/BUILD.gn
+++ b/gpu/gles2_conform_support/native/BUILD.gn
@@ -7,6 +7,7 @@
output_name = "egl_main_native"
sources = [
"egl_native.cc",
+ "egl_native_win.cc",
"main.cc",
]
defines = [
@@ -26,9 +27,6 @@
"egl_native_x11.cc",
]
}
- if (is_win) {
- sources += [ "egl_native_win.cc" ]
- }
}
# GYP version: gpu/gles2_conform_support/gles2_conform_support.gyp:egl_main_windowless
@@ -36,6 +34,7 @@
output_name = "egl_main_windowless"
sources = [
"egl_native.cc",
+ "egl_native_win.cc",
"egl_native_windowless.cc",
"main.cc",
]
@@ -56,7 +55,4 @@
"egl_native_x11.cc",
]
}
- if (is_win) {
- sources += [ "egl_native_win.cc" ]
- }
}
diff --git a/gpu/gpu_unittests.isolate b/gpu/gpu_unittests.isolate
index 7ad1b79..b12c5cb 100644
--- a/gpu/gpu_unittests.isolate
+++ b/gpu/gpu_unittests.isolate
@@ -59,6 +59,5 @@
],
'includes': [
'../base/base.isolate',
- '../third_party/angle/angle.isolate',
],
}
diff --git a/gpu/ipc/BUILD.gn b/gpu/ipc/BUILD.gn
index 8f83ead..d11d685 100644
--- a/gpu/ipc/BUILD.gn
+++ b/gpu/ipc/BUILD.gn
@@ -8,9 +8,10 @@
"gpu_command_buffer_traits.h",
]
- defines = [ "GPU_IMPLEMENTATION" ]
-
- configs += [ "//third_party/khronos:khronos_headers" ]
+ configs += [
+ "//gpu:gpu_implementation",
+ "//third_party/khronos:khronos_headers",
+ ]
deps = [
"//gpu/command_buffer/common",
diff --git a/gpu/perftests/measurements.cc b/gpu/perftests/measurements.cc
index db26fb3..0f46390 100644
--- a/gpu/perftests/measurements.cc
+++ b/gpu/perftests/measurements.cc
@@ -25,16 +25,16 @@
: name(name), wall_time(wall_time), cpu_time(cpu_time), gpu_time(gpu_time) {
}
-void Measurement::PrintResult(const std::string& suffix) const {
- perf_test::PrintResult(name, "_wall" + suffix, "",
- wall_time.InMillisecondsF(), "ms", true);
+void Measurement::PrintResult(const std::string& graph) const {
+ perf_test::PrintResult(graph, "", name + "_wall", wall_time.InMillisecondsF(),
+ "ms", true);
if (cpu_time.InMicroseconds() >= 0) {
- perf_test::PrintResult(name, "_cpu" + suffix, "",
- cpu_time.InMillisecondsF(), "ms", true);
+ perf_test::PrintResult(graph, "", name + "_cpu", cpu_time.InMillisecondsF(),
+ "ms", true);
}
if (gpu_time.InMicroseconds() >= 0) {
- perf_test::PrintResult(name, "_gpu" + suffix, "",
- gpu_time.InMillisecondsF(), "ms", true);
+ perf_test::PrintResult(graph, "", name + "_gpu", gpu_time.InMillisecondsF(),
+ "ms", true);
}
}
diff --git a/gpu/perftests/measurements.h b/gpu/perftests/measurements.h
index 35ede22..87d0c2a 100644
--- a/gpu/perftests/measurements.h
+++ b/gpu/perftests/measurements.h
@@ -11,8 +11,8 @@
#include "base/time/time.h"
namespace gfx {
- class GPUTimingClient;
- class GPUTimer;
+class GPUTimingClient;
+class GPUTimer;
}
namespace gpu {
@@ -26,7 +26,7 @@
const base::TimeDelta gpu_time);
~Measurement();
- void PrintResult(const std::string& suffix) const;
+ void PrintResult(const std::string& graph) const;
Measurement& Increment(const Measurement& m);
Measurement Divide(int a) const;
diff --git a/gpu/perftests/texture_upload_perftest.cc b/gpu/perftests/texture_upload_perftest.cc
index e36fb1b..89e901a 100644
--- a/gpu/perftests/texture_upload_perftest.cc
+++ b/gpu/perftests/texture_upload_perftest.cc
@@ -34,7 +34,7 @@
// clang-format off
const char kVertexShader[] =
SHADER(
- uniform vec2 translation = vec2(0.0, 0.0);
+ uniform vec2 translation;
attribute vec2 a_position;
attribute vec2 a_texCoord;
varying vec2 v_texCoord;
@@ -46,6 +46,7 @@
);
const char kFragmentShader[] =
SHADER(
+ precision mediump float;
uniform sampler2D a_texture;
varying vec2 v_texCoord;
void main() {
@@ -81,18 +82,24 @@
return shader;
}
+int GLFormatBytePerPixel(GLenum format) {
+ DCHECK(format == GL_RGBA || format == GL_LUMINANCE || format == GL_RED_EXT);
+ return format == GL_RGBA ? 4 : 1;
+}
+
void GenerateTextureData(const gfx::Size& size,
int bytes_per_pixel,
const int seed,
std::vector<uint8>* const pixels) {
- int bytes = size.GetArea() * bytes_per_pixel;
- pixels->resize(bytes);
- for (int i = 0; i < bytes; ++i) {
- int channel = i % bytes_per_pixel;
- if (channel == 3) { // Alpha channel.
- pixels->at(i) = 255;
- } else {
- pixels->at(i) = (i + (seed << 2)) % (32 << channel);
+ // Row bytes has to be multiple of 4 (GL_PACK_ALIGNMENT defaults to 4).
+ int stride = ((size.width() * bytes_per_pixel) + 3) & ~0x3;
+ pixels->resize(size.height() * stride);
+ for (int y = 0; y < size.height(); ++y) {
+ for (int x = 0; x < size.width(); ++x) {
+ for (int channel = 0; channel < bytes_per_pixel; ++channel) {
+ int index = y * stride + x * bytes_per_pixel;
+ pixels->at(index) = (index + (seed << 2)) % (0x20 << channel);
+ }
}
}
}
@@ -101,33 +108,34 @@
// where the former buffer have been uploaded as a texture and drawn on the
// RGBA buffer.
bool CompareBufferToRGBABuffer(GLenum format,
+ const gfx::Size& size,
const std::vector<uint8>& pixels,
- const std::vector<uint8>& pixels_rgba) {
- for (size_t i = 0; i < pixels.size(); i += 4) {
- switch (format) {
- case GL_RED_EXT: // (R_t, 0, 0, 1)
- if (pixels_rgba[i] != pixels[i / 4] || pixels_rgba[i + 1] != 0 ||
- pixels_rgba[i + 2] != 0 || pixels_rgba[i + 3] != 255) {
- return false;
- }
- break;
- case GL_LUMINANCE: // (L_t, L_t, L_t, 1)
- if (pixels_rgba[i] != pixels[i / 4] ||
- pixels_rgba[i + 1] != pixels[i / 4] ||
- pixels_rgba[i + 2] != pixels[i / 4] || pixels_rgba[i + 3] != 255) {
- return false;
- }
- break;
- case GL_RGBA: // (R_t, G_t, B_t, A_t)
- if (pixels_rgba[i] != pixels[i] ||
- pixels_rgba[i + 1] != pixels[i + 1] ||
- pixels_rgba[i + 2] != pixels[i + 2] ||
- pixels_rgba[i + 3] != pixels[i + 3]) {
- return false;
- }
- break;
- default:
- NOTREACHED();
+ const std::vector<uint8>& rgba) {
+ int bytes_per_pixel = GLFormatBytePerPixel(format);
+ int pixels_stride = ((size.width() * bytes_per_pixel) + 3) & ~0x3;
+ int rgba_stride = size.width() * GLFormatBytePerPixel(GL_RGBA);
+ for (int y = 0; y < size.height(); ++y) {
+ for (int x = 0; x < size.width(); ++x) {
+ int rgba_index = y * rgba_stride + x * GLFormatBytePerPixel(GL_RGBA);
+ int pixels_index = y * pixels_stride + x * bytes_per_pixel;
+ uint8 expected[4] = {0};
+ switch (format) {
+ case GL_LUMINANCE: // (L_t, L_t, L_t, 1)
+ expected[1] = pixels[pixels_index];
+ expected[2] = pixels[pixels_index];
+ case GL_RED_EXT: // (R_t, 0, 0, 1)n
+ expected[0] = pixels[pixels_index];
+ expected[3] = 255;
+ break;
+ case GL_RGBA: // (R_t, G_t, B_t, A_t)
+ memcpy(expected, &pixels[pixels_index], 4);
+ break;
+ default:
+ NOTREACHED();
+ }
+ if (memcmp(&rgba[rgba_index], expected, 4)) {
+ return false;
+ }
}
}
return true;
@@ -189,15 +197,15 @@
glBindAttribLocation(program_object_, 1, "a_texCoord");
glLinkProgram(program_object_);
- translation_location_ =
- glGetUniformLocation(program_object_, "translation");
- DCHECK_NE(-1, translation_location_);
-
GLint linked = -1;
glGetProgramiv(program_object_, GL_LINK_STATUS, &linked);
CHECK_NE(0, linked);
glUseProgram(program_object_);
glUniform1i(sampler_location_, 0);
+ translation_location_ =
+ glGetUniformLocation(program_object_, "translation");
+ DCHECK_NE(-1, translation_location_);
+ glUniform2f(translation_location_, 0.0f, 0.0f);
sampler_location_ = glGetUniformLocation(program_object_, "a_texture");
CHECK_NE(-1, sampler_location_);
@@ -302,7 +310,8 @@
glReadPixels(0, 0, size.width(), size.height(), GL_RGBA, GL_UNSIGNED_BYTE,
&pixels_rendered[0]);
CheckNoGlError();
- EXPECT_TRUE(CompareBufferToRGBABuffer(format, pixels, pixels_rendered))
+ EXPECT_TRUE(
+ CompareBufferToRGBABuffer(format, size, pixels, pixels_rendered))
<< "Format is: " << gfx::GLEnums::GetStringEnum(format);
std::vector<Measurement> measurements;
@@ -323,9 +332,8 @@
base::SmallMap<std::map<std::string, Measurement>>
aggregates; // indexed by name
int successful_runs = 0;
- ASSERT_THAT(format, testing::AnyOf(GL_RGBA, GL_LUMINANCE, GL_RED_EXT));
for (int i = 0; i < kUploadPerfWarmupRuns + kUploadPerfTestRuns; ++i) {
- GenerateTextureData(size, format == GL_RGBA ? 4 : 1, i + 1, &pixels);
+ GenerateTextureData(size, GLFormatBytePerPixel(format), i + 1, &pixels);
auto run = UploadAndDraw(size, pixels, format);
if (i < kUploadPerfWarmupRuns || !run.size()) {
continue;
@@ -337,15 +345,15 @@
aggregate.Increment(measurement);
}
}
- std::string suffix = base::StringPrintf(
- "_%d_%s", size.width(), gfx::GLEnums::GetStringEnum(format).c_str());
+ std::string graph_name = base::StringPrintf(
+ "%d_%s", size.width(), gfx::GLEnums::GetStringEnum(format).c_str());
if (successful_runs) {
for (const auto& entry : aggregates) {
const auto m = entry.second.Divide(successful_runs);
- m.PrintResult(suffix);
+ m.PrintResult(graph_name);
}
}
- perf_test::PrintResult("sample_runs", suffix, "",
+ perf_test::PrintResult("sample_runs", "", graph_name,
static_cast<size_t>(successful_runs), "laps", true);
}
@@ -367,7 +375,7 @@
// Perf test that generates, uploads and draws a texture on a surface repeatedly
// and prints out aggregated measurements for all the runs.
TEST_F(TextureUploadPerfTest, glTexImage2d) {
- int sizes[] = {128, 256, 512, 1024};
+ int sizes[] = {21, 128, 256, 512, 1024};
std::vector<GLenum> formats;
formats.push_back(GL_RGBA);
// Used by default for ResourceProvider::yuv_resource_format_.
@@ -379,7 +387,7 @@
if (has_texture_rg) {
// Used as ResourceProvider::yuv_resource_format_ if
- // {ARB,EXT}_texture_rg is available.
+ // {ARB,EXT}_texture_rg are available.
formats.push_back(GL_RED_EXT);
}
for (int side : sizes) {
@@ -455,8 +463,9 @@
bool gpu_timer_errors = gpu_timing_client_->IsAvailable() &&
gpu_timing_client_->CheckAndResetTimerErrors();
if (!gpu_timer_errors) {
- upload_and_draw_timers.GetAsMeasurement("upload_and_draw").PrintResult("");
- finish_timers.GetAsMeasurement("finish").PrintResult("");
+ upload_and_draw_timers.GetAsMeasurement("upload_and_draw")
+ .PrintResult("renaming");
+ finish_timers.GetAsMeasurement("finish").PrintResult("renaming");
}
}
diff --git a/mojo/tools/roll/cc_strip_video.patch b/mojo/tools/roll/cc_strip_video.patch
index ebc7495..8d1a3b0 100644
--- a/mojo/tools/roll/cc_strip_video.patch
+++ b/mojo/tools/roll/cc_strip_video.patch
@@ -1,8 +1,8 @@
diff --git a/cc/BUILD.gn b/cc/BUILD.gn
-index 0411b45..4ee07db 100644
+index bd8bfdd..6e55656 100644
--- a/cc/BUILD.gn
+++ b/cc/BUILD.gn
-@@ -222,13 +222,6 @@ component("cc") {
+@@ -189,13 +189,6 @@ component("cc") {
"layers/ui_resource_layer.h",
"layers/ui_resource_layer_impl.cc",
"layers/ui_resource_layer_impl.h",
@@ -16,7 +16,7 @@
"output/begin_frame_args.cc",
"output/begin_frame_args.h",
"output/bsp_tree.cc",
-@@ -486,8 +479,6 @@ component("cc") {
+@@ -458,8 +451,6 @@ component("cc") {
"resources/ui_resource_client.h",
"resources/ui_resource_request.cc",
"resources/ui_resource_request.h",
@@ -25,7 +25,7 @@
"resources/zero_copy_tile_task_worker_pool.cc",
"resources/zero_copy_tile_task_worker_pool.h",
"scheduler/begin_frame_source.cc",
-@@ -628,8 +619,6 @@ source_set("test_support") {
+@@ -606,8 +597,6 @@ source_set("test_support") {
"test/fake_tile_manager_client.h",
"test/fake_ui_resource_layer_tree_host_impl.cc",
"test/fake_ui_resource_layer_tree_host_impl.h",
@@ -34,7 +34,7 @@
"test/geometry_test_utils.cc",
"test/geometry_test_utils.h",
"test/impl_side_painting_settings.h",
-@@ -787,7 +776,6 @@ test("cc_unittests") {
+@@ -766,7 +755,6 @@ test("cc_unittests") {
"layers/tiled_layer_unittest.cc",
"layers/ui_resource_layer_impl_unittest.cc",
"layers/ui_resource_layer_unittest.cc",
@@ -42,7 +42,7 @@
"output/begin_frame_args_unittest.cc",
"output/delegating_renderer_unittest.cc",
"output/filter_operations_unittest.cc",
-@@ -848,7 +836,6 @@ test("cc_unittests") {
+@@ -827,7 +815,6 @@ test("cc_unittests") {
"trees/layer_tree_host_unittest_picture.cc",
"trees/layer_tree_host_unittest_proxy.cc",
"trees/layer_tree_host_unittest_scroll.cc",
@@ -241,23 +241,11 @@
-}
-
-} // namespace cc
-diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
-index 613ea4b..3813e1d 100644
---- a/cc/output/gl_renderer.cc
-+++ b/cc/output/gl_renderer.cc
-@@ -18,7 +18,6 @@
- #include "build/build_config.h"
- #include "base/trace_event/trace_event.h"
- #include "cc/base/math_util.h"
--#include "cc/layers/video_layer_impl.h"
- #include "cc/output/compositor_frame.h"
- #include "cc/output/compositor_frame_metadata.h"
- #include "cc/output/context_provider.h"
diff --git a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc
-index 295fc84..ebda8d6 100644
+index d02df4f..9166ea8 100644
--- a/cc/output/renderer_pixeltest.cc
+++ b/cc/output/renderer_pixeltest.cc
-@@ -12,7 +12,6 @@
+@@ -11,7 +11,6 @@
#include "cc/test/fake_picture_pile_impl.h"
#include "cc/test/pixel_test.h"
#include "gpu/command_buffer/client/gles2_interface.h"
@@ -265,7 +253,7 @@
#include "third_party/skia/include/core/SkColorPriv.h"
#include "third_party/skia/include/core/SkImageFilter.h"
#include "third_party/skia/include/core/SkMatrix.h"
-@@ -902,243 +901,6 @@ TEST_F(GLRendererPixelTest, NonPremultipliedTextureWithBackground) {
+@@ -907,267 +906,6 @@ TEST_F(GLRendererPixelTest, NonPremultipliedTextureWithBackground) {
FuzzyPixelOffByOneComparator(true)));
}
@@ -300,9 +288,9 @@
- // the final image. Bleeding will appear on all four sides of the video
- // if the tex coords are not clamped.
- CreateTestYUVVideoDrawQuad_TwoColor(
-- shared_state, format, false, tex_coord_rect, background_size, 0, 0, 0,
-- green_rect, 149, 43, 21, pass.get(), video_resource_updater_.get(),
-- resource_provider_.get());
+- shared_state, format, false, tex_coord_rect, background_size,
+- gfx::Rect(background_size), 0, 0, 0, green_rect, 149, 43, 21,
+- pass.get(), video_resource_updater_.get(), resource_provider_.get());
- pass_list->push_back(pass.Pass());
- }
-
@@ -327,7 +315,7 @@
- CreateTestYUVVideoDrawQuad_Striped(shared_state, media::VideoFrame::YV12,
- false, gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f),
- pass.get(), video_resource_updater_.get(),
-- rect, resource_provider_.get());
+- rect, rect, resource_provider_.get());
-
- RenderPassList pass_list;
- pass_list.push_back(pass.Pass());
@@ -338,6 +326,30 @@
- FuzzyPixelOffByOneComparator(true)));
-}
-
+-TEST_F(VideoGLRendererPixelTest, ClippedYUVRect) {
+- gfx::Rect viewport(this->device_viewport_size_);
+- gfx::Rect draw_rect(this->device_viewport_size_.width() * 1.5,
+- this->device_viewport_size_.height() * 1.5);
+-
+- RenderPassId id(1, 1);
+- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, viewport);
+-
+- SharedQuadState* shared_state =
+- CreateTestSharedQuadState(gfx::Transform(), viewport, pass.get());
+-
+- CreateTestYUVVideoDrawQuad_Striped(shared_state, media::VideoFrame::YV12,
+- false, gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f),
+- pass.get(), video_resource_updater_.get(),
+- draw_rect, viewport,
+- resource_provider_.get());
+- RenderPassList pass_list;
+- pass_list.push_back(pass.Pass());
+-
+- EXPECT_TRUE(this->RunPixelTest(
+- &pass_list, base::FilePath(FILE_PATH_LITERAL("yuv_stripes_clipped.png")),
+- FuzzyPixelOffByOneComparator(true)));
+-}
+-
-TEST_F(VideoGLRendererPixelTest, OffsetYUVRect) {
- gfx::Rect rect(this->device_viewport_size_);
-
@@ -351,7 +363,7 @@
- CreateTestYUVVideoDrawQuad_Striped(
- shared_state, media::VideoFrame::I420, false,
- gfx::RectF(0.125f, 0.25f, 0.75f, 0.5f), pass.get(),
-- video_resource_updater_.get(), rect, resource_provider_.get());
+- video_resource_updater_.get(), rect, rect, resource_provider_.get());
-
- RenderPassList pass_list;
- pass_list.push_back(pass.Pass());
@@ -375,7 +387,7 @@
- CreateTestYUVVideoDrawQuad_Solid(
- shared_state, media::VideoFrame::YV12, false,
- gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), 15, 128, 128, pass.get(),
-- video_resource_updater_.get(), rect, resource_provider_.get());
+- video_resource_updater_.get(), rect, rect, resource_provider_.get());
-
- RenderPassList pass_list;
- pass_list.push_back(pass.Pass());
@@ -400,7 +412,7 @@
- CreateTestYUVVideoDrawQuad_Solid(
- shared_state, media::VideoFrame::YV12J, false,
- gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), 149, 43, 21, pass.get(),
-- video_resource_updater_.get(), rect, resource_provider_.get());
+- video_resource_updater_.get(), rect, rect, resource_provider_.get());
-
- RenderPassList pass_list;
- pass_list.push_back(pass.Pass());
@@ -441,7 +453,7 @@
- CreateTestYUVVideoDrawQuad_Solid(
- shared_state, media::VideoFrame::YV12J, false,
- gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), 15, 128, 128, pass.get(),
-- video_resource_updater_.get(), rect, resource_provider_.get());
+- video_resource_updater_.get(), rect, rect, resource_provider_.get());
-
- RenderPassList pass_list;
- pass_list.push_back(pass.Pass());
@@ -464,7 +476,7 @@
- CreateTestYUVVideoDrawQuad_Striped(shared_state, media::VideoFrame::YV12A,
- false, gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f),
- pass.get(), video_resource_updater_.get(),
-- rect, resource_provider_.get());
+- rect, rect, resource_provider_.get());
-
- SolidColorDrawQuad* color_quad =
- pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
@@ -491,7 +503,7 @@
- CreateTestYUVVideoDrawQuad_Striped(shared_state, media::VideoFrame::YV12A,
- true, gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f),
- pass.get(), video_resource_updater_.get(),
-- rect, resource_provider_.get());
+- rect, rect, resource_provider_.get());
-
- SolidColorDrawQuad* color_quad =
- pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
@@ -509,18 +521,6 @@
TYPED_TEST(RendererPixelTest, FastPassColorFilterAlpha) {
gfx::Rect viewport_rect(this->device_viewport_size_);
-diff --git a/cc/quads/yuv_video_draw_quad.h b/cc/quads/yuv_video_draw_quad.h
-index 358929e..15bce98 100644
---- a/cc/quads/yuv_video_draw_quad.h
-+++ b/cc/quads/yuv_video_draw_quad.h
-@@ -8,7 +8,6 @@
- #include "base/basictypes.h"
- #include "base/memory/scoped_ptr.h"
- #include "cc/base/cc_export.h"
--#include "cc/layers/video_layer_impl.h"
- #include "cc/quads/draw_quad.h"
-
- namespace cc {
diff --git a/cc/resources/drawing_display_item.cc b/cc/resources/drawing_display_item.cc
index 648f9de..6dffad9 100644
--- a/cc/resources/drawing_display_item.cc
@@ -534,10 +534,10 @@
#include "base/trace_event/trace_event_argument.h"
#include "cc/debug/picture_debug_util.h"
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
-index 4289a99..4e3230b 100644
+index 8056387..e8471e2 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
-@@ -27,7 +27,6 @@
+@@ -26,7 +26,6 @@
#include "cc/layers/solid_color_scrollbar_layer_impl.h"
#include "cc/layers/texture_layer_impl.h"
#include "cc/layers/tiled_layer_impl.h"
@@ -614,10 +614,10 @@
EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame));
host_impl_->DrawLayers(&frame, gfx::FrameTime::Now());
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
-index 68a1f58..2ec6e66 100644
+index aacabd7..9416474 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
-@@ -18,7 +18,6 @@
+@@ -17,7 +17,6 @@
#include "cc/layers/painted_scrollbar_layer.h"
#include "cc/layers/picture_layer.h"
#include "cc/layers/solid_color_layer.h"
@@ -633,7 +633,7 @@
#include "cc/test/geometry_test_utils.h"
#include "cc/test/impl_side_painting_settings.h"
#include "cc/test/layer_tree_test.h"
-@@ -4170,28 +4168,6 @@ class LayerInvalidateCausesDraw : public LayerTreeHostTest {
+@@ -4256,28 +4254,6 @@ class LayerInvalidateCausesDraw : public LayerTreeHostTest {
int num_draws_;
};
diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn
index 3b340bd..211c22b 100644
--- a/sandbox/linux/BUILD.gn
+++ b/sandbox/linux/BUILD.gn
@@ -126,6 +126,9 @@
"services/namespace_sandbox_unittest.cc",
"services/namespace_utils_unittest.cc",
]
+
+ # For credentials_unittest.cc
+ configs += [ "//build/config/linux:libcap" ]
}
}
@@ -265,6 +268,10 @@
defines = [ "SANDBOX_IMPLEMENTATION" ]
+ deps = [
+ "//base",
+ ]
+
if (compile_credentials) {
sources += [
"services/credentials.cc",
@@ -275,13 +282,8 @@
"services/namespace_utils.h",
]
- # For capabilities.cc.
- configs += [ "//build/config/linux:libcap" ]
+ deps += [ ":sandbox_services_headers" ]
}
-
- deps = [
- "//base",
- ]
}
source_set("sandbox_services_headers") {
diff --git a/sandbox/linux/sandbox_linux.gypi b/sandbox/linux/sandbox_linux.gypi
index 6111fd3..4305b41 100644
--- a/sandbox/linux/sandbox_linux.gypi
+++ b/sandbox/linux/sandbox_linux.gypi
@@ -266,8 +266,8 @@
'services/namespace_utils.h',
],
'dependencies': [
- # for capabilities.cc.
- '../build/linux/system.gyp:libcap',
+ # for capability.h.
+ 'sandbox_services_headers',
],
}],
],
@@ -286,6 +286,7 @@
'system_headers/android_ucontext.h',
'system_headers/arm64_linux_syscalls.h',
'system_headers/arm_linux_syscalls.h',
+ 'system_headers/capability.h',
'system_headers/linux_seccomp.h',
'system_headers/linux_syscalls.h',
'system_headers/mips_linux_syscalls.h',
diff --git a/sandbox/linux/sandbox_linux_test_sources.gypi b/sandbox/linux/sandbox_linux_test_sources.gypi
index db039ed..c558a0d 100644
--- a/sandbox/linux/sandbox_linux_test_sources.gypi
+++ b/sandbox/linux/sandbox_linux_test_sources.gypi
@@ -62,6 +62,9 @@
'services/namespace_sandbox_unittest.cc',
'services/namespace_utils_unittest.cc',
],
+ 'dependencies': [
+ '../build/linux/system.gyp:libcap'
+ ],
}],
],
}
diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
index 6f84a66..2e66d97 100644
--- a/sandbox/linux/services/credentials.cc
+++ b/sandbox/linux/services/credentials.cc
@@ -7,7 +7,6 @@
#include <errno.h>
#include <signal.h>
#include <stdio.h>
-#include <sys/capability.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/wait.h>
@@ -27,6 +26,7 @@
#include "sandbox/linux/services/proc_util.h"
#include "sandbox/linux/services/syscall_wrappers.h"
#include "sandbox/linux/services/thread_helpers.h"
+#include "sandbox/linux/system_headers/capability.h"
namespace sandbox {
@@ -34,26 +34,6 @@
bool IsRunningOnValgrind() { return RUNNING_ON_VALGRIND; }
-struct CapFreeDeleter {
- inline void operator()(cap_t cap) const {
- int ret = cap_free(cap);
- CHECK_EQ(0, ret);
- }
-};
-
-// Wrapper to manage libcap2's cap_t type.
-typedef scoped_ptr<typeof(*((cap_t)0)), CapFreeDeleter> ScopedCap;
-
-struct CapTextFreeDeleter {
- inline void operator()(char* cap_text) const {
- int ret = cap_free(cap_text);
- CHECK_EQ(0, ret);
- }
-};
-
-// Wrapper to manage the result from libcap2's cap_from_text().
-typedef scoped_ptr<char, CapTextFreeDeleter> ScopedCapText;
-
// Checks that the set of RES-uids and the set of RES-gids have
// one element each and return that element in |resuid| and |resgid|
// respectively. It's ok to pass NULL as one or both of the ids.
@@ -130,21 +110,27 @@
error == ENOSYS);
}
+// Converts a LinuxCapability to the corresponding Linux CAP_XXX value.
+int LinuxCapabilityToKernelValue(LinuxCapability cap) {
+ switch (cap) {
+ case LinuxCapability::kCapSysChroot:
+ return CAP_SYS_CHROOT;
+ case LinuxCapability::kCapSysAdmin:
+ return CAP_SYS_ADMIN;
+ }
+
+ LOG(FATAL) << "Invalid LinuxCapability: " << static_cast<int>(cap);
+ return 0;
+}
+
} // namespace.
bool Credentials::DropAllCapabilities(int proc_fd) {
- DCHECK_LE(0, proc_fd);
-#if !defined(THREAD_SANITIZER)
- // With TSAN, accept to break the security model as it is a testing
- // configuration.
- CHECK(ThreadHelpers::IsSingleThreaded(proc_fd));
-#endif
+ if (!SetCapabilities(proc_fd, std::vector<LinuxCapability>())) {
+ return false;
+ }
- ScopedCap cap(cap_init());
- CHECK(cap);
- PCHECK(0 == cap_set_proc(cap.get()));
CHECK(!HasAnyCapability());
- // We never let this function fail.
return true;
}
@@ -153,20 +139,64 @@
return Credentials::DropAllCapabilities(proc_fd.get());
}
-bool Credentials::HasAnyCapability() {
- ScopedCap current_cap(cap_get_proc());
- CHECK(current_cap);
- ScopedCap empty_cap(cap_init());
- CHECK(empty_cap);
- return cap_compare(current_cap.get(), empty_cap.get()) != 0;
+// static
+bool Credentials::SetCapabilities(int proc_fd,
+ const std::vector<LinuxCapability>& caps) {
+ DCHECK_LE(0, proc_fd);
+
+#if !defined(THREAD_SANITIZER)
+ // With TSAN, accept to break the security model as it is a testing
+ // configuration.
+ CHECK(ThreadHelpers::IsSingleThreaded(proc_fd));
+#endif
+
+ struct cap_hdr hdr = {};
+ hdr.version = _LINUX_CAPABILITY_VERSION_3;
+ struct cap_data data[_LINUX_CAPABILITY_U32S_3] = {{}};
+
+ // Initially, cap has no capability flags set. Enable the effective and
+ // permitted flags only for the requested capabilities.
+ for (const LinuxCapability cap : caps) {
+ const int cap_num = LinuxCapabilityToKernelValue(cap);
+ const size_t index = CAP_TO_INDEX(cap_num);
+ const uint32_t mask = CAP_TO_MASK(cap_num);
+ data[index].effective |= mask;
+ data[index].permitted |= mask;
+ }
+
+ return sys_capset(&hdr, data) == 0;
}
-scoped_ptr<std::string> Credentials::GetCurrentCapString() {
- ScopedCap current_cap(cap_get_proc());
- CHECK(current_cap);
- ScopedCapText cap_text(cap_to_text(current_cap.get(), NULL));
- CHECK(cap_text);
- return scoped_ptr<std::string> (new std::string(cap_text.get()));
+bool Credentials::HasAnyCapability() {
+ struct cap_hdr hdr = {};
+ hdr.version = _LINUX_CAPABILITY_VERSION_3;
+ struct cap_data data[_LINUX_CAPABILITY_U32S_3] = {{}};
+
+ PCHECK(sys_capget(&hdr, data) == 0);
+
+ for (size_t i = 0; i < arraysize(data); ++i) {
+ if (data[i].effective || data[i].permitted || data[i].inheritable) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool Credentials::HasCapability(LinuxCapability cap) {
+ struct cap_hdr hdr = {};
+ hdr.version = _LINUX_CAPABILITY_VERSION_3;
+ struct cap_data data[_LINUX_CAPABILITY_U32S_3] = {{}};
+
+ PCHECK(sys_capget(&hdr, data) == 0);
+
+ const int cap_num = LinuxCapabilityToKernelValue(cap);
+ const size_t index = CAP_TO_INDEX(cap_num);
+ const uint32_t mask = CAP_TO_MASK(cap_num);
+
+ return (data[index].effective | data[index].permitted |
+ data[index].inheritable) &
+ mask;
}
// static
diff --git a/sandbox/linux/services/credentials.h b/sandbox/linux/services/credentials.h
index 9143561..83f2c70 100644
--- a/sandbox/linux/services/credentials.h
+++ b/sandbox/linux/services/credentials.h
@@ -12,21 +12,30 @@
#endif // defined(OS_ANDROID).
#include <string>
+#include <vector>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
+#include "sandbox/linux/system_headers/capability.h"
#include "sandbox/sandbox_export.h"
namespace sandbox {
+// For brevity, we only expose enums for the subset of capabilities we use.
+// This can be expanded as the need arises.
+enum class LinuxCapability {
+ kCapSysChroot,
+ kCapSysAdmin,
+};
+
// This class should be used to manipulate the current process' credentials.
// It is currently a stub used to manipulate POSIX.1e capabilities as
// implemented by the Linux kernel.
class SANDBOX_EXPORT Credentials {
public:
// Drop all capabilities in the effective, inheritable and permitted sets for
- // the current process. For security reasons, since capabilities are
+ // the current thread. For security reasons, since capabilities are
// per-thread, the caller is responsible for ensuring it is single-threaded
// when calling this API.
// |proc_fd| must be a file descriptor to /proc/ and remains owned by
@@ -34,14 +43,19 @@
static bool DropAllCapabilities(int proc_fd) WARN_UNUSED_RESULT;
// A similar API which assumes that it can open /proc/self/ by itself.
static bool DropAllCapabilities() WARN_UNUSED_RESULT;
+ // Sets the effective and permitted capability sets for the current thread to
+ // the list of capabiltiies in |caps|. All other capability flags are cleared.
+ static bool SetCapabilities(int proc_fd,
+ const std::vector<LinuxCapability>& caps)
+ WARN_UNUSED_RESULT;
+
+ // Returns true if the current thread has either the effective, permitted, or
+ // inheritable flag set for the given capability.
+ static bool HasCapability(LinuxCapability cap);
// Return true iff there is any capability in any of the capabilities sets
- // of the current process.
+ // of the current thread.
static bool HasAnyCapability();
- // Returns the capabilities of the current process in textual form, as
- // documented in libcap2's cap_to_text(3). This is mostly useful for
- // debugging and tests.
- static scoped_ptr<std::string> GetCurrentCapString();
// Returns whether the kernel supports CLONE_NEWUSER and whether it would be
// possible to immediately move to a new user namespace. There is no point
diff --git a/sandbox/linux/services/credentials_unittest.cc b/sandbox/linux/services/credentials_unittest.cc
index 2884e74..db19f6f 100644
--- a/sandbox/linux/services/credentials_unittest.cc
+++ b/sandbox/linux/services/credentials_unittest.cc
@@ -7,16 +7,21 @@
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
+#include <sys/capability.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
+#include <vector>
+
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_file.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "sandbox/linux/services/proc_util.h"
+#include "sandbox/linux/services/syscall_wrappers.h"
+#include "sandbox/linux/system_headers/capability.h"
#include "sandbox/linux/tests/unit_tests.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -24,6 +29,16 @@
namespace {
+struct CapFreeDeleter {
+ inline void operator()(cap_t cap) const {
+ int ret = cap_free(cap);
+ CHECK_EQ(0, ret);
+ }
+};
+
+// Wrapper to manage libcap2's cap_t type.
+typedef scoped_ptr<typeof(*((cap_t)0)), CapFreeDeleter> ScopedCap;
+
bool WorkingDirectoryIsRoot() {
char current_dir[PATH_MAX];
char* cwd = getcwd(current_dir, sizeof(current_dir));
@@ -48,12 +63,6 @@
CHECK(!Credentials::HasAnyCapability());
}
-SANDBOX_TEST(Credentials, GetCurrentCapString) {
- CHECK(Credentials::DropAllCapabilities());
- const char kNoCapabilityText[] = "=";
- CHECK(*Credentials::GetCurrentCapString() == kNoCapabilityText);
-}
-
SANDBOX_TEST(Credentials, MoveToNewUserNS) {
CHECK(Credentials::DropAllCapabilities());
bool moved_to_new_ns = Credentials::MoveToNewUserNS();
@@ -161,6 +170,70 @@
CHECK(!Credentials::MoveToNewUserNS());
}
+SANDBOX_TEST(Credentials, SetCapabilities) {
+ // Probably missing kernel support.
+ if (!Credentials::MoveToNewUserNS())
+ return;
+
+ base::ScopedFD proc_fd(ProcUtil::OpenProc());
+
+ CHECK(Credentials::HasCapability(LinuxCapability::kCapSysAdmin));
+ CHECK(Credentials::HasCapability(LinuxCapability::kCapSysChroot));
+
+ const std::vector<LinuxCapability> caps = {LinuxCapability::kCapSysChroot};
+ CHECK(Credentials::SetCapabilities(proc_fd.get(), caps));
+
+ CHECK(!Credentials::HasCapability(LinuxCapability::kCapSysAdmin));
+ CHECK(Credentials::HasCapability(LinuxCapability::kCapSysChroot));
+
+ const std::vector<LinuxCapability> no_caps;
+ CHECK(Credentials::SetCapabilities(proc_fd.get(), no_caps));
+ CHECK(!Credentials::HasAnyCapability());
+}
+
+SANDBOX_TEST(Credentials, SetCapabilitiesAndChroot) {
+ // Probably missing kernel support.
+ if (!Credentials::MoveToNewUserNS())
+ return;
+
+ base::ScopedFD proc_fd(ProcUtil::OpenProc());
+
+ CHECK(Credentials::HasCapability(LinuxCapability::kCapSysChroot));
+ PCHECK(chroot("/") == 0);
+
+ const std::vector<LinuxCapability> caps = {LinuxCapability::kCapSysChroot};
+ CHECK(Credentials::SetCapabilities(proc_fd.get(), caps));
+ PCHECK(chroot("/") == 0);
+
+ CHECK(Credentials::DropAllCapabilities());
+ PCHECK(chroot("/") == -1 && errno == EPERM);
+}
+
+SANDBOX_TEST(Credentials, SetCapabilitiesMatchesLibCap2) {
+ // Probably missing kernel support.
+ if (!Credentials::MoveToNewUserNS())
+ return;
+
+ base::ScopedFD proc_fd(ProcUtil::OpenProc());
+
+ const std::vector<LinuxCapability> caps = {LinuxCapability::kCapSysChroot};
+ CHECK(Credentials::SetCapabilities(proc_fd.get(), caps));
+
+ ScopedCap actual_cap(cap_get_proc());
+ PCHECK(actual_cap != nullptr);
+
+ ScopedCap expected_cap(cap_init());
+ PCHECK(expected_cap != nullptr);
+
+ const cap_value_t allowed_cap = CAP_SYS_CHROOT;
+ for (const cap_flag_t flag : {CAP_EFFECTIVE, CAP_PERMITTED}) {
+ PCHECK(cap_set_flag(expected_cap.get(), flag, 1, &allowed_cap, CAP_SET) ==
+ 0);
+ }
+
+ CHECK_EQ(0, cap_compare(expected_cap.get(), actual_cap.get()));
+}
+
} // namespace.
} // namespace sandbox.
diff --git a/sandbox/linux/services/syscall_wrappers.cc b/sandbox/linux/services/syscall_wrappers.cc
index af9dc46..5a4045b 100644
--- a/sandbox/linux/services/syscall_wrappers.cc
+++ b/sandbox/linux/services/syscall_wrappers.cc
@@ -77,4 +77,12 @@
return syscall(__NR_prlimit64, pid, resource, new_limit, old_limit);
}
+int sys_capget(cap_hdr* hdrp, cap_data* datap) {
+ return syscall(__NR_capget, hdrp, datap);
+}
+
+int sys_capset(cap_hdr* hdrp, const cap_data* datap) {
+ return syscall(__NR_capset, hdrp, datap);
+}
+
} // namespace sandbox
diff --git a/sandbox/linux/services/syscall_wrappers.h b/sandbox/linux/services/syscall_wrappers.h
index 7f703e0..28cc3a7 100644
--- a/sandbox/linux/services/syscall_wrappers.h
+++ b/sandbox/linux/services/syscall_wrappers.h
@@ -5,12 +5,15 @@
#ifndef SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_
#define SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_
+#include <stdint.h>
#include <sys/types.h>
#include "sandbox/sandbox_export.h"
struct sock_fprog;
struct rlimit64;
+struct cap_hdr;
+struct cap_data;
namespace sandbox {
@@ -47,6 +50,12 @@
const struct rlimit64* new_limit,
struct rlimit64* old_limit);
+// Some libcs do not expose capget/capset wrappers. We want to use these
+// directly in order to avoid pulling in libcap2.
+SANDBOX_EXPORT int sys_capget(struct cap_hdr* hdrp, struct cap_data* datap);
+SANDBOX_EXPORT int sys_capset(struct cap_hdr* hdrp,
+ const struct cap_data* datap);
+
} // namespace sandbox
#endif // SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_
diff --git a/sandbox/linux/system_headers/capability.h b/sandbox/linux/system_headers/capability.h
new file mode 100644
index 0000000..f91fcf7
--- /dev/null
+++ b/sandbox/linux/system_headers/capability.h
@@ -0,0 +1,42 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_CAPABILITY_H_
+#define SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_CAPABILITY_H_
+
+#include <stdint.h>
+
+// The following macros are taken from linux/capability.h.
+// We only support capability version 3, which was introduced in Linux 2.6.26.
+#ifndef _LINUX_CAPABILITY_VERSION_3
+#define _LINUX_CAPABILITY_VERSION_3 0x20080522
+#endif
+#ifndef _LINUX_CAPABILITY_U32S_3
+#define _LINUX_CAPABILITY_U32S_3 2
+#endif
+#ifndef CAP_TO_INDEX
+#define CAP_TO_INDEX(x) ((x) >> 5) // 1 << 5 == bits in __u32
+#endif
+#ifndef CAP_TO_MASK
+#define CAP_TO_MASK(x) (1 << ((x) & 31)) // mask for indexed __u32
+#endif
+#ifndef CAP_SYS_CHROOT
+#define CAP_SYS_CHROOT 18
+#endif
+#ifndef CAP_SYS_ADMIN
+#define CAP_SYS_ADMIN 21
+#endif
+
+struct cap_hdr {
+ uint32_t version;
+ int pid;
+};
+
+struct cap_data {
+ uint32_t effective;
+ uint32_t permitted;
+ uint32_t inheritable;
+};
+
+#endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_CAPABILITY_H_
diff --git a/skia/config/SkUserConfig.h b/skia/config/SkUserConfig.h
index 6369e34..6db5919 100644
--- a/skia/config/SkUserConfig.h
+++ b/skia/config/SkUserConfig.h
@@ -245,6 +245,10 @@
# define SK_SUPPORT_LEGACY_GETTOPDEVICE
#endif
+#ifndef SK_LEGACY_DRAWPICTURECALLBACK
+# define SK_LEGACY_DRAWPICTURECALLBACK
+#endif
+
#ifndef SK_SUPPORT_LEGACY_GETDEVICE
# define SK_SUPPORT_LEGACY_GETDEVICE
#endif
diff --git a/skia/ext/benchmarking_canvas.cc b/skia/ext/benchmarking_canvas.cc
index dbe851a..194f382 100644
--- a/skia/ext/benchmarking_canvas.cc
+++ b/skia/ext/benchmarking_canvas.cc
@@ -244,12 +244,13 @@
val->SetString("Flags", builder.str());
}
- if (paint.getFilterLevel() != default_paint.getFilterLevel()) {
- static const char* gFilterLevelStrings[] =
- { "None", "Low", "Medium", "High" };
- DCHECK_LT(static_cast<size_t>(paint.getFilterLevel()),
- SK_ARRAY_COUNT(gFilterLevelStrings));
- val->SetString("FilterLevel", gFilterLevelStrings[paint.getFilterLevel()]);
+ if (paint.getFilterQuality() != default_paint.getFilterQuality()) {
+ static const char* gFilterQualityStrings[] = {
+ "None", "Low", "Medium", "High"};
+ DCHECK_LT(static_cast<size_t>(paint.getFilterQuality()),
+ SK_ARRAY_COUNT(gFilterQualityStrings));
+ val->SetString("FilterQuality",
+ gFilterQualityStrings[paint.getFilterQuality()]);
}
if (paint.getTextSize() != default_paint.getTextSize())
diff --git a/skia/ext/bitmap_platform_device_cairo.cc b/skia/ext/bitmap_platform_device_cairo.cc
index a331bed..246984a 100644
--- a/skia/ext/bitmap_platform_device_cairo.cc
+++ b/skia/ext/bitmap_platform_device_cairo.cc
@@ -167,8 +167,8 @@
cairo_destroy(cairo_);
}
-SkBaseDevice* BitmapPlatformDevice::onCreateCompatibleDevice(
- const CreateInfo& info) {
+SkBaseDevice* BitmapPlatformDevice::onCreateDevice(const CreateInfo& info,
+ const SkPaint*) {
SkASSERT(info.fInfo.colorType() == kN32_SkColorType);
return BitmapPlatformDevice::Create(info.fInfo.width(), info.fInfo.height(),
info.fInfo.isOpaque());
diff --git a/skia/ext/bitmap_platform_device_cairo.h b/skia/ext/bitmap_platform_device_cairo.h
index 977cdad..96a1e17 100644
--- a/skia/ext/bitmap_platform_device_cairo.h
+++ b/skia/ext/bitmap_platform_device_cairo.h
@@ -92,7 +92,7 @@
cairo_t* BeginPlatformPaint() override;
protected:
- SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& info) override;
+ SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override;
private:
static BitmapPlatformDevice* Create(int width, int height, bool is_opaque,
diff --git a/skia/ext/bitmap_platform_device_mac.cc b/skia/ext/bitmap_platform_device_mac.cc
index 9c7966d..066e93f 100644
--- a/skia/ext/bitmap_platform_device_mac.cc
+++ b/skia/ext/bitmap_platform_device_mac.cc
@@ -272,8 +272,8 @@
SetMatrixClip(transform, region);
}
-SkBaseDevice* BitmapPlatformDevice::onCreateCompatibleDevice(
- const CreateInfo& cinfo) {
+SkBaseDevice* BitmapPlatformDevice::onCreateDevice(const CreateInfo& cinfo,
+ const SkPaint*) {
const SkImageInfo& info = cinfo.fInfo;
const bool do_clear = !info.isOpaque();
SkASSERT(info.colorType() == kN32_SkColorType);
diff --git a/skia/ext/bitmap_platform_device_mac.h b/skia/ext/bitmap_platform_device_mac.h
index 6c8dc84..566924b 100644
--- a/skia/ext/bitmap_platform_device_mac.h
+++ b/skia/ext/bitmap_platform_device_mac.h
@@ -57,7 +57,7 @@
BitmapPlatformDevice(CGContextRef context,
const SkBitmap& bitmap);
- SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& info) override;
+ SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override;
private:
void ReleaseBitmapContext();
diff --git a/skia/ext/bitmap_platform_device_skia.cc b/skia/ext/bitmap_platform_device_skia.cc
index 136706d..04fc950 100644
--- a/skia/ext/bitmap_platform_device_skia.cc
+++ b/skia/ext/bitmap_platform_device_skia.cc
@@ -42,8 +42,8 @@
BitmapPlatformDevice::~BitmapPlatformDevice() {
}
-SkBaseDevice* BitmapPlatformDevice::onCreateCompatibleDevice(
- const CreateInfo& info) {
+SkBaseDevice* BitmapPlatformDevice::onCreateDevice(const CreateInfo& info,
+ const SkPaint*) {
SkASSERT(info.fInfo.colorType() == kN32_SkColorType);
return BitmapPlatformDevice::Create(info.fInfo.width(), info.fInfo.height(),
info.fInfo.isOpaque());
diff --git a/skia/ext/bitmap_platform_device_skia.h b/skia/ext/bitmap_platform_device_skia.h
index 6a8fe7d..0e21929 100644
--- a/skia/ext/bitmap_platform_device_skia.h
+++ b/skia/ext/bitmap_platform_device_skia.h
@@ -40,7 +40,7 @@
PlatformSurface BeginPlatformPaint() override;
protected:
- SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& info) override;
+ SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override;
private:
DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice);
diff --git a/skia/ext/bitmap_platform_device_win.cc b/skia/ext/bitmap_platform_device_win.cc
index 0f16694..6310820 100644
--- a/skia/ext/bitmap_platform_device_win.cc
+++ b/skia/ext/bitmap_platform_device_win.cc
@@ -274,8 +274,8 @@
return SkBitmapDevice::onAccessBitmap();
}
-SkBaseDevice* BitmapPlatformDevice::onCreateCompatibleDevice(
- const CreateInfo& cinfo) {
+SkBaseDevice* BitmapPlatformDevice::onCreateDevice(const CreateInfo& cinfo,
+ const SkPaint*) {
const SkImageInfo& info = cinfo.fInfo;
const bool do_clear = !info.isOpaque();
SkASSERT(info.colorType() == kN32_SkColorType);
diff --git a/skia/ext/bitmap_platform_device_win.h b/skia/ext/bitmap_platform_device_win.h
index 1b60018..4a8ad8f 100644
--- a/skia/ext/bitmap_platform_device_win.h
+++ b/skia/ext/bitmap_platform_device_win.h
@@ -63,8 +63,7 @@
// starts accessing pixel data.
virtual const SkBitmap& onAccessBitmap() override;
- virtual SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& info)
- override;
+ SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override;
private:
// Private constructor.
diff --git a/skia/ext/opacity_draw_filter.cc b/skia/ext/opacity_draw_filter.cc
index 99736f3..10ed9e8 100644
--- a/skia/ext/opacity_draw_filter.cc
+++ b/skia/ext/opacity_draw_filter.cc
@@ -18,7 +18,7 @@
if (alpha_ < 255)
paint->setAlpha(alpha_);
if (disable_image_filtering_)
- paint->setFilterLevel(SkPaint::kNone_FilterLevel);
+ paint->setFilterQuality(kNone_SkFilterQuality);
return true;
}
diff --git a/sky/engine/platform/graphics/GraphicsContext.cpp b/sky/engine/platform/graphics/GraphicsContext.cpp
index 1a8451c..6765a71 100644
--- a/sky/engine/platform/graphics/GraphicsContext.cpp
+++ b/sky/engine/platform/graphics/GraphicsContext.cpp
@@ -980,7 +980,7 @@
RefPtr<SkPictureImageFilter> pictureFilter = adoptRef(SkPictureImageFilter::Create(picture.get(), sourceBounds));
SkMatrix layerScale;
layerScale.setScale(deviceDest.width() / src.width(), deviceDest.height() / src.height());
- RefPtr<SkMatrixImageFilter> matrixFilter = adoptRef(SkMatrixImageFilter::Create(layerScale, SkPaint::kLow_FilterLevel, pictureFilter.get()));
+ RefPtr<SkMatrixImageFilter> matrixFilter = adoptRef(SkMatrixImageFilter::Create(layerScale, kLow_SkFilterQuality, pictureFilter.get()));
SkPaint picturePaint;
picturePaint.setXfermodeMode(WebCoreCompositeToSkiaComposite(op, blendMode));
picturePaint.setImageFilter(matrixFilter.get());
@@ -1791,7 +1791,7 @@
resampling = InterpolationLow;
}
resampling = limitInterpolationQuality(this, resampling);
- paint->setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling));
+ paint->setFilterQuality(static_cast<SkFilterQuality>(resampling));
}
} // namespace blink
diff --git a/sky/engine/platform/graphics/GraphicsContextState.cpp b/sky/engine/platform/graphics/GraphicsContextState.cpp
index bb219e5..8e5307a 100644
--- a/sky/engine/platform/graphics/GraphicsContextState.cpp
+++ b/sky/engine/platform/graphics/GraphicsContextState.cpp
@@ -27,10 +27,10 @@
m_strokePaint.setStrokeCap(SkPaint::kDefault_Cap);
m_strokePaint.setStrokeJoin(SkPaint::kDefault_Join);
m_strokePaint.setStrokeMiter(SkFloatToScalar(m_strokeData.miterLimit()));
- m_strokePaint.setFilterLevel(WebCoreInterpolationQualityToSkFilterLevel(m_interpolationQuality));
+ m_strokePaint.setFilterQuality(WebCoreInterpolationQualityToSkFilterQuality(m_interpolationQuality));
m_strokePaint.setAntiAlias(m_shouldAntialias);
m_fillPaint.setColor(applyAlpha(m_fillColor.rgb()));
- m_fillPaint.setFilterLevel(WebCoreInterpolationQualityToSkFilterLevel(m_interpolationQuality));
+ m_fillPaint.setFilterQuality(WebCoreInterpolationQualityToSkFilterQuality(m_interpolationQuality));
m_fillPaint.setAntiAlias(m_shouldAntialias);
}
@@ -237,8 +237,8 @@
void GraphicsContextState::setInterpolationQuality(InterpolationQuality quality)
{
m_interpolationQuality = quality;
- m_strokePaint.setFilterLevel(WebCoreInterpolationQualityToSkFilterLevel(quality));
- m_fillPaint.setFilterLevel(WebCoreInterpolationQualityToSkFilterLevel(quality));
+ m_strokePaint.setFilterQuality(WebCoreInterpolationQualityToSkFilterQuality(quality));
+ m_fillPaint.setFilterQuality(WebCoreInterpolationQualityToSkFilterQuality(quality));
}
void GraphicsContextState::setShouldAntialias(bool shouldAntialias)
diff --git a/sky/engine/platform/graphics/GraphicsTypes.h b/sky/engine/platform/graphics/GraphicsTypes.h
index b155f45..7d2ae22 100644
--- a/sky/engine/platform/graphics/GraphicsTypes.h
+++ b/sky/engine/platform/graphics/GraphicsTypes.h
@@ -44,10 +44,10 @@
};
enum InterpolationQuality {
- InterpolationNone = SkPaint::kNone_FilterLevel,
- InterpolationLow = SkPaint::kLow_FilterLevel,
- InterpolationMedium = SkPaint::kMedium_FilterLevel,
- InterpolationHigh = SkPaint::kHigh_FilterLevel,
+ InterpolationNone = kNone_SkFilterQuality,
+ InterpolationLow = kLow_SkFilterQuality,
+ InterpolationMedium = kMedium_SkFilterQuality,
+ InterpolationHigh = kHigh_SkFilterQuality,
#if USE(LOW_QUALITY_IMAGE_INTERPOLATION)
InterpolationDefault = InterpolationLow,
#else
diff --git a/sky/engine/platform/graphics/filters/SkiaImageFilterBuilder.cpp b/sky/engine/platform/graphics/filters/SkiaImageFilterBuilder.cpp
index 286c7a6..3dec62a 100644
--- a/sky/engine/platform/graphics/filters/SkiaImageFilterBuilder.cpp
+++ b/sky/engine/platform/graphics/filters/SkiaImageFilterBuilder.cpp
@@ -88,7 +88,7 @@
PassRefPtr<SkImageFilter> SkiaImageFilterBuilder::buildTransform(const AffineTransform& transform, SkImageFilter* input)
{
- return adoptRef(SkMatrixImageFilter::Create(affineTransformToSkMatrix(transform), SkPaint::kHigh_FilterLevel, input));
+ return adoptRef(SkMatrixImageFilter::Create(affineTransformToSkMatrix(transform), kHigh_SkFilterQuality, input));
}
} // namespace blink
diff --git a/sky/engine/platform/graphics/skia/NativeImageSkia.cpp b/sky/engine/platform/graphics/skia/NativeImageSkia.cpp
index e98f56c..71f3e96 100644
--- a/sky/engine/platform/graphics/skia/NativeImageSkia.cpp
+++ b/sky/engine/platform/graphics/skia/NativeImageSkia.cpp
@@ -239,13 +239,13 @@
localMatrix.setTranslate(SkFloatToScalar(adjustedX), SkFloatToScalar(adjustedY));
RefPtr<SkShader> shader;
- SkPaint::FilterLevel filterLevel = static_cast<SkPaint::FilterLevel>(resampling);
+ SkFilterQuality filterLevel = static_cast<SkFilterQuality>(resampling);
// Bicubic filter is only applied to defer-decoded images, see
// NativeImageSkia::draw for details.
if (resampling == InterpolationHigh && !isLazyDecoded) {
// Do nice resampling.
- filterLevel = SkPaint::kNone_FilterLevel;
+ filterLevel = kNone_SkFilterQuality;
float scaleX = destBitmapWidth / normSrcRect.width();
float scaleY = destBitmapHeight / normSrcRect.height();
SkRect scaledSrcRect;
@@ -291,7 +291,7 @@
paint.setShader(shader.get());
paint.setXfermodeMode(WebCoreCompositeToSkiaComposite(compositeOp, blendMode));
paint.setColorFilter(context->colorFilter());
- paint.setFilterLevel(filterLevel);
+ paint.setFilterQuality(filterLevel);
context->drawRect(destRect, paint);
}
diff --git a/sky/engine/platform/graphics/skia/SkiaUtils.h b/sky/engine/platform/graphics/skia/SkiaUtils.h
index 6bdeded..9492dcb 100644
--- a/sky/engine/platform/graphics/skia/SkiaUtils.h
+++ b/sky/engine/platform/graphics/skia/SkiaUtils.h
@@ -53,11 +53,11 @@
// move this guy into SkColor.h
SkColor SkPMColorToColor(SkPMColor);
-inline SkPaint::FilterLevel WebCoreInterpolationQualityToSkFilterLevel(InterpolationQuality quality)
+inline SkFilterQuality WebCoreInterpolationQualityToSkFilterQuality(InterpolationQuality quality)
{
// FIXME: this reflects existing client mappings, but should probably
// be expanded to map higher level interpolations more accurately.
- return quality != InterpolationNone ? SkPaint::kLow_FilterLevel : SkPaint::kNone_FilterLevel;
+ return quality != InterpolationNone ? kLow_SkFilterQuality : kNone_SkFilterQuality;
}
// Skia has problems when passed infinite, etc floats, filter them to 0.
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json
index a839c45..a8730fb 100644
--- a/testing/buildbot/chromium.fyi.json
+++ b/testing/buildbot/chromium.fyi.json
@@ -338,7 +338,7 @@
{ "test": "content_unittests", "args": ["--site-per-process"] },
{ "test": "content_browsertests", "args": ["--site-per-process", "--gtest_filter=-*.AllowTargetedNavigationsAfterSwap:*.SupportCrossProcessPostMessage:*.DisownOpener:*.DontPreemptNavigationWithFrameTreeUpdate:*.ProcessExitWithSwappedOutViews:*.SupportCrossProcessPostMessageWithMessagePort"] },
{ "test": "unit_tests", "args": ["--site-per-process"] },
- { "test": "browser_tests", "args": ["--site-per-process", "--gtest_filter=-AppApiTest.*:AutofillDialogControllerTest.*:BlockedAppApiTest.*:BookmarkOverrideTest.*:BrowserTest.OtherRedirectsDontForkProcess:ChromeAppAPITest.*:ChromeRenderProcessHostTest.*:ChromeRenderProcessHostTestWithCommandLine.*:DevToolsExperimentalExtensionTest.*:DevToolsExtensionTest.*:DnsProbeBrowserTest.*:ErrorPageTest.*:ExecuteScriptApiTest.ExecuteScriptPermissions:ExtensionApiTest.ContentScriptExtensionIframe:ExtensionApiTest.ContentScriptOtherExtensions:ExtensionApiTest.ContentScriptExtensionProcess:ExtensionApiTest.TabsOnUpdated:ExtensionApiTest.WindowOpenPopupIframe:ExtensionBrowserTest.LoadChromeExtensionsWithOptionsParamWhenEmbedded:ExtensionCrxInstallerTest.InstallDelayedUntilNextUpdate:ExtensionOptionsApiTest.ExtensionCanEmbedOwnOptions:ExtensionSettingsApiTest.SimpleTest:ExtensionWebUITest.CanEmbedExtensionOptions:ExtensionWebUITest.ReceivesExtensionOptionsOnClose:ExternallyConnectableMessagingTest.*:GeolocationBrowserTest.*:HistoryBrowserTest.*:InlineLoginUISafeIframeBrowserTest.*:IsolatedAppTest.*:LaunchWebAuthFlowFunctionTest.*:MimeHandlerViewTest.*:NaClBrowserTestNonSfiMode.*:OptionsUIBrowserTest.*:PhishingClassifierTest.*:PhishingDOMFeatureExtractorTest.*:PlatformAppUrlRedirectorBrowserTest.*:PopupBlockerBrowserTest.*:PortForwardingTest.*:PrerenderBrowserTest.*:ProcessManagementTest.*:ProfileManagerBrowserTest.*:RedirectTest.*:ReferrerPolicyTest.*:SandboxStatusUITest.*:SSLUITest.*:SyncFileSystemApiTest.GetFileStatuses:SyncFileSystemTest.*:WebNavigationApiTest.CrossProcessFragment:WebNavigationApiTest.ServerRedirectSingleProcess:WebNavigationApiTest.CrossProcessHistory:WebViewDPITest.*:WebViewPluginTest.*:WebViewTest.*:ZoomControllerBrowserTest.*:*.NavigateFromNTPToOptionsInSameTab:*.ProfilesWithoutPagesNotLaunched:*.TabMove:*.WhitelistedExtension:*.NewTabPageURL:*.HomepageLocation:RestoreOnStartupPolicyTest*:ExtensionApiTest.ActiveTab:PhishingClassifierDelegateTest.*:WebUIWebViewBrowserTest.ExecuteScriptCode"] }
+ { "test": "browser_tests", "args": ["--site-per-process", "--gtest_filter=-AppApiTest.*:BlockedAppApiTest.*:BrowserTest.ClearPendingOnFailUnlessNTP:BrowserTest.OtherRedirectsDontForkProcess:BrowserTest.WindowOpenClose:ChromeAppAPITest.*:ChromeRenderProcessHostTest.*:ChromeRenderProcessHostTestWithCommandLine.*:DevToolsExperimentalExtensionTest.*:DevToolsExtensionTest.*:DnsProbeBrowserTest.*:ErrorPageTest.*:ExecuteScriptApiTest.ExecuteScriptPermissions:ExtensionApiTest.ChromeRuntimeOpenOptionsPage:ExtensionApiTest.ContentScriptExtensionIframe:ExtensionApiTest.ContentScriptOtherExtensions:ExtensionApiTest.ContentScriptExtensionProcess:ExtensionApiTest.TabsOnUpdated:ExtensionApiTest.WindowOpenPopupIframe:ExtensionBrowserTest.LoadChromeExtensionsWithOptionsParamWhenEmbedded:ExtensionCrxInstallerTest.InstallDelayedUntilNextUpdate:ExtensionOptionsApiTest.ExtensionCanEmbedOwnOptions:ExtensionWebUITest.CanEmbedExtensionOptions:ExtensionWebUITest.ReceivesExtensionOptionsOnClose:ExternallyConnectableMessagingTest.*:HistoryBrowserTest.*:InlineLoginUISafeIframeBrowserTest.*:IsolatedAppTest.*:LaunchWebAuthFlowFunctionTest.*:MimeHandlerViewTest.*:*.NewAvatarMenuEnabledInGuestMode:OptionsUIBrowserTest.*:PhishingClassifierTest.*:PhishingDOMFeatureExtractorTest.*:PlatformAppUrlRedirectorBrowserTest.*:PopupBlockerBrowserTest.*:PrerenderBrowserTest.*:ProcessManagementTest.*:RedirectTest.*:ReferrerPolicyTest.*:SSLUITest.*:WebNavigationApiTest.CrossProcessFragment:WebNavigationApiTest.ServerRedirectSingleProcess:WebNavigationApiTest.CrossProcessHistory:WebViewDPITest.*:WebViewPluginTest.*:WebViewTest.*:ZoomControllerBrowserTest.*:*.NavigateFromNTPToOptionsInSameTab:*.ProfilesWithoutPagesNotLaunched:*.TabMove:*.WhitelistedExtension:*.NewTabPageURL:*.HomepageLocation:RestoreOnStartupPolicyTest*:PhishingClassifierDelegateTest.*:WebUIWebViewBrowserTest.ExecuteScriptCode"] }
]
},
"Site Isolation Win": {
@@ -346,7 +346,7 @@
{ "test": "content_unittests", "args": ["--site-per-process"] },
{ "test": "content_browsertests", "args": ["--site-per-process", "--gtest_filter=-*.AllowTargetedNavigationsAfterSwap:*.SupportCrossProcessPostMessage:*.DisownOpener:*.DontPreemptNavigationWithFrameTreeUpdate:*.ProcessExitWithSwappedOutViews:*.SupportCrossProcessPostMessageWithMessagePort"] },
{ "test": "unit_tests", "args": ["--site-per-process"] },
- { "test": "browser_tests", "args": ["--site-per-process", "--gtest_filter=-AppApiTest.*:AutofillDialogControllerTest.*:BlockedAppApiTest.*:BookmarkOverrideTest.*:BrowserTest.OtherRedirectsDontForkProcess:ChromeAppAPITest.*:ChromeRenderProcessHostTest.*:ChromeRenderProcessHostTestWithCommandLine.*:DevToolsExperimentalExtensionTest.*:DevToolsExtensionTest.*:DnsProbeBrowserTest.*:ErrorPageTest.*:ExecuteScriptApiTest.ExecuteScriptPermissions:ExtensionApiTest.ContentScriptExtensionIframe:ExtensionApiTest.ContentScriptOtherExtensions:ExtensionApiTest.ContentScriptExtensionProcess:ExtensionApiTest.TabsOnUpdated:ExtensionApiTest.WindowOpenPopupIframe:ExtensionBrowserTest.LoadChromeExtensionsWithOptionsParamWhenEmbedded:ExtensionCrxInstallerTest.InstallDelayedUntilNextUpdate:ExtensionOptionsApiTest.ExtensionCanEmbedOwnOptions:ExtensionSettingsApiTest.SimpleTest:ExtensionWebUITest.CanEmbedExtensionOptions:ExtensionWebUITest.ReceivesExtensionOptionsOnClose:ExternallyConnectableMessagingTest.*:GeolocationBrowserTest.*:HistoryBrowserTest.*:InlineLoginUISafeIframeBrowserTest.*:IsolatedAppTest.*:LaunchWebAuthFlowFunctionTest.*:MimeHandlerViewTest.*:NaClBrowserTestNonSfiMode.*:OptionsUIBrowserTest.*:PhishingClassifierTest.*:PhishingDOMFeatureExtractorTest.*:PlatformAppUrlRedirectorBrowserTest.*:PopupBlockerBrowserTest.*:PortForwardingTest.*:PrerenderBrowserTest.*:ProcessManagementTest.*:ProfileManagerBrowserTest.*:RedirectTest.*:ReferrerPolicyTest.*:SandboxStatusUITest.*:SSLUITest.*:SyncFileSystemApiTest.GetFileStatuses:SyncFileSystemTest.*:WebNavigationApiTest.CrossProcessFragment:WebNavigationApiTest.ServerRedirectSingleProcess:WebNavigationApiTest.CrossProcessHistory:WebViewDPITest.*:WebViewPluginTest.*:WebViewTest.*:ZoomControllerBrowserTest.*:*.NavigateFromNTPToOptionsInSameTab:*.ProfilesWithoutPagesNotLaunched:*.TabMove:*.WhitelistedExtension:*.NewTabPageURL:*.HomepageLocation:RestoreOnStartupPolicyTest*:ExtensionApiTest.ActiveTab:PhishingClassifierDelegateTest.*:WebUIWebViewBrowserTest.ExecuteScriptCode"] }
+ { "test": "browser_tests", "args": ["--site-per-process", "--gtest_filter=-AppApiTest.*:BlockedAppApiTest.*:BrowserTest.ClearPendingOnFailUnlessNTP:BrowserTest.OtherRedirectsDontForkProcess:BrowserTest.WindowOpenClose:ChromeAppAPITest.*:ChromeRenderProcessHostTest.*:ChromeRenderProcessHostTestWithCommandLine.*:DevToolsExperimentalExtensionTest.*:DevToolsExtensionTest.*:DnsProbeBrowserTest.*:ErrorPageTest.*:ExecuteScriptApiTest.ExecuteScriptPermissions:ExtensionApiTest.ChromeRuntimeOpenOptionsPage:ExtensionApiTest.ContentScriptExtensionIframe:ExtensionApiTest.ContentScriptOtherExtensions:ExtensionApiTest.ContentScriptExtensionProcess:ExtensionApiTest.TabsOnUpdated:ExtensionApiTest.WindowOpenPopupIframe:ExtensionBrowserTest.LoadChromeExtensionsWithOptionsParamWhenEmbedded:ExtensionCrxInstallerTest.InstallDelayedUntilNextUpdate:ExtensionOptionsApiTest.ExtensionCanEmbedOwnOptions:ExtensionWebUITest.CanEmbedExtensionOptions:ExtensionWebUITest.ReceivesExtensionOptionsOnClose:ExternallyConnectableMessagingTest.*:HistoryBrowserTest.*:InlineLoginUISafeIframeBrowserTest.*:IsolatedAppTest.*:LaunchWebAuthFlowFunctionTest.*:MimeHandlerViewTest.*:*.NewAvatarMenuEnabledInGuestMode:OptionsUIBrowserTest.*:PhishingClassifierTest.*:PhishingDOMFeatureExtractorTest.*:PlatformAppUrlRedirectorBrowserTest.*:PopupBlockerBrowserTest.*:PrerenderBrowserTest.*:ProcessManagementTest.*:RedirectTest.*:ReferrerPolicyTest.*:SSLUITest.*:WebNavigationApiTest.CrossProcessFragment:WebNavigationApiTest.ServerRedirectSingleProcess:WebNavigationApiTest.CrossProcessHistory:WebViewDPITest.*:WebViewPluginTest.*:WebViewTest.*:ZoomControllerBrowserTest.*:*.NavigateFromNTPToOptionsInSameTab:*.ProfilesWithoutPagesNotLaunched:*.TabMove:*.WhitelistedExtension:*.NewTabPageURL:*.HomepageLocation:RestoreOnStartupPolicyTest*:PhishingClassifierDelegateTest.*:WebUIWebViewBrowserTest.ExecuteScriptCode"] }
]
},
"Browser Side Navigation Linux": {
diff --git a/testing/buildbot/chromium.perf.json b/testing/buildbot/chromium.perf.json
index e9f616a..2fd07bd 100644
--- a/testing/buildbot/chromium.perf.json
+++ b/testing/buildbot/chromium.perf.json
@@ -1,9 +1,23 @@
{
+ "Linux Perf (3)": {
+ "scripts": [
+ {
+ "name": "cc_perftests",
+ "script": "gtest_perf_test.py",
+ "args": ["cc_perftests", "--test-launcher-print-test-stdio=always"]
+ }
+ ]
+ },
"Android Nexus4 Perf": {
"scripts": [
{
"name": "host_info",
"script": "host_info.py"
+ },
+ {
+ "name": "gpu_perftests",
+ "script": "gtest_perf_test.py",
+ "args": ["gpu_perftests"]
}
]
},
@@ -12,6 +26,20 @@
{
"name": "host_info",
"script": "host_info.py"
+ },
+ {
+ "name": "gpu_perftests",
+ "script": "gtest_perf_test.py",
+ "args": ["gpu_perftests"]
+ }
+ ]
+ },
+ "Android Nexus6 Perf": {
+ "scripts": [
+ {
+ "name": "gpu_perftests",
+ "script": "gtest_perf_test.py",
+ "args": ["gpu_perftests"]
}
]
},
@@ -20,6 +48,20 @@
{
"name": "host_info",
"script": "host_info.py"
+ },
+ {
+ "name": "gpu_perftests",
+ "script": "gtest_perf_test.py",
+ "args": ["gpu_perftests"]
+ }
+ ]
+ },
+ "Android Nexus9 Perf": {
+ "scripts": [
+ {
+ "name": "gpu_perftests",
+ "script": "gtest_perf_test.py",
+ "args": ["gpu_perftests"]
}
]
},
@@ -28,14 +70,28 @@
{
"name": "host_info",
"script": "host_info.py"
+ },
+ {
+ "name": "gpu_perftests",
+ "script": "gtest_perf_test.py",
+ "args": ["gpu_perftests"]
}
]
},
+ "Android One Perf": {
+ "scripts": [
+ ]
+ },
"Android MotoE Perf": {
"scripts": [
{
"name": "host_info",
"script": "host_info.py"
+ },
+ {
+ "name": "gpu_perftests",
+ "script": "gtest_perf_test.py",
+ "args": ["gpu_perftests"]
}
]
},
diff --git a/testing/buildbot/chromium.win.json b/testing/buildbot/chromium.win.json
index f65c4b0..3f69a8e 100644
--- a/testing/buildbot/chromium.win.json
+++ b/testing/buildbot/chromium.win.json
@@ -94,6 +94,7 @@
"shards": 2
}
},
+ "ipc_mojo_unittests",
"ipc_tests",
"jingle_unittests",
{
diff --git a/testing/chromoting/browser_test_commands_linux.txt b/testing/chromoting/browser_test_commands_linux.txt
index 659e4b6..95f076f 100644
--- a/testing/chromoting/browser_test_commands_linux.txt
+++ b/testing/chromoting/browser_test_commands_linux.txt
@@ -9,6 +9,8 @@
/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=Me2MeBrowserTest.MANUAL_Me2Me_v2_Alive_OnLostFocus --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --me2me-pin=123456 --override-user-data-dir=/tmp/chromoting_test_profile
/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=It2MeBrowserTest.MANUAL_Connect --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --override-user-data-dir=/tmp/chromoting_test_profile
/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=It2MeBrowserTest.MANUAL_InvalidAccessCode --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --override-user-data-dir=/tmp/chromoting_test_profile
+/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=It2MeBrowserTest.MANUAL_CancelShare --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --override-user-data-dir=/tmp/chromoting_test_profile
+/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=It2MeBrowserTest.MANUAL_VerifyAccessCodeNonReusable --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --override-user-data-dir=/tmp/chromoting_test_profile
/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=RemoteDesktopBrowserTest.MANUAL_Cancel_PIN --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --me2me-pin=123456 --override-user-data-dir=/tmp/chromoting_test_profile
/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=RemoteDesktopBrowserTest.MANUAL_Update_PIN --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --me2me-pin=123456 --override-user-data-dir=/tmp/chromoting_test_profile
/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=RemoteDesktopBrowserTest.MANUAL_Invalid_PIN --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --me2me-pin=123457 --override-user-data-dir=/tmp/chromoting_test_profile
diff --git a/testing/legion/tools/legion.py b/testing/legion/tools/legion.py
new file mode 100755
index 0000000..7b67133
--- /dev/null
+++ b/testing/legion/tools/legion.py
@@ -0,0 +1,159 @@
+#!/usr/bin/env python
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""A helper module to run Legion multi-machine tests.
+
+Example usage with 1 task machine:
+$ testing/legion/tools/legion.py run \
+ --controller-isolated out/Release/example_test_controller.isolated \
+ --dimension os Ubuntu-14.04 \
+ --task-name test-task-name \
+ --task task_machine out/Release/example_task_machine.isolated
+
+Example usage with 2 task machines with the same isolated file:
+$ testing/legion/tools/legion.py run \
+ --controller-isolated out/Release/example_test_controller.isolated \
+ --dimension os Ubuntu-14.04 \
+ --task-name test-task-name \
+ --task task_machine_1 out/Release/example_task_machine.isolated \
+ --task task_machine_2 out/Release/example_task_machine.isolated
+
+Example usage with 2 task machines with different isolated file:
+$ testing/legion/tools/legion.py run \
+ --controller-isolated out/Release/example_test_controller.isolated \
+ --dimension os Ubuntu-14.04 \
+ --task-name test-task-name \
+ --task task_machine_1 out/Release/example_task_machine_1.isolated \
+ --task task_machine_2 out/Release/example_task_machine_2.isolated
+"""
+
+import argparse
+import logging
+import os
+import subprocess
+import sys
+
+
+THIS_DIR = os.path.split(__file__)[0]
+SWARMING_DIR = os.path.join(THIS_DIR, '..', '..', '..', 'tools',
+ 'swarming_client')
+ISOLATE_PY = os.path.join(SWARMING_DIR, 'isolate.py')
+SWARMING_PY = os.path.join(SWARMING_DIR, 'swarming.py')
+LOGGING_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'ERROR']
+
+
+class Error(Exception):
+ pass
+
+
+def GetArgs():
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument('action', choices=['run', 'trigger'],
+ help='The swarming action to perform.')
+ parser.add_argument('-f', '--format-only', action='store_true',
+ help='If true the .isolated files are archived but '
+ 'swarming is not called, only the command line is built.')
+ parser.add_argument('--controller-isolated', required=True,
+ help='The isolated file for the test controller.')
+ parser.add_argument('--isolate-server', help='Optional. The isolated server '
+ 'to use.')
+ parser.add_argument('--swarming-server', help='Optional. The swarming server '
+ 'to use.')
+ parser.add_argument('--task-name', help='Optional. The swarming task name '
+ 'to use.')
+ parser.add_argument('--dimension', action='append', dest='dimensions',
+ nargs=2, default=[], help='Dimensions to pass to '
+ 'swarming.py. This is in the form of --dimension key '
+ 'value. The minimum required is --dimension os <OS>')
+ parser.add_argument('--task', action='append', dest='tasks',
+ nargs=2, default=[], help='List of task names used in '
+ 'the test controller. This is in the form of --task name '
+ '.isolated and is passed to the controller as --name '
+ '<ISOLATED HASH>.')
+ parser.add_argument('--controller-var', action='append',
+ dest='controller_vars', nargs=2, default=[],
+ help='Command line vars to pass to the controller. These '
+ 'are in the form of --controller-var name value and are '
+ 'passed to the controller as --name value.')
+ parser.add_argument('-v', '--verbosity', default=0, action='count')
+ return parser.parse_args()
+
+
+def RunCommand(cmd, stream_stdout=False):
+ """Runs the command line and streams stdout if requested."""
+ kwargs = {
+ 'args': cmd,
+ 'stderr': subprocess.PIPE,
+ }
+ if not stream_stdout:
+ kwargs['stdout'] = subprocess.PIPE
+
+ p = subprocess.Popen(**kwargs)
+ stdout, stderr = p.communicate()
+ if p.returncode:
+ raise Error(stderr)
+ if not stream_stdout:
+ logging.debug(stdout)
+ return stdout
+
+
+def Archive(isolated, isolate_server=None):
+ """Calls isolate.py archive with the given args."""
+ cmd = [
+ sys.executable,
+ ISOLATE_PY,
+ 'archive',
+ '--isolated', isolated,
+ ]
+ if isolate_server:
+ cmd.extend(['--isolate-server', isolate_server])
+ print ' '.join(cmd)
+ return RunCommand(cmd).split()[0] # The isolated hash
+
+
+def GetSwarmingCommandLine(args):
+ """Builds and returns the command line for swarming.py run|trigger."""
+ cmd = [
+ sys.executable,
+ SWARMING_PY,
+ args.action,
+ args.controller_isolated,
+ ]
+ if args.isolate_server:
+ cmd.extend(['--isolate-server', args.isolate_server])
+ if args.swarming_server:
+ cmd.extend(['--swarming', args.swarming_server])
+ if args.task_name:
+ cmd.extend(['--task-name', args.task_name])
+ # swarming.py dimensions
+ for name, value in args.dimensions:
+ cmd.extend(['--dimension', name, value])
+
+ cmd.append('--')
+
+ # Task name/hash values
+ for name, isolated in args.tasks:
+ cmd.extend(['--' + name, Archive(isolated, args.isolate_server)])
+ # Test controller args
+ for name, value in args.controller_vars:
+ cmd.extend(['--' + name, value])
+ print ' '.join(cmd)
+ return cmd
+
+
+def main():
+ args = GetArgs()
+ logging.basicConfig(
+ format='%(asctime)s %(filename)s:%(lineno)s %(levelname)s] %(message)s',
+ datefmt='%H:%M:%S',
+ level=LOGGING_LEVELS[len(LOGGING_LEVELS)-args.verbosity-1])
+ cmd = GetSwarmingCommandLine(args)
+ if not args.format_only:
+ RunCommand(cmd, True)
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/tools/valgrind/drmemory/suppressions.txt b/tools/valgrind/drmemory/suppressions.txt
index c429a9f..4e084a7 100644
--- a/tools/valgrind/drmemory/suppressions.txt
+++ b/tools/valgrind/drmemory/suppressions.txt
@@ -710,7 +710,7 @@
name=http://crbug.com/449989
system call NtOpenProcess
KERNELBASE.dll!OpenProcess
-base.dll!base::Process::OpenWithExtraPriviles
+base.dll!base::Process::OpenWithExtraPrivileges
content.dll!content::BrowserMessageFilter::Internal::OnChannelConnected
UNADDRESSABLE ACCESS
diff --git a/tools/valgrind/gtest_exclude/browser_tests.gtest-drmemory_win32.txt b/tools/valgrind/gtest_exclude/browser_tests.gtest-drmemory_win32.txt
index 31474ef..f5dcbb0 100644
--- a/tools/valgrind/gtest_exclude/browser_tests.gtest-drmemory_win32.txt
+++ b/tools/valgrind/gtest_exclude/browser_tests.gtest-drmemory_win32.txt
@@ -9,6 +9,9 @@
# http://crbug.com/450221
ProfileChooserViewExtensionsTest.LockProfileNoBlockOtherProfileExtensions
+# http://crbug.com/467514
+AsyncExtensionSettingsWebUITest.testErrorListButtonVisibility
+
# it takes too long to run all browser_tests with Dr.Memory,
# and we only select subset to run
# A*
diff --git a/tools/valgrind/gtest_exclude/cc_unittests.gtest-drmemory_win32.txt b/tools/valgrind/gtest_exclude/cc_unittests.gtest-drmemory_win32.txt
index e7f3488..5a76d89 100644
--- a/tools/valgrind/gtest_exclude/cc_unittests.gtest-drmemory_win32.txt
+++ b/tools/valgrind/gtest_exclude/cc_unittests.gtest-drmemory_win32.txt
@@ -12,20 +12,7 @@
LayerTreeHostCopyRequestTestMultipleRequests.SoftwareRenderer_RunSingleThread
# http://crbug.com/430400
-PixelResourceTest/LayerTreeHostMasksPixelTest.MaskOfLayer/5
-PixelResourceTest/LayerTreeHostMasksPixelTest.MaskOfLayer/6
-PixelResourceTest/LayerTreeHostMasksPixelTest.ImageMaskOfLayer/5
-PixelResourceTest/LayerTreeHostMasksPixelTest.ImageMaskOfLayer/6
-PixelResourceTest/LayerTreeHostMasksPixelTest.MaskOfClippedLayer/5
-PixelResourceTest/LayerTreeHostMasksPixelTest.MaskOfClippedLayer/6
-PixelResourceTest/LayerTreeHostMasksPixelTest.MaskWithReplica/5
-PixelResourceTest/LayerTreeHostMasksPixelTest.MaskWithReplica/6
-PixelResourceTest/LayerTreeHostMasksPixelTest.MaskWithReplicaOfClippedLayer/5
-PixelResourceTest/LayerTreeHostMasksPixelTest.MaskWithReplicaOfClippedLayer/6
-PixelResourceTest/LayerTreeHostMasksPixelTest.MaskOfReplica/5
-PixelResourceTest/LayerTreeHostMasksPixelTest.MaskOfReplica/6
-PixelResourceTest/LayerTreeHostMasksPixelTest.MaskOfReplicaOfClippedLayer/5
-PixelResourceTest/LayerTreeHostMasksPixelTest.MaskOfReplicaOfClippedLayer/6
+PixelResourceTest*
# https://crbug.com/460581
LayerTreeHostPictureTestRSLLMembershipWithScale.RunMultiThread_DirectRenderer_ImplSidePaint
diff --git a/tools/valgrind/gtest_exclude/components_unittests.gtest.txt b/tools/valgrind/gtest_exclude/components_unittests.gtest.txt
index e6a2b3f..ab9ecfc 100644
--- a/tools/valgrind/gtest_exclude/components_unittests.gtest.txt
+++ b/tools/valgrind/gtest_exclude/components_unittests.gtest.txt
@@ -3,6 +3,3 @@
# Fails under valgrind, see http://crbug.com/444516
AudioDirectiveListTest.*
-
-# http://crbug.com/462352
-FeedbackUploaderChromeTest.VariationHeaders
diff --git a/tools/valgrind/gtest_exclude/unit_tests.gtest-drmemory_win32.txt b/tools/valgrind/gtest_exclude/unit_tests.gtest-drmemory_win32.txt
index dc461a9..d804f42 100644
--- a/tools/valgrind/gtest_exclude/unit_tests.gtest-drmemory_win32.txt
+++ b/tools/valgrind/gtest_exclude/unit_tests.gtest-drmemory_win32.txt
@@ -79,3 +79,6 @@
SafeBrowsingModuleVerifierWinTest.VerifyModuleExportModified
SafeBrowsingModuleVerifierWinTest.VerifyModuleModified
SafeBrowsingModuleVerifierWinTest.VerifyModuleUnmodified
+
+# http://crbug.com/467004
+SigninErrorNotifierTest.NoErrorAuthStatusProviders
diff --git a/ui/gfx/transform.cc b/ui/gfx/transform.cc
index c13ae1d..27b5e63 100644
--- a/ui/gfx/transform.cc
+++ b/ui/gfx/transform.cc
@@ -394,6 +394,13 @@
matrix_.set(2, 3, 0.0);
}
+bool Transform::IsFlat() const {
+ return matrix_.get(2, 0) == 0.0 && matrix_.get(2, 1) == 0.0 &&
+ matrix_.get(0, 2) == 0.0 && matrix_.get(1, 2) == 0.0 &&
+ matrix_.get(2, 2) == 1.0 && matrix_.get(3, 2) == 0.0 &&
+ matrix_.get(2, 3) == 0.0;
+}
+
Vector2dF Transform::To2dTranslation() const {
return gfx::Vector2dF(SkMScalarToFloat(matrix_.get(0, 3)),
SkMScalarToFloat(matrix_.get(1, 3)));
diff --git a/ui/gfx/transform.h b/ui/gfx/transform.h
index 68a734e..7f2c599 100644
--- a/ui/gfx/transform.h
+++ b/ui/gfx/transform.h
@@ -188,6 +188,9 @@
//
void FlattenTo2d();
+ // Returns true if the 3rd row and 3rd column are both (0, 0, 1, 0).
+ bool IsFlat() const;
+
// Returns the x and y translation components of the matrix.
Vector2dF To2dTranslation() const;
diff --git a/ui/gfx/transform_unittest.cc b/ui/gfx/transform_unittest.cc
index ef801ac..aee6d8c 100644
--- a/ui/gfx/transform_unittest.cc
+++ b/ui/gfx/transform_unittest.cc
@@ -2420,6 +2420,29 @@
EXPECT_ROW4_EQ(13.0f, 17.0f, 0.0f, 25.0f, A);
}
+TEST(XFormTest, IsFlat) {
+ Transform transform;
+ InitializeTestMatrix(&transform);
+
+ // A transform with all entries non-zero isn't flat.
+ EXPECT_FALSE(transform.IsFlat());
+
+ transform.matrix().set(0, 2, 0.f);
+ transform.matrix().set(1, 2, 0.f);
+ transform.matrix().set(2, 2, 1.f);
+ transform.matrix().set(3, 2, 0.f);
+
+ EXPECT_FALSE(transform.IsFlat());
+
+ transform.matrix().set(2, 0, 0.f);
+ transform.matrix().set(2, 1, 0.f);
+ transform.matrix().set(2, 3, 0.f);
+
+ // Since the third column and row are both (0, 0, 1, 0), the transform is
+ // flat.
+ EXPECT_TRUE(transform.IsFlat());
+}
+
// Another implementation of Preserves2dAxisAlignment that isn't as fast,
// good for testing the faster implementation.
static bool EmpiricallyPreserves2dAxisAlignment(const Transform& transform) {
diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn
index 88b4c36..12a44cc 100644
--- a/ui/gl/BUILD.gn
+++ b/ui/gl/BUILD.gn
@@ -183,8 +183,6 @@
}
if (is_win) {
sources += [
- "angle_platform_impl.cc",
- "angle_platform_impl.h",
"gl_bindings_autogen_wgl.cc",
"gl_bindings_autogen_wgl.h",
"gl_context_wgl.cc",
@@ -197,8 +195,6 @@
"gl_wgl_api_implementation.h",
]
- deps += [ "//third_party/angle:libGLESv2" ]
-
libs = [ "dwmapi.lib" ]
ldflags = [ "/DELAYLOAD:dwmapi.dll" ]
}
diff --git a/ui/gl/DEPS b/ui/gl/DEPS
index e582c0d..862c555 100644
--- a/ui/gl/DEPS
+++ b/ui/gl/DEPS
@@ -12,9 +12,5 @@
# get access to desktop OpenGL.
"gl_surface_osmesa.cc": [
"+third_party/mesa/src/include/GL/osmesa.h",
- ],
-# Allow us to include ANGLE's base platform implementation.
- "angle_platform_impl.h": [
- "+third_party/angle/include/platform/Platform.h",
- ],
+ ]
}
diff --git a/ui/gl/angle_platform_impl.cc b/ui/gl/angle_platform_impl.cc
deleted file mode 100644
index 2ce12b8..0000000
--- a/ui/gl/angle_platform_impl.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/gl/angle_platform_impl.h"
-
-#include "base/metrics/histogram.h"
-#include "base/metrics/sparse_histogram.h"
-
-namespace gfx {
-
-ANGLEPlatformImpl::ANGLEPlatformImpl() {
-}
-
-ANGLEPlatformImpl::~ANGLEPlatformImpl() {
-}
-
-void ANGLEPlatformImpl::histogramCustomCounts(const char* name,
- int sample,
- int min,
- int max,
- int bucket_count) {
- // Copied from histogram macro, but without the static variable caching
- // the histogram because name is dynamic.
- base::HistogramBase* counter = base::Histogram::FactoryGet(
- name, min, max, bucket_count,
- base::HistogramBase::kUmaTargetedHistogramFlag);
- DCHECK_EQ(name, counter->histogram_name());
- counter->Add(sample);
-}
-
-void ANGLEPlatformImpl::histogramEnumeration(const char* name,
- int sample,
- int boundary_value) {
- // Copied from histogram macro, but without the static variable caching
- // the histogram because name is dynamic.
- base::HistogramBase* counter = base::LinearHistogram::FactoryGet(
- name, 1, boundary_value, boundary_value + 1,
- base::HistogramBase::kUmaTargetedHistogramFlag);
- DCHECK_EQ(name, counter->histogram_name());
- counter->Add(sample);
-}
-
-void ANGLEPlatformImpl::histogramSparse(const char* name, int sample) {
- // For sparse histograms, we can use the macro, as it does not incorporate a
- // static.
- UMA_HISTOGRAM_SPARSE_SLOWLY(name, sample);
-}
-
-} // namespace gfx
diff --git a/ui/gl/angle_platform_impl.h b/ui/gl/angle_platform_impl.h
deleted file mode 100644
index 2d12f60..0000000
--- a/ui/gl/angle_platform_impl.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_GL_ANGLE_PLATFORM_IMPL_H_
-#define UI_GL_ANGLE_PLATFORM_IMPL_H_
-
-// Implements the ANGLE platform interface, for functionality like
-// histograms and trace profiling.
-
-#include "base/macros.h"
-#include "third_party/angle/include/platform/Platform.h"
-
-namespace gfx {
-
-// Derives the base ANGLE platform and provides implementations
-class ANGLEPlatformImpl : public angle::Platform {
- public:
- ANGLEPlatformImpl();
- ~ANGLEPlatformImpl() override;
-
- // angle::Platform:
- void histogramCustomCounts(const char* name,
- int sample,
- int min,
- int max,
- int bucket_count) override;
- void histogramEnumeration(const char* name,
- int sample,
- int boundary_value) override;
- void histogramSparse(const char* name, int sample) override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ANGLEPlatformImpl);
-};
-
-} // namespace gfx
-
-#endif // UI_GL_ANGLE_PLATFORM_IMPL_H_
diff --git a/ui/gl/generate_bindings.py b/ui/gl/generate_bindings.py
index 3b91dd3..fdeb96c 100755
--- a/ui/gl/generate_bindings.py
+++ b/ui/gl/generate_bindings.py
@@ -46,10 +46,8 @@
'names': ['glAttachShader'],
'arguments': 'GLuint program, GLuint shader', },
{ 'return_type': 'void',
- 'versions': [{ 'name': 'glBeginQuery' }],
- 'arguments': 'GLenum target, GLuint id', },
-{ 'return_type': 'void',
- 'versions': [{ 'name': 'glBeginQueryARB' },
+ 'versions': [{ 'name': 'glBeginQuery' },
+ { 'name': 'glBeginQueryARB' },
{ 'name': 'glBeginQueryEXT',
'extensions': ['GL_EXT_occlusion_query_boolean'] }],
'arguments': 'GLenum target, GLuint id', },
@@ -264,10 +262,8 @@
'names': ['glDeleteProgram'],
'arguments': 'GLuint program', },
{ 'return_type': 'void',
- 'versions': [{ 'name': 'glDeleteQueries' }],
- 'arguments': 'GLsizei n, const GLuint* ids', },
-{ 'return_type': 'void',
- 'versions': [{ 'name': 'glDeleteQueriesARB'},
+ 'versions': [{ 'name': 'glDeleteQueries' },
+ { 'name': 'glDeleteQueriesARB'},
{ 'name': 'glDeleteQueriesEXT',
'extensions': ['GL_EXT_occlusion_query_boolean'] }],
'arguments': 'GLsizei n, const GLuint* ids', },
@@ -367,10 +363,8 @@
'names': ['glEnableVertexAttribArray'],
'arguments': 'GLuint index', },
{ 'return_type': 'void',
- 'versions': [{ 'name': 'glEndQuery' }],
- 'arguments': 'GLenum target', },
-{ 'return_type': 'void',
- 'versions': [{ 'name': 'glEndQueryARB' },
+ 'versions': [{ 'name': 'glEndQuery' },
+ { 'name': 'glEndQueryARB' },
{ 'name': 'glEndQueryEXT',
'extensions': ['GL_EXT_occlusion_query_boolean'] }],
'arguments': 'GLenum target', },
@@ -444,10 +438,8 @@
'names': ['glGenFramebuffersEXT', 'glGenFramebuffers'],
'arguments': 'GLsizei n, GLuint* framebuffers', },
{ 'return_type': 'void',
- 'versions': [{ 'name': 'glGenQueries' }],
- 'arguments': 'GLsizei n, GLuint* ids', },
-{ 'return_type': 'void',
- 'versions': [{ 'name': 'glGenQueriesARB', },
+ 'versions': [{ 'name': 'glGenQueries' },
+ { 'name': 'glGenQueriesARB', },
{ 'name' : 'glGenQueriesEXT',
'extensions': ['GL_EXT_occlusion_query_boolean'] }],
'arguments': 'GLsizei n, GLuint* ids', },
@@ -566,10 +558,8 @@
'names': ['glGetProgramResourceLocation'],
'arguments': 'GLuint program, GLenum programInterface, const char* name', },
{ 'return_type': 'void',
- 'versions': [{ 'name': 'glGetQueryiv' }],
- 'arguments': 'GLenum target, GLenum pname, GLint* params', },
-{ 'return_type': 'void',
- 'versions': [{ 'name': 'glGetQueryivARB' },
+ 'versions': [{ 'name': 'glGetQueryiv' },
+ { 'name': 'glGetQueryivARB' },
{ 'name': 'glGetQueryivEXT',
'extensions': ['GL_EXT_occlusion_query_boolean'] }],
'arguments': 'GLenum target, GLenum pname, GLint* params', },
@@ -579,10 +569,9 @@
{ 'name': 'glGetQueryObjecti64vEXT' }],
'arguments': 'GLuint id, GLenum pname, GLint64* params', },
{ 'return_type': 'void',
- 'names': ['glGetQueryObjectiv'],
- 'arguments': 'GLuint id, GLenum pname, GLint* params', },
-{ 'return_type': 'void',
- 'names': ['glGetQueryObjectivARB', 'glGetQueryObjectivEXT'],
+ 'versions': [{ 'name': 'glGetQueryObjectiv' },
+ { 'name': 'glGetQueryObjectivARB' },
+ { 'name': 'glGetQueryObjectivEXT' }],
'arguments': 'GLuint id, GLenum pname, GLint* params', },
{ 'return_type': 'void',
'versions': [{ 'name': 'glGetQueryObjectui64v',
@@ -590,10 +579,8 @@
{ 'name': 'glGetQueryObjectui64vEXT' }],
'arguments': 'GLuint id, GLenum pname, GLuint64* params', },
{ 'return_type': 'void',
- 'versions': [{ 'name': 'glGetQueryObjectuiv' }],
- 'arguments': 'GLuint id, GLenum pname, GLuint* params', },
-{ 'return_type': 'void',
- 'versions': [{ 'name': 'glGetQueryObjectuivARB' },
+ 'versions': [{ 'name': 'glGetQueryObjectuiv' },
+ { 'name': 'glGetQueryObjectuivARB' },
{ 'name': 'glGetQueryObjectuivEXT',
'extensions': ['GL_EXT_occlusion_query_boolean'] }],
'arguments': 'GLuint id, GLenum pname, GLuint* params', },
@@ -714,10 +701,8 @@
'names': ['glIsProgram'],
'arguments': 'GLuint program', },
{ 'return_type': 'GLboolean',
- 'versions': [{ 'name': 'glIsQuery' }],
- 'arguments': 'GLuint query', },
-{ 'return_type': 'GLboolean',
- 'versions': [{ 'name': 'glIsQueryARB' },
+ 'versions': [{ 'name': 'glIsQuery' },
+ { 'name': 'glIsQueryARB' },
{ 'name': 'glIsQueryEXT',
'extensions': ['GL_EXT_occlusion_query_boolean'] }],
'arguments': 'GLuint query', },
diff --git a/ui/gl/gl.gyp b/ui/gl/gl.gyp
index d62950a..0538107 100644
--- a/ui/gl/gl.gyp
+++ b/ui/gl/gl.gyp
@@ -186,8 +186,6 @@
}],
['OS=="win"', {
'sources': [
- 'angle_platform_impl.cc',
- 'angle_platform_impl.h',
'gl_bindings_autogen_wgl.cc',
'gl_bindings_autogen_wgl.h',
'gl_context_wgl.cc',
@@ -199,11 +197,6 @@
'gl_wgl_api_implementation.cc',
'gl_wgl_api_implementation.h',
],
- 'dependencies': [
- # TODO(jmadill): Use ANGLE on other platforms.
- '<(angle_path)/src/angle.gyp:libEGL',
- '<(angle_path)/src/angle.gyp:libGLESv2',
- ],
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [
diff --git a/ui/gl/gl_bindings_api_autogen_gl.h b/ui/gl/gl_bindings_api_autogen_gl.h
index 9b0366c..416a8d8 100644
--- a/ui/gl/gl_bindings_api_autogen_gl.h
+++ b/ui/gl/gl_bindings_api_autogen_gl.h
@@ -11,7 +11,6 @@
void glActiveTextureFn(GLenum texture) override;
void glAttachShaderFn(GLuint program, GLuint shader) override;
void glBeginQueryFn(GLenum target, GLuint id) override;
-void glBeginQueryARBFn(GLenum target, GLuint id) override;
void glBeginTransformFeedbackFn(GLenum primitiveMode) override;
void glBindAttribLocationFn(GLuint program,
GLuint index,
@@ -181,7 +180,6 @@
void glDeleteFramebuffersEXTFn(GLsizei n, const GLuint* framebuffers) override;
void glDeleteProgramFn(GLuint program) override;
void glDeleteQueriesFn(GLsizei n, const GLuint* ids) override;
-void glDeleteQueriesARBFn(GLsizei n, const GLuint* ids) override;
void glDeleteRenderbuffersEXTFn(GLsizei n,
const GLuint* renderbuffers) override;
void glDeleteSamplersFn(GLsizei n, const GLuint* samplers) override;
@@ -229,7 +227,6 @@
void glEnableFn(GLenum cap) override;
void glEnableVertexAttribArrayFn(GLuint index) override;
void glEndQueryFn(GLenum target) override;
-void glEndQueryARBFn(GLenum target) override;
void glEndTransformFeedbackFn(void) override;
GLsync glFenceSyncFn(GLenum condition, GLbitfield flags) override;
void glFinishFn(void) override;
@@ -272,7 +269,6 @@
void glGenFencesNVFn(GLsizei n, GLuint* fences) override;
void glGenFramebuffersEXTFn(GLsizei n, GLuint* framebuffers) override;
void glGenQueriesFn(GLsizei n, GLuint* ids) override;
-void glGenQueriesARBFn(GLsizei n, GLuint* ids) override;
void glGenRenderbuffersEXTFn(GLsizei n, GLuint* renderbuffers) override;
void glGenSamplersFn(GLsizei n, GLuint* samplers) override;
void glGenTexturesFn(GLsizei n, GLuint* textures) override;
@@ -347,15 +343,12 @@
GLenum programInterface,
const char* name) override;
void glGetQueryivFn(GLenum target, GLenum pname, GLint* params) override;
-void glGetQueryivARBFn(GLenum target, GLenum pname, GLint* params) override;
void glGetQueryObjecti64vFn(GLuint id, GLenum pname, GLint64* params) override;
void glGetQueryObjectivFn(GLuint id, GLenum pname, GLint* params) override;
-void glGetQueryObjectivARBFn(GLuint id, GLenum pname, GLint* params) override;
void glGetQueryObjectui64vFn(GLuint id,
GLenum pname,
GLuint64* params) override;
void glGetQueryObjectuivFn(GLuint id, GLenum pname, GLuint* params) override;
-void glGetQueryObjectuivARBFn(GLuint id, GLenum pname, GLuint* params) override;
void glGetRenderbufferParameterivEXTFn(GLenum target,
GLenum pname,
GLint* params) override;
@@ -443,7 +436,6 @@
GLboolean glIsFramebufferEXTFn(GLuint framebuffer) override;
GLboolean glIsProgramFn(GLuint program) override;
GLboolean glIsQueryFn(GLuint query) override;
-GLboolean glIsQueryARBFn(GLuint query) override;
GLboolean glIsRenderbufferEXTFn(GLuint renderbuffer) override;
GLboolean glIsSamplerFn(GLuint sampler) override;
GLboolean glIsShaderFn(GLuint shader) override;
diff --git a/ui/gl/gl_bindings_autogen_gl.cc b/ui/gl/gl_bindings_autogen_gl.cc
index a655717..726f545 100644
--- a/ui/gl/gl_bindings_autogen_gl.cc
+++ b/ui/gl/gl_bindings_autogen_gl.cc
@@ -29,7 +29,6 @@
fn.glAttachShaderFn =
reinterpret_cast<glAttachShaderProc>(GetGLProcAddress("glAttachShader"));
fn.glBeginQueryFn = 0;
- fn.glBeginQueryARBFn = 0;
fn.glBeginTransformFeedbackFn = 0;
fn.glBindAttribLocationFn = reinterpret_cast<glBindAttribLocationProc>(
GetGLProcAddress("glBindAttribLocation"));
@@ -108,7 +107,6 @@
fn.glDeleteProgramFn = reinterpret_cast<glDeleteProgramProc>(
GetGLProcAddress("glDeleteProgram"));
fn.glDeleteQueriesFn = 0;
- fn.glDeleteQueriesARBFn = 0;
fn.glDeleteRenderbuffersEXTFn = 0;
fn.glDeleteSamplersFn = 0;
fn.glDeleteShaderFn =
@@ -149,7 +147,6 @@
reinterpret_cast<glEnableVertexAttribArrayProc>(
GetGLProcAddress("glEnableVertexAttribArray"));
fn.glEndQueryFn = 0;
- fn.glEndQueryARBFn = 0;
fn.glEndTransformFeedbackFn = 0;
fn.glFenceSyncFn = 0;
fn.glFinishFn = reinterpret_cast<glFinishProc>(GetGLProcAddress("glFinish"));
@@ -171,7 +168,6 @@
fn.glGenFencesNVFn = 0;
fn.glGenFramebuffersEXTFn = 0;
fn.glGenQueriesFn = 0;
- fn.glGenQueriesARBFn = 0;
fn.glGenRenderbuffersEXTFn = 0;
fn.glGenSamplersFn = 0;
fn.glGenTexturesFn =
@@ -214,13 +210,10 @@
reinterpret_cast<glGetProgramivProc>(GetGLProcAddress("glGetProgramiv"));
fn.glGetProgramResourceLocationFn = 0;
fn.glGetQueryivFn = 0;
- fn.glGetQueryivARBFn = 0;
fn.glGetQueryObjecti64vFn = 0;
fn.glGetQueryObjectivFn = 0;
- fn.glGetQueryObjectivARBFn = 0;
fn.glGetQueryObjectui64vFn = 0;
fn.glGetQueryObjectuivFn = 0;
- fn.glGetQueryObjectuivARBFn = 0;
fn.glGetRenderbufferParameterivEXTFn = 0;
fn.glGetSamplerParameterfvFn = 0;
fn.glGetSamplerParameterivFn = 0;
@@ -272,7 +265,6 @@
fn.glIsProgramFn =
reinterpret_cast<glIsProgramProc>(GetGLProcAddress("glIsProgram"));
fn.glIsQueryFn = 0;
- fn.glIsQueryARBFn = 0;
fn.glIsRenderbufferEXTFn = 0;
fn.glIsSamplerFn = 0;
fn.glIsShaderFn =
@@ -540,18 +532,15 @@
fn.glBeginQueryFn =
reinterpret_cast<glBeginQueryProc>(GetGLProcAddress("glBeginQuery"));
DCHECK(fn.glBeginQueryFn);
- }
-
- debug_fn.glBeginQueryARBFn = 0;
- if (ext.b_GL_ARB_occlusion_query) {
- fn.glBeginQueryARBFn = reinterpret_cast<glBeginQueryARBProc>(
- GetGLProcAddress("glBeginQueryARB"));
- DCHECK(fn.glBeginQueryARBFn);
+ } else if (ext.b_GL_ARB_occlusion_query) {
+ fn.glBeginQueryFn =
+ reinterpret_cast<glBeginQueryProc>(GetGLProcAddress("glBeginQueryARB"));
+ DCHECK(fn.glBeginQueryFn);
} else if (ext.b_GL_EXT_disjoint_timer_query ||
ext.b_GL_EXT_occlusion_query_boolean) {
- fn.glBeginQueryARBFn = reinterpret_cast<glBeginQueryARBProc>(
- GetGLProcAddress("glBeginQueryEXT"));
- DCHECK(fn.glBeginQueryARBFn);
+ fn.glBeginQueryFn =
+ reinterpret_cast<glBeginQueryProc>(GetGLProcAddress("glBeginQueryEXT"));
+ DCHECK(fn.glBeginQueryFn);
}
debug_fn.glBeginTransformFeedbackFn = 0;
@@ -793,18 +782,15 @@
fn.glDeleteQueriesFn = reinterpret_cast<glDeleteQueriesProc>(
GetGLProcAddress("glDeleteQueries"));
DCHECK(fn.glDeleteQueriesFn);
- }
-
- debug_fn.glDeleteQueriesARBFn = 0;
- if (ext.b_GL_ARB_occlusion_query) {
- fn.glDeleteQueriesARBFn = reinterpret_cast<glDeleteQueriesARBProc>(
+ } else if (ext.b_GL_ARB_occlusion_query) {
+ fn.glDeleteQueriesFn = reinterpret_cast<glDeleteQueriesProc>(
GetGLProcAddress("glDeleteQueriesARB"));
- DCHECK(fn.glDeleteQueriesARBFn);
+ DCHECK(fn.glDeleteQueriesFn);
} else if (ext.b_GL_EXT_disjoint_timer_query ||
ext.b_GL_EXT_occlusion_query_boolean) {
- fn.glDeleteQueriesARBFn = reinterpret_cast<glDeleteQueriesARBProc>(
+ fn.glDeleteQueriesFn = reinterpret_cast<glDeleteQueriesProc>(
GetGLProcAddress("glDeleteQueriesEXT"));
- DCHECK(fn.glDeleteQueriesARBFn);
+ DCHECK(fn.glDeleteQueriesFn);
}
debug_fn.glDeleteRenderbuffersEXTFn = 0;
@@ -963,18 +949,15 @@
fn.glEndQueryFn =
reinterpret_cast<glEndQueryProc>(GetGLProcAddress("glEndQuery"));
DCHECK(fn.glEndQueryFn);
- }
-
- debug_fn.glEndQueryARBFn = 0;
- if (ext.b_GL_ARB_occlusion_query) {
- fn.glEndQueryARBFn =
- reinterpret_cast<glEndQueryARBProc>(GetGLProcAddress("glEndQueryARB"));
- DCHECK(fn.glEndQueryARBFn);
+ } else if (ext.b_GL_ARB_occlusion_query) {
+ fn.glEndQueryFn =
+ reinterpret_cast<glEndQueryProc>(GetGLProcAddress("glEndQueryARB"));
+ DCHECK(fn.glEndQueryFn);
} else if (ext.b_GL_EXT_disjoint_timer_query ||
ext.b_GL_EXT_occlusion_query_boolean) {
- fn.glEndQueryARBFn =
- reinterpret_cast<glEndQueryARBProc>(GetGLProcAddress("glEndQueryEXT"));
- DCHECK(fn.glEndQueryARBFn);
+ fn.glEndQueryFn =
+ reinterpret_cast<glEndQueryProc>(GetGLProcAddress("glEndQueryEXT"));
+ DCHECK(fn.glEndQueryFn);
}
debug_fn.glEndTransformFeedbackFn = 0;
@@ -1105,18 +1088,15 @@
fn.glGenQueriesFn =
reinterpret_cast<glGenQueriesProc>(GetGLProcAddress("glGenQueries"));
DCHECK(fn.glGenQueriesFn);
- }
-
- debug_fn.glGenQueriesARBFn = 0;
- if (ext.b_GL_ARB_occlusion_query) {
- fn.glGenQueriesARBFn = reinterpret_cast<glGenQueriesARBProc>(
- GetGLProcAddress("glGenQueriesARB"));
- DCHECK(fn.glGenQueriesARBFn);
+ } else if (ext.b_GL_ARB_occlusion_query) {
+ fn.glGenQueriesFn =
+ reinterpret_cast<glGenQueriesProc>(GetGLProcAddress("glGenQueriesARB"));
+ DCHECK(fn.glGenQueriesFn);
} else if (ext.b_GL_EXT_disjoint_timer_query ||
ext.b_GL_EXT_occlusion_query_boolean) {
- fn.glGenQueriesARBFn = reinterpret_cast<glGenQueriesARBProc>(
- GetGLProcAddress("glGenQueriesEXT"));
- DCHECK(fn.glGenQueriesARBFn);
+ fn.glGenQueriesFn =
+ reinterpret_cast<glGenQueriesProc>(GetGLProcAddress("glGenQueriesEXT"));
+ DCHECK(fn.glGenQueriesFn);
}
debug_fn.glGenRenderbuffersEXTFn = 0;
@@ -1287,18 +1267,15 @@
fn.glGetQueryivFn =
reinterpret_cast<glGetQueryivProc>(GetGLProcAddress("glGetQueryiv"));
DCHECK(fn.glGetQueryivFn);
- }
-
- debug_fn.glGetQueryivARBFn = 0;
- if (ext.b_GL_ARB_occlusion_query) {
- fn.glGetQueryivARBFn = reinterpret_cast<glGetQueryivARBProc>(
- GetGLProcAddress("glGetQueryivARB"));
- DCHECK(fn.glGetQueryivARBFn);
+ } else if (ext.b_GL_ARB_occlusion_query) {
+ fn.glGetQueryivFn =
+ reinterpret_cast<glGetQueryivProc>(GetGLProcAddress("glGetQueryivARB"));
+ DCHECK(fn.glGetQueryivFn);
} else if (ext.b_GL_EXT_disjoint_timer_query ||
ext.b_GL_EXT_occlusion_query_boolean) {
- fn.glGetQueryivARBFn = reinterpret_cast<glGetQueryivARBProc>(
- GetGLProcAddress("glGetQueryivEXT"));
- DCHECK(fn.glGetQueryivARBFn);
+ fn.glGetQueryivFn =
+ reinterpret_cast<glGetQueryivProc>(GetGLProcAddress("glGetQueryivEXT"));
+ DCHECK(fn.glGetQueryivFn);
}
debug_fn.glGetQueryObjecti64vFn = 0;
@@ -1317,17 +1294,14 @@
fn.glGetQueryObjectivFn = reinterpret_cast<glGetQueryObjectivProc>(
GetGLProcAddress("glGetQueryObjectiv"));
DCHECK(fn.glGetQueryObjectivFn);
- }
-
- debug_fn.glGetQueryObjectivARBFn = 0;
- if (ext.b_GL_ARB_occlusion_query) {
- fn.glGetQueryObjectivARBFn = reinterpret_cast<glGetQueryObjectivARBProc>(
+ } else if (ext.b_GL_ARB_occlusion_query) {
+ fn.glGetQueryObjectivFn = reinterpret_cast<glGetQueryObjectivProc>(
GetGLProcAddress("glGetQueryObjectivARB"));
- DCHECK(fn.glGetQueryObjectivARBFn);
+ DCHECK(fn.glGetQueryObjectivFn);
} else if (ext.b_GL_EXT_disjoint_timer_query) {
- fn.glGetQueryObjectivARBFn = reinterpret_cast<glGetQueryObjectivARBProc>(
+ fn.glGetQueryObjectivFn = reinterpret_cast<glGetQueryObjectivProc>(
GetGLProcAddress("glGetQueryObjectivEXT"));
- DCHECK(fn.glGetQueryObjectivARBFn);
+ DCHECK(fn.glGetQueryObjectivFn);
}
debug_fn.glGetQueryObjectui64vFn = 0;
@@ -1346,18 +1320,15 @@
fn.glGetQueryObjectuivFn = reinterpret_cast<glGetQueryObjectuivProc>(
GetGLProcAddress("glGetQueryObjectuiv"));
DCHECK(fn.glGetQueryObjectuivFn);
- }
-
- debug_fn.glGetQueryObjectuivARBFn = 0;
- if (ext.b_GL_ARB_occlusion_query) {
- fn.glGetQueryObjectuivARBFn = reinterpret_cast<glGetQueryObjectuivARBProc>(
+ } else if (ext.b_GL_ARB_occlusion_query) {
+ fn.glGetQueryObjectuivFn = reinterpret_cast<glGetQueryObjectuivProc>(
GetGLProcAddress("glGetQueryObjectuivARB"));
- DCHECK(fn.glGetQueryObjectuivARBFn);
+ DCHECK(fn.glGetQueryObjectuivFn);
} else if (ext.b_GL_EXT_disjoint_timer_query ||
ext.b_GL_EXT_occlusion_query_boolean) {
- fn.glGetQueryObjectuivARBFn = reinterpret_cast<glGetQueryObjectuivARBProc>(
+ fn.glGetQueryObjectuivFn = reinterpret_cast<glGetQueryObjectuivProc>(
GetGLProcAddress("glGetQueryObjectuivEXT"));
- DCHECK(fn.glGetQueryObjectuivARBFn);
+ DCHECK(fn.glGetQueryObjectuivFn);
}
debug_fn.glGetRenderbufferParameterivEXTFn = 0;
@@ -1511,18 +1482,15 @@
fn.glIsQueryFn =
reinterpret_cast<glIsQueryProc>(GetGLProcAddress("glIsQuery"));
DCHECK(fn.glIsQueryFn);
- }
-
- debug_fn.glIsQueryARBFn = 0;
- if (ext.b_GL_ARB_occlusion_query) {
- fn.glIsQueryARBFn =
- reinterpret_cast<glIsQueryARBProc>(GetGLProcAddress("glIsQueryARB"));
- DCHECK(fn.glIsQueryARBFn);
+ } else if (ext.b_GL_ARB_occlusion_query) {
+ fn.glIsQueryFn =
+ reinterpret_cast<glIsQueryProc>(GetGLProcAddress("glIsQueryARB"));
+ DCHECK(fn.glIsQueryFn);
} else if (ext.b_GL_EXT_disjoint_timer_query ||
ext.b_GL_EXT_occlusion_query_boolean) {
- fn.glIsQueryARBFn =
- reinterpret_cast<glIsQueryARBProc>(GetGLProcAddress("glIsQueryEXT"));
- DCHECK(fn.glIsQueryARBFn);
+ fn.glIsQueryFn =
+ reinterpret_cast<glIsQueryProc>(GetGLProcAddress("glIsQueryEXT"));
+ DCHECK(fn.glIsQueryFn);
}
debug_fn.glIsRenderbufferEXTFn = 0;
@@ -2040,12 +2008,6 @@
g_driver_gl.debug_fn.glBeginQueryFn(target, id);
}
-static void GL_BINDING_CALL Debug_glBeginQueryARB(GLenum target, GLuint id) {
- GL_SERVICE_LOG("glBeginQueryARB"
- << "(" << GLEnums::GetStringEnum(target) << ", " << id << ")");
- g_driver_gl.debug_fn.glBeginQueryARBFn(target, id);
-}
-
static void GL_BINDING_CALL
Debug_glBeginTransformFeedback(GLenum primitiveMode) {
GL_SERVICE_LOG("glBeginTransformFeedback"
@@ -2572,13 +2534,6 @@
}
static void GL_BINDING_CALL
-Debug_glDeleteQueriesARB(GLsizei n, const GLuint* ids) {
- GL_SERVICE_LOG("glDeleteQueriesARB"
- << "(" << n << ", " << static_cast<const void*>(ids) << ")");
- g_driver_gl.debug_fn.glDeleteQueriesARBFn(n, ids);
-}
-
-static void GL_BINDING_CALL
Debug_glDeleteRenderbuffersEXT(GLsizei n, const GLuint* renderbuffers) {
GL_SERVICE_LOG("glDeleteRenderbuffersEXT"
<< "(" << n << ", " << static_cast<const void*>(renderbuffers)
@@ -2792,12 +2747,6 @@
g_driver_gl.debug_fn.glEndQueryFn(target);
}
-static void GL_BINDING_CALL Debug_glEndQueryARB(GLenum target) {
- GL_SERVICE_LOG("glEndQueryARB"
- << "(" << GLEnums::GetStringEnum(target) << ")");
- g_driver_gl.debug_fn.glEndQueryARBFn(target);
-}
-
static void GL_BINDING_CALL Debug_glEndTransformFeedback(void) {
GL_SERVICE_LOG("glEndTransformFeedback"
<< "("
@@ -2970,12 +2919,6 @@
g_driver_gl.debug_fn.glGenQueriesFn(n, ids);
}
-static void GL_BINDING_CALL Debug_glGenQueriesARB(GLsizei n, GLuint* ids) {
- GL_SERVICE_LOG("glGenQueriesARB"
- << "(" << n << ", " << static_cast<const void*>(ids) << ")");
- g_driver_gl.debug_fn.glGenQueriesARBFn(n, ids);
-}
-
static void GL_BINDING_CALL
Debug_glGenRenderbuffersEXT(GLsizei n, GLuint* renderbuffers) {
GL_SERVICE_LOG("glGenRenderbuffersEXT"
@@ -3287,15 +3230,6 @@
}
static void GL_BINDING_CALL
-Debug_glGetQueryivARB(GLenum target, GLenum pname, GLint* params) {
- GL_SERVICE_LOG("glGetQueryivARB"
- << "(" << GLEnums::GetStringEnum(target) << ", "
- << GLEnums::GetStringEnum(pname) << ", "
- << static_cast<const void*>(params) << ")");
- g_driver_gl.debug_fn.glGetQueryivARBFn(target, pname, params);
-}
-
-static void GL_BINDING_CALL
Debug_glGetQueryObjecti64v(GLuint id, GLenum pname, GLint64* params) {
GL_SERVICE_LOG("glGetQueryObjecti64v"
<< "(" << id << ", " << GLEnums::GetStringEnum(pname) << ", "
@@ -3312,14 +3246,6 @@
}
static void GL_BINDING_CALL
-Debug_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint* params) {
- GL_SERVICE_LOG("glGetQueryObjectivARB"
- << "(" << id << ", " << GLEnums::GetStringEnum(pname) << ", "
- << static_cast<const void*>(params) << ")");
- g_driver_gl.debug_fn.glGetQueryObjectivARBFn(id, pname, params);
-}
-
-static void GL_BINDING_CALL
Debug_glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64* params) {
GL_SERVICE_LOG("glGetQueryObjectui64v"
<< "(" << id << ", " << GLEnums::GetStringEnum(pname) << ", "
@@ -3336,14 +3262,6 @@
}
static void GL_BINDING_CALL
-Debug_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint* params) {
- GL_SERVICE_LOG("glGetQueryObjectuivARB"
- << "(" << id << ", " << GLEnums::GetStringEnum(pname) << ", "
- << static_cast<const void*>(params) << ")");
- g_driver_gl.debug_fn.glGetQueryObjectuivARBFn(id, pname, params);
-}
-
-static void GL_BINDING_CALL
Debug_glGetRenderbufferParameterivEXT(GLenum target,
GLenum pname,
GLint* params) {
@@ -3685,14 +3603,6 @@
return result;
}
-static GLboolean GL_BINDING_CALL Debug_glIsQueryARB(GLuint query) {
- GL_SERVICE_LOG("glIsQueryARB"
- << "(" << query << ")");
- GLboolean result = g_driver_gl.debug_fn.glIsQueryARBFn(query);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
-}
-
static GLboolean GL_BINDING_CALL
Debug_glIsRenderbufferEXT(GLuint renderbuffer) {
GL_SERVICE_LOG("glIsRenderbufferEXT"
@@ -4751,10 +4661,6 @@
debug_fn.glBeginQueryFn = fn.glBeginQueryFn;
fn.glBeginQueryFn = Debug_glBeginQuery;
}
- if (!debug_fn.glBeginQueryARBFn) {
- debug_fn.glBeginQueryARBFn = fn.glBeginQueryARBFn;
- fn.glBeginQueryARBFn = Debug_glBeginQueryARB;
- }
if (!debug_fn.glBeginTransformFeedbackFn) {
debug_fn.glBeginTransformFeedbackFn = fn.glBeginTransformFeedbackFn;
fn.glBeginTransformFeedbackFn = Debug_glBeginTransformFeedback;
@@ -4968,10 +4874,6 @@
debug_fn.glDeleteQueriesFn = fn.glDeleteQueriesFn;
fn.glDeleteQueriesFn = Debug_glDeleteQueries;
}
- if (!debug_fn.glDeleteQueriesARBFn) {
- debug_fn.glDeleteQueriesARBFn = fn.glDeleteQueriesARBFn;
- fn.glDeleteQueriesARBFn = Debug_glDeleteQueriesARB;
- }
if (!debug_fn.glDeleteRenderbuffersEXTFn) {
debug_fn.glDeleteRenderbuffersEXTFn = fn.glDeleteRenderbuffersEXTFn;
fn.glDeleteRenderbuffersEXTFn = Debug_glDeleteRenderbuffersEXT;
@@ -5082,10 +4984,6 @@
debug_fn.glEndQueryFn = fn.glEndQueryFn;
fn.glEndQueryFn = Debug_glEndQuery;
}
- if (!debug_fn.glEndQueryARBFn) {
- debug_fn.glEndQueryARBFn = fn.glEndQueryARBFn;
- fn.glEndQueryARBFn = Debug_glEndQueryARB;
- }
if (!debug_fn.glEndTransformFeedbackFn) {
debug_fn.glEndTransformFeedbackFn = fn.glEndTransformFeedbackFn;
fn.glEndTransformFeedbackFn = Debug_glEndTransformFeedback;
@@ -5166,10 +5064,6 @@
debug_fn.glGenQueriesFn = fn.glGenQueriesFn;
fn.glGenQueriesFn = Debug_glGenQueries;
}
- if (!debug_fn.glGenQueriesARBFn) {
- debug_fn.glGenQueriesARBFn = fn.glGenQueriesARBFn;
- fn.glGenQueriesARBFn = Debug_glGenQueriesARB;
- }
if (!debug_fn.glGenRenderbuffersEXTFn) {
debug_fn.glGenRenderbuffersEXTFn = fn.glGenRenderbuffersEXTFn;
fn.glGenRenderbuffersEXTFn = Debug_glGenRenderbuffersEXT;
@@ -5292,10 +5186,6 @@
debug_fn.glGetQueryivFn = fn.glGetQueryivFn;
fn.glGetQueryivFn = Debug_glGetQueryiv;
}
- if (!debug_fn.glGetQueryivARBFn) {
- debug_fn.glGetQueryivARBFn = fn.glGetQueryivARBFn;
- fn.glGetQueryivARBFn = Debug_glGetQueryivARB;
- }
if (!debug_fn.glGetQueryObjecti64vFn) {
debug_fn.glGetQueryObjecti64vFn = fn.glGetQueryObjecti64vFn;
fn.glGetQueryObjecti64vFn = Debug_glGetQueryObjecti64v;
@@ -5304,10 +5194,6 @@
debug_fn.glGetQueryObjectivFn = fn.glGetQueryObjectivFn;
fn.glGetQueryObjectivFn = Debug_glGetQueryObjectiv;
}
- if (!debug_fn.glGetQueryObjectivARBFn) {
- debug_fn.glGetQueryObjectivARBFn = fn.glGetQueryObjectivARBFn;
- fn.glGetQueryObjectivARBFn = Debug_glGetQueryObjectivARB;
- }
if (!debug_fn.glGetQueryObjectui64vFn) {
debug_fn.glGetQueryObjectui64vFn = fn.glGetQueryObjectui64vFn;
fn.glGetQueryObjectui64vFn = Debug_glGetQueryObjectui64v;
@@ -5316,10 +5202,6 @@
debug_fn.glGetQueryObjectuivFn = fn.glGetQueryObjectuivFn;
fn.glGetQueryObjectuivFn = Debug_glGetQueryObjectuiv;
}
- if (!debug_fn.glGetQueryObjectuivARBFn) {
- debug_fn.glGetQueryObjectuivARBFn = fn.glGetQueryObjectuivARBFn;
- fn.glGetQueryObjectuivARBFn = Debug_glGetQueryObjectuivARB;
- }
if (!debug_fn.glGetRenderbufferParameterivEXTFn) {
debug_fn.glGetRenderbufferParameterivEXTFn =
fn.glGetRenderbufferParameterivEXTFn;
@@ -5465,10 +5347,6 @@
debug_fn.glIsQueryFn = fn.glIsQueryFn;
fn.glIsQueryFn = Debug_glIsQuery;
}
- if (!debug_fn.glIsQueryARBFn) {
- debug_fn.glIsQueryARBFn = fn.glIsQueryARBFn;
- fn.glIsQueryARBFn = Debug_glIsQueryARB;
- }
if (!debug_fn.glIsRenderbufferEXTFn) {
debug_fn.glIsRenderbufferEXTFn = fn.glIsRenderbufferEXTFn;
fn.glIsRenderbufferEXTFn = Debug_glIsRenderbufferEXT;
@@ -5948,10 +5826,6 @@
driver_->fn.glBeginQueryFn(target, id);
}
-void GLApiBase::glBeginQueryARBFn(GLenum target, GLuint id) {
- driver_->fn.glBeginQueryARBFn(target, id);
-}
-
void GLApiBase::glBeginTransformFeedbackFn(GLenum primitiveMode) {
driver_->fn.glBeginTransformFeedbackFn(primitiveMode);
}
@@ -6292,10 +6166,6 @@
driver_->fn.glDeleteQueriesFn(n, ids);
}
-void GLApiBase::glDeleteQueriesARBFn(GLsizei n, const GLuint* ids) {
- driver_->fn.glDeleteQueriesARBFn(n, ids);
-}
-
void GLApiBase::glDeleteRenderbuffersEXTFn(GLsizei n,
const GLuint* renderbuffers) {
driver_->fn.glDeleteRenderbuffersEXTFn(n, renderbuffers);
@@ -6425,10 +6295,6 @@
driver_->fn.glEndQueryFn(target);
}
-void GLApiBase::glEndQueryARBFn(GLenum target) {
- driver_->fn.glEndQueryARBFn(target);
-}
-
void GLApiBase::glEndTransformFeedbackFn(void) {
driver_->fn.glEndTransformFeedbackFn();
}
@@ -6533,10 +6399,6 @@
driver_->fn.glGenQueriesFn(n, ids);
}
-void GLApiBase::glGenQueriesARBFn(GLsizei n, GLuint* ids) {
- driver_->fn.glGenQueriesARBFn(n, ids);
-}
-
void GLApiBase::glGenRenderbuffersEXTFn(GLsizei n, GLuint* renderbuffers) {
driver_->fn.glGenRenderbuffersEXTFn(n, renderbuffers);
}
@@ -6712,10 +6574,6 @@
driver_->fn.glGetQueryivFn(target, pname, params);
}
-void GLApiBase::glGetQueryivARBFn(GLenum target, GLenum pname, GLint* params) {
- driver_->fn.glGetQueryivARBFn(target, pname, params);
-}
-
void GLApiBase::glGetQueryObjecti64vFn(GLuint id,
GLenum pname,
GLint64* params) {
@@ -6726,12 +6584,6 @@
driver_->fn.glGetQueryObjectivFn(id, pname, params);
}
-void GLApiBase::glGetQueryObjectivARBFn(GLuint id,
- GLenum pname,
- GLint* params) {
- driver_->fn.glGetQueryObjectivARBFn(id, pname, params);
-}
-
void GLApiBase::glGetQueryObjectui64vFn(GLuint id,
GLenum pname,
GLuint64* params) {
@@ -6742,12 +6594,6 @@
driver_->fn.glGetQueryObjectuivFn(id, pname, params);
}
-void GLApiBase::glGetQueryObjectuivARBFn(GLuint id,
- GLenum pname,
- GLuint* params) {
- driver_->fn.glGetQueryObjectuivARBFn(id, pname, params);
-}
-
void GLApiBase::glGetRenderbufferParameterivEXTFn(GLenum target,
GLenum pname,
GLint* params) {
@@ -6953,10 +6799,6 @@
return driver_->fn.glIsQueryFn(query);
}
-GLboolean GLApiBase::glIsQueryARBFn(GLuint query) {
- return driver_->fn.glIsQueryARBFn(query);
-}
-
GLboolean GLApiBase::glIsRenderbufferEXTFn(GLuint renderbuffer) {
return driver_->fn.glIsRenderbufferEXTFn(renderbuffer);
}
@@ -7617,11 +7459,6 @@
gl_api_->glBeginQueryFn(target, id);
}
-void TraceGLApi::glBeginQueryARBFn(GLenum target, GLuint id) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBeginQueryARB")
- gl_api_->glBeginQueryARBFn(target, id);
-}
-
void TraceGLApi::glBeginTransformFeedbackFn(GLenum primitiveMode) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBeginTransformFeedback")
gl_api_->glBeginTransformFeedbackFn(primitiveMode);
@@ -8018,11 +7855,6 @@
gl_api_->glDeleteQueriesFn(n, ids);
}
-void TraceGLApi::glDeleteQueriesARBFn(GLsizei n, const GLuint* ids) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteQueriesARB")
- gl_api_->glDeleteQueriesARBFn(n, ids);
-}
-
void TraceGLApi::glDeleteRenderbuffersEXTFn(GLsizei n,
const GLuint* renderbuffers) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteRenderbuffersEXT")
@@ -8182,11 +8014,6 @@
gl_api_->glEndQueryFn(target);
}
-void TraceGLApi::glEndQueryARBFn(GLenum target) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEndQueryARB")
- gl_api_->glEndQueryARBFn(target);
-}
-
void TraceGLApi::glEndTransformFeedbackFn(void) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEndTransformFeedback")
gl_api_->glEndTransformFeedbackFn();
@@ -8313,11 +8140,6 @@
gl_api_->glGenQueriesFn(n, ids);
}
-void TraceGLApi::glGenQueriesARBFn(GLsizei n, GLuint* ids) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenQueriesARB")
- gl_api_->glGenQueriesARBFn(n, ids);
-}
-
void TraceGLApi::glGenRenderbuffersEXTFn(GLsizei n, GLuint* renderbuffers) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenRenderbuffersEXT")
gl_api_->glGenRenderbuffersEXTFn(n, renderbuffers);
@@ -8526,11 +8348,6 @@
gl_api_->glGetQueryivFn(target, pname, params);
}
-void TraceGLApi::glGetQueryivARBFn(GLenum target, GLenum pname, GLint* params) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryivARB")
- gl_api_->glGetQueryivARBFn(target, pname, params);
-}
-
void TraceGLApi::glGetQueryObjecti64vFn(GLuint id,
GLenum pname,
GLint64* params) {
@@ -8543,13 +8360,6 @@
gl_api_->glGetQueryObjectivFn(id, pname, params);
}
-void TraceGLApi::glGetQueryObjectivARBFn(GLuint id,
- GLenum pname,
- GLint* params) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryObjectivARB")
- gl_api_->glGetQueryObjectivARBFn(id, pname, params);
-}
-
void TraceGLApi::glGetQueryObjectui64vFn(GLuint id,
GLenum pname,
GLuint64* params) {
@@ -8564,13 +8374,6 @@
gl_api_->glGetQueryObjectuivFn(id, pname, params);
}
-void TraceGLApi::glGetQueryObjectuivARBFn(GLuint id,
- GLenum pname,
- GLuint* params) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryObjectuivARB")
- gl_api_->glGetQueryObjectuivARBFn(id, pname, params);
-}
-
void TraceGLApi::glGetRenderbufferParameterivEXTFn(GLenum target,
GLenum pname,
GLint* params) {
@@ -8813,11 +8616,6 @@
return gl_api_->glIsQueryFn(query);
}
-GLboolean TraceGLApi::glIsQueryARBFn(GLuint query) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsQueryARB")
- return gl_api_->glIsQueryARBFn(query);
-}
-
GLboolean TraceGLApi::glIsRenderbufferEXTFn(GLuint renderbuffer) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsRenderbufferEXT")
return gl_api_->glIsRenderbufferEXTFn(renderbuffer);
@@ -9596,11 +9394,6 @@
LOG(ERROR) << "Trying to call glBeginQuery() without current GL context";
}
-void NoContextGLApi::glBeginQueryARBFn(GLenum target, GLuint id) {
- NOTREACHED() << "Trying to call glBeginQueryARB() without current GL context";
- LOG(ERROR) << "Trying to call glBeginQueryARB() without current GL context";
-}
-
void NoContextGLApi::glBeginTransformFeedbackFn(GLenum primitiveMode) {
NOTREACHED()
<< "Trying to call glBeginTransformFeedback() without current GL context";
@@ -10043,13 +9836,6 @@
LOG(ERROR) << "Trying to call glDeleteQueries() without current GL context";
}
-void NoContextGLApi::glDeleteQueriesARBFn(GLsizei n, const GLuint* ids) {
- NOTREACHED()
- << "Trying to call glDeleteQueriesARB() without current GL context";
- LOG(ERROR)
- << "Trying to call glDeleteQueriesARB() without current GL context";
-}
-
void NoContextGLApi::glDeleteRenderbuffersEXTFn(GLsizei n,
const GLuint* renderbuffers) {
NOTREACHED()
@@ -10233,11 +10019,6 @@
LOG(ERROR) << "Trying to call glEndQuery() without current GL context";
}
-void NoContextGLApi::glEndQueryARBFn(GLenum target) {
- NOTREACHED() << "Trying to call glEndQueryARB() without current GL context";
- LOG(ERROR) << "Trying to call glEndQueryARB() without current GL context";
-}
-
void NoContextGLApi::glEndTransformFeedbackFn(void) {
NOTREACHED()
<< "Trying to call glEndTransformFeedback() without current GL context";
@@ -10378,11 +10159,6 @@
LOG(ERROR) << "Trying to call glGenQueries() without current GL context";
}
-void NoContextGLApi::glGenQueriesARBFn(GLsizei n, GLuint* ids) {
- NOTREACHED() << "Trying to call glGenQueriesARB() without current GL context";
- LOG(ERROR) << "Trying to call glGenQueriesARB() without current GL context";
-}
-
void NoContextGLApi::glGenRenderbuffersEXTFn(GLsizei n, GLuint* renderbuffers) {
NOTREACHED()
<< "Trying to call glGenRenderbuffersEXT() without current GL context";
@@ -10630,13 +10406,6 @@
LOG(ERROR) << "Trying to call glGetQueryiv() without current GL context";
}
-void NoContextGLApi::glGetQueryivARBFn(GLenum target,
- GLenum pname,
- GLint* params) {
- NOTREACHED() << "Trying to call glGetQueryivARB() without current GL context";
- LOG(ERROR) << "Trying to call glGetQueryivARB() without current GL context";
-}
-
void NoContextGLApi::glGetQueryObjecti64vFn(GLuint id,
GLenum pname,
GLint64* params) {
@@ -10655,15 +10424,6 @@
<< "Trying to call glGetQueryObjectiv() without current GL context";
}
-void NoContextGLApi::glGetQueryObjectivARBFn(GLuint id,
- GLenum pname,
- GLint* params) {
- NOTREACHED()
- << "Trying to call glGetQueryObjectivARB() without current GL context";
- LOG(ERROR)
- << "Trying to call glGetQueryObjectivARB() without current GL context";
-}
-
void NoContextGLApi::glGetQueryObjectui64vFn(GLuint id,
GLenum pname,
GLuint64* params) {
@@ -10682,15 +10442,6 @@
<< "Trying to call glGetQueryObjectuiv() without current GL context";
}
-void NoContextGLApi::glGetQueryObjectuivARBFn(GLuint id,
- GLenum pname,
- GLuint* params) {
- NOTREACHED()
- << "Trying to call glGetQueryObjectuivARB() without current GL context";
- LOG(ERROR)
- << "Trying to call glGetQueryObjectuivARB() without current GL context";
-}
-
void NoContextGLApi::glGetRenderbufferParameterivEXTFn(GLenum target,
GLenum pname,
GLint* params) {
@@ -10983,12 +10734,6 @@
return GL_FALSE;
}
-GLboolean NoContextGLApi::glIsQueryARBFn(GLuint query) {
- NOTREACHED() << "Trying to call glIsQueryARB() without current GL context";
- LOG(ERROR) << "Trying to call glIsQueryARB() without current GL context";
- return GL_FALSE;
-}
-
GLboolean NoContextGLApi::glIsRenderbufferEXTFn(GLuint renderbuffer) {
NOTREACHED()
<< "Trying to call glIsRenderbufferEXT() without current GL context";
diff --git a/ui/gl/gl_bindings_autogen_gl.h b/ui/gl/gl_bindings_autogen_gl.h
index 643a236..4a4acc9 100644
--- a/ui/gl/gl_bindings_autogen_gl.h
+++ b/ui/gl/gl_bindings_autogen_gl.h
@@ -19,7 +19,6 @@
typedef void(GL_BINDING_CALL* glAttachShaderProc)(GLuint program,
GLuint shader);
typedef void(GL_BINDING_CALL* glBeginQueryProc)(GLenum target, GLuint id);
-typedef void(GL_BINDING_CALL* glBeginQueryARBProc)(GLenum target, GLuint id);
typedef void(GL_BINDING_CALL* glBeginTransformFeedbackProc)(
GLenum primitiveMode);
typedef void(GL_BINDING_CALL* glBindAttribLocationProc)(GLuint program,
@@ -203,8 +202,6 @@
typedef void(GL_BINDING_CALL* glDeleteProgramProc)(GLuint program);
typedef void(GL_BINDING_CALL* glDeleteQueriesProc)(GLsizei n,
const GLuint* ids);
-typedef void(GL_BINDING_CALL* glDeleteQueriesARBProc)(GLsizei n,
- const GLuint* ids);
typedef void(GL_BINDING_CALL* glDeleteRenderbuffersEXTProc)(
GLsizei n,
const GLuint* renderbuffers);
@@ -268,7 +265,6 @@
typedef void(GL_BINDING_CALL* glEnableProc)(GLenum cap);
typedef void(GL_BINDING_CALL* glEnableVertexAttribArrayProc)(GLuint index);
typedef void(GL_BINDING_CALL* glEndQueryProc)(GLenum target);
-typedef void(GL_BINDING_CALL* glEndQueryARBProc)(GLenum target);
typedef void(GL_BINDING_CALL* glEndTransformFeedbackProc)(void);
typedef GLsync(GL_BINDING_CALL* glFenceSyncProc)(GLenum condition,
GLbitfield flags);
@@ -316,7 +312,6 @@
typedef void(GL_BINDING_CALL* glGenFramebuffersEXTProc)(GLsizei n,
GLuint* framebuffers);
typedef void(GL_BINDING_CALL* glGenQueriesProc)(GLsizei n, GLuint* ids);
-typedef void(GL_BINDING_CALL* glGenQueriesARBProc)(GLsizei n, GLuint* ids);
typedef void(GL_BINDING_CALL* glGenRenderbuffersEXTProc)(GLsizei n,
GLuint* renderbuffers);
typedef void(GL_BINDING_CALL* glGenSamplersProc)(GLsizei n, GLuint* samplers);
@@ -413,27 +408,18 @@
typedef void(GL_BINDING_CALL* glGetQueryivProc)(GLenum target,
GLenum pname,
GLint* params);
-typedef void(GL_BINDING_CALL* glGetQueryivARBProc)(GLenum target,
- GLenum pname,
- GLint* params);
typedef void(GL_BINDING_CALL* glGetQueryObjecti64vProc)(GLuint id,
GLenum pname,
GLint64* params);
typedef void(GL_BINDING_CALL* glGetQueryObjectivProc)(GLuint id,
GLenum pname,
GLint* params);
-typedef void(GL_BINDING_CALL* glGetQueryObjectivARBProc)(GLuint id,
- GLenum pname,
- GLint* params);
typedef void(GL_BINDING_CALL* glGetQueryObjectui64vProc)(GLuint id,
GLenum pname,
GLuint64* params);
typedef void(GL_BINDING_CALL* glGetQueryObjectuivProc)(GLuint id,
GLenum pname,
GLuint* params);
-typedef void(GL_BINDING_CALL* glGetQueryObjectuivARBProc)(GLuint id,
- GLenum pname,
- GLuint* params);
typedef void(GL_BINDING_CALL* glGetRenderbufferParameterivEXTProc)(
GLenum target,
GLenum pname,
@@ -542,7 +528,6 @@
typedef GLboolean(GL_BINDING_CALL* glIsFramebufferEXTProc)(GLuint framebuffer);
typedef GLboolean(GL_BINDING_CALL* glIsProgramProc)(GLuint program);
typedef GLboolean(GL_BINDING_CALL* glIsQueryProc)(GLuint query);
-typedef GLboolean(GL_BINDING_CALL* glIsQueryARBProc)(GLuint query);
typedef GLboolean(GL_BINDING_CALL* glIsRenderbufferEXTProc)(
GLuint renderbuffer);
typedef GLboolean(GL_BINDING_CALL* glIsSamplerProc)(GLuint sampler);
@@ -943,7 +928,6 @@
glActiveTextureProc glActiveTextureFn;
glAttachShaderProc glAttachShaderFn;
glBeginQueryProc glBeginQueryFn;
- glBeginQueryARBProc glBeginQueryARBFn;
glBeginTransformFeedbackProc glBeginTransformFeedbackFn;
glBindAttribLocationProc glBindAttribLocationFn;
glBindBufferProc glBindBufferFn;
@@ -997,7 +981,6 @@
glDeleteFramebuffersEXTProc glDeleteFramebuffersEXTFn;
glDeleteProgramProc glDeleteProgramFn;
glDeleteQueriesProc glDeleteQueriesFn;
- glDeleteQueriesARBProc glDeleteQueriesARBFn;
glDeleteRenderbuffersEXTProc glDeleteRenderbuffersEXTFn;
glDeleteSamplersProc glDeleteSamplersFn;
glDeleteShaderProc glDeleteShaderFn;
@@ -1026,7 +1009,6 @@
glEnableProc glEnableFn;
glEnableVertexAttribArrayProc glEnableVertexAttribArrayFn;
glEndQueryProc glEndQueryFn;
- glEndQueryARBProc glEndQueryARBFn;
glEndTransformFeedbackProc glEndTransformFeedbackFn;
glFenceSyncProc glFenceSyncFn;
glFinishProc glFinishFn;
@@ -1048,7 +1030,6 @@
glGenFencesNVProc glGenFencesNVFn;
glGenFramebuffersEXTProc glGenFramebuffersEXTFn;
glGenQueriesProc glGenQueriesFn;
- glGenQueriesARBProc glGenQueriesARBFn;
glGenRenderbuffersEXTProc glGenRenderbuffersEXTFn;
glGenSamplersProc glGenSamplersFn;
glGenTexturesProc glGenTexturesFn;
@@ -1080,13 +1061,10 @@
glGetProgramivProc glGetProgramivFn;
glGetProgramResourceLocationProc glGetProgramResourceLocationFn;
glGetQueryivProc glGetQueryivFn;
- glGetQueryivARBProc glGetQueryivARBFn;
glGetQueryObjecti64vProc glGetQueryObjecti64vFn;
glGetQueryObjectivProc glGetQueryObjectivFn;
- glGetQueryObjectivARBProc glGetQueryObjectivARBFn;
glGetQueryObjectui64vProc glGetQueryObjectui64vFn;
glGetQueryObjectuivProc glGetQueryObjectuivFn;
- glGetQueryObjectuivARBProc glGetQueryObjectuivARBFn;
glGetRenderbufferParameterivEXTProc glGetRenderbufferParameterivEXTFn;
glGetSamplerParameterfvProc glGetSamplerParameterfvFn;
glGetSamplerParameterivProc glGetSamplerParameterivFn;
@@ -1122,7 +1100,6 @@
glIsFramebufferEXTProc glIsFramebufferEXTFn;
glIsProgramProc glIsProgramFn;
glIsQueryProc glIsQueryFn;
- glIsQueryARBProc glIsQueryARBFn;
glIsRenderbufferEXTProc glIsRenderbufferEXTFn;
glIsSamplerProc glIsSamplerFn;
glIsShaderProc glIsShaderFn;
@@ -1247,7 +1224,6 @@
virtual void glActiveTextureFn(GLenum texture) = 0;
virtual void glAttachShaderFn(GLuint program, GLuint shader) = 0;
virtual void glBeginQueryFn(GLenum target, GLuint id) = 0;
- virtual void glBeginQueryARBFn(GLenum target, GLuint id) = 0;
virtual void glBeginTransformFeedbackFn(GLenum primitiveMode) = 0;
virtual void glBindAttribLocationFn(GLuint program,
GLuint index,
@@ -1420,7 +1396,6 @@
const GLuint* framebuffers) = 0;
virtual void glDeleteProgramFn(GLuint program) = 0;
virtual void glDeleteQueriesFn(GLsizei n, const GLuint* ids) = 0;
- virtual void glDeleteQueriesARBFn(GLsizei n, const GLuint* ids) = 0;
virtual void glDeleteRenderbuffersEXTFn(GLsizei n,
const GLuint* renderbuffers) = 0;
virtual void glDeleteSamplersFn(GLsizei n, const GLuint* samplers) = 0;
@@ -1469,7 +1444,6 @@
virtual void glEnableFn(GLenum cap) = 0;
virtual void glEnableVertexAttribArrayFn(GLuint index) = 0;
virtual void glEndQueryFn(GLenum target) = 0;
- virtual void glEndQueryARBFn(GLenum target) = 0;
virtual void glEndTransformFeedbackFn(void) = 0;
virtual GLsync glFenceSyncFn(GLenum condition, GLbitfield flags) = 0;
virtual void glFinishFn(void) = 0;
@@ -1512,7 +1486,6 @@
virtual void glGenFencesNVFn(GLsizei n, GLuint* fences) = 0;
virtual void glGenFramebuffersEXTFn(GLsizei n, GLuint* framebuffers) = 0;
virtual void glGenQueriesFn(GLsizei n, GLuint* ids) = 0;
- virtual void glGenQueriesARBFn(GLsizei n, GLuint* ids) = 0;
virtual void glGenRenderbuffersEXTFn(GLsizei n, GLuint* renderbuffers) = 0;
virtual void glGenSamplersFn(GLsizei n, GLuint* samplers) = 0;
virtual void glGenTexturesFn(GLsizei n, GLuint* textures) = 0;
@@ -1591,25 +1564,16 @@
GLenum programInterface,
const char* name) = 0;
virtual void glGetQueryivFn(GLenum target, GLenum pname, GLint* params) = 0;
- virtual void glGetQueryivARBFn(GLenum target,
- GLenum pname,
- GLint* params) = 0;
virtual void glGetQueryObjecti64vFn(GLuint id,
GLenum pname,
GLint64* params) = 0;
virtual void glGetQueryObjectivFn(GLuint id, GLenum pname, GLint* params) = 0;
- virtual void glGetQueryObjectivARBFn(GLuint id,
- GLenum pname,
- GLint* params) = 0;
virtual void glGetQueryObjectui64vFn(GLuint id,
GLenum pname,
GLuint64* params) = 0;
virtual void glGetQueryObjectuivFn(GLuint id,
GLenum pname,
GLuint* params) = 0;
- virtual void glGetQueryObjectuivARBFn(GLuint id,
- GLenum pname,
- GLuint* params) = 0;
virtual void glGetRenderbufferParameterivEXTFn(GLenum target,
GLenum pname,
GLint* params) = 0;
@@ -1705,7 +1669,6 @@
virtual GLboolean glIsFramebufferEXTFn(GLuint framebuffer) = 0;
virtual GLboolean glIsProgramFn(GLuint program) = 0;
virtual GLboolean glIsQueryFn(GLuint query) = 0;
- virtual GLboolean glIsQueryARBFn(GLuint query) = 0;
virtual GLboolean glIsRenderbufferEXTFn(GLuint renderbuffer) = 0;
virtual GLboolean glIsSamplerFn(GLuint sampler) = 0;
virtual GLboolean glIsShaderFn(GLuint shader) = 0;
@@ -2023,7 +1986,6 @@
#define glActiveTexture ::gfx::g_current_gl_context->glActiveTextureFn
#define glAttachShader ::gfx::g_current_gl_context->glAttachShaderFn
#define glBeginQuery ::gfx::g_current_gl_context->glBeginQueryFn
-#define glBeginQueryARB ::gfx::g_current_gl_context->glBeginQueryARBFn
#define glBeginTransformFeedback \
::gfx::g_current_gl_context->glBeginTransformFeedbackFn
#define glBindAttribLocation ::gfx::g_current_gl_context->glBindAttribLocationFn
@@ -2089,7 +2051,6 @@
::gfx::g_current_gl_context->glDeleteFramebuffersEXTFn
#define glDeleteProgram ::gfx::g_current_gl_context->glDeleteProgramFn
#define glDeleteQueries ::gfx::g_current_gl_context->glDeleteQueriesFn
-#define glDeleteQueriesARB ::gfx::g_current_gl_context->glDeleteQueriesARBFn
#define glDeleteRenderbuffersEXT \
::gfx::g_current_gl_context->glDeleteRenderbuffersEXTFn
#define glDeleteSamplers ::gfx::g_current_gl_context->glDeleteSamplersFn
@@ -2127,7 +2088,6 @@
#define glEnableVertexAttribArray \
::gfx::g_current_gl_context->glEnableVertexAttribArrayFn
#define glEndQuery ::gfx::g_current_gl_context->glEndQueryFn
-#define glEndQueryARB ::gfx::g_current_gl_context->glEndQueryARBFn
#define glEndTransformFeedback \
::gfx::g_current_gl_context->glEndTransformFeedbackFn
#define glFenceSync ::gfx::g_current_gl_context->glFenceSyncFn
@@ -2154,7 +2114,6 @@
#define glGenFencesNV ::gfx::g_current_gl_context->glGenFencesNVFn
#define glGenFramebuffersEXT ::gfx::g_current_gl_context->glGenFramebuffersEXTFn
#define glGenQueries ::gfx::g_current_gl_context->glGenQueriesFn
-#define glGenQueriesARB ::gfx::g_current_gl_context->glGenQueriesARBFn
#define glGenRenderbuffersEXT \
::gfx::g_current_gl_context->glGenRenderbuffersEXTFn
#define glGenSamplers ::gfx::g_current_gl_context->glGenSamplersFn
@@ -2196,16 +2155,11 @@
#define glGetProgramResourceLocation \
::gfx::g_current_gl_context->glGetProgramResourceLocationFn
#define glGetQueryiv ::gfx::g_current_gl_context->glGetQueryivFn
-#define glGetQueryivARB ::gfx::g_current_gl_context->glGetQueryivARBFn
#define glGetQueryObjecti64v ::gfx::g_current_gl_context->glGetQueryObjecti64vFn
#define glGetQueryObjectiv ::gfx::g_current_gl_context->glGetQueryObjectivFn
-#define glGetQueryObjectivARB \
- ::gfx::g_current_gl_context->glGetQueryObjectivARBFn
#define glGetQueryObjectui64v \
::gfx::g_current_gl_context->glGetQueryObjectui64vFn
#define glGetQueryObjectuiv ::gfx::g_current_gl_context->glGetQueryObjectuivFn
-#define glGetQueryObjectuivARB \
- ::gfx::g_current_gl_context->glGetQueryObjectuivARBFn
#define glGetRenderbufferParameterivEXT \
::gfx::g_current_gl_context->glGetRenderbufferParameterivEXTFn
#define glGetSamplerParameterfv \
@@ -2254,7 +2208,6 @@
#define glIsFramebufferEXT ::gfx::g_current_gl_context->glIsFramebufferEXTFn
#define glIsProgram ::gfx::g_current_gl_context->glIsProgramFn
#define glIsQuery ::gfx::g_current_gl_context->glIsQueryFn
-#define glIsQueryARB ::gfx::g_current_gl_context->glIsQueryARBFn
#define glIsRenderbufferEXT ::gfx::g_current_gl_context->glIsRenderbufferEXTFn
#define glIsSampler ::gfx::g_current_gl_context->glIsSamplerFn
#define glIsShader ::gfx::g_current_gl_context->glIsShaderFn
diff --git a/ui/gl/gl_bindings_autogen_mock.cc b/ui/gl/gl_bindings_autogen_mock.cc
index bf0a857..717198f 100644
--- a/ui/gl/gl_bindings_autogen_mock.cc
+++ b/ui/gl/gl_bindings_autogen_mock.cc
@@ -41,13 +41,13 @@
void GL_BINDING_CALL
MockGLInterface::Mock_glBeginQueryARB(GLenum target, GLuint id) {
MakeFunctionUnique("glBeginQueryARB");
- interface_->BeginQueryARB(target, id);
+ interface_->BeginQuery(target, id);
}
void GL_BINDING_CALL
MockGLInterface::Mock_glBeginQueryEXT(GLenum target, GLuint id) {
MakeFunctionUnique("glBeginQueryEXT");
- interface_->BeginQueryARB(target, id);
+ interface_->BeginQuery(target, id);
}
void GL_BINDING_CALL
@@ -518,13 +518,13 @@
void GL_BINDING_CALL
MockGLInterface::Mock_glDeleteQueriesARB(GLsizei n, const GLuint* ids) {
MakeFunctionUnique("glDeleteQueriesARB");
- interface_->DeleteQueriesARB(n, ids);
+ interface_->DeleteQueries(n, ids);
}
void GL_BINDING_CALL
MockGLInterface::Mock_glDeleteQueriesEXT(GLsizei n, const GLuint* ids) {
MakeFunctionUnique("glDeleteQueriesEXT");
- interface_->DeleteQueriesARB(n, ids);
+ interface_->DeleteQueries(n, ids);
}
void GL_BINDING_CALL
@@ -773,12 +773,12 @@
void GL_BINDING_CALL MockGLInterface::Mock_glEndQueryARB(GLenum target) {
MakeFunctionUnique("glEndQueryARB");
- interface_->EndQueryARB(target);
+ interface_->EndQuery(target);
}
void GL_BINDING_CALL MockGLInterface::Mock_glEndQueryEXT(GLenum target) {
MakeFunctionUnique("glEndQueryEXT");
- interface_->EndQueryARB(target);
+ interface_->EndQuery(target);
}
void GL_BINDING_CALL MockGLInterface::Mock_glEndTransformFeedback(void) {
@@ -941,13 +941,13 @@
void GL_BINDING_CALL
MockGLInterface::Mock_glGenQueriesARB(GLsizei n, GLuint* ids) {
MakeFunctionUnique("glGenQueriesARB");
- interface_->GenQueriesARB(n, ids);
+ interface_->GenQueries(n, ids);
}
void GL_BINDING_CALL
MockGLInterface::Mock_glGenQueriesEXT(GLsizei n, GLuint* ids) {
MakeFunctionUnique("glGenQueriesEXT");
- interface_->GenQueriesARB(n, ids);
+ interface_->GenQueries(n, ids);
}
void GL_BINDING_CALL
@@ -1267,7 +1267,7 @@
GLenum pname,
GLint* params) {
MakeFunctionUnique("glGetQueryObjectivARB");
- interface_->GetQueryObjectivARB(id, pname, params);
+ interface_->GetQueryObjectiv(id, pname, params);
}
void GL_BINDING_CALL
@@ -1275,7 +1275,7 @@
GLenum pname,
GLint* params) {
MakeFunctionUnique("glGetQueryObjectivEXT");
- interface_->GetQueryObjectivARB(id, pname, params);
+ interface_->GetQueryObjectiv(id, pname, params);
}
void GL_BINDING_CALL
@@ -1306,7 +1306,7 @@
GLenum pname,
GLuint* params) {
MakeFunctionUnique("glGetQueryObjectuivARB");
- interface_->GetQueryObjectuivARB(id, pname, params);
+ interface_->GetQueryObjectuiv(id, pname, params);
}
void GL_BINDING_CALL
@@ -1314,7 +1314,7 @@
GLenum pname,
GLuint* params) {
MakeFunctionUnique("glGetQueryObjectuivEXT");
- interface_->GetQueryObjectuivARB(id, pname, params);
+ interface_->GetQueryObjectuiv(id, pname, params);
}
void GL_BINDING_CALL
@@ -1327,14 +1327,14 @@
GLenum pname,
GLint* params) {
MakeFunctionUnique("glGetQueryivARB");
- interface_->GetQueryivARB(target, pname, params);
+ interface_->GetQueryiv(target, pname, params);
}
void GL_BINDING_CALL MockGLInterface::Mock_glGetQueryivEXT(GLenum target,
GLenum pname,
GLint* params) {
MakeFunctionUnique("glGetQueryivEXT");
- interface_->GetQueryivARB(target, pname, params);
+ interface_->GetQueryiv(target, pname, params);
}
void GL_BINDING_CALL
@@ -1614,12 +1614,12 @@
GLboolean GL_BINDING_CALL MockGLInterface::Mock_glIsQueryARB(GLuint query) {
MakeFunctionUnique("glIsQueryARB");
- return interface_->IsQueryARB(query);
+ return interface_->IsQuery(query);
}
GLboolean GL_BINDING_CALL MockGLInterface::Mock_glIsQueryEXT(GLuint query) {
MakeFunctionUnique("glIsQueryEXT");
- return interface_->IsQueryARB(query);
+ return interface_->IsQuery(query);
}
GLboolean GL_BINDING_CALL
diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc
index dd8aa26..e64d031 100644
--- a/ui/gl/gl_context.cc
+++ b/ui/gl/gl_context.cc
@@ -4,6 +4,8 @@
#include <string>
+#include "base/bind.h"
+#include "base/cancelable_callback.h"
#include "base/command_line.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
@@ -41,8 +43,15 @@
GLContext::GLContext(GLShareGroup* share_group) :
share_group_(share_group),
+ state_dirtied_externally_(false),
swap_interval_(1),
- force_swap_interval_zero_(false) {
+ force_swap_interval_zero_(false),
+ state_dirtied_callback_(
+ base::Bind(&GLContext::SetStateWasDirtiedExternally,
+ // Note that if this is not unretained, it will create a cycle (and
+ // will never be freed.
+ base::Unretained(this),
+ true)) {
if (!share_group_.get())
share_group_ = new GLShareGroup;
@@ -93,6 +102,24 @@
return std::string(renderer ? renderer : "");
}
+base::Closure GLContext::GetStateWasDirtiedExternallyCallback() {
+ return state_dirtied_callback_.callback();
+}
+
+void GLContext::RestoreStateIfDirtiedExternally() {
+ NOTREACHED();
+}
+
+bool GLContext::GetStateWasDirtiedExternally() const {
+ DCHECK(virtual_gl_api_);
+ return state_dirtied_externally_;
+}
+
+void GLContext::SetStateWasDirtiedExternally(bool dirtied_externally) {
+ DCHECK(virtual_gl_api_);
+ state_dirtied_externally_ = dirtied_externally;
+}
+
bool GLContext::HasExtension(const char* name) {
std::string extensions = GetExtensions();
extensions += " ";
diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h
index 4577be3..9598661 100644
--- a/ui/gl/gl_context.h
+++ b/ui/gl/gl_context.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/cancelable_callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/cancellation_flag.h"
@@ -16,6 +17,10 @@
#include "ui/gl/gl_state_restorer.h"
#include "ui/gl/gpu_preference.h"
+namespace gpu {
+class GLContextVirtual;
+} // namespace gpu
+
namespace gfx {
class GLSurface;
@@ -130,6 +135,14 @@
// Returns the GL renderer string. The context must be current.
virtual std::string GetGLRenderer();
+ // Return a callback that, when called, indicates that the state the
+ // underlying context has been changed by code outside of the command buffer,
+ // and will need to be restored.
+ virtual base::Closure GetStateWasDirtiedExternallyCallback();
+
+ // Restore the context's state if it was dirtied by an external caller.
+ virtual void RestoreStateIfDirtiedExternally();
+
protected:
virtual ~GLContext();
@@ -159,20 +172,27 @@
virtual void OnSetSwapInterval(int interval) = 0;
+ bool GetStateWasDirtiedExternally() const;
+ void SetStateWasDirtiedExternally(bool dirtied_externally);
+
private:
friend class base::RefCounted<GLContext>;
// For GetRealCurrent.
friend class VirtualGLApi;
+ friend class gpu::GLContextVirtual;
scoped_refptr<GLShareGroup> share_group_;
scoped_ptr<VirtualGLApi> virtual_gl_api_;
+ bool state_dirtied_externally_;
scoped_ptr<GLStateRestorer> state_restorer_;
scoped_ptr<GLVersionInfo> version_info_;
int swap_interval_;
bool force_swap_interval_zero_;
+ base::CancelableCallback<void()> state_dirtied_callback_;
+
DISALLOW_COPY_AND_ASSIGN(GLContext);
};
diff --git a/ui/gl/gl_enums_implementation_autogen.h b/ui/gl/gl_enums_implementation_autogen.h
index 5872db9..da97baa 100644
--- a/ui/gl/gl_enums_implementation_autogen.h
+++ b/ui/gl/gl_enums_implementation_autogen.h
@@ -10,4432 +10,4432 @@
static const GLEnums::EnumToString enum_to_string_table[] = {
{
- 0x8D77,
- "GL_RGB16UI",
+ 0x8D77,
+ "GL_RGB16UI",
},
{
- 0x8D76,
- "GL_RGBA16UI",
+ 0x8D76,
+ "GL_RGBA16UI",
},
{
- 0x9260,
- "GL_GCCSO_SHADER_BINARY_FJ",
+ 0x9260,
+ "GL_GCCSO_SHADER_BINARY_FJ",
},
{
- 0x9009,
- "GL_TEXTURE_CUBE_MAP_ARRAY_EXT",
+ 0x9009,
+ "GL_TEXTURE_CUBE_MAP_ARRAY_EXT",
},
{
- 0x8D71,
- "GL_RGB32UI",
+ 0x8D71,
+ "GL_RGB32UI",
},
{
- 0x8D70,
- "GL_RGBA32UI",
+ 0x8D70,
+ "GL_RGBA32UI",
},
{
- 0x8C76,
- "GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH",
+ 0x8C76,
+ "GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH",
},
{
- 0x8825,
- "GL_DRAW_BUFFER0_EXT",
+ 0x8825,
+ "GL_DRAW_BUFFER0_EXT",
},
{
- 0x8D94,
- "GL_RED_INTEGER",
+ 0x8D94,
+ "GL_RED_INTEGER",
},
{
- 0x0BC1,
- "GL_ALPHA_TEST_FUNC_QCOM",
+ 0x0BC1,
+ "GL_ALPHA_TEST_FUNC_QCOM",
},
{
- 0x884C,
- "GL_TEXTURE_COMPARE_MODE_EXT",
+ 0x884C,
+ "GL_TEXTURE_COMPARE_MODE_EXT",
},
{
- 0x0BC2,
- "GL_ALPHA_TEST_REF_QCOM",
+ 0x0BC2,
+ "GL_ALPHA_TEST_REF_QCOM",
},
{
- 0x78EF,
- "GL_PIXEL_UNPACK_TRANSFER_BUFFER_BINDING_CHROMIUM",
+ 0x78EF,
+ "GL_PIXEL_UNPACK_TRANSFER_BUFFER_BINDING_CHROMIUM",
},
{
- 0x884D,
- "GL_TEXTURE_COMPARE_FUNC_EXT",
+ 0x884D,
+ "GL_TEXTURE_COMPARE_FUNC_EXT",
},
{
- 0x884E,
- "GL_COMPARE_REF_TO_TEXTURE_EXT",
+ 0x884E,
+ "GL_COMPARE_REF_TO_TEXTURE_EXT",
},
{
- 0x8E76,
- "GL_TESS_GEN_MODE_EXT",
+ 0x8E76,
+ "GL_TESS_GEN_MODE_EXT",
},
{
- 0x8E77,
- "GL_TESS_GEN_SPACING_EXT",
+ 0x8E77,
+ "GL_TESS_GEN_SPACING_EXT",
},
{
- 0x000D,
- "GL_TRIANGLE_STRIP_ADJACENCY_EXT",
+ 0x000D,
+ "GL_TRIANGLE_STRIP_ADJACENCY_EXT",
},
{
- 0x000E,
- "GL_PATCHES_EXT",
+ 0x000E,
+ "GL_PATCHES_EXT",
},
{
- 0x000B,
- "GL_LINE_STRIP_ADJACENCY_EXT",
+ 0x000B,
+ "GL_LINE_STRIP_ADJACENCY_EXT",
},
{
- 0x000C,
- "GL_TRIANGLES_ADJACENCY_EXT",
+ 0x000C,
+ "GL_TRIANGLES_ADJACENCY_EXT",
},
{
- 0x000A,
- "GL_LINES_ADJACENCY_EXT",
+ 0x000A,
+ "GL_LINES_ADJACENCY_EXT",
},
{
- 0x92CF,
- "GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT",
+ 0x92CF,
+ "GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT",
},
{
- 0x93A1,
- "GL_BGRA8_EXT",
+ 0x93A1,
+ "GL_BGRA8_EXT",
},
{
- 0x813C,
- "GL_TEXTURE_BASE_LEVEL",
+ 0x813C,
+ "GL_TEXTURE_BASE_LEVEL",
},
{
- 0,
- "GL_FALSE",
+ 0,
+ "GL_FALSE",
},
{
- 0x00400000,
- "GL_STENCIL_BUFFER_BIT6_QCOM",
+ 0x00400000,
+ "GL_STENCIL_BUFFER_BIT6_QCOM",
},
{
- 0x9500,
- "GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL",
+ 0x9500,
+ "GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL",
},
{
- 0x78F2,
- "GL_SCANOUT_CHROMIUM",
+ 0x78F2,
+ "GL_SCANOUT_CHROMIUM",
},
{
- 0x9138,
- "GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG",
+ 0x9138,
+ "GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG",
},
{
- 0x8FC4,
- "GL_SHADER_BINARY_VIV",
+ 0x8FC4,
+ "GL_SHADER_BINARY_VIV",
},
{
- 0x9130,
- "GL_SGX_PROGRAM_BINARY_IMG",
+ 0x9130,
+ "GL_SGX_PROGRAM_BINARY_IMG",
},
{
- 0x9133,
- "GL_RENDERBUFFER_SAMPLES_IMG",
+ 0x9133,
+ "GL_RENDERBUFFER_SAMPLES_IMG",
},
{
- 0x82E0,
- "GL_BUFFER_KHR",
+ 0x82E0,
+ "GL_BUFFER_KHR",
},
{
- 0x9135,
- "GL_MAX_SAMPLES_IMG",
+ 0x9135,
+ "GL_MAX_SAMPLES_IMG",
},
{
- 0x9134,
- "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG",
+ 0x9134,
+ "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG",
},
{
- 0x9137,
- "GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG",
+ 0x9137,
+ "GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG",
},
{
- 0x9136,
- "GL_TEXTURE_SAMPLES_IMG",
+ 0x9136,
+ "GL_TEXTURE_SAMPLES_IMG",
},
{
- 0x8D88,
- "GL_RGBA16I",
+ 0x8D88,
+ "GL_RGBA16I",
},
{
- 0x8D89,
- "GL_RGB16I",
+ 0x8D89,
+ "GL_RGB16I",
},
{
- 0x00000020,
- "GL_COLOR_BUFFER_BIT5_QCOM",
+ 0x00000020,
+ "GL_COLOR_BUFFER_BIT5_QCOM",
},
{
- 0x0008,
- "GL_MAP_INVALIDATE_BUFFER_BIT_EXT",
+ 0x0008,
+ "GL_MAP_INVALIDATE_BUFFER_BIT_EXT",
},
{
- 0x0BC0,
- "GL_ALPHA_TEST_QCOM",
+ 0x0BC0,
+ "GL_ALPHA_TEST_QCOM",
},
{
- 0x0006,
- "GL_TRIANGLE_FAN",
+ 0x0006,
+ "GL_TRIANGLE_FAN",
},
{
- 0x0007,
- "GL_QUADS_EXT",
+ 0x0007,
+ "GL_QUADS_EXT",
},
{
- 0x0004,
- "GL_TRIANGLES",
+ 0x0004,
+ "GL_TRIANGLES",
},
{
- 0x0005,
- "GL_TRIANGLE_STRIP",
+ 0x0005,
+ "GL_TRIANGLE_STRIP",
},
{
- 0x0002,
- "GL_LINE_LOOP",
+ 0x0002,
+ "GL_LINE_LOOP",
},
{
- 0x0003,
- "GL_LINE_STRIP",
+ 0x0003,
+ "GL_LINE_STRIP",
},
{
- 0x0000,
- "GL_POINTS",
+ 0x0000,
+ "GL_POINTS",
},
{
- 0x0001,
- "GL_LINES",
+ 0x0001,
+ "GL_LINES",
},
{
- 0x8D7D,
- "GL_RGB8UI",
+ 0x8D7D,
+ "GL_RGB8UI",
},
{
- 0x93F0,
- "GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG",
+ 0x93F0,
+ "GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG",
},
{
- 0x93F1,
- "GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG",
+ 0x93F1,
+ "GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG",
},
{
- 0x0D04,
- "GL_PACK_SKIP_PIXELS",
+ 0x0D04,
+ "GL_PACK_SKIP_PIXELS",
},
{
- 0x900E,
- "GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT",
+ 0x900E,
+ "GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT",
},
{
- 0x900D,
- "GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT",
+ 0x900D,
+ "GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT",
},
{
- 0x8C7F,
- "GL_TRANSFORM_FEEDBACK_BUFFER_MODE",
+ 0x8C7F,
+ "GL_TRANSFORM_FEEDBACK_BUFFER_MODE",
},
{
- 0x900F,
- "GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT",
+ 0x900F,
+ "GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT",
},
{
- 0x900A,
- "GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT",
+ 0x900A,
+ "GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT",
},
{
- 0x900C,
- "GL_SAMPLER_CUBE_MAP_ARRAY_EXT",
+ 0x900C,
+ "GL_SAMPLER_CUBE_MAP_ARRAY_EXT",
},
{
- 0x88B8,
- "GL_READ_ONLY",
+ 0x88B8,
+ "GL_READ_ONLY",
},
{
- 0x88B9,
- "GL_WRITE_ONLY_OES",
+ 0x88B9,
+ "GL_WRITE_ONLY_OES",
},
{
- 0x8211,
- "GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT",
+ 0x8211,
+ "GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT",
},
{
- 0x8210,
- "GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT",
+ 0x8210,
+ "GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT",
},
{
- 0x8741,
- "GL_PROGRAM_BINARY_LENGTH_OES",
+ 0x8741,
+ "GL_PROGRAM_BINARY_LENGTH_OES",
},
{
- 0x8740,
- "GL_Z400_BINARY_AMD",
+ 0x8740,
+ "GL_Z400_BINARY_AMD",
},
{
- 0x8215,
- "GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE",
+ 0x8215,
+ "GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE",
},
{
- 0x8C4D,
- "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV",
+ 0x8C4D,
+ "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV",
},
{
- 0x8192,
- "GL_GENERATE_MIPMAP_HINT",
+ 0x8192,
+ "GL_GENERATE_MIPMAP_HINT",
},
{
- 0x8E79,
- "GL_TESS_GEN_POINT_MODE_EXT",
+ 0x8E79,
+ "GL_TESS_GEN_POINT_MODE_EXT",
},
{
- 0x8A54,
- "GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT",
+ 0x8A54,
+ "GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT",
},
{
- 0x8A55,
- "GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT",
+ 0x8A55,
+ "GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT",
},
{
- 0x8A56,
- "GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT",
+ 0x8A56,
+ "GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT",
},
{
- 0x8A57,
- "GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT",
+ 0x8A57,
+ "GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT",
},
{
- 0x8A51,
- "GL_RGB_RAW_422_APPLE",
+ 0x8A51,
+ "GL_RGB_RAW_422_APPLE",
},
{
- 0x87F9,
- "GL_3DC_X_AMD",
+ 0x87F9,
+ "GL_3DC_X_AMD",
},
{
- 0x8A53,
- "GL_SYNC_OBJECT_APPLE",
+ 0x8A53,
+ "GL_SYNC_OBJECT_APPLE",
},
{
- 0x8DF8,
- "GL_SHADER_BINARY_FORMATS",
+ 0x8DF8,
+ "GL_SHADER_BINARY_FORMATS",
},
{
- 0x8DF9,
- "GL_NUM_SHADER_BINARY_FORMATS",
+ 0x8DF9,
+ "GL_NUM_SHADER_BINARY_FORMATS",
},
{
- 0x826D,
- "GL_DEBUG_GROUP_STACK_DEPTH_KHR",
+ 0x826D,
+ "GL_DEBUG_GROUP_STACK_DEPTH_KHR",
},
{
- 0x8E75,
- "GL_TESS_CONTROL_OUTPUT_VERTICES_EXT",
+ 0x8E75,
+ "GL_TESS_CONTROL_OUTPUT_VERTICES_EXT",
},
{
- 0x826B,
- "GL_DEBUG_SEVERITY_NOTIFICATION_KHR",
+ 0x826B,
+ "GL_DEBUG_SEVERITY_NOTIFICATION_KHR",
},
{
- 0x826C,
- "GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR",
+ 0x826C,
+ "GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR",
},
{
- 0x8B59,
- "GL_BOOL_VEC4",
+ 0x8B59,
+ "GL_BOOL_VEC4",
},
{
- 0x826A,
- "GL_DEBUG_TYPE_POP_GROUP_KHR",
+ 0x826A,
+ "GL_DEBUG_TYPE_POP_GROUP_KHR",
},
{
- 0x8B57,
- "GL_BOOL_VEC2",
+ 0x8B57,
+ "GL_BOOL_VEC2",
},
{
- 0x8DF1,
- "GL_MEDIUM_FLOAT",
+ 0x8DF1,
+ "GL_MEDIUM_FLOAT",
},
{
- 0x8B55,
- "GL_INT_VEC4",
+ 0x8B55,
+ "GL_INT_VEC4",
},
{
- 0x8B54,
- "GL_INT_VEC3",
+ 0x8B54,
+ "GL_INT_VEC3",
},
{
- 0x8DF4,
- "GL_MEDIUM_INT",
+ 0x8DF4,
+ "GL_MEDIUM_INT",
},
{
- 0x8DF5,
- "GL_HIGH_INT",
+ 0x8DF5,
+ "GL_HIGH_INT",
},
{
- 0x8B51,
- "GL_FLOAT_VEC3",
+ 0x8B51,
+ "GL_FLOAT_VEC3",
},
{
- 0x8B50,
- "GL_FLOAT_VEC2",
+ 0x8B50,
+ "GL_FLOAT_VEC2",
},
{
- 0x806D,
- "GL_UNPACK_SKIP_IMAGES",
+ 0x806D,
+ "GL_UNPACK_SKIP_IMAGES",
},
{
- 0x806E,
- "GL_UNPACK_IMAGE_HEIGHT",
+ 0x806E,
+ "GL_UNPACK_IMAGE_HEIGHT",
},
{
- 0x806F,
- "GL_TEXTURE_3D_OES",
+ 0x806F,
+ "GL_TEXTURE_3D_OES",
},
{
- 0x92E7,
- "GL_IS_PER_PATCH_EXT",
+ 0x92E7,
+ "GL_IS_PER_PATCH_EXT",
},
{
- 0x92E0,
- "GL_DEBUG_OUTPUT_KHR",
+ 0x92E0,
+ "GL_DEBUG_OUTPUT_KHR",
},
{
- 0x806A,
- "GL_TEXTURE_BINDING_3D_OES",
+ 0x806A,
+ "GL_TEXTURE_BINDING_3D_OES",
},
{
- 0x8D8E,
- "GL_RGBA8I",
+ 0x8D8E,
+ "GL_RGBA8I",
},
{
- 0x8CE3,
- "GL_COLOR_ATTACHMENT3_EXT",
+ 0x8CE3,
+ "GL_COLOR_ATTACHMENT3_EXT",
},
{
- 0x9274,
- "GL_COMPRESSED_RGB8_ETC2",
+ 0x9274,
+ "GL_COMPRESSED_RGB8_ETC2",
},
{
- 0x1904,
- "GL_GREEN_NV",
+ 0x1904,
+ "GL_GREEN_NV",
},
{
- 0x928D,
- "GL_DST_OUT_NV",
+ 0x928D,
+ "GL_DST_OUT_NV",
},
{
- 0x8069,
- "GL_TEXTURE_BINDING_2D",
+ 0x8069,
+ "GL_TEXTURE_BINDING_2D",
},
{
- 0x8A2E,
- "GL_MAX_COMBINED_UNIFORM_BLOCKS",
+ 0x8A2E,
+ "GL_MAX_COMBINED_UNIFORM_BLOCKS",
},
{
- 0x8F96,
- "GL_RGB8_SNORM",
+ 0x8F96,
+ "GL_RGB8_SNORM",
},
{
- 0x8F95,
- "GL_RG8_SNORM",
+ 0x8F95,
+ "GL_RG8_SNORM",
},
{
- 0x8260,
- "GL_UNDEFINED_VERTEX_EXT",
+ 0x8260,
+ "GL_UNDEFINED_VERTEX_EXT",
},
{
- 0x8261,
- "GL_NO_RESET_NOTIFICATION_KHR",
+ 0x8261,
+ "GL_NO_RESET_NOTIFICATION_KHR",
},
{
- 0x0D02,
- "GL_PACK_ROW_LENGTH",
+ 0x0D02,
+ "GL_PACK_ROW_LENGTH",
},
{
- 0x8DFA,
- "GL_SHADER_COMPILER",
+ 0x8DFA,
+ "GL_SHADER_COMPILER",
},
{
- 0x8DFB,
- "GL_MAX_VERTEX_UNIFORM_VECTORS",
+ 0x8DFB,
+ "GL_MAX_VERTEX_UNIFORM_VECTORS",
},
{
- 0x8DFC,
- "GL_MAX_VARYING_VECTORS",
+ 0x8DFC,
+ "GL_MAX_VARYING_VECTORS",
},
{
- 0x8B5C,
- "GL_FLOAT_MAT4",
+ 0x8B5C,
+ "GL_FLOAT_MAT4",
},
{
- 0x8B5B,
- "GL_FLOAT_MAT3",
+ 0x8B5B,
+ "GL_FLOAT_MAT3",
},
{
- 0x8268,
- "GL_DEBUG_TYPE_MARKER_KHR",
+ 0x8268,
+ "GL_DEBUG_TYPE_MARKER_KHR",
},
{
- 0x8269,
- "GL_DEBUG_TYPE_PUSH_GROUP_KHR",
+ 0x8269,
+ "GL_DEBUG_TYPE_PUSH_GROUP_KHR",
},
{
- 0x8A43,
- "GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES",
+ 0x8A43,
+ "GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES",
},
{
- 0x1905,
- "GL_BLUE_NV",
+ 0x1905,
+ "GL_BLUE_NV",
},
{
- 0x87FF,
- "GL_PROGRAM_BINARY_FORMATS_OES",
+ 0x87FF,
+ "GL_PROGRAM_BINARY_FORMATS_OES",
},
{
- 0x87FE,
- "GL_NUM_PROGRAM_BINARY_FORMATS_OES",
+ 0x87FE,
+ "GL_NUM_PROGRAM_BINARY_FORMATS_OES",
},
{
- 0x8A41,
- "GL_UNIFORM_BLOCK_NAME_LENGTH",
+ 0x8A41,
+ "GL_UNIFORM_BLOCK_NAME_LENGTH",
},
{
- 0x2600,
- "GL_NEAREST",
+ 0x2600,
+ "GL_NEAREST",
},
{
- 0x2601,
- "GL_LINEAR",
+ 0x2601,
+ "GL_LINEAR",
},
{
- 0x8C03,
- "GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",
+ 0x8C03,
+ "GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",
},
{
- 0x821B,
- "GL_MAJOR_VERSION",
+ 0x821B,
+ "GL_MAJOR_VERSION",
},
{
- 0x821A,
- "GL_DEPTH_STENCIL_ATTACHMENT",
+ 0x821A,
+ "GL_DEPTH_STENCIL_ATTACHMENT",
},
{
- 0x8A40,
- "GL_UNIFORM_BLOCK_DATA_SIZE",
+ 0x8A40,
+ "GL_UNIFORM_BLOCK_DATA_SIZE",
},
{
- 0x9242,
- "GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM",
+ 0x9242,
+ "GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM",
},
{
- 0x821D,
- "GL_NUM_EXTENSIONS",
+ 0x821D,
+ "GL_NUM_EXTENSIONS",
},
{
- 0x88BB,
- "GL_BUFFER_ACCESS_OES",
+ 0x88BB,
+ "GL_BUFFER_ACCESS_OES",
},
{
- 0x88BC,
- "GL_BUFFER_MAPPED_OES",
+ 0x88BC,
+ "GL_BUFFER_MAPPED_OES",
},
{
- 0x88BD,
- "GL_BUFFER_MAP_POINTER_OES",
+ 0x88BD,
+ "GL_BUFFER_MAP_POINTER_OES",
},
{
- 0x88BF,
- "GL_TIME_ELAPSED_EXT",
+ 0x88BF,
+ "GL_TIME_ELAPSED_EXT",
},
{
- 0x8A46,
- "GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER",
+ 0x8A46,
+ "GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER",
},
{
- 0x6003,
- "GL_GET_ERROR_QUERY_CHROMIUM",
+ 0x6003,
+ "GL_GET_ERROR_QUERY_CHROMIUM",
},
{
- 0x8F94,
- "GL_R8_SNORM",
+ 0x8F94,
+ "GL_R8_SNORM",
},
{
- 0x0C10,
- "GL_SCISSOR_BOX",
+ 0x0C10,
+ "GL_SCISSOR_BOX",
},
{
- 0x0C11,
- "GL_SCISSOR_TEST",
+ 0x0C11,
+ "GL_SCISSOR_TEST",
},
{
- 0x1700,
- "GL_PATH_MODELVIEW_CHROMIUM",
+ 0x1700,
+ "GL_PATH_MODELVIEW_CHROMIUM",
},
{
- 0x80000000,
- "GL_MULTISAMPLE_BUFFER_BIT7_QCOM",
+ 0x80000000,
+ "GL_MULTISAMPLE_BUFFER_BIT7_QCOM",
},
{
- 0x94F8,
- "GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL",
+ 0x94F8,
+ "GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL",
},
{
- 0x8A48,
- "GL_TEXTURE_SRGB_DECODE_EXT",
+ 0x8A48,
+ "GL_TEXTURE_SRGB_DECODE_EXT",
},
{
- 0x300E,
- "GL_CONTEXT_LOST",
+ 0x300E,
+ "GL_CONTEXT_LOST",
},
{
- 0x02000000,
- "GL_MULTISAMPLE_BUFFER_BIT1_QCOM",
+ 0x02000000,
+ "GL_MULTISAMPLE_BUFFER_BIT1_QCOM",
},
{
- 0x8C2F,
- "GL_ANY_SAMPLES_PASSED_EXT",
+ 0x8C2F,
+ "GL_ANY_SAMPLES_PASSED_EXT",
},
{
- 0x8BD2,
- "GL_TEXTURE_WIDTH_QCOM",
+ 0x8BD2,
+ "GL_TEXTURE_WIDTH_QCOM",
},
{
- 0x8C2D,
- "GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT",
+ 0x8C2D,
+ "GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT",
},
{
- 0x8C2C,
- "GL_TEXTURE_BINDING_BUFFER_EXT",
+ 0x8C2C,
+ "GL_TEXTURE_BINDING_BUFFER_EXT",
},
{
- 0x8C2B,
- "GL_MAX_TEXTURE_BUFFER_SIZE_EXT",
+ 0x8C2B,
+ "GL_MAX_TEXTURE_BUFFER_SIZE_EXT",
},
{
- 0x8C2A,
- "GL_TEXTURE_BUFFER_EXT",
+ 0x8C2A,
+ "GL_TEXTURE_BUFFER_EXT",
},
{
- 0x8BD7,
- "GL_TEXTURE_TYPE_QCOM",
+ 0x8BD7,
+ "GL_TEXTURE_TYPE_QCOM",
},
{
- 0x8B8D,
- "GL_CURRENT_PROGRAM",
+ 0x8B8D,
+ "GL_CURRENT_PROGRAM",
},
{
- 0x8BD9,
- "GL_TEXTURE_NUM_LEVELS_QCOM",
+ 0x8BD9,
+ "GL_TEXTURE_NUM_LEVELS_QCOM",
},
{
- 0x00200000,
- "GL_STENCIL_BUFFER_BIT5_QCOM",
+ 0x00200000,
+ "GL_STENCIL_BUFFER_BIT5_QCOM",
},
{
- 0x8D9F,
- "GL_INT_2_10_10_10_REV",
+ 0x8D9F,
+ "GL_INT_2_10_10_10_REV",
},
{
- 0x8B8A,
- "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH",
+ 0x8B8A,
+ "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH",
},
{
- 0x8B8B,
- "GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES",
+ 0x8B8B,
+ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES",
},
{
- 0x8B8C,
- "GL_SHADING_LANGUAGE_VERSION",
+ 0x8B8C,
+ "GL_SHADING_LANGUAGE_VERSION",
},
{
- 0x8BDA,
- "GL_TEXTURE_TARGET_QCOM",
+ 0x8BDA,
+ "GL_TEXTURE_TARGET_QCOM",
},
{
- 0x8BDB,
- "GL_TEXTURE_OBJECT_VALID_QCOM",
+ 0x8BDB,
+ "GL_TEXTURE_OBJECT_VALID_QCOM",
},
{
- 0x8BDC,
- "GL_STATE_RESTORE",
+ 0x8BDC,
+ "GL_STATE_RESTORE",
},
{
- 0x8B88,
- "GL_SHADER_SOURCE_LENGTH",
+ 0x8B88,
+ "GL_SHADER_SOURCE_LENGTH",
},
{
- 0x8B89,
- "GL_ACTIVE_ATTRIBUTES",
+ 0x8B89,
+ "GL_ACTIVE_ATTRIBUTES",
},
{
- 0x93C9,
- "GL_COMPRESSED_RGBA_ASTC_6x6x6_OES",
+ 0x93C9,
+ "GL_COMPRESSED_RGBA_ASTC_6x6x6_OES",
},
{
- 0x93C8,
- "GL_COMPRESSED_RGBA_ASTC_6x6x5_OES",
+ 0x93C8,
+ "GL_COMPRESSED_RGBA_ASTC_6x6x5_OES",
},
{
- 0x8B84,
- "GL_INFO_LOG_LENGTH",
+ 0x8B84,
+ "GL_INFO_LOG_LENGTH",
},
{
- 0x8B85,
- "GL_ATTACHED_SHADERS",
+ 0x8B85,
+ "GL_ATTACHED_SHADERS",
},
{
- 0x8B86,
- "GL_ACTIVE_UNIFORMS",
+ 0x8B86,
+ "GL_ACTIVE_UNIFORMS",
},
{
- 0x8B87,
- "GL_ACTIVE_UNIFORM_MAX_LENGTH",
+ 0x8B87,
+ "GL_ACTIVE_UNIFORM_MAX_LENGTH",
},
{
- 0x8B80,
- "GL_DELETE_STATUS",
+ 0x8B80,
+ "GL_DELETE_STATUS",
},
{
- 0x8B81,
- "GL_COMPILE_STATUS",
+ 0x8B81,
+ "GL_COMPILE_STATUS",
},
{
- 0x8B82,
- "GL_LINK_STATUS",
+ 0x8B82,
+ "GL_LINK_STATUS",
},
{
- 0x8B83,
- "GL_VALIDATE_STATUS",
+ 0x8B83,
+ "GL_VALIDATE_STATUS",
},
{
- 0x9380,
- "GL_NUM_SAMPLE_COUNTS",
+ 0x9380,
+ "GL_NUM_SAMPLE_COUNTS",
},
{
- 0x8D48,
- "GL_STENCIL_INDEX8",
+ 0x8D48,
+ "GL_STENCIL_INDEX8",
},
{
- 0x8D46,
- "GL_STENCIL_INDEX1_OES",
+ 0x8D46,
+ "GL_STENCIL_INDEX1_OES",
},
{
- 0x8D47,
- "GL_STENCIL_INDEX4_OES",
+ 0x8D47,
+ "GL_STENCIL_INDEX4_OES",
},
{
- 0x8D44,
- "GL_RENDERBUFFER_INTERNAL_FORMAT",
+ 0x8D44,
+ "GL_RENDERBUFFER_INTERNAL_FORMAT",
},
{
- 0x00000100,
- "GL_DEPTH_BUFFER_BIT",
+ 0x00000100,
+ "GL_DEPTH_BUFFER_BIT",
},
{
- 0x8D42,
- "GL_RENDERBUFFER_WIDTH",
+ 0x8D42,
+ "GL_RENDERBUFFER_WIDTH",
},
{
- 0x8D43,
- "GL_RENDERBUFFER_HEIGHT",
+ 0x8D43,
+ "GL_RENDERBUFFER_HEIGHT",
},
{
- 0x8D40,
- "GL_FRAMEBUFFER",
+ 0x8D40,
+ "GL_FRAMEBUFFER",
},
{
- 0x8D41,
- "GL_RENDERBUFFER",
+ 0x8D41,
+ "GL_RENDERBUFFER",
},
{
- 0x8A3A,
- "GL_UNIFORM_BLOCK_INDEX",
+ 0x8A3A,
+ "GL_UNIFORM_BLOCK_INDEX",
},
{
- 0x0BD0,
- "GL_DITHER",
+ 0x0BD0,
+ "GL_DITHER",
},
{
- 0x93D3,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR",
+ 0x93D3,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR",
},
{
- 0x9144,
- "GL_MAX_DEBUG_LOGGED_MESSAGES_KHR",
+ 0x9144,
+ "GL_MAX_DEBUG_LOGGED_MESSAGES_KHR",
},
{
- 0x1801,
- "GL_DEPTH_EXT",
+ 0x1801,
+ "GL_DEPTH_EXT",
},
{
- 0x1800,
- "GL_COLOR_EXT",
+ 0x1800,
+ "GL_COLOR_EXT",
},
{
- 0x1802,
- "GL_STENCIL_EXT",
+ 0x1802,
+ "GL_STENCIL_EXT",
},
{
- 0x9288,
- "GL_SRC_OVER_NV",
+ 0x9288,
+ "GL_SRC_OVER_NV",
},
{
- 0x9120,
- "GL_BUFFER_MAP_LENGTH",
+ 0x9120,
+ "GL_BUFFER_MAP_LENGTH",
},
{
- 0x0B21,
- "GL_LINE_WIDTH",
+ 0x0B21,
+ "GL_LINE_WIDTH",
},
{
- 0x9308,
- "GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT",
+ 0x9308,
+ "GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT",
},
{
- 0x81A5,
- "GL_DEPTH_COMPONENT16",
+ 0x81A5,
+ "GL_DEPTH_COMPONENT16",
},
{
- 0x81A6,
- "GL_DEPTH_COMPONENT24_OES",
+ 0x81A6,
+ "GL_DEPTH_COMPONENT24_OES",
},
{
- 0x81A7,
- "GL_DEPTH_COMPONENT32_OES",
+ 0x81A7,
+ "GL_DEPTH_COMPONENT32_OES",
},
{
- 0x88FD,
- "GL_VERTEX_ATTRIB_ARRAY_INTEGER",
+ 0x88FD,
+ "GL_VERTEX_ATTRIB_ARRAY_INTEGER",
},
{
- 0x88FE,
- "GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE",
+ 0x88FE,
+ "GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE",
},
{
- 0x88FF,
- "GL_MAX_ARRAY_TEXTURE_LAYERS",
+ 0x88FF,
+ "GL_MAX_ARRAY_TEXTURE_LAYERS",
},
{
- 0x8B6A,
- "GL_FLOAT_MAT4x3_NV",
+ 0x8B6A,
+ "GL_FLOAT_MAT4x3_NV",
},
{
- 0x93D0,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR",
+ 0x93D0,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR",
},
{
- 0x9143,
- "GL_MAX_DEBUG_MESSAGE_LENGTH_KHR",
+ 0x9143,
+ "GL_MAX_DEBUG_MESSAGE_LENGTH_KHR",
},
{
- 0x8DFD,
- "GL_MAX_FRAGMENT_UNIFORM_VECTORS",
+ 0x8DFD,
+ "GL_MAX_FRAGMENT_UNIFORM_VECTORS",
},
{
- 0x9145,
- "GL_DEBUG_LOGGED_MESSAGES_KHR",
+ 0x9145,
+ "GL_DEBUG_LOGGED_MESSAGES_KHR",
},
{
- 0x9146,
- "GL_DEBUG_SEVERITY_HIGH_KHR",
+ 0x9146,
+ "GL_DEBUG_SEVERITY_HIGH_KHR",
},
{
- 0x9147,
- "GL_DEBUG_SEVERITY_MEDIUM_KHR",
+ 0x9147,
+ "GL_DEBUG_SEVERITY_MEDIUM_KHR",
},
{
- 0x9148,
- "GL_DEBUG_SEVERITY_LOW_KHR",
+ 0x9148,
+ "GL_DEBUG_SEVERITY_LOW_KHR",
},
{
- 0x8F63,
- "GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT",
+ 0x8F63,
+ "GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT",
},
{
- 0x8F60,
- "GL_MALI_SHADER_BINARY_ARM",
+ 0x8F60,
+ "GL_MALI_SHADER_BINARY_ARM",
},
{
- 0x8F61,
- "GL_MALI_PROGRAM_BINARY_ARM",
+ 0x8F61,
+ "GL_MALI_PROGRAM_BINARY_ARM",
},
{
- 0x8F66,
- "GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM",
+ 0x8F66,
+ "GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM",
},
{
- 0x8F67,
- "GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT",
+ 0x8F67,
+ "GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT",
},
{
- 0x8F64,
- "GL_SHADER_PIXEL_LOCAL_STORAGE_EXT",
+ 0x8F64,
+ "GL_SHADER_PIXEL_LOCAL_STORAGE_EXT",
},
{
- 0x8F65,
- "GL_FETCH_PER_SAMPLE_ARM",
+ 0x8F65,
+ "GL_FETCH_PER_SAMPLE_ARM",
},
{
- 0x92D3,
- "GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT",
+ 0x92D3,
+ "GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT",
},
{
- 0x87EE,
- "GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD",
+ 0x87EE,
+ "GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD",
},
{
- 0x822B,
- "GL_RG8_EXT",
+ 0x822B,
+ "GL_RG8_EXT",
},
{
- 0x822F,
- "GL_RG16F_EXT",
+ 0x822F,
+ "GL_RG16F_EXT",
},
{
- 0x822D,
- "GL_R16F_EXT",
+ 0x822D,
+ "GL_R16F_EXT",
},
{
- 0x822E,
- "GL_R32F_EXT",
+ 0x822E,
+ "GL_R32F_EXT",
},
{
- 1,
- "GL_ES_VERSION_2_0",
+ 1,
+ "GL_ES_VERSION_2_0",
},
{
- 0x84F9,
- "GL_DEPTH_STENCIL_OES",
+ 0x84F9,
+ "GL_DEPTH_STENCIL_OES",
},
{
- 0x82DB,
- "GL_TEXTURE_VIEW_MIN_LEVEL_EXT",
+ 0x82DB,
+ "GL_TEXTURE_VIEW_MIN_LEVEL_EXT",
},
{
- 0x8368,
- "GL_UNSIGNED_INT_2_10_10_10_REV_EXT",
+ 0x8368,
+ "GL_UNSIGNED_INT_2_10_10_10_REV_EXT",
},
{
- 0x8819,
- "GL_LUMINANCE_ALPHA32F_EXT",
+ 0x8819,
+ "GL_LUMINANCE_ALPHA32F_EXT",
},
{
- 0x8818,
- "GL_LUMINANCE32F_EXT",
+ 0x8818,
+ "GL_LUMINANCE32F_EXT",
},
{
- 0x82DF,
- "GL_TEXTURE_IMMUTABLE_LEVELS",
+ 0x82DF,
+ "GL_TEXTURE_IMMUTABLE_LEVELS",
},
{
- 0x8363,
- "GL_UNSIGNED_SHORT_5_6_5",
+ 0x8363,
+ "GL_UNSIGNED_SHORT_5_6_5",
},
{
- 0x9051,
- "GL_IMAGE_BUFFER_EXT",
+ 0x9051,
+ "GL_IMAGE_BUFFER_EXT",
},
{
- 0x84F2,
- "GL_ALL_COMPLETED_NV",
+ 0x84F2,
+ "GL_ALL_COMPLETED_NV",
},
{
- 0x8E5A,
- "GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT",
+ 0x8E5A,
+ "GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT",
},
{
- 0x84F4,
- "GL_FENCE_CONDITION_NV",
+ 0x84F4,
+ "GL_FENCE_CONDITION_NV",
},
{
- 0x8366,
- "GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT",
+ 0x8366,
+ "GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT",
},
{
- 0x8365,
- "GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT",
+ 0x8365,
+ "GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT",
},
{
- 0x84F7,
- "GL_COMMANDS_COMPLETED_CHROMIUM",
+ 0x84F7,
+ "GL_COMMANDS_COMPLETED_CHROMIUM",
},
{
- 0x8F9C,
- "GL_SIGNED_NORMALIZED",
+ 0x8F9C,
+ "GL_SIGNED_NORMALIZED",
},
{
- 0x92D5,
- "GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT",
+ 0x92D5,
+ "GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT",
},
{
- 0x881E,
- "GL_LUMINANCE16F_EXT",
+ 0x881E,
+ "GL_LUMINANCE16F_EXT",
},
{
- 0x84FA,
- "GL_UNSIGNED_INT_24_8_OES",
+ 0x84FA,
+ "GL_UNSIGNED_INT_24_8_OES",
},
{
- 0x92D4,
- "GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT",
+ 0x92D4,
+ "GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT",
},
{
- 0x881A,
- "GL_RGBA16F_EXT",
+ 0x881A,
+ "GL_RGBA16F_EXT",
},
{
- 0x84FE,
- "GL_TEXTURE_MAX_ANISOTROPY_EXT",
+ 0x84FE,
+ "GL_TEXTURE_MAX_ANISOTROPY_EXT",
},
{
- 0x0901,
- "GL_CCW",
+ 0x0901,
+ "GL_CCW",
},
{
- 0x0900,
- "GL_CW",
+ 0x0900,
+ "GL_CW",
},
{
- 0x9317,
- "GL_MAX_FRAMEBUFFER_LAYERS_EXT",
+ 0x9317,
+ "GL_MAX_FRAMEBUFFER_LAYERS_EXT",
},
{
- 0x8229,
- "GL_R8_EXT",
+ 0x8229,
+ "GL_R8_EXT",
},
{
- 0x8230,
- "GL_RG32F_EXT",
+ 0x8230,
+ "GL_RG32F_EXT",
},
{
- 0x9312,
- "GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT",
+ 0x9312,
+ "GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT",
},
{
- 0x9283,
- "GL_DISJOINT_NV",
+ 0x9283,
+ "GL_DISJOINT_NV",
},
{
- 0x8221,
- "GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED",
+ 0x8221,
+ "GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED",
},
{
- 0x8227,
- "GL_RG_EXT",
+ 0x8227,
+ "GL_RG_EXT",
},
{
- 0x8B66,
- "GL_FLOAT_MAT2x4_NV",
+ 0x8B66,
+ "GL_FLOAT_MAT2x4_NV",
},
{
- 0x8B67,
- "GL_FLOAT_MAT3x2_NV",
+ 0x8B67,
+ "GL_FLOAT_MAT3x2_NV",
},
{
- 0x8E1E,
- "GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT",
+ 0x8E1E,
+ "GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT",
},
{
- 0x8B62,
- "GL_SAMPLER_2D_SHADOW_EXT",
+ 0x8B62,
+ "GL_SAMPLER_2D_SHADOW_EXT",
},
{
- 0x8B63,
- "GL_SAMPLER_2D_RECT_ARB",
+ 0x8B63,
+ "GL_SAMPLER_2D_RECT_ARB",
},
{
- 0x8B60,
- "GL_SAMPLER_CUBE",
+ 0x8B60,
+ "GL_SAMPLER_CUBE",
},
{
- 0x00001000,
- "GL_DEPTH_BUFFER_BIT4_QCOM",
+ 0x00001000,
+ "GL_DEPTH_BUFFER_BIT4_QCOM",
},
{
- 0x8B68,
- "GL_FLOAT_MAT3x4_NV",
+ 0x8B68,
+ "GL_FLOAT_MAT3x4_NV",
},
{
- 0x83F0,
- "GL_COMPRESSED_RGB_S3TC_DXT1_EXT",
+ 0x83F0,
+ "GL_COMPRESSED_RGB_S3TC_DXT1_EXT",
},
{
- 0x8D6A,
- "GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT",
+ 0x8D6A,
+ "GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT",
},
{
- 0x00000080,
- "GL_COLOR_BUFFER_BIT7_QCOM",
+ 0x00000080,
+ "GL_COLOR_BUFFER_BIT7_QCOM",
},
{
- 0x88F0,
- "GL_DEPTH24_STENCIL8_OES",
+ 0x88F0,
+ "GL_DEPTH24_STENCIL8_OES",
},
{
- 0x8E1F,
- "GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT",
+ 0x8E1F,
+ "GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT",
},
{
- 0x80A0,
- "GL_SAMPLE_COVERAGE",
+ 0x80A0,
+ "GL_SAMPLE_COVERAGE",
},
{
- 0x928F,
- "GL_DST_ATOP_NV",
+ 0x928F,
+ "GL_DST_ATOP_NV",
},
{
- 0x8213,
- "GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE",
+ 0x8213,
+ "GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE",
},
{
- 0x80A9,
- "GL_SAMPLES",
+ 0x80A9,
+ "GL_SAMPLES",
},
{
- 0x80A8,
- "GL_SAMPLE_BUFFERS",
+ 0x80A8,
+ "GL_SAMPLE_BUFFERS",
},
{
- 0x0D55,
- "GL_ALPHA_BITS",
+ 0x0D55,
+ "GL_ALPHA_BITS",
},
{
- 0x0D54,
- "GL_BLUE_BITS",
+ 0x0D54,
+ "GL_BLUE_BITS",
},
{
- 0x0D57,
- "GL_STENCIL_BITS",
+ 0x0D57,
+ "GL_STENCIL_BITS",
},
{
- 0x0D56,
- "GL_DEPTH_BITS",
+ 0x0D56,
+ "GL_DEPTH_BITS",
},
{
- 0x8CD5,
- "GL_FRAMEBUFFER_COMPLETE",
+ 0x8CD5,
+ "GL_FRAMEBUFFER_COMPLETE",
},
{
- 0x0D50,
- "GL_SUBPIXEL_BITS",
+ 0x0D50,
+ "GL_SUBPIXEL_BITS",
},
{
- 0x0D53,
- "GL_GREEN_BITS",
+ 0x0D53,
+ "GL_GREEN_BITS",
},
{
- 0x0D52,
- "GL_RED_BITS",
+ 0x0D52,
+ "GL_RED_BITS",
},
{
- 0x8037,
- "GL_POLYGON_OFFSET_FILL",
+ 0x8037,
+ "GL_POLYGON_OFFSET_FILL",
},
{
- 0x928C,
- "GL_SRC_OUT_NV",
+ 0x928C,
+ "GL_SRC_OUT_NV",
},
{
- 0x8034,
- "GL_UNSIGNED_SHORT_5_5_5_1",
+ 0x8034,
+ "GL_UNSIGNED_SHORT_5_5_5_1",
},
{
- 0x8033,
- "GL_UNSIGNED_SHORT_4_4_4_4",
+ 0x8033,
+ "GL_UNSIGNED_SHORT_4_4_4_4",
},
{
- 0x928B,
- "GL_DST_IN_NV",
+ 0x928B,
+ "GL_DST_IN_NV",
},
{
- 0x0305,
- "GL_ONE_MINUS_DST_ALPHA",
+ 0x0305,
+ "GL_ONE_MINUS_DST_ALPHA",
},
{
- 0x0304,
- "GL_DST_ALPHA",
+ 0x0304,
+ "GL_DST_ALPHA",
},
{
- 0x0307,
- "GL_ONE_MINUS_DST_COLOR",
+ 0x0307,
+ "GL_ONE_MINUS_DST_COLOR",
},
{
- 0x0306,
- "GL_DST_COLOR",
+ 0x0306,
+ "GL_DST_COLOR",
},
{
- 0x0301,
- "GL_ONE_MINUS_SRC_COLOR",
+ 0x0301,
+ "GL_ONE_MINUS_SRC_COLOR",
},
{
- 0x0300,
- "GL_SRC_COLOR",
+ 0x0300,
+ "GL_SRC_COLOR",
},
{
- 0x0303,
- "GL_ONE_MINUS_SRC_ALPHA",
+ 0x0303,
+ "GL_ONE_MINUS_SRC_ALPHA",
},
{
- 0x0302,
- "GL_SRC_ALPHA",
+ 0x0302,
+ "GL_SRC_ALPHA",
},
{
- 0x8212,
- "GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE",
+ 0x8212,
+ "GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE",
},
{
- 0x0308,
- "GL_SRC_ALPHA_SATURATE",
+ 0x0308,
+ "GL_SRC_ALPHA_SATURATE",
},
{
- 0x2A00,
- "GL_POLYGON_OFFSET_UNITS",
+ 0x2A00,
+ "GL_POLYGON_OFFSET_UNITS",
},
{
- 0xFFFFFFFF,
- "GL_ALL_SHADER_BITS_EXT",
+ 0xFFFFFFFF,
+ "GL_ALL_SHADER_BITS_EXT",
},
{
- 0x82DC,
- "GL_TEXTURE_VIEW_NUM_LEVELS_EXT",
+ 0x82DC,
+ "GL_TEXTURE_VIEW_NUM_LEVELS_EXT",
},
{
- 0x8C29,
- "GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT",
+ 0x8C29,
+ "GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT",
},
{
- 0x82DD,
- "GL_TEXTURE_VIEW_MIN_LAYER_EXT",
+ 0x82DD,
+ "GL_TEXTURE_VIEW_MIN_LAYER_EXT",
},
{
- 0x00800000,
- "GL_STENCIL_BUFFER_BIT7_QCOM",
+ 0x00800000,
+ "GL_STENCIL_BUFFER_BIT7_QCOM",
},
{
- 0x82DE,
- "GL_TEXTURE_VIEW_NUM_LAYERS_EXT",
+ 0x82DE,
+ "GL_TEXTURE_VIEW_NUM_LAYERS_EXT",
},
{
- 0x00020000,
- "GL_STENCIL_BUFFER_BIT1_QCOM",
+ 0x00020000,
+ "GL_STENCIL_BUFFER_BIT1_QCOM",
},
{
- 0x8D00,
- "GL_DEPTH_ATTACHMENT",
+ 0x8D00,
+ "GL_DEPTH_ATTACHMENT",
},
{
- 0x8FA0,
- "GL_PERFMON_GLOBAL_MODE_QCOM",
+ 0x8FA0,
+ "GL_PERFMON_GLOBAL_MODE_QCOM",
},
{
- 0x8815,
- "GL_RGB32F_EXT",
+ 0x8815,
+ "GL_RGB32F_EXT",
},
{
- 0x8A35,
- "GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH",
+ 0x8A35,
+ "GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH",
},
{
- 0x8814,
- "GL_RGBA32F_EXT",
+ 0x8814,
+ "GL_RGBA32F_EXT",
},
{
- 0x9277,
- "GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",
+ 0x9277,
+ "GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",
},
{
- 0x6004,
- "GL_COMMANDS_ISSUED_CHROMIUM",
+ 0x6004,
+ "GL_COMMANDS_ISSUED_CHROMIUM",
},
{
- 0x813D,
- "GL_TEXTURE_MAX_LEVEL_APPLE",
+ 0x813D,
+ "GL_TEXTURE_MAX_LEVEL_APPLE",
},
{
- 0x8816,
- "GL_ALPHA32F_EXT",
+ 0x8816,
+ "GL_ALPHA32F_EXT",
},
{
- 0x813B,
- "GL_TEXTURE_MAX_LOD",
+ 0x813B,
+ "GL_TEXTURE_MAX_LOD",
},
{
- 0x8CDD,
- "GL_FRAMEBUFFER_UNSUPPORTED",
+ 0x8CDD,
+ "GL_FRAMEBUFFER_UNSUPPORTED",
},
{
- 0x8CDF,
- "GL_MAX_COLOR_ATTACHMENTS_EXT",
+ 0x8CDF,
+ "GL_MAX_COLOR_ATTACHMENTS_EXT",
},
{
- 0x90F3,
- "GL_CONTEXT_ROBUST_ACCESS_KHR",
+ 0x90F3,
+ "GL_CONTEXT_ROBUST_ACCESS_KHR",
},
{
- 0x90F2,
- "GL_MAX_MULTIVIEW_BUFFERS_EXT",
+ 0x90F2,
+ "GL_MAX_MULTIVIEW_BUFFERS_EXT",
},
{
- 0x90F1,
- "GL_MULTIVIEW_EXT",
+ 0x90F1,
+ "GL_MULTIVIEW_EXT",
},
{
- 0x90F0,
- "GL_COLOR_ATTACHMENT_EXT",
+ 0x90F0,
+ "GL_COLOR_ATTACHMENT_EXT",
},
{
- 0x803C,
- "GL_ALPHA8_OES",
+ 0x803C,
+ "GL_ALPHA8_OES",
},
{
- 0x8904,
- "GL_MIN_PROGRAM_TEXEL_OFFSET",
+ 0x8904,
+ "GL_MIN_PROGRAM_TEXEL_OFFSET",
},
{
- 0x84F5,
- "GL_TEXTURE_RECTANGLE_ARB",
+ 0x84F5,
+ "GL_TEXTURE_RECTANGLE_ARB",
},
{
- 0x882A,
- "GL_DRAW_BUFFER5_EXT",
+ 0x882A,
+ "GL_DRAW_BUFFER5_EXT",
},
{
- 0x8E7F,
- "GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT",
+ 0x8E7F,
+ "GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT",
},
{
- 0x80AA,
- "GL_SAMPLE_COVERAGE_VALUE",
+ 0x80AA,
+ "GL_SAMPLE_COVERAGE_VALUE",
},
{
- 0x84F6,
- "GL_TEXTURE_BINDING_RECTANGLE_ARB",
+ 0x84F6,
+ "GL_TEXTURE_BINDING_RECTANGLE_ARB",
},
{
- 0x80AB,
- "GL_SAMPLE_COVERAGE_INVERT",
+ 0x80AB,
+ "GL_SAMPLE_COVERAGE_INVERT",
},
{
- 0x8E7D,
- "GL_MAX_PATCH_VERTICES_EXT",
+ 0x8E7D,
+ "GL_MAX_PATCH_VERTICES_EXT",
},
{
- 0x6005,
- "GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM",
+ 0x6005,
+ "GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM",
},
{
- 0x9105,
- "GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES",
+ 0x9105,
+ "GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES",
},
{
- 0x8E7E,
- "GL_MAX_TESS_GEN_LEVEL_EXT",
+ 0x8E7E,
+ "GL_MAX_TESS_GEN_LEVEL_EXT",
},
{
- 0x9102,
- "GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES",
+ 0x9102,
+ "GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES",
},
{
- 0x8C40,
- "GL_SRGB_EXT",
+ 0x8C40,
+ "GL_SRGB_EXT",
},
{
- 0x8236,
- "GL_R32UI",
+ 0x8236,
+ "GL_R32UI",
},
{
- 0x8E7B,
- "GL_FRACTIONAL_ODD_EXT",
+ 0x8E7B,
+ "GL_FRACTIONAL_ODD_EXT",
},
{
- 0x00000040,
- "GL_COLOR_BUFFER_BIT6_QCOM",
+ 0x00000040,
+ "GL_COLOR_BUFFER_BIT6_QCOM",
},
{
- 0x882B,
- "GL_DRAW_BUFFER6_EXT",
+ 0x882B,
+ "GL_DRAW_BUFFER6_EXT",
},
{
- 0x8E7C,
- "GL_FRACTIONAL_EVEN_EXT",
+ 0x8E7C,
+ "GL_FRACTIONAL_EVEN_EXT",
},
{
- 0x8C8E,
- "GL_TRANSFORM_FEEDBACK_BUFFER",
+ 0x8C8E,
+ "GL_TRANSFORM_FEEDBACK_BUFFER",
},
{
- 0x8C8D,
- "GL_SEPARATE_ATTRIBS",
+ 0x8C8D,
+ "GL_SEPARATE_ATTRIBS",
},
{
- 0x8C8F,
- "GL_TRANSFORM_FEEDBACK_BUFFER_BINDING",
+ 0x8C8F,
+ "GL_TRANSFORM_FEEDBACK_BUFFER_BINDING",
},
{
- 0x8C8A,
- "GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS",
+ 0x8C8A,
+ "GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS",
},
{
- 0x8C8C,
- "GL_INTERLEAVED_ATTRIBS",
+ 0x8C8C,
+ "GL_INTERLEAVED_ATTRIBS",
},
{
- 0x8C8B,
- "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS",
+ 0x8C8B,
+ "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS",
},
{
- 0x8C17,
- "GL_UNSIGNED_NORMALIZED_EXT",
+ 0x8C17,
+ "GL_UNSIGNED_NORMALIZED_EXT",
},
{
- 0x8A3E,
- "GL_UNIFORM_IS_ROW_MAJOR",
+ 0x8A3E,
+ "GL_UNIFORM_IS_ROW_MAJOR",
},
{
- 0x8E7A,
- "GL_ISOLINES_EXT",
+ 0x8E7A,
+ "GL_ISOLINES_EXT",
},
{
- 0x6006,
- "GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM",
+ 0x6006,
+ "GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM",
},
{
- 0x8D99,
- "GL_RGBA_INTEGER",
+ 0x8D99,
+ "GL_RGBA_INTEGER",
},
{
- 0x8D98,
- "GL_RGB_INTEGER",
+ 0x8D98,
+ "GL_RGB_INTEGER",
},
{
- 0x8A4A,
- "GL_SKIP_DECODE_EXT",
+ 0x8A4A,
+ "GL_SKIP_DECODE_EXT",
},
{
- 0x8A4F,
- "GL_PROGRAM_PIPELINE_OBJECT_EXT",
+ 0x8A4F,
+ "GL_PROGRAM_PIPELINE_OBJECT_EXT",
},
{
- 0x882C,
- "GL_DRAW_BUFFER7_EXT",
+ 0x882C,
+ "GL_DRAW_BUFFER7_EXT",
},
{
- 0x0010,
- "GL_MAP_FLUSH_EXPLICIT_BIT_EXT",
+ 0x0010,
+ "GL_MAP_FLUSH_EXPLICIT_BIT_EXT",
},
{
- 0x8918,
- "GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT",
+ 0x8918,
+ "GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT",
},
{
- 0x8919,
- "GL_SAMPLER_BINDING",
+ 0x8919,
+ "GL_SAMPLER_BINDING",
},
{
- 0x92CD,
- "GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT",
+ 0x92CD,
+ "GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT",
},
{
- 0x92CE,
- "GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT",
+ 0x92CE,
+ "GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT",
},
{
- 0x8C85,
- "GL_TRANSFORM_FEEDBACK_BUFFER_SIZE",
+ 0x8C85,
+ "GL_TRANSFORM_FEEDBACK_BUFFER_SIZE",
},
{
- 0x8D7C,
- "GL_RGBA8UI",
+ 0x8D7C,
+ "GL_RGBA8UI",
},
{
- 0x6007,
- "GL_LATENCY_QUERY_CHROMIUM",
+ 0x6007,
+ "GL_LATENCY_QUERY_CHROMIUM",
},
{
- 0x8D83,
- "GL_RGB32I",
+ 0x8D83,
+ "GL_RGB32I",
},
{
- 0x8916,
- "GL_GEOMETRY_LINKED_VERTICES_OUT_EXT",
+ 0x8916,
+ "GL_GEOMETRY_LINKED_VERTICES_OUT_EXT",
},
{
- 0x8917,
- "GL_GEOMETRY_LINKED_INPUT_TYPE_EXT",
+ 0x8917,
+ "GL_GEOMETRY_LINKED_INPUT_TYPE_EXT",
},
{
- 0x881F,
- "GL_LUMINANCE_ALPHA16F_EXT",
+ 0x881F,
+ "GL_LUMINANCE_ALPHA16F_EXT",
},
{
- 0x84FD,
- "GL_MAX_TEXTURE_LOD_BIAS",
+ 0x84FD,
+ "GL_MAX_TEXTURE_LOD_BIAS",
},
{
- 0x882D,
- "GL_DRAW_BUFFER8_EXT",
+ 0x882D,
+ "GL_DRAW_BUFFER8_EXT",
},
{
- 0x0BA6,
- "GL_PATH_MODELVIEW_MATRIX_CHROMIUM",
+ 0x0BA6,
+ "GL_PATH_MODELVIEW_MATRIX_CHROMIUM",
},
{
- 0x8A42,
- "GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS",
+ 0x8A42,
+ "GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS",
},
{
- 0x8F37,
- "GL_COPY_WRITE_BUFFER_NV",
+ 0x8F37,
+ "GL_COPY_WRITE_BUFFER_NV",
},
{
- 0x8F36,
- "GL_COPY_READ_BUFFER_NV",
+ 0x8F36,
+ "GL_COPY_READ_BUFFER_NV",
},
{
- 0x84FF,
- "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT",
+ 0x84FF,
+ "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT",
},
{
- 0x8A3C,
- "GL_UNIFORM_ARRAY_STRIDE",
+ 0x8A3C,
+ "GL_UNIFORM_ARRAY_STRIDE",
},
{
- 0x8A44,
- "GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER",
+ 0x8A44,
+ "GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER",
},
{
- 0x6000,
- "GL_TEXTURE_POOL_CHROMIUM",
+ 0x6000,
+ "GL_TEXTURE_POOL_CHROMIUM",
},
{
- 0x0B74,
- "GL_DEPTH_FUNC",
+ 0x0B74,
+ "GL_DEPTH_FUNC",
},
{
- 0x8A49,
- "GL_DECODE_EXT",
+ 0x8A49,
+ "GL_DECODE_EXT",
},
{
- 0x881B,
- "GL_RGB16F_EXT",
+ 0x881B,
+ "GL_RGB16F_EXT",
},
{
- 0x0B71,
- "GL_DEPTH_TEST",
+ 0x0B71,
+ "GL_DEPTH_TEST",
},
{
- 0x0B70,
- "GL_DEPTH_RANGE",
+ 0x0B70,
+ "GL_DEPTH_RANGE",
},
{
- 0x0B73,
- "GL_DEPTH_CLEAR_VALUE",
+ 0x0B73,
+ "GL_DEPTH_CLEAR_VALUE",
},
{
- 0x0B72,
- "GL_DEPTH_WRITEMASK",
+ 0x0B72,
+ "GL_DEPTH_WRITEMASK",
},
{
- 0x8BD5,
- "GL_TEXTURE_INTERNAL_FORMAT_QCOM",
+ 0x8BD5,
+ "GL_TEXTURE_INTERNAL_FORMAT_QCOM",
},
{
- 0x85BA,
- "GL_UNSIGNED_SHORT_8_8_APPLE",
+ 0x85BA,
+ "GL_UNSIGNED_SHORT_8_8_APPLE",
},
{
- 0x8C87,
- "GL_PRIMITIVES_GENERATED_EXT",
+ 0x8C87,
+ "GL_PRIMITIVES_GENERATED_EXT",
},
{
- 0x8C80,
- "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS",
+ 0x8C80,
+ "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS",
},
{
- 0x8C83,
- "GL_TRANSFORM_FEEDBACK_VARYINGS",
+ 0x8C83,
+ "GL_TRANSFORM_FEEDBACK_VARYINGS",
},
{
- 0x8D69,
- "GL_PRIMITIVE_RESTART_FIXED_INDEX",
+ 0x8D69,
+ "GL_PRIMITIVE_RESTART_FIXED_INDEX",
},
{
- 0x882E,
- "GL_DRAW_BUFFER9_EXT",
+ 0x882E,
+ "GL_DRAW_BUFFER9_EXT",
},
{
- 0x8A32,
- "GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT",
+ 0x8A32,
+ "GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT",
},
{
- 0x8A31,
- "GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS",
+ 0x8A31,
+ "GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS",
},
{
- 0x8C89,
- "GL_RASTERIZER_DISCARD",
+ 0x8C89,
+ "GL_RASTERIZER_DISCARD",
},
{
- 0x8C88,
- "GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN",
+ 0x8C88,
+ "GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN",
},
{
- 0x8C1A,
- "GL_TEXTURE_2D_ARRAY",
+ 0x8C1A,
+ "GL_TEXTURE_2D_ARRAY",
},
{
- 0x910D,
- "GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES",
+ 0x910D,
+ "GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES",
},
{
- 0x8E80,
- "GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT",
+ 0x8E80,
+ "GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT",
},
{
- 0x910B,
- "GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES",
+ 0x910B,
+ "GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES",
},
{
- 0x910C,
- "GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES",
+ 0x910C,
+ "GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES",
},
{
- 0x94FA,
- "GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL",
+ 0x94FA,
+ "GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL",
},
{
- 0x8073,
- "GL_MAX_3D_TEXTURE_SIZE_OES",
+ 0x8073,
+ "GL_MAX_3D_TEXTURE_SIZE_OES",
},
{
- 0x8072,
- "GL_TEXTURE_WRAP_R_OES",
+ 0x8072,
+ "GL_TEXTURE_WRAP_R_OES",
},
{
- 0x9289,
- "GL_DST_OVER_NV",
+ 0x9289,
+ "GL_DST_OVER_NV",
},
{
- 0x882F,
- "GL_DRAW_BUFFER10_EXT",
+ 0x882F,
+ "GL_DRAW_BUFFER10_EXT",
},
{
- 0x8074,
- "GL_VERTEX_ARRAY_KHR",
+ 0x8074,
+ "GL_VERTEX_ARRAY_KHR",
},
{
- 0x80E1,
- "GL_BGRA_EXT",
+ 0x80E1,
+ "GL_BGRA_EXT",
},
{
- 0x8ED7,
- "GL_COVERAGE_AUTOMATIC_NV",
+ 0x8ED7,
+ "GL_COVERAGE_AUTOMATIC_NV",
},
{
- 0x8ED6,
- "GL_COVERAGE_EDGE_FRAGMENTS_NV",
+ 0x8ED6,
+ "GL_COVERAGE_EDGE_FRAGMENTS_NV",
},
{
- 0x8ED5,
- "GL_COVERAGE_ALL_FRAGMENTS_NV",
+ 0x8ED5,
+ "GL_COVERAGE_ALL_FRAGMENTS_NV",
},
{
- 0x8ED4,
- "GL_COVERAGE_SAMPLES_NV",
+ 0x8ED4,
+ "GL_COVERAGE_SAMPLES_NV",
},
{
- 0x8ED3,
- "GL_COVERAGE_BUFFERS_NV",
+ 0x8ED3,
+ "GL_COVERAGE_BUFFERS_NV",
},
{
- 0x8ED2,
- "GL_COVERAGE_ATTACHMENT_NV",
+ 0x8ED2,
+ "GL_COVERAGE_ATTACHMENT_NV",
},
{
- 0x8ED1,
- "GL_COVERAGE_COMPONENT4_NV",
+ 0x8ED1,
+ "GL_COVERAGE_COMPONENT4_NV",
},
{
- 0x8ED0,
- "GL_COVERAGE_COMPONENT_NV",
+ 0x8ED0,
+ "GL_COVERAGE_COMPONENT_NV",
},
{
- 0x8217,
- "GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE",
+ 0x8217,
+ "GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE",
},
{
- 0x8E89,
- "GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT",
+ 0x8E89,
+ "GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT",
},
{
- 0x8216,
- "GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE",
+ 0x8216,
+ "GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE",
},
{
- 0x8A36,
- "GL_ACTIVE_UNIFORM_BLOCKS",
+ 0x8A36,
+ "GL_ACTIVE_UNIFORM_BLOCKS",
},
{
- 0x8A37,
- "GL_UNIFORM_TYPE",
+ 0x8A37,
+ "GL_UNIFORM_TYPE",
},
{
- 0x8A34,
- "GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT",
+ 0x8A34,
+ "GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT",
},
{
- 0x3006,
- "GL_CLIP_DISTANCE6_APPLE",
+ 0x3006,
+ "GL_CLIP_DISTANCE6_APPLE",
},
{
- 0x800B,
- "GL_FUNC_REVERSE_SUBTRACT",
+ 0x800B,
+ "GL_FUNC_REVERSE_SUBTRACT",
},
{
- 0x8A33,
- "GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS",
+ 0x8A33,
+ "GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS",
},
{
- 0x00000400,
- "GL_STENCIL_BUFFER_BIT",
+ 0x00000400,
+ "GL_STENCIL_BUFFER_BIT",
},
{
- 0x800A,
- "GL_FUNC_SUBTRACT",
+ 0x800A,
+ "GL_FUNC_SUBTRACT",
},
{
- 0x8214,
- "GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE",
+ 0x8214,
+ "GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE",
},
{
- 0x8A38,
- "GL_UNIFORM_SIZE",
+ 0x8A38,
+ "GL_UNIFORM_SIZE",
},
{
- 0x8A39,
- "GL_UNIFORM_NAME_LENGTH",
+ 0x8A39,
+ "GL_UNIFORM_NAME_LENGTH",
},
{
- 0x8E2C,
- "GL_DEPTH_COMPONENT16_NONLINEAR_NV",
+ 0x8E2C,
+ "GL_DEPTH_COMPONENT16_NONLINEAR_NV",
},
{
- 0x889F,
- "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",
+ 0x889F,
+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",
},
{
- 0x8219,
- "GL_FRAMEBUFFER_UNDEFINED_OES",
+ 0x8219,
+ "GL_FRAMEBUFFER_UNDEFINED_OES",
},
{
- 0x8E23,
- "GL_TRANSFORM_FEEDBACK_PAUSED",
+ 0x8E23,
+ "GL_TRANSFORM_FEEDBACK_PAUSED",
},
{
- 0x8E22,
- "GL_TRANSFORM_FEEDBACK",
+ 0x8E22,
+ "GL_TRANSFORM_FEEDBACK",
},
{
- 0x8E25,
- "GL_TRANSFORM_FEEDBACK_BINDING",
+ 0x8E25,
+ "GL_TRANSFORM_FEEDBACK_BINDING",
},
{
- 0x9054,
- "GL_IMAGE_CUBE_MAP_ARRAY_EXT",
+ 0x9054,
+ "GL_IMAGE_CUBE_MAP_ARRAY_EXT",
},
{
- 0x8E28,
- "GL_TIMESTAMP_EXT",
+ 0x8E28,
+ "GL_TIMESTAMP_EXT",
},
{
- 0x8006,
- "GL_FUNC_ADD",
+ 0x8006,
+ "GL_FUNC_ADD",
},
{
- 0x8007,
- "GL_MIN_EXT",
+ 0x8007,
+ "GL_MIN_EXT",
},
{
- 0x8004,
- "GL_ONE_MINUS_CONSTANT_ALPHA",
+ 0x8004,
+ "GL_ONE_MINUS_CONSTANT_ALPHA",
},
{
- 0x8005,
- "GL_BLEND_COLOR",
+ 0x8005,
+ "GL_BLEND_COLOR",
},
{
- 0x8002,
- "GL_ONE_MINUS_CONSTANT_COLOR",
+ 0x8002,
+ "GL_ONE_MINUS_CONSTANT_COLOR",
},
{
- 0x8003,
- "GL_CONSTANT_ALPHA",
+ 0x8003,
+ "GL_CONSTANT_ALPHA",
},
{
- 0x8001,
- "GL_CONSTANT_COLOR",
+ 0x8001,
+ "GL_CONSTANT_COLOR",
},
{
- 0x0204,
- "GL_GREATER",
+ 0x0204,
+ "GL_GREATER",
},
{
- 0x0205,
- "GL_NOTEQUAL",
+ 0x0205,
+ "GL_NOTEQUAL",
},
{
- 0x0206,
- "GL_GEQUAL",
+ 0x0206,
+ "GL_GEQUAL",
},
{
- 0x0207,
- "GL_ALWAYS",
+ 0x0207,
+ "GL_ALWAYS",
},
{
- 0x0200,
- "GL_NEVER",
+ 0x0200,
+ "GL_NEVER",
},
{
- 0x0201,
- "GL_LESS",
+ 0x0201,
+ "GL_LESS",
},
{
- 0x0202,
- "GL_EQUAL",
+ 0x0202,
+ "GL_EQUAL",
},
{
- 0x0203,
- "GL_LEQUAL",
+ 0x0203,
+ "GL_LEQUAL",
},
{
- 0x8BD6,
- "GL_TEXTURE_FORMAT_QCOM",
+ 0x8BD6,
+ "GL_TEXTURE_FORMAT_QCOM",
},
{
- 0x8228,
- "GL_RG_INTEGER",
+ 0x8228,
+ "GL_RG_INTEGER",
},
{
- 0x2901,
- "GL_REPEAT",
+ 0x2901,
+ "GL_REPEAT",
},
{
- 0x9067,
- "GL_UNSIGNED_INT_IMAGE_BUFFER_EXT",
+ 0x9067,
+ "GL_UNSIGNED_INT_IMAGE_BUFFER_EXT",
},
{
- 0x92A0,
- "GL_EXCLUSION_KHR",
+ 0x92A0,
+ "GL_EXCLUSION_KHR",
},
{
- 0x93D8,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR",
+ 0x93D8,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR",
},
{
- 0x93D9,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR",
+ 0x93D9,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR",
},
{
- 0x8FB2,
- "GL_GPU_OPTIMIZED_QCOM",
+ 0x8FB2,
+ "GL_GPU_OPTIMIZED_QCOM",
},
{
- 0x190A,
- "GL_LUMINANCE_ALPHA",
+ 0x190A,
+ "GL_LUMINANCE_ALPHA",
},
{
- 0x8FB0,
- "GL_BINNING_CONTROL_HINT_QCOM",
+ 0x8FB0,
+ "GL_BINNING_CONTROL_HINT_QCOM",
},
{
- 0x905C,
- "GL_INT_IMAGE_BUFFER_EXT",
+ 0x905C,
+ "GL_INT_IMAGE_BUFFER_EXT",
},
{
- 0x1E00,
- "GL_KEEP",
+ 0x1E00,
+ "GL_KEEP",
},
{
- 0x1E01,
- "GL_REPLACE",
+ 0x1E01,
+ "GL_REPLACE",
},
{
- 0x1E02,
- "GL_INCR",
+ 0x1E02,
+ "GL_INCR",
},
{
- 0x1E03,
- "GL_DECR",
+ 0x1E03,
+ "GL_DECR",
},
{
- 0x93D6,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR",
+ 0x93D6,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR",
},
{
- 0x93D7,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR",
+ 0x93D7,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR",
},
{
- 0x93D4,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR",
+ 0x93D4,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR",
},
{
- 0x93D5,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR",
+ 0x93D5,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR",
},
{
- 0x886D,
- "GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT",
+ 0x886D,
+ "GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT",
},
{
- 0x0BE2,
- "GL_BLEND",
+ 0x0BE2,
+ "GL_BLEND",
},
{
- 0x84CB,
- "GL_TEXTURE11",
+ 0x84CB,
+ "GL_TEXTURE11",
},
{
- 0x8D55,
- "GL_RENDERBUFFER_STENCIL_SIZE",
+ 0x8D55,
+ "GL_RENDERBUFFER_STENCIL_SIZE",
},
{
- 0x8D54,
- "GL_RENDERBUFFER_DEPTH_SIZE",
+ 0x8D54,
+ "GL_RENDERBUFFER_DEPTH_SIZE",
},
{
- 0x8D57,
- "GL_MAX_SAMPLES_ANGLE",
+ 0x8D57,
+ "GL_MAX_SAMPLES_ANGLE",
},
{
- 0x8D56,
- "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE",
+ 0x8D56,
+ "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE",
},
{
- 0x8D51,
- "GL_RENDERBUFFER_GREEN_SIZE",
+ 0x8D51,
+ "GL_RENDERBUFFER_GREEN_SIZE",
},
{
- 0x8D50,
- "GL_RENDERBUFFER_RED_SIZE",
+ 0x8D50,
+ "GL_RENDERBUFFER_RED_SIZE",
},
{
- 0x8D53,
- "GL_RENDERBUFFER_ALPHA_SIZE",
+ 0x8D53,
+ "GL_RENDERBUFFER_ALPHA_SIZE",
},
{
- 0x8D52,
- "GL_RENDERBUFFER_BLUE_SIZE",
+ 0x8D52,
+ "GL_RENDERBUFFER_BLUE_SIZE",
},
{
- 0x92A6,
- "GL_VIVIDLIGHT_NV",
+ 0x92A6,
+ "GL_VIVIDLIGHT_NV",
},
{
- 0x8A2A,
- "GL_UNIFORM_BUFFER_SIZE",
+ 0x8A2A,
+ "GL_UNIFORM_BUFFER_SIZE",
},
{
- 0x8DCC,
- "GL_INT_SAMPLER_CUBE",
+ 0x8DCC,
+ "GL_INT_SAMPLER_CUBE",
},
{
- 0x78F1,
- "GL_MAP_CHROMIUM",
+ 0x78F1,
+ "GL_MAP_CHROMIUM",
},
{
- 0x00080000,
- "GL_STENCIL_BUFFER_BIT3_QCOM",
+ 0x00080000,
+ "GL_STENCIL_BUFFER_BIT3_QCOM",
},
{
- 0x92A7,
- "GL_LINEARLIGHT_NV",
+ 0x92A7,
+ "GL_LINEARLIGHT_NV",
},
{
- 0x8DCF,
- "GL_INT_SAMPLER_2D_ARRAY",
+ 0x8DCF,
+ "GL_INT_SAMPLER_2D_ARRAY",
},
{
- 0x886A,
- "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED",
+ 0x886A,
+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED",
},
{
- 0x8C41,
- "GL_SRGB8_NV",
+ 0x8C41,
+ "GL_SRGB8_NV",
},
{
- 0x0C01,
- "GL_DRAW_BUFFER_EXT",
+ 0x0C01,
+ "GL_DRAW_BUFFER_EXT",
},
{
- 0x886C,
- "GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT",
+ 0x886C,
+ "GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT",
},
{
- 0x90CB,
- "GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT",
+ 0x90CB,
+ "GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT",
},
{
- 0x8DCA,
- "GL_INT_SAMPLER_2D",
+ 0x8DCA,
+ "GL_INT_SAMPLER_2D",
},
{
- 0x93C7,
- "GL_COMPRESSED_RGBA_ASTC_6x5x5_OES",
+ 0x93C7,
+ "GL_COMPRESSED_RGBA_ASTC_6x5x5_OES",
},
{
- 0x8B5F,
- "GL_SAMPLER_3D_OES",
+ 0x8B5F,
+ "GL_SAMPLER_3D_OES",
},
{
- 0x8B95,
- "GL_PALETTE8_RGB8_OES",
+ 0x8B95,
+ "GL_PALETTE8_RGB8_OES",
},
{
- 0x9250,
- "GL_SHADER_BINARY_DMP",
+ 0x9250,
+ "GL_SHADER_BINARY_DMP",
},
{
- 0x9251,
- "GL_SMAPHS30_PROGRAM_BINARY_DMP",
+ 0x9251,
+ "GL_SMAPHS30_PROGRAM_BINARY_DMP",
},
{
- 0x9252,
- "GL_SMAPHS_PROGRAM_BINARY_DMP",
+ 0x9252,
+ "GL_SMAPHS_PROGRAM_BINARY_DMP",
},
{
- 0x9253,
- "GL_DMP_PROGRAM_BINARY_DMP",
+ 0x9253,
+ "GL_DMP_PROGRAM_BINARY_DMP",
},
{
- 0x8DC8,
- "GL_UNSIGNED_INT_VEC4",
+ 0x8DC8,
+ "GL_UNSIGNED_INT_VEC4",
},
{
- 0x3000,
- "GL_CLIP_DISTANCE0_APPLE",
+ 0x3000,
+ "GL_CLIP_DISTANCE0_APPLE",
},
{
- 0x8C92,
- "GL_ATC_RGB_AMD",
+ 0x8C92,
+ "GL_ATC_RGB_AMD",
},
{
- 0x8DC1,
- "GL_SAMPLER_2D_ARRAY",
+ 0x8DC1,
+ "GL_SAMPLER_2D_ARRAY",
},
{
- 0x9154,
- "GL_VERTEX_ARRAY_OBJECT_EXT",
+ 0x9154,
+ "GL_VERTEX_ARRAY_OBJECT_EXT",
},
{
- 0x9153,
- "GL_QUERY_OBJECT_EXT",
+ 0x9153,
+ "GL_QUERY_OBJECT_EXT",
},
{
- 0x8864,
- "GL_QUERY_COUNTER_BITS_EXT",
+ 0x8864,
+ "GL_QUERY_COUNTER_BITS_EXT",
},
{
- 0x9151,
- "GL_BUFFER_OBJECT_EXT",
+ 0x9151,
+ "GL_BUFFER_OBJECT_EXT",
},
{
- 0x8C93,
- "GL_ATC_RGBA_EXPLICIT_ALPHA_AMD",
+ 0x8C93,
+ "GL_ATC_RGBA_EXPLICIT_ALPHA_AMD",
},
{
- 0x00000002,
- "GL_CONTEXT_FLAG_DEBUG_BIT_KHR",
+ 0x00000002,
+ "GL_CONTEXT_FLAG_DEBUG_BIT_KHR",
},
{
- 0x8A3F,
- "GL_UNIFORM_BLOCK_BINDING",
+ 0x8A3F,
+ "GL_UNIFORM_BLOCK_BINDING",
},
{
- 0x00000000,
- "GL_PERFQUERY_SINGLE_CONTEXT_INTEL",
+ 0x00000000,
+ "GL_PERFQUERY_SINGLE_CONTEXT_INTEL",
},
{
- 0x00000001,
- "GL_SYNC_FLUSH_COMMANDS_BIT_APPLE",
+ 0x00000001,
+ "GL_SYNC_FLUSH_COMMANDS_BIT_APPLE",
},
{
- 0x9248,
- "GL_OVERLAY_TRANSFORM_ROTATE_90_CHROMIUM",
+ 0x9248,
+ "GL_OVERLAY_TRANSFORM_ROTATE_90_CHROMIUM",
},
{
- 0x00000004,
- "GL_GEOMETRY_SHADER_BIT_EXT",
+ 0x00000004,
+ "GL_GEOMETRY_SHADER_BIT_EXT",
},
{
- 0x1702,
- "GL_TEXTURE",
+ 0x1702,
+ "GL_TEXTURE",
},
{
- 0x3003,
- "GL_CLIP_DISTANCE3_APPLE",
+ 0x3003,
+ "GL_CLIP_DISTANCE3_APPLE",
},
{
- 0x00000008,
- "GL_TESS_CONTROL_SHADER_BIT_EXT",
+ 0x00000008,
+ "GL_TESS_CONTROL_SHADER_BIT_EXT",
},
{
- 0x8B58,
- "GL_BOOL_VEC3",
+ 0x8B58,
+ "GL_BOOL_VEC3",
},
{
- 0x8A3D,
- "GL_UNIFORM_MATRIX_STRIDE",
+ 0x8A3D,
+ "GL_UNIFORM_MATRIX_STRIDE",
},
{
- 0x8828,
- "GL_DRAW_BUFFER3_EXT",
+ 0x8828,
+ "GL_DRAW_BUFFER3_EXT",
},
{
- 0x8DF0,
- "GL_LOW_FLOAT",
+ 0x8DF0,
+ "GL_LOW_FLOAT",
},
{
- 0x1906,
- "GL_ALPHA",
+ 0x1906,
+ "GL_ALPHA",
},
{
- 0x1907,
- "GL_RGB",
+ 0x1907,
+ "GL_RGB",
},
{
- 0x8FBB,
- "GL_GPU_DISJOINT_EXT",
+ 0x8FBB,
+ "GL_GPU_DISJOINT_EXT",
},
{
- 0x1901,
- "GL_STENCIL_INDEX_OES",
+ 0x1901,
+ "GL_STENCIL_INDEX_OES",
},
{
- 0x1902,
- "GL_DEPTH_COMPONENT",
+ 0x1902,
+ "GL_DEPTH_COMPONENT",
},
{
- 0x8B56,
- "GL_BOOL",
+ 0x8B56,
+ "GL_BOOL",
},
{
- 0x93DB,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR",
+ 0x93DB,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR",
},
{
- 0x8B9B,
- "GL_IMPLEMENTATION_COLOR_READ_FORMAT",
+ 0x8B9B,
+ "GL_IMPLEMENTATION_COLOR_READ_FORMAT",
},
{
- 0x8B9A,
- "GL_IMPLEMENTATION_COLOR_READ_TYPE",
+ 0x8B9A,
+ "GL_IMPLEMENTATION_COLOR_READ_TYPE",
},
{
- 0x93DA,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR",
+ 0x93DA,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR",
},
{
- 0x1908,
- "GL_RGBA",
+ 0x1908,
+ "GL_RGBA",
},
{
- 0x8DF2,
- "GL_HIGH_FLOAT",
+ 0x8DF2,
+ "GL_HIGH_FLOAT",
},
{
- 0x93DD,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR",
+ 0x93DD,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR",
},
{
- 0x8827,
- "GL_DRAW_BUFFER2_EXT",
+ 0x8827,
+ "GL_DRAW_BUFFER2_EXT",
},
{
- 0x9243,
- "GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM",
+ 0x9243,
+ "GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM",
},
{
- 0x8DF3,
- "GL_LOW_INT",
+ 0x8DF3,
+ "GL_LOW_INT",
},
{
- 0x82E8,
- "GL_MAX_LABEL_LENGTH_KHR",
+ 0x82E8,
+ "GL_MAX_LABEL_LENGTH_KHR",
},
{
- 0x82E6,
- "GL_SAMPLER_KHR",
+ 0x82E6,
+ "GL_SAMPLER_KHR",
},
{
- 0x0C02,
- "GL_READ_BUFFER_EXT",
+ 0x0C02,
+ "GL_READ_BUFFER_EXT",
},
{
- 0x82E3,
- "GL_QUERY_KHR",
+ 0x82E3,
+ "GL_QUERY_KHR",
},
{
- 0x82E2,
- "GL_PROGRAM_KHR",
+ 0x82E2,
+ "GL_PROGRAM_KHR",
},
{
- 0x82E1,
- "GL_SHADER_KHR",
+ 0x82E1,
+ "GL_SHADER_KHR",
},
{
- 0x8B52,
- "GL_FLOAT_VEC4",
+ 0x8B52,
+ "GL_FLOAT_VEC4",
},
{
- 0x8239,
- "GL_RG16I",
+ 0x8239,
+ "GL_RG16I",
},
{
- 0x8238,
- "GL_RG8UI",
+ 0x8238,
+ "GL_RG8UI",
},
{
- 0x9240,
- "GL_UNPACK_FLIP_Y_CHROMIUM",
+ 0x9240,
+ "GL_UNPACK_FLIP_Y_CHROMIUM",
},
{
- 0x8DF6,
- "GL_UNSIGNED_INT_10_10_10_2_OES",
+ 0x8DF6,
+ "GL_UNSIGNED_INT_10_10_10_2_OES",
},
{
- 0x8A30,
- "GL_MAX_UNIFORM_BLOCK_SIZE",
+ 0x8A30,
+ "GL_MAX_UNIFORM_BLOCK_SIZE",
},
{
- 0x9273,
- "GL_COMPRESSED_SIGNED_RG11_EAC",
+ 0x9273,
+ "GL_COMPRESSED_SIGNED_RG11_EAC",
},
{
- 0x8231,
- "GL_R8I",
+ 0x8231,
+ "GL_R8I",
},
{
- 0x8866,
- "GL_QUERY_RESULT_EXT",
+ 0x8866,
+ "GL_QUERY_RESULT_EXT",
},
{
- 0x8233,
- "GL_R16I",
+ 0x8233,
+ "GL_R16I",
},
{
- 0x8DF7,
- "GL_INT_10_10_10_2_OES",
+ 0x8DF7,
+ "GL_INT_10_10_10_2_OES",
},
{
- 0x8235,
- "GL_R32I",
+ 0x8235,
+ "GL_R32I",
},
{
- 0x8234,
- "GL_R16UI",
+ 0x8234,
+ "GL_R16UI",
},
{
- 0x8237,
- "GL_RG8I",
+ 0x8237,
+ "GL_RG8I",
},
{
- 0x9246,
- "GL_OVERLAY_TRANSFORM_FLIP_HORIZONTAL_CHROMIUM",
+ 0x9246,
+ "GL_OVERLAY_TRANSFORM_FLIP_HORIZONTAL_CHROMIUM",
},
{
- 0x8B69,
- "GL_FLOAT_MAT4x2_NV",
+ 0x8B69,
+ "GL_FLOAT_MAT4x2_NV",
},
{
- 0x812D,
- "GL_CLAMP_TO_BORDER_EXT",
+ 0x812D,
+ "GL_CLAMP_TO_BORDER_EXT",
},
{
- 0x812F,
- "GL_CLAMP_TO_EDGE",
+ 0x812F,
+ "GL_CLAMP_TO_EDGE",
},
{
- 0x92A4,
- "GL_LINEARDODGE_NV",
+ 0x92A4,
+ "GL_LINEARDODGE_NV",
},
{
- 0x8DD8,
- "GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT",
+ 0x8DD8,
+ "GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT",
},
{
- 0x8DD9,
- "GL_GEOMETRY_SHADER_EXT",
+ 0x8DD9,
+ "GL_GEOMETRY_SHADER_EXT",
},
{
- 0x86A3,
- "GL_COMPRESSED_TEXTURE_FORMATS",
+ 0x86A3,
+ "GL_COMPRESSED_TEXTURE_FORMATS",
},
{
- 0x8DD4,
- "GL_UNSIGNED_INT_SAMPLER_CUBE",
+ 0x8DD4,
+ "GL_UNSIGNED_INT_SAMPLER_CUBE",
},
{
- 0x9244,
- "GL_BIND_GENERATES_RESOURCE_CHROMIUM",
+ 0x9244,
+ "GL_BIND_GENERATES_RESOURCE_CHROMIUM",
},
{
- 0x8DD2,
- "GL_UNSIGNED_INT_SAMPLER_2D",
+ 0x8DD2,
+ "GL_UNSIGNED_INT_SAMPLER_2D",
},
{
- 0x8DD3,
- "GL_UNSIGNED_INT_SAMPLER_3D",
+ 0x8DD3,
+ "GL_UNSIGNED_INT_SAMPLER_3D",
},
{
- 0x8DD0,
- "GL_INT_SAMPLER_BUFFER_EXT",
+ 0x8DD0,
+ "GL_INT_SAMPLER_BUFFER_EXT",
},
{
- 0x86A2,
- "GL_NUM_COMPRESSED_TEXTURE_FORMATS",
+ 0x86A2,
+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS",
},
{
- 0x0CF3,
- "GL_UNPACK_SKIP_ROWS_EXT",
+ 0x0CF3,
+ "GL_UNPACK_SKIP_ROWS_EXT",
},
{
- 0x0CF2,
- "GL_UNPACK_ROW_LENGTH_EXT",
+ 0x0CF2,
+ "GL_UNPACK_ROW_LENGTH_EXT",
},
{
- 0x140C,
- "GL_FIXED",
+ 0x140C,
+ "GL_FIXED",
},
{
- 0x140B,
- "GL_HALF_FLOAT",
+ 0x140B,
+ "GL_HALF_FLOAT",
},
{
- 0x8008,
- "GL_MAX_EXT",
+ 0x8008,
+ "GL_MAX_EXT",
},
{
- 0x0CF5,
- "GL_UNPACK_ALIGNMENT",
+ 0x0CF5,
+ "GL_UNPACK_ALIGNMENT",
},
{
- 0x8867,
- "GL_QUERY_RESULT_AVAILABLE_EXT",
+ 0x8867,
+ "GL_QUERY_RESULT_AVAILABLE_EXT",
},
{
- 0x8D82,
- "GL_RGBA32I",
+ 0x8D82,
+ "GL_RGBA32I",
},
{
- 0x8009,
- "GL_BLEND_EQUATION",
+ 0x8009,
+ "GL_BLEND_EQUATION",
},
{
- 0x911F,
- "GL_BUFFER_ACCESS_FLAGS",
+ 0x911F,
+ "GL_BUFFER_ACCESS_FLAGS",
},
{
- 0x1401,
- "GL_UNSIGNED_BYTE",
+ 0x1401,
+ "GL_UNSIGNED_BYTE",
},
{
- 0x1400,
- "GL_BYTE",
+ 0x1400,
+ "GL_BYTE",
},
{
- 0x1403,
- "GL_UNSIGNED_SHORT",
+ 0x1403,
+ "GL_UNSIGNED_SHORT",
},
{
- 0x1402,
- "GL_SHORT",
+ 0x1402,
+ "GL_SHORT",
},
{
- 0x1405,
- "GL_UNSIGNED_INT",
+ 0x1405,
+ "GL_UNSIGNED_INT",
},
{
- 0x1404,
- "GL_INT",
+ 0x1404,
+ "GL_INT",
},
{
- 0x1406,
- "GL_FLOAT",
+ 0x1406,
+ "GL_FLOAT",
},
{
- 0x8C1D,
- "GL_TEXTURE_BINDING_2D_ARRAY",
+ 0x8C1D,
+ "GL_TEXTURE_BINDING_2D_ARRAY",
},
{
- 0x8DDF,
- "GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT",
+ 0x8DDF,
+ "GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT",
},
{
- 0x8043,
- "GL_LUMINANCE4_ALPHA4_OES",
+ 0x8043,
+ "GL_LUMINANCE4_ALPHA4_OES",
},
{
- 0x8040,
- "GL_LUMINANCE8_OES",
+ 0x8040,
+ "GL_LUMINANCE8_OES",
},
{
- 0x8045,
- "GL_LUMINANCE8_ALPHA8_OES",
+ 0x8045,
+ "GL_LUMINANCE8_ALPHA8_OES",
},
{
- 0x8CD1,
- "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",
+ 0x8CD1,
+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",
},
{
- 0x00040000,
- "GL_STENCIL_BUFFER_BIT2_QCOM",
+ 0x00040000,
+ "GL_STENCIL_BUFFER_BIT2_QCOM",
},
{
- 0x8CD0,
- "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",
+ 0x8CD0,
+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",
},
{
- 0x823A,
- "GL_RG16UI",
+ 0x823A,
+ "GL_RG16UI",
},
{
- 0x8CE4,
- "GL_COLOR_ATTACHMENT4_EXT",
+ 0x8CE4,
+ "GL_COLOR_ATTACHMENT4_EXT",
},
{
- 0x823B,
- "GL_RG32I",
+ 0x823B,
+ "GL_RG32I",
},
{
- 0x8CD3,
- "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",
+ 0x8CD3,
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",
},
{
- 0x846E,
- "GL_ALIASED_LINE_WIDTH_RANGE",
+ 0x846E,
+ "GL_ALIASED_LINE_WIDTH_RANGE",
},
{
- 0x0B90,
- "GL_STENCIL_TEST",
+ 0x0B90,
+ "GL_STENCIL_TEST",
},
{
- 0x8CD2,
- "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",
+ 0x8CD2,
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",
},
{
- 0x881C,
- "GL_ALPHA16F_EXT",
+ 0x881C,
+ "GL_ALPHA16F_EXT",
},
{
- 0x928E,
- "GL_SRC_ATOP_NV",
+ 0x928E,
+ "GL_SRC_ATOP_NV",
},
{
- 0x8CD4,
- "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES",
+ 0x8CD4,
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES",
},
{
- 0x9113,
- "GL_SYNC_CONDITION_APPLE",
+ 0x9113,
+ "GL_SYNC_CONDITION_APPLE",
},
{
- 0x8CD7,
- "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",
+ 0x8CD7,
+ "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",
},
{
- 0x08000000,
- "GL_MULTISAMPLE_BUFFER_BIT3_QCOM",
+ 0x08000000,
+ "GL_MULTISAMPLE_BUFFER_BIT3_QCOM",
},
{
- 0x93A4,
- "GL_PACK_REVERSE_ROW_ORDER_ANGLE",
+ 0x93A4,
+ "GL_PACK_REVERSE_ROW_ORDER_ANGLE",
},
{
- 0x8038,
- "GL_POLYGON_OFFSET_FACTOR",
+ 0x8038,
+ "GL_POLYGON_OFFSET_FACTOR",
},
{
- 0x94F9,
- "GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL",
+ 0x94F9,
+ "GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL",
},
{
- 0x851A,
- "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z",
+ 0x851A,
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z",
},
{
- 0x851C,
- "GL_MAX_CUBE_MAP_TEXTURE_SIZE",
+ 0x851C,
+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE",
},
{
- 0x8CD9,
- "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS",
+ 0x8CD9,
+ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS",
},
{
- 0x84CC,
- "GL_TEXTURE12",
+ 0x84CC,
+ "GL_TEXTURE12",
},
{
- 0x0BA2,
- "GL_VIEWPORT",
+ 0x0BA2,
+ "GL_VIEWPORT",
},
{
- 0x84CA,
- "GL_TEXTURE10",
+ 0x84CA,
+ "GL_TEXTURE10",
},
{
- 0x0BA7,
- "GL_PATH_PROJECTION_MATRIX_CHROMIUM",
+ 0x0BA7,
+ "GL_PATH_PROJECTION_MATRIX_CHROMIUM",
},
{
- 0x84CF,
- "GL_TEXTURE15",
+ 0x84CF,
+ "GL_TEXTURE15",
},
{
- 0x84CE,
- "GL_TEXTURE14",
+ 0x84CE,
+ "GL_TEXTURE14",
},
{
- 0x84CD,
- "GL_TEXTURE13",
+ 0x84CD,
+ "GL_TEXTURE13",
},
{
- 0x83F9,
- "GL_PERFQUERY_DONOT_FLUSH_INTEL",
+ 0x83F9,
+ "GL_PERFQUERY_DONOT_FLUSH_INTEL",
},
{
- 0x9115,
- "GL_SYNC_FLAGS_APPLE",
+ 0x9115,
+ "GL_SYNC_FLAGS_APPLE",
},
{
- 0x9286,
- "GL_SRC_NV",
+ 0x9286,
+ "GL_SRC_NV",
},
{
- 0x83F3,
- "GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE",
+ 0x83F3,
+ "GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE",
},
{
- 0x83F2,
- "GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE",
+ 0x83F2,
+ "GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE",
},
{
- 0x83F1,
- "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT",
+ 0x83F1,
+ "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT",
},
{
- 0x9114,
- "GL_SYNC_STATUS_APPLE",
+ 0x9114,
+ "GL_SYNC_STATUS_APPLE",
},
{
- 0x8C0A,
- "GL_SGX_BINARY_IMG",
+ 0x8C0A,
+ "GL_SGX_BINARY_IMG",
},
{
- 0x93BB,
- "GL_COMPRESSED_RGBA_ASTC_10x10_KHR",
+ 0x93BB,
+ "GL_COMPRESSED_RGBA_ASTC_10x10_KHR",
},
{
- 0x911C,
- "GL_CONDITION_SATISFIED_APPLE",
+ 0x911C,
+ "GL_CONDITION_SATISFIED_APPLE",
},
{
- 0x911B,
- "GL_TIMEOUT_EXPIRED_APPLE",
+ 0x911B,
+ "GL_TIMEOUT_EXPIRED_APPLE",
},
{
- 0x911A,
- "GL_ALREADY_SIGNALED_APPLE",
+ 0x911A,
+ "GL_ALREADY_SIGNALED_APPLE",
},
{
- 0x9284,
- "GL_CONJOINT_NV",
+ 0x9284,
+ "GL_CONJOINT_NV",
},
{
- 0x9124,
- "GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT",
+ 0x9124,
+ "GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT",
},
{
- 0x911D,
- "GL_WAIT_FAILED_APPLE",
+ 0x911D,
+ "GL_WAIT_FAILED_APPLE",
},
{
- 0x929A,
- "GL_COLORBURN_KHR",
+ 0x929A,
+ "GL_COLORBURN_KHR",
},
{
- 0x929B,
- "GL_HARDLIGHT_KHR",
+ 0x929B,
+ "GL_HARDLIGHT_KHR",
},
{
- 0x929C,
- "GL_SOFTLIGHT_KHR",
+ 0x929C,
+ "GL_SOFTLIGHT_KHR",
},
{
- 0x846D,
- "GL_ALIASED_POINT_SIZE_RANGE",
+ 0x846D,
+ "GL_ALIASED_POINT_SIZE_RANGE",
},
{
- 0x929E,
- "GL_DIFFERENCE_KHR",
+ 0x929E,
+ "GL_DIFFERENCE_KHR",
},
{
- 0x929F,
- "GL_MINUS_NV",
+ 0x929F,
+ "GL_MINUS_NV",
},
{
- 0x9282,
- "GL_UNCORRELATED_NV",
+ 0x9282,
+ "GL_UNCORRELATED_NV",
},
{
- 0x9298,
- "GL_LIGHTEN_KHR",
+ 0x9298,
+ "GL_LIGHTEN_KHR",
},
{
- 0x9299,
- "GL_COLORDODGE_KHR",
+ 0x9299,
+ "GL_COLORDODGE_KHR",
},
{
- 0x9111,
- "GL_MAX_SERVER_WAIT_TIMEOUT_APPLE",
+ 0x9111,
+ "GL_MAX_SERVER_WAIT_TIMEOUT_APPLE",
},
{
- 0x93A6,
- "GL_PROGRAM_BINARY_ANGLE",
+ 0x93A6,
+ "GL_PROGRAM_BINARY_ANGLE",
},
{
- 0x9117,
- "GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE",
+ 0x9117,
+ "GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE",
},
{
- 0x93A0,
- "GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE",
+ 0x93A0,
+ "GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE",
},
{
- 0x93A3,
- "GL_FRAMEBUFFER_ATTACHMENT_ANGLE",
+ 0x93A3,
+ "GL_FRAMEBUFFER_ATTACHMENT_ANGLE",
},
{
- 0x93A2,
- "GL_TEXTURE_USAGE_ANGLE",
+ 0x93A2,
+ "GL_TEXTURE_USAGE_ANGLE",
},
{
- 0x8802,
- "GL_STENCIL_BACK_PASS_DEPTH_FAIL",
+ 0x8802,
+ "GL_STENCIL_BACK_PASS_DEPTH_FAIL",
},
{
- 0x9119,
- "GL_SIGNALED_APPLE",
+ 0x9119,
+ "GL_SIGNALED_APPLE",
},
{
- 0x9118,
- "GL_UNSIGNALED_APPLE",
+ 0x9118,
+ "GL_UNSIGNALED_APPLE",
},
{
- 0x9294,
- "GL_MULTIPLY_KHR",
+ 0x9294,
+ "GL_MULTIPLY_KHR",
},
{
- 0x9295,
- "GL_SCREEN_KHR",
+ 0x9295,
+ "GL_SCREEN_KHR",
},
{
- 0x9296,
- "GL_OVERLAY_KHR",
+ 0x9296,
+ "GL_OVERLAY_KHR",
},
{
- 0x9297,
- "GL_DARKEN_KHR",
+ 0x9297,
+ "GL_DARKEN_KHR",
},
{
- 0x0020,
- "GL_MAP_UNSYNCHRONIZED_BIT_EXT",
+ 0x0020,
+ "GL_MAP_UNSYNCHRONIZED_BIT_EXT",
},
{
- 0x8E78,
- "GL_TESS_GEN_VERTEX_ORDER_EXT",
+ 0x8E78,
+ "GL_TESS_GEN_VERTEX_ORDER_EXT",
},
{
- 0x8C01,
- "GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG",
+ 0x8C01,
+ "GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG",
},
{
- 0x8C00,
- "GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG",
+ 0x8C00,
+ "GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG",
},
{
- 0x8A52,
- "GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT",
+ 0x8A52,
+ "GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT",
},
{
- 0x8C02,
- "GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",
+ 0x8C02,
+ "GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",
},
{
- 0x84C9,
- "GL_TEXTURE9",
+ 0x84C9,
+ "GL_TEXTURE9",
},
{
- 0x84C8,
- "GL_TEXTURE8",
+ 0x84C8,
+ "GL_TEXTURE8",
},
{
- 0x8869,
- "GL_MAX_VERTEX_ATTRIBS",
+ 0x8869,
+ "GL_MAX_VERTEX_ATTRIBS",
},
{
- 0x84C3,
- "GL_TEXTURE3",
+ 0x84C3,
+ "GL_TEXTURE3",
},
{
- 0x84C2,
- "GL_TEXTURE2",
+ 0x84C2,
+ "GL_TEXTURE2",
},
{
- 0x84C1,
- "GL_TEXTURE1",
+ 0x84C1,
+ "GL_TEXTURE1",
},
{
- 0x84C0,
- "GL_TEXTURE0",
+ 0x84C0,
+ "GL_TEXTURE0",
},
{
- 0x84C7,
- "GL_TEXTURE7",
+ 0x84C7,
+ "GL_TEXTURE7",
},
{
- 0x84C6,
- "GL_TEXTURE6",
+ 0x84C6,
+ "GL_TEXTURE6",
},
{
- 0x84C5,
- "GL_TEXTURE5",
+ 0x84C5,
+ "GL_TEXTURE5",
},
{
- 0x8803,
- "GL_STENCIL_BACK_PASS_DEPTH_PASS",
+ 0x8803,
+ "GL_STENCIL_BACK_PASS_DEPTH_PASS",
},
{
- 0x928A,
- "GL_SRC_IN_NV",
+ 0x928A,
+ "GL_SRC_IN_NV",
},
{
- 0x8518,
- "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y",
+ 0x8518,
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y",
},
{
- 0x8519,
- "GL_TEXTURE_CUBE_MAP_POSITIVE_Z",
+ 0x8519,
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z",
},
{
- 0x8514,
- "GL_TEXTURE_BINDING_CUBE_MAP",
+ 0x8514,
+ "GL_TEXTURE_BINDING_CUBE_MAP",
},
{
- 0x8515,
- "GL_TEXTURE_CUBE_MAP_POSITIVE_X",
+ 0x8515,
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X",
},
{
- 0x8516,
- "GL_TEXTURE_CUBE_MAP_NEGATIVE_X",
+ 0x8516,
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X",
},
{
- 0x8517,
- "GL_TEXTURE_CUBE_MAP_POSITIVE_Y",
+ 0x8517,
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y",
},
{
- 0x8218,
- "GL_FRAMEBUFFER_DEFAULT",
+ 0x8218,
+ "GL_FRAMEBUFFER_DEFAULT",
},
{
- 0x8513,
- "GL_TEXTURE_CUBE_MAP",
+ 0x8513,
+ "GL_TEXTURE_CUBE_MAP",
},
{
- 0x8626,
- "GL_CURRENT_VERTEX_ATTRIB",
+ 0x8626,
+ "GL_CURRENT_VERTEX_ATTRIB",
},
{
- 0x92B1,
- "GL_PLUS_CLAMPED_NV",
+ 0x92B1,
+ "GL_PLUS_CLAMPED_NV",
},
{
- 0x92B0,
- "GL_HSL_LUMINOSITY_KHR",
+ 0x92B0,
+ "GL_HSL_LUMINOSITY_KHR",
},
{
- 0x92B3,
- "GL_MINUS_CLAMPED_NV",
+ 0x92B3,
+ "GL_MINUS_CLAMPED_NV",
},
{
- 0x92B2,
- "GL_PLUS_CLAMPED_ALPHA_NV",
+ 0x92B2,
+ "GL_PLUS_CLAMPED_ALPHA_NV",
},
{
- 0x8765,
- "GL_BUFFER_USAGE",
+ 0x8765,
+ "GL_BUFFER_USAGE",
},
{
- 0x8764,
- "GL_BUFFER_SIZE",
+ 0x8764,
+ "GL_BUFFER_SIZE",
},
{
- 0x8B99,
- "GL_PALETTE8_RGB5_A1_OES",
+ 0x8B99,
+ "GL_PALETTE8_RGB5_A1_OES",
},
{
- 0x0503,
- "GL_STACK_OVERFLOW_KHR",
+ 0x0503,
+ "GL_STACK_OVERFLOW_KHR",
},
{
- 0x0502,
- "GL_INVALID_OPERATION",
+ 0x0502,
+ "GL_INVALID_OPERATION",
},
{
- 0x0501,
- "GL_INVALID_VALUE",
+ 0x0501,
+ "GL_INVALID_VALUE",
},
{
- 0x0500,
- "GL_INVALID_ENUM",
+ 0x0500,
+ "GL_INVALID_ENUM",
},
{
- 0x0507,
- "GL_CONTEXT_LOST_KHR",
+ 0x0507,
+ "GL_CONTEXT_LOST_KHR",
},
{
- 0x0506,
- "GL_INVALID_FRAMEBUFFER_OPERATION",
+ 0x0506,
+ "GL_INVALID_FRAMEBUFFER_OPERATION",
},
{
- 0x0505,
- "GL_OUT_OF_MEMORY",
+ 0x0505,
+ "GL_OUT_OF_MEMORY",
},
{
- 0x0504,
- "GL_STACK_UNDERFLOW_KHR",
+ 0x0504,
+ "GL_STACK_UNDERFLOW_KHR",
},
{
- 0x0CF4,
- "GL_UNPACK_SKIP_PIXELS_EXT",
+ 0x0CF4,
+ "GL_UNPACK_SKIP_PIXELS_EXT",
},
{
- 0x0B44,
- "GL_CULL_FACE",
+ 0x0B44,
+ "GL_CULL_FACE",
},
{
- 0x8B5E,
- "GL_SAMPLER_2D",
+ 0x8B5E,
+ "GL_SAMPLER_2D",
},
{
- 0x0B46,
- "GL_FRONT_FACE",
+ 0x0B46,
+ "GL_FRONT_FACE",
},
{
- 0x8FB3,
- "GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM",
+ 0x8FB3,
+ "GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM",
},
{
- 0x824A,
- "GL_DEBUG_SOURCE_APPLICATION_KHR",
+ 0x824A,
+ "GL_DEBUG_SOURCE_APPLICATION_KHR",
},
{
- 0x824B,
- "GL_DEBUG_SOURCE_OTHER_KHR",
+ 0x824B,
+ "GL_DEBUG_SOURCE_OTHER_KHR",
},
{
- 0x824C,
- "GL_DEBUG_TYPE_ERROR_KHR",
+ 0x824C,
+ "GL_DEBUG_TYPE_ERROR_KHR",
},
{
- 0x824D,
- "GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR",
+ 0x824D,
+ "GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR",
},
{
- 0x824E,
- "GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR",
+ 0x824E,
+ "GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR",
},
{
- 0x824F,
- "GL_DEBUG_TYPE_PORTABILITY_KHR",
+ 0x824F,
+ "GL_DEBUG_TYPE_PORTABILITY_KHR",
},
{
- 0x8DD7,
- "GL_UNSIGNED_INT_SAMPLER_2D_ARRAY",
+ 0x8DD7,
+ "GL_UNSIGNED_INT_SAMPLER_2D_ARRAY",
},
{
- 0x8B31,
- "GL_VERTEX_SHADER",
+ 0x8B31,
+ "GL_VERTEX_SHADER",
},
{
- 0x8B30,
- "GL_FRAGMENT_SHADER",
+ 0x8B30,
+ "GL_FRAGMENT_SHADER",
},
{
- 0x8FB1,
- "GL_CPU_OPTIMIZED_QCOM",
+ 0x8FB1,
+ "GL_CPU_OPTIMIZED_QCOM",
},
{
- 0x93D2,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR",
+ 0x93D2,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR",
},
{
- 0x82FB,
- "GL_CONTEXT_RELEASE_BEHAVIOR_KHR",
+ 0x82FB,
+ "GL_CONTEXT_RELEASE_BEHAVIOR_KHR",
},
{
- 0x8B5A,
- "GL_FLOAT_MAT2",
+ 0x8B5A,
+ "GL_FLOAT_MAT2",
},
{
- 0x84D8,
- "GL_TEXTURE24",
+ 0x84D8,
+ "GL_TEXTURE24",
},
{
- 0x84D9,
- "GL_TEXTURE25",
+ 0x84D9,
+ "GL_TEXTURE25",
},
{
- 0x84D6,
- "GL_TEXTURE22",
+ 0x84D6,
+ "GL_TEXTURE22",
},
{
- 0x84D7,
- "GL_TEXTURE23",
+ 0x84D7,
+ "GL_TEXTURE23",
},
{
- 0x84D4,
- "GL_TEXTURE20",
+ 0x84D4,
+ "GL_TEXTURE20",
},
{
- 0x0D05,
- "GL_PACK_ALIGNMENT",
+ 0x0D05,
+ "GL_PACK_ALIGNMENT",
},
{
- 0x84D2,
- "GL_TEXTURE18",
+ 0x84D2,
+ "GL_TEXTURE18",
},
{
- 0x84D3,
- "GL_TEXTURE19",
+ 0x84D3,
+ "GL_TEXTURE19",
},
{
- 0x84D0,
- "GL_TEXTURE16",
+ 0x84D0,
+ "GL_TEXTURE16",
},
{
- 0x84D1,
- "GL_TEXTURE17",
+ 0x84D1,
+ "GL_TEXTURE17",
},
{
- 0x93D1,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR",
+ 0x93D1,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR",
},
{
- 0x84DF,
- "GL_TEXTURE31",
+ 0x84DF,
+ "GL_TEXTURE31",
},
{
- 0x8B97,
- "GL_PALETTE8_R5_G6_B5_OES",
+ 0x8B97,
+ "GL_PALETTE8_R5_G6_B5_OES",
},
{
- 0x84DD,
- "GL_TEXTURE29",
+ 0x84DD,
+ "GL_TEXTURE29",
},
{
- 0x84DE,
- "GL_TEXTURE30",
+ 0x84DE,
+ "GL_TEXTURE30",
},
{
- 0x84DB,
- "GL_TEXTURE27",
+ 0x84DB,
+ "GL_TEXTURE27",
},
{
- 0x84DC,
- "GL_TEXTURE28",
+ 0x84DC,
+ "GL_TEXTURE28",
},
{
- 0x6002,
- "GL_TEXTURE_POOL_UNMANAGED_CHROMIUM",
+ 0x6002,
+ "GL_TEXTURE_POOL_UNMANAGED_CHROMIUM",
},
{
- 0x84DA,
- "GL_TEXTURE26",
+ 0x84DA,
+ "GL_TEXTURE26",
},
{
- 0x8242,
- "GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR",
+ 0x8242,
+ "GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR",
},
{
- 0x8243,
- "GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR",
+ 0x8243,
+ "GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR",
},
{
- 0x8244,
- "GL_DEBUG_CALLBACK_FUNCTION_KHR",
+ 0x8244,
+ "GL_DEBUG_CALLBACK_FUNCTION_KHR",
},
{
- 0x8245,
- "GL_DEBUG_CALLBACK_USER_PARAM_KHR",
+ 0x8245,
+ "GL_DEBUG_CALLBACK_USER_PARAM_KHR",
},
{
- 0x8246,
- "GL_DEBUG_SOURCE_API_KHR",
+ 0x8246,
+ "GL_DEBUG_SOURCE_API_KHR",
},
{
- 0x8247,
- "GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR",
+ 0x8247,
+ "GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR",
},
{
- 0x8248,
- "GL_DEBUG_SOURCE_SHADER_COMPILER_KHR",
+ 0x8248,
+ "GL_DEBUG_SOURCE_SHADER_COMPILER_KHR",
},
{
- 0x8249,
- "GL_DEBUG_SOURCE_THIRD_PARTY_KHR",
+ 0x8249,
+ "GL_DEBUG_SOURCE_THIRD_PARTY_KHR",
},
{
- 0x88ED,
- "GL_PIXEL_PACK_BUFFER_BINDING",
+ 0x88ED,
+ "GL_PIXEL_PACK_BUFFER_BINDING",
},
{
- 0x8B94,
- "GL_PALETTE4_RGB5_A1_OES",
+ 0x8B94,
+ "GL_PALETTE4_RGB5_A1_OES",
},
{
- 0x94F4,
- "GL_PERFQUERY_COUNTER_RAW_INTEL",
+ 0x94F4,
+ "GL_PERFQUERY_COUNTER_RAW_INTEL",
},
{
- 0x823C,
- "GL_RG32UI",
+ 0x823C,
+ "GL_RG32UI",
},
{
- 0x8A29,
- "GL_UNIFORM_BUFFER_START",
+ 0x8A29,
+ "GL_UNIFORM_BUFFER_START",
},
{
- 0x8A28,
- "GL_UNIFORM_BUFFER_BINDING",
+ 0x8A28,
+ "GL_UNIFORM_BUFFER_BINDING",
},
{
- 0x92BE,
- "GL_PRIMITIVE_BOUNDING_BOX_EXT",
+ 0x92BE,
+ "GL_PRIMITIVE_BOUNDING_BOX_EXT",
},
{
- 0x8645,
- "GL_VERTEX_ATTRIB_ARRAY_POINTER",
+ 0x8645,
+ "GL_VERTEX_ATTRIB_ARRAY_POINTER",
},
{
- 0x8865,
- "GL_CURRENT_QUERY_EXT",
+ 0x8865,
+ "GL_CURRENT_QUERY_EXT",
},
{
- 0x8E5B,
- "GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES",
+ 0x8E5B,
+ "GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES",
},
{
- 0x8E5C,
- "GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES",
+ 0x8E5C,
+ "GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES",
},
{
- 0x8E5D,
- "GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES",
+ 0x8E5D,
+ "GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES",
},
{
- 0x906A,
- "GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT",
+ 0x906A,
+ "GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT",
},
{
- 0x906F,
- "GL_RGB10_A2UI",
+ 0x906F,
+ "GL_RGB10_A2UI",
},
{
- 0x8E72,
- "GL_PATCH_VERTICES_EXT",
+ 0x8E72,
+ "GL_PATCH_VERTICES_EXT",
},
{
- 0x8BD3,
- "GL_TEXTURE_HEIGHT_QCOM",
+ 0x8BD3,
+ "GL_TEXTURE_HEIGHT_QCOM",
},
{
- 0x87FA,
- "GL_3DC_XY_AMD",
+ 0x87FA,
+ "GL_3DC_XY_AMD",
},
{
- 0x84C4,
- "GL_TEXTURE4",
+ 0x84C4,
+ "GL_TEXTURE4",
},
{
- 0x821C,
- "GL_MINOR_VERSION",
+ 0x821C,
+ "GL_MINOR_VERSION",
},
{
- 0x8E8A,
- "GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT",
+ 0x8E8A,
+ "GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT",
},
{
- 0x85B5,
- "GL_VERTEX_ARRAY_BINDING_OES",
+ 0x85B5,
+ "GL_VERTEX_ARRAY_BINDING_OES",
},
{
- 0x8253,
- "GL_GUILTY_CONTEXT_RESET_KHR",
+ 0x8253,
+ "GL_GUILTY_CONTEXT_RESET_KHR",
},
{
- 0x8D6B,
- "GL_MAX_ELEMENT_INDEX",
+ 0x8D6B,
+ "GL_MAX_ELEMENT_INDEX",
},
{
- 0x8D6C,
- "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT",
+ 0x8D6C,
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT",
},
{
- 0x92A1,
- "GL_CONTRAST_NV",
+ 0x92A1,
+ "GL_CONTRAST_NV",
},
{
- 0x8252,
- "GL_LOSE_CONTEXT_ON_RESET_KHR",
+ 0x8252,
+ "GL_LOSE_CONTEXT_ON_RESET_KHR",
},
{
- 0x8C4C,
- "GL_COMPRESSED_SRGB_S3TC_DXT1_NV",
+ 0x8C4C,
+ "GL_COMPRESSED_SRGB_S3TC_DXT1_NV",
},
{
- 0x8C4E,
- "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV",
+ 0x8C4E,
+ "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV",
},
{
- 0x8251,
- "GL_DEBUG_TYPE_OTHER_KHR",
+ 0x8251,
+ "GL_DEBUG_TYPE_OTHER_KHR",
},
{
- 0x8C4F,
- "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV",
+ 0x8C4F,
+ "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV",
},
{
- 0x9309,
- "GL_REFERENCED_BY_GEOMETRY_SHADER_EXT",
+ 0x9309,
+ "GL_REFERENCED_BY_GEOMETRY_SHADER_EXT",
},
{
- 0x93E9,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES",
+ 0x93E9,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES",
},
{
- 0x93E8,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES",
+ 0x93E8,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES",
},
{
- 0x8C43,
- "GL_SRGB8_ALPHA8_EXT",
+ 0x8C43,
+ "GL_SRGB8_ALPHA8_EXT",
},
{
- 0x8C42,
- "GL_SRGB_ALPHA_EXT",
+ 0x8C42,
+ "GL_SRGB_ALPHA_EXT",
},
{
- 0x8C45,
- "GL_SLUMINANCE8_ALPHA8_NV",
+ 0x8C45,
+ "GL_SLUMINANCE8_ALPHA8_NV",
},
{
- 0x8C44,
- "GL_SLUMINANCE_ALPHA_NV",
+ 0x8C44,
+ "GL_SLUMINANCE_ALPHA_NV",
},
{
- 0x8C47,
- "GL_SLUMINANCE8_NV",
+ 0x8C47,
+ "GL_SLUMINANCE8_NV",
},
{
- 0x8C46,
- "GL_SLUMINANCE_NV",
+ 0x8C46,
+ "GL_SLUMINANCE_NV",
},
{
- 0x93E1,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES",
+ 0x93E1,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES",
},
{
- 0x93E0,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES",
+ 0x93E0,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES",
},
{
- 0x93E3,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES",
+ 0x93E3,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES",
},
{
- 0x93E2,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES",
+ 0x93E2,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES",
},
{
- 0x93E5,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES",
+ 0x93E5,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES",
},
{
- 0x93E4,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES",
+ 0x93E4,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES",
},
{
- 0x93E7,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES",
+ 0x93E7,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES",
},
{
- 0x93E6,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES",
+ 0x93E6,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES",
},
{
- 0x8D68,
- "GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES",
+ 0x8D68,
+ "GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES",
},
{
- 0x8E82,
- "GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT",
+ 0x8E82,
+ "GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT",
},
{
- 0x8E81,
- "GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT",
+ 0x8E81,
+ "GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT",
},
{
- 0x85BB,
- "GL_UNSIGNED_SHORT_8_8_REV_APPLE",
+ 0x85BB,
+ "GL_UNSIGNED_SHORT_8_8_REV_APPLE",
},
{
- 0x8E87,
- "GL_TESS_EVALUATION_SHADER_EXT",
+ 0x8E87,
+ "GL_TESS_EVALUATION_SHADER_EXT",
},
{
- 0x8E86,
- "GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT",
+ 0x8E86,
+ "GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT",
},
{
- 0x8E85,
- "GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT",
+ 0x8E85,
+ "GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT",
},
{
- 0x8E84,
- "GL_MAX_TESS_PATCH_COMPONENTS_EXT",
+ 0x8E84,
+ "GL_MAX_TESS_PATCH_COMPONENTS_EXT",
},
{
- 0x8D61,
- "GL_HALF_FLOAT_OES",
+ 0x8D61,
+ "GL_HALF_FLOAT_OES",
},
{
- 0x8D62,
- "GL_RGB565",
+ 0x8D62,
+ "GL_RGB565",
},
{
- 0x8E88,
- "GL_TESS_CONTROL_SHADER_EXT",
+ 0x8E88,
+ "GL_TESS_CONTROL_SHADER_EXT",
},
{
- 0x8D64,
- "GL_ETC1_RGB8_OES",
+ 0x8D64,
+ "GL_ETC1_RGB8_OES",
},
{
- 0x8D65,
- "GL_TEXTURE_EXTERNAL_OES",
+ 0x8D65,
+ "GL_TEXTURE_EXTERNAL_OES",
},
{
- 0x8D66,
- "GL_SAMPLER_EXTERNAL_OES",
+ 0x8D66,
+ "GL_SAMPLER_EXTERNAL_OES",
},
{
- 0x8D67,
- "GL_TEXTURE_BINDING_EXTERNAL_OES",
+ 0x8D67,
+ "GL_TEXTURE_BINDING_EXTERNAL_OES",
},
{
- 0x10000000,
- "GL_MULTISAMPLE_BUFFER_BIT4_QCOM",
+ 0x10000000,
+ "GL_MULTISAMPLE_BUFFER_BIT4_QCOM",
},
{
- 0x04000000,
- "GL_MULTISAMPLE_BUFFER_BIT2_QCOM",
+ 0x04000000,
+ "GL_MULTISAMPLE_BUFFER_BIT2_QCOM",
},
{
- 0x90D7,
- "GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT",
+ 0x90D7,
+ "GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT",
},
{
- 0x90D9,
- "GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT",
+ 0x90D9,
+ "GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT",
},
{
- 0x90D8,
- "GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT",
+ 0x90D8,
+ "GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT",
},
{
- 0x8CEE,
- "GL_COLOR_ATTACHMENT14_EXT",
+ 0x8CEE,
+ "GL_COLOR_ATTACHMENT14_EXT",
},
{
- 0x8DC7,
- "GL_UNSIGNED_INT_VEC3",
+ 0x8DC7,
+ "GL_UNSIGNED_INT_VEC3",
},
{
- 0x1701,
- "GL_PATH_PROJECTION_CHROMIUM",
+ 0x1701,
+ "GL_PATH_PROJECTION_CHROMIUM",
},
{
- 0x2800,
- "GL_TEXTURE_MAG_FILTER",
+ 0x2800,
+ "GL_TEXTURE_MAG_FILTER",
},
{
- 0x2801,
- "GL_TEXTURE_MIN_FILTER",
+ 0x2801,
+ "GL_TEXTURE_MIN_FILTER",
},
{
- 0x2802,
- "GL_TEXTURE_WRAP_S",
+ 0x2802,
+ "GL_TEXTURE_WRAP_S",
},
{
- 0x2803,
- "GL_TEXTURE_WRAP_T",
+ 0x2803,
+ "GL_TEXTURE_WRAP_T",
},
{
- 0x8DCB,
- "GL_INT_SAMPLER_3D",
+ 0x8DCB,
+ "GL_INT_SAMPLER_3D",
},
{
- 0x3007,
- "GL_CLIP_DISTANCE7_APPLE",
+ 0x3007,
+ "GL_CLIP_DISTANCE7_APPLE",
},
{
- 0x2703,
- "GL_LINEAR_MIPMAP_LINEAR",
+ 0x2703,
+ "GL_LINEAR_MIPMAP_LINEAR",
},
{
- 0x3005,
- "GL_CLIP_DISTANCE5_APPLE",
+ 0x3005,
+ "GL_CLIP_DISTANCE5_APPLE",
},
{
- 0x3004,
- "GL_CLIP_DISTANCE4_APPLE",
+ 0x3004,
+ "GL_CLIP_DISTANCE4_APPLE",
},
{
- 0x8B98,
- "GL_PALETTE8_RGBA4_OES",
+ 0x8B98,
+ "GL_PALETTE8_RGBA4_OES",
},
{
- 0x3002,
- "GL_CLIP_DISTANCE2_APPLE",
+ 0x3002,
+ "GL_CLIP_DISTANCE2_APPLE",
},
{
- 0x3001,
- "GL_CLIP_DISTANCE1_APPLE",
+ 0x3001,
+ "GL_CLIP_DISTANCE1_APPLE",
},
{
- 0x2702,
- "GL_NEAREST_MIPMAP_LINEAR",
+ 0x2702,
+ "GL_NEAREST_MIPMAP_LINEAR",
},
{
- 0x1F03,
- "GL_EXTENSIONS",
+ 0x1F03,
+ "GL_EXTENSIONS",
},
{
- 0x1F02,
- "GL_VERSION",
+ 0x1F02,
+ "GL_VERSION",
},
{
- 0x1F01,
- "GL_RENDERER",
+ 0x1F01,
+ "GL_RENDERER",
},
{
- 0x1F00,
- "GL_VENDOR",
+ 0x1F00,
+ "GL_VENDOR",
},
{
- 0x9247,
- "GL_OVERLAY_TRANSFORM_FLIP_VERTICAL_CHROMIUM",
+ 0x9247,
+ "GL_OVERLAY_TRANSFORM_FLIP_VERTICAL_CHROMIUM",
},
{
- 0x2701,
- "GL_LINEAR_MIPMAP_NEAREST",
+ 0x2701,
+ "GL_LINEAR_MIPMAP_NEAREST",
},
{
- 0x9245,
- "GL_OVERLAY_TRANSFORM_NONE_CHROMIUM",
+ 0x9245,
+ "GL_OVERLAY_TRANSFORM_NONE_CHROMIUM",
},
{
- 0x92B4,
- "GL_INVERT_OVG_NV",
+ 0x92B4,
+ "GL_INVERT_OVG_NV",
},
{
- 0x9249,
- "GL_OVERLAY_TRANSFORM_ROTATE_180_CHROMIUM",
+ 0x9249,
+ "GL_OVERLAY_TRANSFORM_ROTATE_180_CHROMIUM",
},
{
- 0x0B94,
- "GL_STENCIL_FAIL",
+ 0x0B94,
+ "GL_STENCIL_FAIL",
},
{
- 0x8B4A,
- "GL_MAX_VERTEX_UNIFORM_COMPONENTS",
+ 0x8B4A,
+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS",
},
{
- 0x8B4B,
- "GL_MAX_VARYING_COMPONENTS",
+ 0x8B4B,
+ "GL_MAX_VARYING_COMPONENTS",
},
{
- 0x8B4C,
- "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS",
+ 0x8B4C,
+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS",
},
{
- 0x8B4D,
- "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS",
+ 0x8B4D,
+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS",
},
{
- 0x8B4F,
- "GL_SHADER_TYPE",
+ 0x8B4F,
+ "GL_SHADER_TYPE",
},
{
- 0x9122,
- "GL_MAX_VERTEX_OUTPUT_COMPONENTS",
+ 0x9122,
+ "GL_MAX_VERTEX_OUTPUT_COMPONENTS",
},
{
- 0x9123,
- "GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT",
+ 0x9123,
+ "GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT",
},
{
- 0x83FB,
- "GL_PERFQUERY_WAIT_INTEL",
+ 0x83FB,
+ "GL_PERFQUERY_WAIT_INTEL",
},
{
- 0x9121,
- "GL_BUFFER_MAP_OFFSET",
+ 0x9121,
+ "GL_BUFFER_MAP_OFFSET",
},
{
- 0x00004000,
- "GL_COLOR_BUFFER_BIT",
+ 0x00004000,
+ "GL_COLOR_BUFFER_BIT",
},
{
- 0x9125,
- "GL_MAX_FRAGMENT_INPUT_COMPONENTS",
+ 0x9125,
+ "GL_MAX_FRAGMENT_INPUT_COMPONENTS",
},
{
- 0x00000010,
- "GL_TESS_EVALUATION_SHADER_BIT_EXT",
+ 0x00000010,
+ "GL_TESS_EVALUATION_SHADER_BIT_EXT",
},
{
- 0x8834,
- "GL_DRAW_BUFFER15_EXT",
+ 0x8834,
+ "GL_DRAW_BUFFER15_EXT",
},
{
- 0x8833,
- "GL_DRAW_BUFFER14_EXT",
+ 0x8833,
+ "GL_DRAW_BUFFER14_EXT",
},
{
- 0x8832,
- "GL_DRAW_BUFFER13_EXT",
+ 0x8832,
+ "GL_DRAW_BUFFER13_EXT",
},
{
- 0x8831,
- "GL_DRAW_BUFFER12_EXT",
+ 0x8831,
+ "GL_DRAW_BUFFER12_EXT",
},
{
- 0x8830,
- "GL_DRAW_BUFFER11_EXT",
+ 0x8830,
+ "GL_DRAW_BUFFER11_EXT",
},
{
- 0x8DC5,
- "GL_SAMPLER_CUBE_SHADOW_NV",
+ 0x8DC5,
+ "GL_SAMPLER_CUBE_SHADOW_NV",
},
{
- 0x94FF,
- "GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL",
+ 0x94FF,
+ "GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL",
},
{
- 0x94FE,
- "GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL",
+ 0x94FE,
+ "GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL",
},
{
- 0x94FD,
- "GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL",
+ 0x94FD,
+ "GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL",
},
{
- 0x94FC,
- "GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL",
+ 0x94FC,
+ "GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL",
},
{
- 0x94FB,
- "GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL",
+ 0x94FB,
+ "GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL",
},
{
- 0x93B8,
- "GL_COMPRESSED_RGBA_ASTC_10x5_KHR",
+ 0x93B8,
+ "GL_COMPRESSED_RGBA_ASTC_10x5_KHR",
},
{
- 0x8B65,
- "GL_FLOAT_MAT2x3_NV",
+ 0x8B65,
+ "GL_FLOAT_MAT2x3_NV",
},
{
- 0x9241,
- "GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM",
+ 0x9241,
+ "GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM",
},
{
- 0x00010000,
- "GL_STENCIL_BUFFER_BIT0_QCOM",
+ 0x00010000,
+ "GL_STENCIL_BUFFER_BIT0_QCOM",
},
{
- 0x83FA,
- "GL_PERFQUERY_FLUSH_INTEL",
+ 0x83FA,
+ "GL_PERFQUERY_FLUSH_INTEL",
},
{
- 0x0D03,
- "GL_PACK_SKIP_ROWS",
+ 0x0D03,
+ "GL_PACK_SKIP_ROWS",
},
{
- 0x84F3,
- "GL_FENCE_STATUS_NV",
+ 0x84F3,
+ "GL_FENCE_STATUS_NV",
},
{
- 0x88E6,
- "GL_STATIC_COPY",
+ 0x88E6,
+ "GL_STATIC_COPY",
},
{
- 0x0B93,
- "GL_STENCIL_VALUE_MASK",
+ 0x0B93,
+ "GL_STENCIL_VALUE_MASK",
},
{
- 0x0B92,
- "GL_STENCIL_FUNC",
+ 0x0B92,
+ "GL_STENCIL_FUNC",
},
{
- 0x0B91,
- "GL_STENCIL_CLEAR_VALUE",
+ 0x0B91,
+ "GL_STENCIL_CLEAR_VALUE",
},
{
- 0x883D,
- "GL_BLEND_EQUATION_ALPHA",
+ 0x883D,
+ "GL_BLEND_EQUATION_ALPHA",
},
{
- 0x0B97,
- "GL_STENCIL_REF",
+ 0x0B97,
+ "GL_STENCIL_REF",
},
{
- 0x0B96,
- "GL_STENCIL_PASS_DEPTH_PASS",
+ 0x0B96,
+ "GL_STENCIL_PASS_DEPTH_PASS",
},
{
- 0x0B95,
- "GL_STENCIL_PASS_DEPTH_FAIL",
+ 0x0B95,
+ "GL_STENCIL_PASS_DEPTH_FAIL",
},
{
- 0x2700,
- "GL_NEAREST_MIPMAP_NEAREST",
+ 0x2700,
+ "GL_NEAREST_MIPMAP_NEAREST",
},
{
- 0x94F5,
- "GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL",
+ 0x94F5,
+ "GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL",
},
{
- 0x0B98,
- "GL_STENCIL_WRITEMASK",
+ 0x0B98,
+ "GL_STENCIL_WRITEMASK",
},
{
- 0x94F3,
- "GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL",
+ 0x94F3,
+ "GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL",
},
{
- 0x94F2,
- "GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL",
+ 0x94F2,
+ "GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL",
},
{
- 0x94F1,
- "GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL",
+ 0x94F1,
+ "GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL",
},
{
- 0x94F0,
- "GL_PERFQUERY_COUNTER_EVENT_INTEL",
+ 0x94F0,
+ "GL_PERFQUERY_COUNTER_EVENT_INTEL",
},
{
- 0x8B40,
- "GL_PROGRAM_OBJECT_EXT",
+ 0x8B40,
+ "GL_PROGRAM_OBJECT_EXT",
},
{
- 0x1004,
- "GL_TEXTURE_BORDER_COLOR_EXT",
+ 0x1004,
+ "GL_TEXTURE_BORDER_COLOR_EXT",
},
{
- 0x8A2D,
- "GL_MAX_FRAGMENT_UNIFORM_BLOCKS",
+ 0x8A2D,
+ "GL_MAX_FRAGMENT_UNIFORM_BLOCKS",
},
{
- 0x8B48,
- "GL_SHADER_OBJECT_EXT",
+ 0x8B48,
+ "GL_SHADER_OBJECT_EXT",
},
{
- 0x8B49,
- "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS",
+ 0x8B49,
+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS",
},
{
- 0x813A,
- "GL_TEXTURE_MIN_LOD",
+ 0x813A,
+ "GL_TEXTURE_MIN_LOD",
},
{
- 0x8DE1,
- "GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT",
+ 0x8DE1,
+ "GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT",
},
{
- 0x8DE0,
- "GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT",
+ 0x8DE0,
+ "GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT",
},
{
- 0x924C,
- "GL_MOUSE_POSITION_CHROMIUM",
+ 0x924C,
+ "GL_MOUSE_POSITION_CHROMIUM",
},
{
- 0x924B,
- "GL_SUBSCRIBED_VALUES_BUFFER_CHROMIUM",
+ 0x924B,
+ "GL_SUBSCRIBED_VALUES_BUFFER_CHROMIUM",
},
{
- 0x924A,
- "GL_OVERLAY_TRANSFORM_ROTATE_270_CHROMIUM",
+ 0x924A,
+ "GL_OVERLAY_TRANSFORM_ROTATE_270_CHROMIUM",
},
{
- 0x8A2F,
- "GL_MAX_UNIFORM_BUFFER_BINDINGS",
+ 0x8A2F,
+ "GL_MAX_UNIFORM_BUFFER_BINDINGS",
},
{
- 0x20000000,
- "GL_MULTISAMPLE_BUFFER_BIT5_QCOM",
+ 0x20000000,
+ "GL_MULTISAMPLE_BUFFER_BIT5_QCOM",
},
{
- 64,
- "GL_MAILBOX_SIZE_CHROMIUM",
+ 64,
+ "GL_MAILBOX_SIZE_CHROMIUM",
},
{
- 0x0DE1,
- "GL_TEXTURE_2D",
+ 0x0DE1,
+ "GL_TEXTURE_2D",
},
{
- 0x8A2C,
- "GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT",
+ 0x8A2C,
+ "GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT",
},
{
- 0x80C9,
- "GL_BLEND_SRC_RGB",
+ 0x80C9,
+ "GL_BLEND_SRC_RGB",
},
{
- 0x80C8,
- "GL_BLEND_DST_RGB",
+ 0x80C8,
+ "GL_BLEND_DST_RGB",
},
{
- 0x912F,
- "GL_TEXTURE_IMMUTABLE_FORMAT_EXT",
+ 0x912F,
+ "GL_TEXTURE_IMMUTABLE_FORMAT_EXT",
},
{
- 0x8A2B,
- "GL_MAX_VERTEX_UNIFORM_BLOCKS",
+ 0x8A2B,
+ "GL_MAX_VERTEX_UNIFORM_BLOCKS",
},
{
- 0x88EC,
- "GL_PIXEL_UNPACK_BUFFER",
+ 0x88EC,
+ "GL_PIXEL_UNPACK_BUFFER",
},
{
- 0x8D8F,
- "GL_RGB8I",
+ 0x8D8F,
+ "GL_RGB8I",
},
{
- 0x8059,
- "GL_RGB10_A2_EXT",
+ 0x8059,
+ "GL_RGB10_A2_EXT",
},
{
- 0x8058,
- "GL_RGBA8_OES",
+ 0x8058,
+ "GL_RGBA8_OES",
},
{
- 0x8B93,
- "GL_PALETTE4_RGBA4_OES",
+ 0x8B93,
+ "GL_PALETTE4_RGBA4_OES",
},
{
- 0x88EB,
- "GL_PIXEL_PACK_BUFFER",
+ 0x88EB,
+ "GL_PIXEL_PACK_BUFFER",
},
{
- 0x8E83,
- "GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT",
+ 0x8E83,
+ "GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT",
},
{
- 0x8051,
- "GL_RGB8_OES",
+ 0x8051,
+ "GL_RGB8_OES",
},
{
- 0x8CAD,
- "GL_DEPTH32F_STENCIL8",
+ 0x8CAD,
+ "GL_DEPTH32F_STENCIL8",
},
{
- 0x8052,
- "GL_RGB10_EXT",
+ 0x8052,
+ "GL_RGB10_EXT",
},
{
- 0x8CAB,
- "GL_RENDERBUFFER_SAMPLES_ANGLE",
+ 0x8CAB,
+ "GL_RENDERBUFFER_SAMPLES_ANGLE",
},
{
- 0x8CAC,
- "GL_DEPTH_COMPONENT32F",
+ 0x8CAC,
+ "GL_DEPTH_COMPONENT32F",
},
{
- 0x8057,
- "GL_RGB5_A1",
+ 0x8057,
+ "GL_RGB5_A1",
},
{
- 0x8056,
- "GL_RGBA4",
+ 0x8056,
+ "GL_RGBA4",
},
{
- 0x8232,
- "GL_R8UI",
+ 0x8232,
+ "GL_R8UI",
},
{
- 0x150A,
- "GL_INVERT",
+ 0x150A,
+ "GL_INVERT",
},
{
- 0x01000000,
- "GL_MULTISAMPLE_BUFFER_BIT0_QCOM",
+ 0x01000000,
+ "GL_MULTISAMPLE_BUFFER_BIT0_QCOM",
},
{
- 0x78ED,
- "GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM",
+ 0x78ED,
+ "GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM",
},
{
- 0x78EE,
- "GL_PIXEL_PACK_TRANSFER_BUFFER_BINDING_CHROMIUM",
+ 0x78EE,
+ "GL_PIXEL_PACK_TRANSFER_BUFFER_BINDING_CHROMIUM",
},
{
- 0x6001,
- "GL_TEXTURE_POOL_MANAGED_CHROMIUM",
+ 0x6001,
+ "GL_TEXTURE_POOL_MANAGED_CHROMIUM",
},
{
- 0x0B45,
- "GL_CULL_FACE_MODE",
+ 0x0B45,
+ "GL_CULL_FACE_MODE",
},
{
- 0x8B92,
- "GL_PALETTE4_R5_G6_B5_OES",
+ 0x8B92,
+ "GL_PALETTE4_R5_G6_B5_OES",
},
{
- 0x00100000,
- "GL_STENCIL_BUFFER_BIT4_QCOM",
+ 0x00100000,
+ "GL_STENCIL_BUFFER_BIT4_QCOM",
},
{
- 0x8E4E,
- "GL_LAST_VERTEX_CONVENTION_EXT",
+ 0x8E4E,
+ "GL_LAST_VERTEX_CONVENTION_EXT",
},
{
- 0x8E4D,
- "GL_FIRST_VERTEX_CONVENTION_EXT",
+ 0x8E4D,
+ "GL_FIRST_VERTEX_CONVENTION_EXT",
},
{
- 0x8E24,
- "GL_TRANSFORM_FEEDBACK_ACTIVE",
+ 0x8E24,
+ "GL_TRANSFORM_FEEDBACK_ACTIVE",
},
{
- 0x8E45,
- "GL_TEXTURE_SWIZZLE_A",
+ 0x8E45,
+ "GL_TEXTURE_SWIZZLE_A",
},
{
- 0x8E44,
- "GL_TEXTURE_SWIZZLE_B",
+ 0x8E44,
+ "GL_TEXTURE_SWIZZLE_B",
},
{
- 0x8E43,
- "GL_TEXTURE_SWIZZLE_G",
+ 0x8E43,
+ "GL_TEXTURE_SWIZZLE_G",
},
{
- 0x8E42,
- "GL_TEXTURE_SWIZZLE_R",
+ 0x8E42,
+ "GL_TEXTURE_SWIZZLE_R",
},
{
- 0x8D20,
- "GL_STENCIL_ATTACHMENT",
+ 0x8D20,
+ "GL_STENCIL_ATTACHMENT",
},
{
- 0x8B91,
- "GL_PALETTE4_RGBA8_OES",
+ 0x8B91,
+ "GL_PALETTE4_RGBA8_OES",
},
{
- 0x00000200,
- "GL_DEPTH_BUFFER_BIT1_QCOM",
+ 0x00000200,
+ "GL_DEPTH_BUFFER_BIT1_QCOM",
},
{
- 0x00008000,
- "GL_COVERAGE_BUFFER_BIT_NV",
+ 0x00008000,
+ "GL_COVERAGE_BUFFER_BIT_NV",
},
{
- 0x1506,
- "GL_XOR_NV",
+ 0x1506,
+ "GL_XOR_NV",
},
{
- 0x8CA8,
- "GL_READ_FRAMEBUFFER_ANGLE",
+ 0x8CA8,
+ "GL_READ_FRAMEBUFFER_ANGLE",
},
{
- 0x8CA9,
- "GL_DRAW_FRAMEBUFFER_ANGLE",
+ 0x8CA9,
+ "GL_DRAW_FRAMEBUFFER_ANGLE",
},
{
- 0x8CA6,
- "GL_FRAMEBUFFER_BINDING",
+ 0x8CA6,
+ "GL_FRAMEBUFFER_BINDING",
},
{
- 0x8CA7,
- "GL_RENDERBUFFER_BINDING",
+ 0x8CA7,
+ "GL_RENDERBUFFER_BINDING",
},
{
- 0x8CA4,
- "GL_STENCIL_BACK_VALUE_MASK",
+ 0x8CA4,
+ "GL_STENCIL_BACK_VALUE_MASK",
},
{
- 0x8CA5,
- "GL_STENCIL_BACK_WRITEMASK",
+ 0x8CA5,
+ "GL_STENCIL_BACK_WRITEMASK",
},
{
- 0x8B90,
- "GL_PALETTE4_RGB8_OES",
+ 0x8B90,
+ "GL_PALETTE4_RGB8_OES",
},
{
- 0x8CA3,
- "GL_STENCIL_BACK_REF",
+ 0x8CA3,
+ "GL_STENCIL_BACK_REF",
},
{
- 0x80E8,
- "GL_MAX_ELEMENTS_VERTICES",
+ 0x80E8,
+ "GL_MAX_ELEMENTS_VERTICES",
},
{
- 0x80CB,
- "GL_BLEND_SRC_ALPHA",
+ 0x80CB,
+ "GL_BLEND_SRC_ALPHA",
},
{
- 0x80CA,
- "GL_BLEND_DST_ALPHA",
+ 0x80CA,
+ "GL_BLEND_DST_ALPHA",
},
{
- 0x8CE7,
- "GL_COLOR_ATTACHMENT7_EXT",
+ 0x8CE7,
+ "GL_COLOR_ATTACHMENT7_EXT",
},
{
- 0x93B0,
- "GL_COMPRESSED_RGBA_ASTC_4x4_KHR",
+ 0x93B0,
+ "GL_COMPRESSED_RGBA_ASTC_4x4_KHR",
},
{
- 0x93B1,
- "GL_COMPRESSED_RGBA_ASTC_5x4_KHR",
+ 0x93B1,
+ "GL_COMPRESSED_RGBA_ASTC_5x4_KHR",
},
{
- 0x93B2,
- "GL_COMPRESSED_RGBA_ASTC_5x5_KHR",
+ 0x93B2,
+ "GL_COMPRESSED_RGBA_ASTC_5x5_KHR",
},
{
- 0x93B3,
- "GL_COMPRESSED_RGBA_ASTC_6x5_KHR",
+ 0x93B3,
+ "GL_COMPRESSED_RGBA_ASTC_6x5_KHR",
},
{
- 0x93B4,
- "GL_COMPRESSED_RGBA_ASTC_6x6_KHR",
+ 0x93B4,
+ "GL_COMPRESSED_RGBA_ASTC_6x6_KHR",
},
{
- 0x93B5,
- "GL_COMPRESSED_RGBA_ASTC_8x5_KHR",
+ 0x93B5,
+ "GL_COMPRESSED_RGBA_ASTC_8x5_KHR",
},
{
- 0x93B6,
- "GL_COMPRESSED_RGBA_ASTC_8x6_KHR",
+ 0x93B6,
+ "GL_COMPRESSED_RGBA_ASTC_8x6_KHR",
},
{
- 0x93B7,
- "GL_COMPRESSED_RGBA_ASTC_8x8_KHR",
+ 0x93B7,
+ "GL_COMPRESSED_RGBA_ASTC_8x8_KHR",
},
{
- 0x8CD6,
- "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT",
+ 0x8CD6,
+ "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT",
},
{
- 0x93B9,
- "GL_COMPRESSED_RGBA_ASTC_10x6_KHR",
+ 0x93B9,
+ "GL_COMPRESSED_RGBA_ASTC_10x6_KHR",
},
{
- 0x80E9,
- "GL_MAX_ELEMENTS_INDICES",
+ 0x80E9,
+ "GL_MAX_ELEMENTS_INDICES",
},
{
- 0x8CE5,
- "GL_COLOR_ATTACHMENT5_EXT",
+ 0x8CE5,
+ "GL_COLOR_ATTACHMENT5_EXT",
},
{
- 0x8C84,
- "GL_TRANSFORM_FEEDBACK_BUFFER_START",
+ 0x8C84,
+ "GL_TRANSFORM_FEEDBACK_BUFFER_START",
},
{
- 0x8DC2,
- "GL_SAMPLER_BUFFER_EXT",
+ 0x8DC2,
+ "GL_SAMPLER_BUFFER_EXT",
},
{
- 0x8C36,
- "GL_SAMPLE_SHADING_OES",
+ 0x8C36,
+ "GL_SAMPLE_SHADING_OES",
},
{
- 0x8C37,
- "GL_MIN_SAMPLE_SHADING_VALUE_OES",
+ 0x8C37,
+ "GL_MIN_SAMPLE_SHADING_VALUE_OES",
},
{
- 0x8F97,
- "GL_RGBA8_SNORM",
+ 0x8F97,
+ "GL_RGBA8_SNORM",
},
{
- 0x8CE9,
- "GL_COLOR_ATTACHMENT9_EXT",
+ 0x8CE9,
+ "GL_COLOR_ATTACHMENT9_EXT",
},
{
- 0x8DAD,
- "GL_FLOAT_32_UNSIGNED_INT_24_8_REV",
+ 0x8DAD,
+ "GL_FLOAT_32_UNSIGNED_INT_24_8_REV",
},
{
- 0x8B96,
- "GL_PALETTE8_RGBA8_OES",
+ 0x8B96,
+ "GL_PALETTE8_RGBA8_OES",
},
{
- 0x8872,
- "GL_MAX_TEXTURE_IMAGE_UNITS",
+ 0x8872,
+ "GL_MAX_TEXTURE_IMAGE_UNITS",
},
{
- 0x8DC6,
- "GL_UNSIGNED_INT_VEC2",
+ 0x8DC6,
+ "GL_UNSIGNED_INT_VEC2",
},
{
- 0x8905,
- "GL_MAX_PROGRAM_TEXEL_OFFSET",
+ 0x8905,
+ "GL_MAX_PROGRAM_TEXEL_OFFSET",
},
{
- 0x8508,
- "GL_DECR_WRAP",
+ 0x8508,
+ "GL_DECR_WRAP",
},
{
- 0x92AD,
- "GL_HSL_HUE_KHR",
+ 0x92AD,
+ "GL_HSL_HUE_KHR",
},
{
- 0x92AE,
- "GL_HSL_SATURATION_KHR",
+ 0x92AE,
+ "GL_HSL_SATURATION_KHR",
},
{
- 0x92AF,
- "GL_HSL_COLOR_KHR",
+ 0x92AF,
+ "GL_HSL_COLOR_KHR",
},
{
- 0x8BD4,
- "GL_TEXTURE_DEPTH_QCOM",
+ 0x8BD4,
+ "GL_TEXTURE_DEPTH_QCOM",
},
{
- 0x8DC4,
- "GL_SAMPLER_2D_ARRAY_SHADOW_NV",
+ 0x8DC4,
+ "GL_SAMPLER_2D_ARRAY_SHADOW_NV",
},
{
- 0x8507,
- "GL_INCR_WRAP",
+ 0x8507,
+ "GL_INCR_WRAP",
},
{
- 0x82FC,
- "GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR",
+ 0x82FC,
+ "GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR",
},
{
- 0x8895,
- "GL_ELEMENT_ARRAY_BUFFER_BINDING",
+ 0x8895,
+ "GL_ELEMENT_ARRAY_BUFFER_BINDING",
},
{
- 0x8894,
- "GL_ARRAY_BUFFER_BINDING",
+ 0x8894,
+ "GL_ARRAY_BUFFER_BINDING",
},
{
- 0x92A3,
- "GL_INVERT_RGB_NV",
+ 0x92A3,
+ "GL_INVERT_RGB_NV",
},
{
- 0x905F,
- "GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT",
+ 0x905F,
+ "GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT",
},
{
- 0x92A5,
- "GL_LINEARBURN_NV",
+ 0x92A5,
+ "GL_LINEARBURN_NV",
},
{
- 0x8893,
- "GL_ELEMENT_ARRAY_BUFFER",
+ 0x8893,
+ "GL_ELEMENT_ARRAY_BUFFER",
},
{
- 0x8892,
- "GL_ARRAY_BUFFER",
+ 0x8892,
+ "GL_ARRAY_BUFFER",
},
{
- 0x92A8,
- "GL_PINLIGHT_NV",
+ 0x92A8,
+ "GL_PINLIGHT_NV",
},
{
- 0x92A9,
- "GL_HARDMIX_NV",
+ 0x92A9,
+ "GL_HARDMIX_NV",
},
{
- 0x9112,
- "GL_OBJECT_TYPE_APPLE",
+ 0x9112,
+ "GL_OBJECT_TYPE_APPLE",
},
{
- 0x90CC,
- "GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT",
+ 0x90CC,
+ "GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT",
},
{
- 0x90CD,
- "GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT",
+ 0x90CD,
+ "GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT",
},
{
- 0x919F,
- "GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_EXT",
+ 0x919F,
+ "GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_EXT",
},
{
- 0x919E,
- "GL_TEXTURE_BUFFER_SIZE_EXT",
+ 0x919E,
+ "GL_TEXTURE_BUFFER_SIZE_EXT",
},
{
- 0x919D,
- "GL_TEXTURE_BUFFER_OFFSET_EXT",
+ 0x919D,
+ "GL_TEXTURE_BUFFER_OFFSET_EXT",
},
{
- 0x8BD8,
- "GL_TEXTURE_IMAGE_VALID_QCOM",
+ 0x8BD8,
+ "GL_TEXTURE_IMAGE_VALID_QCOM",
},
{
- 0x9278,
- "GL_COMPRESSED_RGBA8_ETC2_EAC",
+ 0x9278,
+ "GL_COMPRESSED_RGBA8_ETC2_EAC",
},
{
- 0x9279,
- "GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",
+ 0x9279,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",
},
{
- 0x8DA7,
- "GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT",
+ 0x8DA7,
+ "GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT",
},
{
- 0x9272,
- "GL_COMPRESSED_RG11_EAC",
+ 0x9272,
+ "GL_COMPRESSED_RG11_EAC",
},
{
- 0x8DA8,
- "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT",
+ 0x8DA8,
+ "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT",
},
{
- 0x9270,
- "GL_COMPRESSED_R11_EAC",
+ 0x9270,
+ "GL_COMPRESSED_R11_EAC",
},
{
- 0x9271,
- "GL_COMPRESSED_SIGNED_R11_EAC",
+ 0x9271,
+ "GL_COMPRESSED_SIGNED_R11_EAC",
},
{
- 0x9276,
- "GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",
+ 0x9276,
+ "GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",
},
{
- 0x887F,
- "GL_GEOMETRY_SHADER_INVOCATIONS_EXT",
+ 0x887F,
+ "GL_GEOMETRY_SHADER_INVOCATIONS_EXT",
},
{
- 0x8A3B,
- "GL_UNIFORM_OFFSET",
+ 0x8A3B,
+ "GL_UNIFORM_OFFSET",
},
{
- 0x9275,
- "GL_COMPRESSED_SRGB8_ETC2",
+ 0x9275,
+ "GL_COMPRESSED_SRGB8_ETC2",
},
{
- 0x84D5,
- "GL_TEXTURE21",
+ 0x84D5,
+ "GL_TEXTURE21",
},
{
- 0x8C3A,
- "GL_R11F_G11F_B10F_APPLE",
+ 0x8C3A,
+ "GL_R11F_G11F_B10F_APPLE",
},
{
- 0x8C3B,
- "GL_UNSIGNED_INT_10F_11F_11F_REV_APPLE",
+ 0x8C3B,
+ "GL_UNSIGNED_INT_10F_11F_11F_REV_APPLE",
},
{
- 0x8C3D,
- "GL_RGB9_E5_APPLE",
+ 0x8C3D,
+ "GL_RGB9_E5_APPLE",
},
{
- 0x8C3E,
- "GL_UNSIGNED_INT_5_9_9_9_REV_APPLE",
+ 0x8C3E,
+ "GL_UNSIGNED_INT_5_9_9_9_REV_APPLE",
},
{
- 0x9287,
- "GL_DST_NV",
+ 0x9287,
+ "GL_DST_NV",
},
{
- 0x93BA,
- "GL_COMPRESSED_RGBA_ASTC_10x8_KHR",
+ 0x93BA,
+ "GL_COMPRESSED_RGBA_ASTC_10x8_KHR",
},
{
- 0x9285,
- "GL_BLEND_ADVANCED_COHERENT_KHR",
+ 0x9285,
+ "GL_BLEND_ADVANCED_COHERENT_KHR",
},
{
- 0x93BC,
- "GL_COMPRESSED_RGBA_ASTC_12x10_KHR",
+ 0x93BC,
+ "GL_COMPRESSED_RGBA_ASTC_12x10_KHR",
},
{
- 0x93BD,
- "GL_COMPRESSED_RGBA_ASTC_12x12_KHR",
+ 0x93BD,
+ "GL_COMPRESSED_RGBA_ASTC_12x12_KHR",
},
{
- 0x84E8,
- "GL_MAX_RENDERBUFFER_SIZE",
+ 0x84E8,
+ "GL_MAX_RENDERBUFFER_SIZE",
},
{
- 0x9281,
- "GL_BLEND_OVERLAP_NV",
+ 0x9281,
+ "GL_BLEND_OVERLAP_NV",
},
{
- 0x9280,
- "GL_BLEND_PREMULTIPLIED_SRC_NV",
+ 0x9280,
+ "GL_BLEND_PREMULTIPLIED_SRC_NV",
},
{
- 0x00002000,
- "GL_DEPTH_BUFFER_BIT5_QCOM",
+ 0x00002000,
+ "GL_DEPTH_BUFFER_BIT5_QCOM",
},
{
- 0x8370,
- "GL_MIRRORED_REPEAT",
+ 0x8370,
+ "GL_MIRRORED_REPEAT",
},
{
- 0x84E0,
- "GL_ACTIVE_TEXTURE",
+ 0x84E0,
+ "GL_ACTIVE_TEXTURE",
},
{
- 0x8800,
- "GL_STENCIL_BACK_FUNC",
+ 0x8800,
+ "GL_STENCIL_BACK_FUNC",
},
{
- 0x8801,
- "GL_STENCIL_BACK_FAIL",
+ 0x8801,
+ "GL_STENCIL_BACK_FAIL",
},
{
- 0x0D33,
- "GL_MAX_TEXTURE_SIZE",
+ 0x0D33,
+ "GL_MAX_TEXTURE_SIZE",
},
{
- 0x0D32,
- "GL_MAX_CLIP_DISTANCES_APPLE",
+ 0x0D32,
+ "GL_MAX_CLIP_DISTANCES_APPLE",
},
{
- 0x8624,
- "GL_VERTEX_ATTRIB_ARRAY_STRIDE",
+ 0x8624,
+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE",
},
{
- 0x8625,
- "GL_VERTEX_ATTRIB_ARRAY_TYPE",
+ 0x8625,
+ "GL_VERTEX_ATTRIB_ARRAY_TYPE",
},
{
- 0x8622,
- "GL_VERTEX_ATTRIB_ARRAY_ENABLED",
+ 0x8622,
+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED",
},
{
- 0x8623,
- "GL_VERTEX_ATTRIB_ARRAY_SIZE",
+ 0x8623,
+ "GL_VERTEX_ATTRIB_ARRAY_SIZE",
},
{
- 0x8DB9,
- "GL_FRAMEBUFFER_SRGB_EXT",
+ 0x8DB9,
+ "GL_FRAMEBUFFER_SRGB_EXT",
},
{
- 0x9307,
- "GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT",
+ 0x9307,
+ "GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT",
},
{
- 0x8259,
- "GL_ACTIVE_PROGRAM_EXT",
+ 0x8259,
+ "GL_ACTIVE_PROGRAM_EXT",
},
{
- 0x8258,
- "GL_PROGRAM_SEPARABLE_EXT",
+ 0x8258,
+ "GL_PROGRAM_SEPARABLE_EXT",
},
{
- 0x8257,
- "GL_PROGRAM_BINARY_RETRIEVABLE_HINT",
+ 0x8257,
+ "GL_PROGRAM_BINARY_RETRIEVABLE_HINT",
},
{
- 0x8256,
- "GL_RESET_NOTIFICATION_STRATEGY_KHR",
+ 0x8256,
+ "GL_RESET_NOTIFICATION_STRATEGY_KHR",
},
{
- 0x8255,
- "GL_UNKNOWN_CONTEXT_RESET_KHR",
+ 0x8255,
+ "GL_UNKNOWN_CONTEXT_RESET_KHR",
},
{
- 0x8254,
- "GL_INNOCENT_CONTEXT_RESET_KHR",
+ 0x8254,
+ "GL_INNOCENT_CONTEXT_RESET_KHR",
},
{
- 0x1100,
- "GL_DONT_CARE",
+ 0x1100,
+ "GL_DONT_CARE",
},
{
- 0x1101,
- "GL_FASTEST",
+ 0x1101,
+ "GL_FASTEST",
},
{
- 0x1102,
- "GL_NICEST",
+ 0x1102,
+ "GL_NICEST",
},
{
- 0x8250,
- "GL_DEBUG_TYPE_PERFORMANCE_KHR",
+ 0x8250,
+ "GL_DEBUG_TYPE_PERFORMANCE_KHR",
},
{
- 0x8CEB,
- "GL_COLOR_ATTACHMENT11_EXT",
+ 0x8CEB,
+ "GL_COLOR_ATTACHMENT11_EXT",
},
{
- 0x8CEC,
- "GL_COLOR_ATTACHMENT12_EXT",
+ 0x8CEC,
+ "GL_COLOR_ATTACHMENT12_EXT",
},
{
- 0x0408,
- "GL_FRONT_AND_BACK",
+ 0x0408,
+ "GL_FRONT_AND_BACK",
},
{
- 0x8CEA,
- "GL_COLOR_ATTACHMENT10_EXT",
+ 0x8CEA,
+ "GL_COLOR_ATTACHMENT10_EXT",
},
{
- 0x8CEF,
- "GL_COLOR_ATTACHMENT15_EXT",
+ 0x8CEF,
+ "GL_COLOR_ATTACHMENT15_EXT",
},
{
- 0x8CED,
- "GL_COLOR_ATTACHMENT13_EXT",
+ 0x8CED,
+ "GL_COLOR_ATTACHMENT13_EXT",
},
{
- 0x8829,
- "GL_DRAW_BUFFER4_EXT",
+ 0x8829,
+ "GL_DRAW_BUFFER4_EXT",
},
{
- 0x0404,
- "GL_FRONT",
+ 0x0404,
+ "GL_FRONT",
},
{
- 0x0405,
- "GL_BACK",
+ 0x0405,
+ "GL_BACK",
},
{
- 0x88E1,
- "GL_STREAM_READ",
+ 0x88E1,
+ "GL_STREAM_READ",
},
{
- 0x88E0,
- "GL_STREAM_DRAW",
+ 0x88E0,
+ "GL_STREAM_DRAW",
},
{
- 0x88E2,
- "GL_STREAM_COPY",
+ 0x88E2,
+ "GL_STREAM_COPY",
},
{
- 0x88E5,
- "GL_STATIC_READ",
+ 0x88E5,
+ "GL_STATIC_READ",
},
{
- 0x88E4,
- "GL_STATIC_DRAW",
+ 0x88E4,
+ "GL_STATIC_DRAW",
},
{
- 0x93C6,
- "GL_COMPRESSED_RGBA_ASTC_5x5x5_OES",
+ 0x93C6,
+ "GL_COMPRESSED_RGBA_ASTC_5x5x5_OES",
},
{
- 0x88E9,
- "GL_DYNAMIC_READ",
+ 0x88E9,
+ "GL_DYNAMIC_READ",
},
{
- 0x88E8,
- "GL_DYNAMIC_DRAW",
+ 0x88E8,
+ "GL_DYNAMIC_DRAW",
},
{
- 0x9291,
- "GL_PLUS_NV",
+ 0x9291,
+ "GL_PLUS_NV",
},
{
- 0x8CAA,
- "GL_READ_FRAMEBUFFER_BINDING_ANGLE",
+ 0x8CAA,
+ "GL_READ_FRAMEBUFFER_BINDING_ANGLE",
},
{
- 0x93C5,
- "GL_COMPRESSED_RGBA_ASTC_5x5x4_OES",
+ 0x93C5,
+ "GL_COMPRESSED_RGBA_ASTC_5x5x4_OES",
},
{
- 0x40000000,
- "GL_MULTISAMPLE_BUFFER_BIT6_QCOM",
+ 0x40000000,
+ "GL_MULTISAMPLE_BUFFER_BIT6_QCOM",
},
{
- 0x88EA,
- "GL_DYNAMIC_COPY",
+ 0x88EA,
+ "GL_DYNAMIC_COPY",
},
{
- 0x9116,
- "GL_SYNC_FENCE_APPLE",
+ 0x9116,
+ "GL_SYNC_FENCE_APPLE",
},
{
- 0x93C4,
- "GL_COMPRESSED_RGBA_ASTC_5x4x4_OES",
+ 0x93C4,
+ "GL_COMPRESSED_RGBA_ASTC_5x4x4_OES",
},
{
- 0x88EE,
- "GL_ETC1_SRGB8_NV",
+ 0x88EE,
+ "GL_ETC1_SRGB8_NV",
},
{
- 0x78EC,
- "GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM",
+ 0x78EC,
+ "GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM",
},
{
- 0x88EF,
- "GL_PIXEL_UNPACK_BUFFER_BINDING",
+ 0x88EF,
+ "GL_PIXEL_UNPACK_BUFFER_BINDING",
},
{
- 0x93C3,
- "GL_COMPRESSED_RGBA_ASTC_4x4x4_OES",
+ 0x93C3,
+ "GL_COMPRESSED_RGBA_ASTC_4x4x4_OES",
},
{
- 0x00000800,
- "GL_DEPTH_BUFFER_BIT3_QCOM",
+ 0x00000800,
+ "GL_DEPTH_BUFFER_BIT3_QCOM",
},
{
- 0x1903,
- "GL_RED_EXT",
+ 0x1903,
+ "GL_RED_EXT",
},
{
- 0x93C2,
- "GL_COMPRESSED_RGBA_ASTC_4x4x3_OES",
+ 0x93C2,
+ "GL_COMPRESSED_RGBA_ASTC_4x4x3_OES",
},
{
- 0x8CE2,
- "GL_COLOR_ATTACHMENT2_EXT",
+ 0x8CE2,
+ "GL_COLOR_ATTACHMENT2_EXT",
},
{
- 0x8BC1,
- "GL_COUNTER_RANGE_AMD",
+ 0x8BC1,
+ "GL_COUNTER_RANGE_AMD",
},
{
- 0x8CE0,
- "GL_COLOR_ATTACHMENT0",
+ 0x8CE0,
+ "GL_COLOR_ATTACHMENT0",
},
{
- 0x8CE1,
- "GL_COLOR_ATTACHMENT1_EXT",
+ 0x8CE1,
+ "GL_COLOR_ATTACHMENT1_EXT",
},
{
- 0x8CE6,
- "GL_COLOR_ATTACHMENT6_EXT",
+ 0x8CE6,
+ "GL_COLOR_ATTACHMENT6_EXT",
},
{
- 0x93C1,
- "GL_COMPRESSED_RGBA_ASTC_4x3x3_OES",
+ 0x93C1,
+ "GL_COMPRESSED_RGBA_ASTC_4x3x3_OES",
},
{
- 0x8A1F,
- "GL_RGB_422_APPLE",
+ 0x8A1F,
+ "GL_RGB_422_APPLE",
},
{
- 0x93DC,
- "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR",
+ 0x93DC,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR",
},
{
- 0x9292,
- "GL_PLUS_DARKER_NV",
+ 0x9292,
+ "GL_PLUS_DARKER_NV",
},
{
- 0x8CE8,
- "GL_COLOR_ATTACHMENT8_EXT",
+ 0x8CE8,
+ "GL_COLOR_ATTACHMENT8_EXT",
},
{
- 0x93C0,
- "GL_COMPRESSED_RGBA_ASTC_3x3x3_OES",
+ 0x93C0,
+ "GL_COMPRESSED_RGBA_ASTC_3x3x3_OES",
},
{
- 0x0C23,
- "GL_COLOR_WRITEMASK",
+ 0x0C23,
+ "GL_COLOR_WRITEMASK",
},
{
- 0x0C22,
- "GL_COLOR_CLEAR_VALUE",
+ 0x0C22,
+ "GL_COLOR_CLEAR_VALUE",
},
{
- 0x8A11,
- "GL_UNIFORM_BUFFER",
+ 0x8A11,
+ "GL_UNIFORM_BUFFER",
},
{
- 0x8823,
- "GL_WRITEONLY_RENDERING_QCOM",
+ 0x8823,
+ "GL_WRITEONLY_RENDERING_QCOM",
},
{
- 0x8824,
- "GL_MAX_DRAW_BUFFERS_EXT",
+ 0x8824,
+ "GL_MAX_DRAW_BUFFERS_EXT",
},
{
- 0x825E,
- "GL_LAYER_PROVOKING_VERTEX_EXT",
+ 0x825E,
+ "GL_LAYER_PROVOKING_VERTEX_EXT",
},
{
- 0x825A,
- "GL_PROGRAM_PIPELINE_BINDING_EXT",
+ 0x825A,
+ "GL_PROGRAM_PIPELINE_BINDING_EXT",
},
{
- 0x1909,
- "GL_LUMINANCE",
+ 0x1909,
+ "GL_LUMINANCE",
},
{
- 0x0D3A,
- "GL_MAX_VIEWPORT_DIMS",
+ 0x0D3A,
+ "GL_MAX_VIEWPORT_DIMS",
},
{
- 0x8B53,
- "GL_INT_VEC2",
+ 0x8B53,
+ "GL_INT_VEC2",
},
{
- 0x8826,
- "GL_DRAW_BUFFER1_EXT",
+ 0x8826,
+ "GL_DRAW_BUFFER1_EXT",
},
{
- 0x809E,
- "GL_SAMPLE_ALPHA_TO_COVERAGE",
+ 0x809E,
+ "GL_SAMPLE_ALPHA_TO_COVERAGE",
},
{
- 0x8BC0,
- "GL_COUNTER_TYPE_AMD",
+ 0x8BC0,
+ "GL_COUNTER_TYPE_AMD",
},
{
- 0x8BC3,
- "GL_PERCENTAGE_AMD",
+ 0x8BC3,
+ "GL_PERCENTAGE_AMD",
},
{
- 0x8BC2,
- "GL_UNSIGNED_INT64_AMD",
+ 0x8BC2,
+ "GL_UNSIGNED_INT64_AMD",
},
{
- 0x8BC5,
- "GL_PERFMON_RESULT_SIZE_AMD",
+ 0x8BC5,
+ "GL_PERFMON_RESULT_SIZE_AMD",
},
{
- 0x8BC4,
- "GL_PERFMON_RESULT_AVAILABLE_AMD",
+ 0x8BC4,
+ "GL_PERFMON_RESULT_AVAILABLE_AMD",
},
{
- 0x8BC6,
- "GL_PERFMON_RESULT_AMD",
+ 0x8BC6,
+ "GL_PERFMON_RESULT_AMD",
},
};
diff --git a/ui/gl/gl_gl_api_implementation.cc b/ui/gl/gl_gl_api_implementation.cc
index 81a1b72..5bea3f1 100644
--- a/ui/gl/gl_gl_api_implementation.cc
+++ b/ui/gl/gl_gl_api_implementation.cc
@@ -466,11 +466,15 @@
}
}
+ bool state_dirtied_externally = real_context_->GetStateWasDirtiedExternally();
+ real_context_->SetStateWasDirtiedExternally(false);
+
DCHECK_EQ(real_context_, GLContext::GetRealCurrent());
DCHECK(real_context_->IsCurrent(NULL));
DCHECK(virtual_context->IsCurrent(surface));
- if (switched_contexts || virtual_context != current_context_) {
+ if (state_dirtied_externally || switched_contexts ||
+ virtual_context != current_context_) {
#if DCHECK_IS_ON()
GLenum error = glGetErrorFn();
// Accepting a context loss error here enables using debug mode to work on
@@ -485,7 +489,7 @@
SetGLToRealGLApi();
if (virtual_context->GetGLStateRestorer()->IsInitialized()) {
virtual_context->GetGLStateRestorer()->RestoreState(
- (current_context_ && !switched_contexts)
+ (current_context_ && !state_dirtied_externally && !switched_contexts)
? current_context_->GetGLStateRestorer()
: NULL);
}
diff --git a/ui/gl/gl_implementation_win.cc b/ui/gl/gl_implementation_win.cc
index 618250d..477f5a5 100644
--- a/ui/gl/gl_implementation_win.cc
+++ b/ui/gl/gl_implementation_win.cc
@@ -9,7 +9,6 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
-#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/native_library.h"
#include "base/path_service.h"
@@ -17,8 +16,6 @@
#include "base/threading/thread_restrictions.h"
#include "base/trace_event/trace_event.h"
#include "base/win/windows_version.h"
-// TODO(jmadill): Apply to all platforms eventually
-#include "ui/gl/angle_platform_impl.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context_stub_with_extensions.h"
#include "ui/gl/gl_egl_api_implementation.h"
@@ -100,10 +97,6 @@
GetCategoryEnabledFlagFunc get_category_enabled_flag,
AddTraceEventFunc add_trace_event_func);
-// TODO(jmadill): Apply to all platforms eventually
-base::LazyInstance<ANGLEPlatformImpl> g_angle_platform_impl =
- LAZY_INSTANCE_INITIALIZER;
-
} // namespace
void GetAllowedGLImplementations(std::vector<GLImplementation>* impls) {
@@ -118,10 +111,6 @@
// later switch to another GL implementation.
DCHECK_EQ(kGLImplementationNone, GetGLImplementation());
- // Init ANGLE platform here, before we call GetPlatformDisplay().
- // TODO(jmadill): Apply to all platforms eventually
- angle::Platform::initialize(&g_angle_platform_impl.Get());
-
// Allow the main thread or another to initialize these bindings
// after instituting restrictions on I/O. Going forward they will
// likely be used in the browser process on most platforms. The
@@ -359,9 +348,6 @@
}
void ClearGLBindings() {
- // TODO(jmadill): Apply to all platforms eventually
- angle::Platform::shutdown();
-
ClearGLBindingsEGL();
ClearGLBindingsGL();
ClearGLBindingsOSMESA();
diff --git a/ui/gl/gl_mock_autogen_gl.h b/ui/gl/gl_mock_autogen_gl.h
index 7bec019..d4f3c12 100644
--- a/ui/gl/gl_mock_autogen_gl.h
+++ b/ui/gl/gl_mock_autogen_gl.h
@@ -11,7 +11,6 @@
MOCK_METHOD1(ActiveTexture, void(GLenum texture));
MOCK_METHOD2(AttachShader, void(GLuint program, GLuint shader));
MOCK_METHOD2(BeginQuery, void(GLenum target, GLuint id));
-MOCK_METHOD2(BeginQueryARB, void(GLenum target, GLuint id));
MOCK_METHOD1(BeginTransformFeedback, void(GLenum primitiveMode));
MOCK_METHOD3(BindAttribLocation,
void(GLuint program, GLuint index, const char* name));
@@ -177,7 +176,6 @@
void(GLsizei n, const GLuint* framebuffers));
MOCK_METHOD1(DeleteProgram, void(GLuint program));
MOCK_METHOD2(DeleteQueries, void(GLsizei n, const GLuint* ids));
-MOCK_METHOD2(DeleteQueriesARB, void(GLsizei n, const GLuint* ids));
MOCK_METHOD2(DeleteRenderbuffersEXT,
void(GLsizei n, const GLuint* renderbuffers));
MOCK_METHOD2(DeleteSamplers, void(GLsizei n, const GLuint* samplers));
@@ -225,7 +223,6 @@
MOCK_METHOD1(Enable, void(GLenum cap));
MOCK_METHOD1(EnableVertexAttribArray, void(GLuint index));
MOCK_METHOD1(EndQuery, void(GLenum target));
-MOCK_METHOD1(EndQueryARB, void(GLenum target));
MOCK_METHOD0(EndTransformFeedback, void());
MOCK_METHOD2(FenceSync, GLsync(GLenum condition, GLbitfield flags));
MOCK_METHOD0(Finish, void());
@@ -272,7 +269,6 @@
MOCK_METHOD2(GenFencesNV, void(GLsizei n, GLuint* fences));
MOCK_METHOD2(GenFramebuffersEXT, void(GLsizei n, GLuint* framebuffers));
MOCK_METHOD2(GenQueries, void(GLsizei n, GLuint* ids));
-MOCK_METHOD2(GenQueriesARB, void(GLsizei n, GLuint* ids));
MOCK_METHOD2(GenRenderbuffersEXT, void(GLsizei n, GLuint* renderbuffers));
MOCK_METHOD2(GenSamplers, void(GLsizei n, GLuint* samplers));
MOCK_METHOD2(GenTextures, void(GLsizei n, GLuint* textures));
@@ -349,16 +345,12 @@
MOCK_METHOD3(GetProgramResourceLocation,
GLint(GLuint program, GLenum programInterface, const char* name));
MOCK_METHOD3(GetQueryiv, void(GLenum target, GLenum pname, GLint* params));
-MOCK_METHOD3(GetQueryivARB, void(GLenum target, GLenum pname, GLint* params));
MOCK_METHOD3(GetQueryObjecti64v,
void(GLuint id, GLenum pname, GLint64* params));
MOCK_METHOD3(GetQueryObjectiv, void(GLuint id, GLenum pname, GLint* params));
-MOCK_METHOD3(GetQueryObjectivARB, void(GLuint id, GLenum pname, GLint* params));
MOCK_METHOD3(GetQueryObjectui64v,
void(GLuint id, GLenum pname, GLuint64* params));
MOCK_METHOD3(GetQueryObjectuiv, void(GLuint id, GLenum pname, GLuint* params));
-MOCK_METHOD3(GetQueryObjectuivARB,
- void(GLuint id, GLenum pname, GLuint* params));
MOCK_METHOD3(GetRenderbufferParameterivEXT,
void(GLenum target, GLenum pname, GLint* params));
MOCK_METHOD3(GetSamplerParameterfv,
@@ -442,7 +434,6 @@
MOCK_METHOD1(IsFramebufferEXT, GLboolean(GLuint framebuffer));
MOCK_METHOD1(IsProgram, GLboolean(GLuint program));
MOCK_METHOD1(IsQuery, GLboolean(GLuint query));
-MOCK_METHOD1(IsQueryARB, GLboolean(GLuint query));
MOCK_METHOD1(IsRenderbufferEXT, GLboolean(GLuint renderbuffer));
MOCK_METHOD1(IsSampler, GLboolean(GLuint sampler));
MOCK_METHOD1(IsShader, GLboolean(GLuint shader));
diff --git a/ui/gl/gpu_timing.cc b/ui/gl/gpu_timing.cc
index a744164..a84d3f7 100644
--- a/ui/gl/gpu_timing.cc
+++ b/ui/gl/gpu_timing.cc
@@ -44,7 +44,7 @@
}
GPUTimer::~GPUTimer() {
- glDeleteQueriesARB(2, queries_);
+ glDeleteQueries(2, queries_);
}
void GPUTimer::Start() {
@@ -84,8 +84,8 @@
return false;
}
GLint done = 0;
- glGetQueryObjectivARB(queries_[1] ? queries_[1] : queries_[0],
- GL_QUERY_RESULT_AVAILABLE, &done);
+ glGetQueryObjectiv(queries_[1] ? queries_[1] : queries_[0],
+ GL_QUERY_RESULT_AVAILABLE, &done);
return done != 0;
}
@@ -145,7 +145,7 @@
default:
NOTREACHED();
}
- glGenQueriesARB(queries, queries_);
+ glGenQueries(queries, queries_);
}
GPUTimingClient::GPUTimingClient(GPUTiming* gpu_timing)