Update from https://crrev.com/312398
Involves adding many //testing/test.gni imports, fixing one
SkSurface::NewRenderTarget invocation inside sky, and fixing up
base::Process usage in the shell.
Review URL: https://codereview.chromium.org/862133002
diff --git a/DEPS b/DEPS
index ad9d949..be45317 100644
--- a/DEPS
+++ b/DEPS
@@ -21,15 +21,15 @@
'chromium_git': 'https://chromium.googlesource.com',
'dart_svn': 'https://dart.googlecode.com',
'sfntly_revision': '1bdaae8fc788a5ac8936d68bf24f37d977a13dac',
- 'skia_revision': '199ba8e19b0cafb37eea3beab162bc4b52728fff',
+ 'skia_revision': '3e3b58d57a358e2d52bc23ad2409a95d59310100',
# 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': 'cc2b2f487bfa07c4f8f33ac574a4580ad9ec0374',
+ 'v8_revision': '3efdae6669030b03a841c8d579655ba1f36b1f87',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling ANGLE
# and whatever else without interference from each other.
- 'angle_revision': '9e0478f62fbc2f24d4ec233ef655d50b9dc0b812',
+ 'angle_revision': '2a30ccefd0c47608380a1621a983bf46685e5ad9',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling build tools
# and whatever else without interference from each other.
@@ -41,11 +41,11 @@
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling PDFium
# and whatever else without interference from each other.
- 'pdfium_revision': 'f8105c665856863ad95da37fee6c12b98b953e2c',
+ 'pdfium_revision': 'aa7b4ede03764a5701a477b601720a32c88d8e42',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling BoringSSL
# and whatever else without interference from each other.
- 'boringssl_revision': 'ca9a538aa0f2ebdd261783efa032e69a2ea17fbc',
+ 'boringssl_revision': 'e49da742cb8da281bbeaa7a54aad90aa5d3d19fe',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling lss
# and whatever else without interference from each other.
@@ -73,7 +73,7 @@
Var('chromium_git') + '/external/open-vcdiff.git' + '@' + '438f2a5be6d809bc21611a94cd37bfc8c28ceb33', # from svn revision 41
'src/testing/gtest':
- Var('chromium_git') + '/external/googletest.git' + '@' + '8245545b6dc9c4703e6496d1efd19e975ad2b038', # from svn revision 700
+ Var('chromium_git') + '/external/googletest.git' + '@' + 'be1868139ffe0ccd0e8e3b37292b84c821d9c8ad', # from svn revision 704
'src/testing/gmock':
Var('chromium_git') + '/external/googlemock.git' + '@' + '29763965ab52f24565299976b936d1265cb6a271', # from svn revision 501
@@ -133,7 +133,7 @@
'https://boringssl.googlesource.com/boringssl.git' + '@' + Var('boringssl_revision'),
'src/tools/gyp':
- Var('chromium_git') + '/external/gyp.git' + '@' + '82b08049cc0b1f9e0bdcc0702ac6b523360f635f', # from svn revision 2020
+ Var('chromium_git') + '/external/gyp.git' + '@' + '194ec65a55edf24c1976d4265f57e8c90ef5bb2f', # from svn revision 2023
}
diff --git a/base/BUILD.gn b/base/BUILD.gn
index cb914be..065f871 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/ui.gni")
+import("//testing/test.gni")
if (is_android) {
import("//build/config/android/rules.gni")
@@ -909,7 +910,10 @@
# Linux.
if (is_linux) {
# TODO(brettw) this will need to be parameterized at some point.
- linux_configs = [ "//build/config/linux:glib" ]
+ linux_configs = []
+ if (use_glib) {
+ linux_configs += [ "//build/config/linux:glib" ]
+ }
configs += linux_configs
all_dependent_configs = linux_configs
@@ -1374,6 +1378,13 @@
"//third_party/icu",
]
+ if (is_android) {
+ apk_deps = [
+ ":base_java",
+ ":base_java_unittest_support",
+ ]
+ }
+
if (is_ios) {
sources -= [
"metrics/stats_table_uinittest.cc", # Requires spawning a process.
@@ -1403,10 +1414,12 @@
sources -= [ "file_version_info_unittest.cc" ]
sources += [ "nix/xdg_util_unittest.cc" ]
defines = [ "USE_SYMBOLIZE" ]
- configs += [ "//build/config/linux:glib" ]
+ if (use_glib) {
+ configs += [ "//build/config/linux:glib" ]
+ }
}
- if (!is_linux) {
+ if (!is_linux || use_ozone) {
sources -= [ "message_loop/message_pump_glib_unittest.cc" ]
}
@@ -1526,14 +1539,4 @@
java_files =
[ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ]
}
-
- # GYP: //base.gyp:base_unittests_apk
- unittest_apk("base_unittests_apk") {
- deps = [
- ":base_java",
- ":base_java_unittest_support",
- ":base_unittests",
- ]
- unittests_dep = ":base_unittests"
- }
}
diff --git a/base/DEPS b/base/DEPS
index 2407baa..c632e35 100644
--- a/base/DEPS
+++ b/base/DEPS
@@ -4,7 +4,6 @@
"+third_party/apple_apsl",
"+third_party/libevent",
"+third_party/dmg_fp",
- "+third_party/google_toolbox_for_mac/src",
"+third_party/mach_override",
"+third_party/modp_b64",
"+third_party/tcmalloc",
diff --git a/base/allocator/generic_allocators.cc b/base/allocator/generic_allocators.cc
index 2726903..ae65f77 100644
--- a/base/allocator/generic_allocators.cc
+++ b/base/allocator/generic_allocators.cc
@@ -28,7 +28,7 @@
return generic_cpp_alloc(size, false);
}
-void operator delete(void* p) {
+void operator delete(void* p) throw() {
free(p);
}
@@ -36,7 +36,7 @@
return generic_cpp_alloc(size, false);
}
-void operator delete[](void* p) {
+void operator delete[](void* p) throw() {
free(p);
}
@@ -44,7 +44,7 @@
return generic_cpp_alloc(size, true);
}
-void operator delete(void* p, const std::nothrow_t& nt) {
+void operator delete(void* p, const std::nothrow_t& nt) throw() {
free(p);
}
@@ -52,7 +52,7 @@
return generic_cpp_alloc(size, true);
}
-void operator delete[](void* p, const std::nothrow_t& nt) {
+void operator delete[](void* p, const std::nothrow_t& nt) throw() {
free(p);
}
@@ -83,10 +83,6 @@
return result;
}
-void cfree(void* p) {
- free(p);
-}
-
#ifdef WIN32
void* _recalloc(void* p, size_t n, size_t elem_size) {
diff --git a/base/android/java/src/org/chromium/base/PerfTraceEvent.java b/base/android/java/src/org/chromium/base/PerfTraceEvent.java
index ca22042..c0e4b21 100644
--- a/base/android/java/src/org/chromium/base/PerfTraceEvent.java
+++ b/base/android/java/src/org/chromium/base/PerfTraceEvent.java
@@ -8,6 +8,8 @@
import android.os.Debug.MemoryInfo;
import android.util.Log;
+import org.chromium.base.annotations.SuppressFBWarnings;
+
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -36,6 +38,7 @@
* the @TracePerf annotation. Thus, unlike TraceEvent, we do not
* support an implicit trace name based on the callstack.
*/
+@SuppressFBWarnings("CHROMIUM_SYNCHRONIZED_METHOD")
public class PerfTraceEvent {
private static final int MAX_NAME_LENGTH = 40;
private static final String MEMORY_TRACE_NAME_SUFFIX = "_BZR_PSS";
diff --git a/base/android/java/src/org/chromium/base/annotations/SuppressFBWarnings.java b/base/android/java/src/org/chromium/base/annotations/SuppressFBWarnings.java
new file mode 100644
index 0000000..89068ac
--- /dev/null
+++ b/base/android/java/src/org/chromium/base/annotations/SuppressFBWarnings.java
@@ -0,0 +1,20 @@
+// Copyright 2014 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.
+
+package org.chromium.base.annotations;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * @SuppressFBWarnings is used to suppress FindBugs warnings.
+ *
+ * The long name of FindBugs warnings can be found at
+ * http://findbugs.sourceforge.net/bugDescriptions.html
+ */
+@Retention(RetentionPolicy.CLASS)
+public @interface SuppressFBWarnings {
+ String[] value() default {};
+ String justification() default "";
+}
diff --git a/base/android/java/src/org/chromium/base/library_loader/Linker.java b/base/android/java/src/org/chromium/base/library_loader/Linker.java
index d58d1fc..dfcc141 100644
--- a/base/android/java/src/org/chromium/base/library_loader/Linker.java
+++ b/base/android/java/src/org/chromium/base/library_loader/Linker.java
@@ -845,6 +845,16 @@
*/
public static boolean checkMapExecSupport(String apkFile) {
assert apkFile != null;
+
+ // https://code.google.com/p/chromium/issues/detail?id=448084
+ // Do not check if the device is Samsung Mega.
+ final String model = android.os.Build.MODEL;
+ if (model != null && model.equals("GT-I9205")) {
+ if (DEBUG) Log.i(TAG, "checkMapExecSupport: model is '" + model
+ + "', returning false");
+ return false;
+ }
+
synchronized (Linker.class) {
ensureInitializedLocked();
diff --git a/base/android/java/templates/NativeLibraries.template b/base/android/java/templates/NativeLibraries.template
index f52acb4..d9f6a55 100644
--- a/base/android/java/templates/NativeLibraries.template
+++ b/base/android/java/templates/NativeLibraries.template
@@ -4,6 +4,9 @@
package org.chromium.base.library_loader;
+import org.chromium.base.annotations.SuppressFBWarnings;
+
+@SuppressFBWarnings
public class NativeLibraries {
/**
* IMPORTANT NOTE: The variables defined here must _not_ be 'final'.
diff --git a/base/atomicops.h b/base/atomicops.h
index 833e170..6a5371c 100644
--- a/base/atomicops.h
+++ b/base/atomicops.h
@@ -28,10 +28,14 @@
#ifndef BASE_ATOMICOPS_H_
#define BASE_ATOMICOPS_H_
-#include <cassert> // Small C++ header which defines implementation specific
- // macros used to identify the STL implementation.
#include <stdint.h>
+// Small C++ header which defines implementation specific macros used to
+// identify the STL implementation.
+// - libc++: captures __config for _LIBCPP_VERSION
+// - libstdc++: captures bits/c++config.h for __GLIBCXX__
+#include <cstddef>
+
#include "base/base_export.h"
#include "build/build_config.h"
diff --git a/base/base.gyp b/base/base.gyp
index 4d5ac00..5d26fc4 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -757,6 +757,11 @@
'message_loop/message_pump_glib_unittest.cc',
]
}],
+ ['use_ozone == 1', {
+ 'sources!': [
+ 'message_loop/message_pump_glib_unittest.cc',
+ ]
+ }],
['OS == "linux" and use_allocator!="none"', {
'dependencies': [
'allocator/allocator.gyp:allocator',
diff --git a/base/base.gypi b/base/base.gypi
index 14a632d..349308c 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -941,6 +941,11 @@
'strings/string16.cc',
],
},],
+ ['<(use_ozone) == 1', {
+ 'sources!': [
+ 'message_loop/message_pump_glib.cc',
+ ]
+ }],
['OS == "linux" and >(nacl_untrusted_build)==0', {
'sources!': [
'files/file_path_watcher_fsevents.cc',
diff --git a/base/cancelable_callback.h b/base/cancelable_callback.h
index 91eb046..2b9d260 100644
--- a/base/cancelable_callback.h
+++ b/base/cancelable_callback.h
@@ -62,8 +62,7 @@
// |callback| must not be null.
explicit CancelableCallback(const base::Callback<void(A...)>& callback)
- : weak_factory_(this),
- callback_(callback) {
+ : callback_(callback), weak_factory_(this) {
DCHECK(!callback.is_null());
InitializeForwarder();
}
@@ -113,17 +112,15 @@
weak_factory_.GetWeakPtr());
}
- // Used to ensure Forward() is not run when this object is destroyed.
- // TODO(ckehoe): This should be the last class member.
- // Move it there when crbug.com/433583 is fixed.
- base::WeakPtrFactory<CancelableCallback<void(A...)> > weak_factory_;
-
// The wrapper closure.
base::Callback<void(A...)> forwarder_;
// The stored closure that may be cancelled.
base::Callback<void(A...)> callback_;
+ // Used to ensure Forward() is not run when this object is destroyed.
+ base::WeakPtrFactory<CancelableCallback<void(A...)>> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(CancelableCallback);
};
diff --git a/base/files/file_path.h b/base/files/file_path.h
index 6890866..67bbb4b 100644
--- a/base/files/file_path.h
+++ b/base/files/file_path.h
@@ -238,7 +238,7 @@
// ASSERT(new_path == path.value());
// NOTE: this is different from the original file_util implementation which
// returned the extension without a leading "." ("jpg" instead of ".jpg")
- StringType Extension() const;
+ StringType Extension() const WARN_UNUSED_RESULT;
// Returns the path's file extension, as in Extension(), but will
// never return a double extension.
@@ -247,7 +247,7 @@
// we can rename this to Extension() and the other to something like
// LongExtension(), defaulting to short extensions and leaving the
// long "extensions" to logic like base::GetUniquePathNumber().
- StringType FinalExtension() const;
+ StringType FinalExtension() const WARN_UNUSED_RESULT;
// Returns "C:\pics\jojo" for path "C:\pics\jojo.jpg"
// NOTE: this is slightly different from the similar file_util implementation
diff --git a/base/i18n/rtl.cc b/base/i18n/rtl.cc
index 392cb13..1cccae2 100644
--- a/base/i18n/rtl.cc
+++ b/base/i18n/rtl.cc
@@ -74,8 +74,8 @@
}
// Convert the ICU canonicalized locale to a string.
-std::string GetCanonicalLocale(const char* locale) {
- return GetLocaleString(icu::Locale::createCanonical(locale));
+std::string GetCanonicalLocale(const std::string& locale) {
+ return GetLocaleString(icu::Locale::createCanonical(locale.c_str()));
}
// Convert Chrome locale name to ICU locale name
diff --git a/base/i18n/rtl.h b/base/i18n/rtl.h
index aa5f681..9b9a0dc 100644
--- a/base/i18n/rtl.h
+++ b/base/i18n/rtl.h
@@ -40,7 +40,7 @@
BASE_I18N_EXPORT std::string GetConfiguredLocale();
// Canonicalize a string (eg. a POSIX locale string) to a Chrome locale name.
-BASE_I18N_EXPORT std::string GetCanonicalLocale(const char* locale);
+BASE_I18N_EXPORT std::string GetCanonicalLocale(const std::string& locale);
// Sets the default locale of ICU.
// Once the application locale of Chrome in GetApplicationLocale is determined,
diff --git a/base/ios/weak_nsobject.h b/base/ios/weak_nsobject.h
index 46aecb5..a1984bb 100644
--- a/base/ios/weak_nsobject.h
+++ b/base/ios/weak_nsobject.h
@@ -36,17 +36,28 @@
// NSObject, this relationship is maintained via the ObjectiveC associated
// object API, indirectly via an ObjectiveC CRBWeakNSProtocolSentinel class.
//
-// The implementation assumes that the tracked object will be released on the
-// same thread that the WeakNSObject is created on.
-//
+// Threading restrictions:
+// - Several WeakNSObject pointing to the same underlying object must all be
+// created and dereferenced on the same thread;
+// - thread safety is enforced by the implementation, except in two cases:
+// (1) it is allowed to copy a WeakNSObject on a different thread. However,
+// that copy must return to the original thread before being dereferenced,
+// (2) it is allowed to destroy a WeakNSObject on any thread;
+// - the implementation assumes that the tracked object will be released on the
+// same thread that the WeakNSObject is created on.
namespace base {
// WeakContainer keeps a weak pointer to an object and clears it when it
// receives nullify() from the object's sentinel.
class WeakContainer : public base::RefCountedThreadSafe<WeakContainer> {
public:
- WeakContainer(id object) : object_(object) {}
- id object() { return object_; }
+ explicit WeakContainer(id object) : object_(object) {}
+
+ id object() {
+ DCHECK(checker_.CalledOnValidThread());
+ return object_;
+ }
+
void nullify() {
DCHECK(checker_.CalledOnValidThread());
object_ = nil;
@@ -74,53 +85,63 @@
// Base class for all WeakNSObject derivatives.
template <typename NST>
-class WeakNSProtocol : public base::NonThreadSafe {
+class WeakNSProtocol {
public:
explicit WeakNSProtocol(NST object = nil) {
container_ = [CRBWeakNSProtocolSentinel containerForObject:object];
}
WeakNSProtocol(const WeakNSProtocol<NST>& that) {
+ // A WeakNSProtocol object can be copied on one thread and used on
+ // another.
+ checker_.DetachFromThread();
container_ = that.container_;
}
~WeakNSProtocol() {
- // A WeakNSProtocol object can be allocated on one thread and released on
+ // A WeakNSProtocol object can be used on one thread and released on
// another. This is not the case for the contained object.
- DetachFromThread();
+ checker_.DetachFromThread();
}
void reset(NST object = nil) {
- DCHECK(CalledOnValidThread());
+ DCHECK(checker_.CalledOnValidThread());
container_ = [CRBWeakNSProtocolSentinel containerForObject:object];
}
NST get() const {
- DCHECK(CalledOnValidThread());
+ DCHECK(checker_.CalledOnValidThread());
if (!container_.get())
return nil;
return container_->object();
}
WeakNSProtocol& operator=(const WeakNSProtocol<NST>& that) {
- DCHECK(CalledOnValidThread());
+ DCHECK(checker_.CalledOnValidThread());
container_ = that.container_;
return *this;
}
bool operator==(NST that) const {
- DCHECK(CalledOnValidThread());
+ DCHECK(checker_.CalledOnValidThread());
return get() == that;
}
- bool operator!=(NST that) const { return get() != that; }
+ bool operator!=(NST that) const {
+ DCHECK(checker_.CalledOnValidThread());
+ return get() != that;
+ }
- operator NST() const { return get(); }
+ operator NST() const {
+ DCHECK(checker_.CalledOnValidThread());
+ return get();
+ }
private:
// Refecounted reference to the container tracking the ObjectiveC object this
// class encapsulates.
scoped_refptr<base::WeakContainer> container_;
+ base::ThreadChecker checker_;
};
// Free functions
diff --git a/base/ios/weak_nsobject_unittest.mm b/base/ios/weak_nsobject_unittest.mm
index 9758aed..325dcd2 100644
--- a/base/ios/weak_nsobject_unittest.mm
+++ b/base/ios/weak_nsobject_unittest.mm
@@ -3,16 +3,19 @@
// found in the LICENSE file.
#include "base/basictypes.h"
+#include "base/bind.h"
#include "base/ios/weak_nsobject.h"
#include "base/mac/scoped_nsobject.h"
+#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
+#include "base/threading/thread.h"
#include "testing/gtest/include/gtest/gtest.h"
-using base::WeakNSObject;
-
+namespace base {
namespace {
TEST(WeakNSObjectTest, WeakNSObject) {
- base::scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
+ scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
WeakNSObject<NSObject> w1(p1);
EXPECT_TRUE(w1);
p1.reset();
@@ -20,7 +23,7 @@
}
TEST(WeakNSObjectTest, MultipleWeakNSObject) {
- base::scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
+ scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
WeakNSObject<NSObject> w1(p1);
WeakNSObject<NSObject> w2(w1);
EXPECT_TRUE(w1);
@@ -32,7 +35,7 @@
}
TEST(WeakNSObjectTest, WeakNSObjectDies) {
- base::scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
+ scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
{
WeakNSObject<NSObject> w1(p1);
EXPECT_TRUE(w1);
@@ -40,7 +43,7 @@
}
TEST(WeakNSObjectTest, WeakNSObjectReset) {
- base::scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
+ scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
WeakNSObject<NSObject> w1(p1);
EXPECT_TRUE(w1);
w1.reset();
@@ -50,8 +53,8 @@
}
TEST(WeakNSObjectTest, WeakNSObjectResetWithObject) {
- base::scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
- base::scoped_nsobject<NSObject> p2([[NSObject alloc] init]);
+ scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
+ scoped_nsobject<NSObject> p2([[NSObject alloc] init]);
WeakNSObject<NSObject> w1(p1);
EXPECT_TRUE(w1);
w1.reset(p2);
@@ -61,7 +64,7 @@
}
TEST(WeakNSObjectTest, WeakNSObjectEmpty) {
- base::scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
+ scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
WeakNSObject<NSObject> w1;
EXPECT_FALSE(w1);
w1.reset(p1);
@@ -71,7 +74,7 @@
}
TEST(WeakNSObjectTest, WeakNSObjectCopy) {
- base::scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
+ scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
WeakNSObject<NSObject> w1(p1);
WeakNSObject<NSObject> w2(w1);
EXPECT_TRUE(w1);
@@ -82,7 +85,7 @@
}
TEST(WeakNSObjectTest, WeakNSObjectAssignment) {
- base::scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
+ scoped_nsobject<NSObject> p1([[NSObject alloc] init]);
WeakNSObject<NSObject> w1(p1);
WeakNSObject<NSObject> w2;
EXPECT_FALSE(w2);
@@ -94,4 +97,40 @@
EXPECT_FALSE(w2);
}
+// Touches |weak_data| by increasing its length by 1. Used to check that the
+// weak object can be dereferenced.
+void TouchWeakData(const WeakNSObject<NSMutableData>& weak_data) {
+ if (!weak_data)
+ return;
+ [weak_data increaseLengthBy:1];
+}
+
+// Makes a copy of |weak_object| on the current thread and posts a task to touch
+// 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));
+}
+
+// Tests that the weak object can be copied on a different thread.
+TEST(WeakNSObjectTest, WeakNSObjectCopyOnOtherThread) {
+ MessageLoop loop;
+ Thread other_thread("WeakNSObjectCopyOnOtherThread");
+ other_thread.Start();
+
+ scoped_nsobject<NSMutableData> data([[NSMutableData alloc] init]);
+ WeakNSObject<NSMutableData> weak(data);
+
+ scoped_refptr<SingleThreadTaskRunner> runner = loop.task_runner();
+ other_thread.task_runner()->PostTask(
+ FROM_HERE, Bind(&CopyWeakNSObjectAndPost, weak, runner));
+ other_thread.Stop();
+ loop.RunUntilIdle();
+
+ // Check that TouchWeakData was called.
+ EXPECT_EQ(1u, [data length]);
+}
+
} // namespace
+} // namespace base
diff --git a/base/mac/cocoa_protocols.h b/base/mac/cocoa_protocols.h
index e10001f..ab34a19 100644
--- a/base/mac/cocoa_protocols.h
+++ b/base/mac/cocoa_protocols.h
@@ -7,10 +7,6 @@
#import <Cocoa/Cocoa.h>
-// GTM also maintains a list of empty protocols, but only the ones the library
-// requires. Augment that below.
-#import "third_party/google_toolbox_for_mac/src/GTMDefines.h"
-
// New Mac OS X SDKs introduce new protocols used for delegates. These
// protocol defintions aren't not present in earlier releases of the Mac OS X
// SDK. In order to support building against the new SDK, which requires
diff --git a/base/mac/scoped_nsobject.h b/base/mac/scoped_nsobject.h
index 8d7bd4a..8814b51 100644
--- a/base/mac/scoped_nsobject.h
+++ b/base/mac/scoped_nsobject.h
@@ -40,6 +40,11 @@
: object_([that.object_ retain]) {
}
+ template <typename NSU>
+ scoped_nsprotocol(const scoped_nsprotocol<NSU>& that)
+ : object_([that.get() retain]) {
+ }
+
~scoped_nsprotocol() {
[object_ release];
}
@@ -119,6 +124,11 @@
: scoped_nsprotocol<NST*>(that) {
}
+ template<typename NSU>
+ scoped_nsobject(const scoped_nsobject<NSU>& that)
+ : scoped_nsprotocol<NST*>(that) {
+ }
+
scoped_nsobject& operator=(const scoped_nsobject<NST>& that) {
scoped_nsprotocol<NST*>::operator=(that);
return *this;
@@ -135,6 +145,11 @@
: scoped_nsprotocol<id>(that) {
}
+ template<typename NSU>
+ scoped_nsobject(const scoped_nsobject<NSU>& that)
+ : scoped_nsprotocol<id>(that) {
+ }
+
scoped_nsobject& operator=(const scoped_nsobject<id>& that) {
scoped_nsprotocol<id>::operator=(that);
return *this;
diff --git a/base/mac/sdk_forward_declarations.h b/base/mac/sdk_forward_declarations.h
index f606dab..faa36ea 100644
--- a/base/mac/sdk_forward_declarations.h
+++ b/base/mac/sdk_forward_declarations.h
@@ -105,6 +105,7 @@
- (void)setAnimationBehavior:(NSWindowAnimationBehavior)newAnimationBehavior;
- (void)toggleFullScreen:(id)sender;
- (void)setRestorable:(BOOL)flag;
+- (NSRect)convertRectFromScreen:(NSRect)aRect;
@end
@interface NSCursor (LionSDKDeclarations)
diff --git a/base/memory/scoped_vector.h b/base/memory/scoped_vector.h
index 1b30f63..173ea5a 100644
--- a/base/memory/scoped_vector.h
+++ b/base/memory/scoped_vector.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
#include "base/move.h"
#include "base/stl_util.h"
@@ -64,6 +65,7 @@
reference back() { return v_.back(); }
void push_back(T* elem) { v_.push_back(elem); }
+ void push_back(scoped_ptr<T> elem) { v_.push_back(elem.release()); }
void pop_back() {
DCHECK(!empty());
diff --git a/base/memory/scoped_vector_unittest.cc b/base/memory/scoped_vector_unittest.cc
index b60ca14..220cfb0 100644
--- a/base/memory/scoped_vector_unittest.cc
+++ b/base/memory/scoped_vector_unittest.cc
@@ -308,4 +308,17 @@
EXPECT_EQ(LC_CONSTRUCTED, it->life_cycle_state());
}
+// Assertions for push_back(scoped_ptr).
+TEST(ScopedVectorTest, PushBackScopedPtr) {
+ int delete_counter = 0;
+ scoped_ptr<DeleteCounter> elem(new DeleteCounter(&delete_counter));
+ EXPECT_EQ(0, delete_counter);
+ {
+ ScopedVector<DeleteCounter> v;
+ v.push_back(elem.Pass());
+ EXPECT_EQ(0, delete_counter);
+ }
+ EXPECT_EQ(1, delete_counter);
+}
+
} // namespace
diff --git a/base/message_loop/message_pump_io_ios.h b/base/message_loop/message_pump_io_ios.h
index 18af4a8..317a59c 100644
--- a/base/message_loop/message_pump_io_ios.h
+++ b/base/message_loop/message_pump_io_ios.h
@@ -97,7 +97,7 @@
};
MessagePumpIOSForIO();
- virtual ~MessagePumpIOSForIO();
+ ~MessagePumpIOSForIO() override;
// Have the current thread's message loop watch for a a situation in which
// reading/writing to the FD can be performed without blocking.
diff --git a/base/message_loop/message_pump_io_ios_unittest.cc b/base/message_loop/message_pump_io_ios_unittest.cc
index 0bf8c08..ba96f83 100644
--- a/base/message_loop/message_pump_io_ios_unittest.cc
+++ b/base/message_loop/message_pump_io_ios_unittest.cc
@@ -18,9 +18,9 @@
MessagePumpIOSForIOTest()
: ui_loop_(MessageLoop::TYPE_UI),
io_thread_("MessagePumpIOSForIOTestIOThread") {}
- virtual ~MessagePumpIOSForIOTest() {}
+ ~MessagePumpIOSForIOTest() override {}
- virtual void SetUp() override {
+ void SetUp() override {
Thread::Options options(MessageLoop::TYPE_IO, 0);
ASSERT_TRUE(io_thread_.StartWithOptions(options));
ASSERT_EQ(MessageLoop::TYPE_IO, io_thread_.message_loop()->type());
@@ -30,7 +30,7 @@
ASSERT_EQ(0, ret);
}
- virtual void TearDown() override {
+ void TearDown() override {
if (IGNORE_EINTR(close(pipefds_[0])) < 0)
PLOG(ERROR) << "close";
if (IGNORE_EINTR(close(pipefds_[1])) < 0)
@@ -64,11 +64,11 @@
// nothing useful.
class StupidWatcher : public MessagePumpIOSForIO::Watcher {
public:
- virtual ~StupidWatcher() {}
+ ~StupidWatcher() override {}
// base:MessagePumpIOSForIO::Watcher interface
- virtual void OnFileCanReadWithoutBlocking(int fd) override {}
- virtual void OnFileCanWriteWithoutBlocking(int fd) override {}
+ void OnFileCanReadWithoutBlocking(int fd) override {}
+ void OnFileCanWriteWithoutBlocking(int fd) override {}
};
#if GTEST_HAS_DEATH_TEST && !defined(NDEBUG)
@@ -93,16 +93,12 @@
: controller_(controller) {
DCHECK(controller_);
}
- virtual ~BaseWatcher() {}
+ ~BaseWatcher() override {}
// MessagePumpIOSForIO::Watcher interface
- virtual void OnFileCanReadWithoutBlocking(int /* fd */) override {
- NOTREACHED();
- }
+ void OnFileCanReadWithoutBlocking(int /* fd */) override { NOTREACHED(); }
- virtual void OnFileCanWriteWithoutBlocking(int /* fd */) override {
- NOTREACHED();
- }
+ void OnFileCanWriteWithoutBlocking(int /* fd */) override { NOTREACHED(); }
protected:
MessagePumpIOSForIO::FileDescriptorWatcher* controller_;
@@ -114,11 +110,9 @@
MessagePumpIOSForIO::FileDescriptorWatcher* controller)
: BaseWatcher(controller) {}
- virtual ~DeleteWatcher() {
- DCHECK(!controller_);
- }
+ ~DeleteWatcher() override { DCHECK(!controller_); }
- virtual void OnFileCanWriteWithoutBlocking(int /* fd */) override {
+ void OnFileCanWriteWithoutBlocking(int /* fd */) override {
DCHECK(controller_);
delete controller_;
controller_ = NULL;
@@ -146,9 +140,9 @@
pump_(pump),
fd_to_start_watching_(fd_to_start_watching) {}
- virtual ~StopWatcher() {}
+ ~StopWatcher() override {}
- virtual void OnFileCanWriteWithoutBlocking(int /* fd */) override {
+ void OnFileCanWriteWithoutBlocking(int /* fd */) override {
controller_->StopWatchingFileDescriptor();
if (fd_to_start_watching_ >= 0) {
pump_->WatchFileDescriptor(fd_to_start_watching_,
diff --git a/base/message_loop/message_pump_mac.h b/base/message_loop/message_pump_mac.h
index 55ab2c6..c853202 100644
--- a/base/message_loop/message_pump_mac.h
+++ b/base/message_loop/message_pump_mac.h
@@ -263,9 +263,9 @@
class MessagePumpUIApplication : public MessagePumpCFRunLoopBase {
public:
MessagePumpUIApplication();
- virtual ~MessagePumpUIApplication();
- virtual void DoRun(Delegate* delegate) override;
- virtual void Quit() override;
+ ~MessagePumpUIApplication() override;
+ void DoRun(Delegate* delegate) override;
+ void Quit() override;
// This message pump can not spin the main message loop directly. Instead,
// call |Attach()| to set up a delegate. It is an error to call |Run()|.
diff --git a/base/message_loop/message_pump_win.cc b/base/message_loop/message_pump_win.cc
index c140691..a7a1485 100644
--- a/base/message_loop/message_pump_win.cc
+++ b/base/message_loop/message_pump_win.cc
@@ -162,6 +162,11 @@
// static
LRESULT CALLBACK MessagePumpForUI::WndProcThunk(
HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "440919 MessagePumpForUI::WndProcThunk"));
+
switch (message) {
case kMsgHaveWork:
reinterpret_cast<MessagePumpForUI*>(wparam)->HandleWorkMessage();
diff --git a/base/metrics/field_trial.cc b/base/metrics/field_trial.cc
index 7efca7a..e03c94c 100644
--- a/base/metrics/field_trial.cc
+++ b/base/metrics/field_trial.cc
@@ -223,6 +223,20 @@
return true;
}
+bool FieldTrial::GetState(FieldTrialState* field_trial_state) const {
+ if (!enable_field_trial_)
+ return false;
+ field_trial_state->trial_name = trial_name_;
+ // If the group name is empty (hasn't been finalized yet), use the default
+ // group name instead.
+ if (!group_name_.empty())
+ field_trial_state->group_name = group_name_;
+ else
+ field_trial_state->group_name = default_group_name_;
+ field_trial_state->activated = group_reported_;
+ return true;
+}
+
//------------------------------------------------------------------------------
// FieldTrialList methods and members.
@@ -387,6 +401,29 @@
}
// static
+void FieldTrialList::AllStatesToString(std::string* output) {
+ if (!global_)
+ return;
+ AutoLock auto_lock(global_->lock_);
+
+ for (const auto& registered : global_->registered_) {
+ FieldTrial::FieldTrialState trial;
+ if (!registered.second->GetState(&trial))
+ continue;
+ DCHECK_EQ(std::string::npos,
+ trial.trial_name.find(kPersistentStringSeparator));
+ DCHECK_EQ(std::string::npos,
+ trial.group_name.find(kPersistentStringSeparator));
+ if (trial.activated)
+ output->append(1, kActivationMarker);
+ output->append(trial.trial_name);
+ output->append(1, kPersistentStringSeparator);
+ output->append(trial.group_name);
+ output->append(1, kPersistentStringSeparator);
+ }
+}
+
+// static
void FieldTrialList::GetActiveFieldTrialGroups(
FieldTrial::ActiveGroups* active_groups) {
DCHECK(active_groups->empty());
diff --git a/base/metrics/field_trial.h b/base/metrics/field_trial.h
index e2e5439..26257ab 100644
--- a/base/metrics/field_trial.h
+++ b/base/metrics/field_trial.h
@@ -106,6 +106,14 @@
std::string group_name;
};
+ // A triplet representing a FieldTrial, its selected group and whether it's
+ // active.
+ struct FieldTrialState {
+ std::string trial_name;
+ std::string group_name;
+ bool activated;
+ };
+
typedef std::vector<ActiveGroup> ActiveGroups;
// A return value to indicate that a given instance has not yet had a group
@@ -180,8 +188,10 @@
FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, OneWinner);
FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, DisableProbability);
FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, ActiveGroups);
+ FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, AllGroups);
FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, ActiveGroupsNotFinalized);
FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, Save);
+ FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, SaveAll);
FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, DuplicateRestore);
FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, SetForcedTurnFeatureOff);
FRIEND_TEST_ALL_PREFIXES(FieldTrialTest, SetForcedTurnFeatureOn);
@@ -230,6 +240,13 @@
// untouched.
bool GetActiveGroup(ActiveGroup* active_group) const;
+ // Returns the trial name and selected group name for this field trial via
+ // the output parameter |field_trial_state|, but only if the trial has not
+ // been disabled. In that case, true is returned and |field_trial_state| is
+ // filled in; otherwise, the result is false and |field_trial_state| is left
+ // untouched.
+ bool GetState(FieldTrialState* field_trial_state) const;
+
// Returns the group_name. A winner need not have been chosen.
std::string group_name_internal() const { return group_name_; }
@@ -404,6 +421,16 @@
// by |CreateTrialsFromString()|.
static void StatesToString(std::string* output);
+ // Creates a persistent representation of all FieldTrial instances for
+ // resurrection in another process. This allows randomization to be done in
+ // one process, and secondary processes can be synchronized on the result.
+ // The resulting string contains the name and group name pairs of all
+ // registered FieldTrials which have not been disabled, with "/" used
+ // to separate all names and to terminate the string. All activated trials
+ // have their name prefixed with "*". This string is parsed by
+ // |CreateTrialsFromString()|.
+ static void AllStatesToString(std::string* output);
+
// Fills in the supplied vector |active_groups| (which must be empty when
// called) with a snapshot of all registered FieldTrials for which the group
// has been chosen and externally observed (via |group()|) and which have
diff --git a/base/metrics/field_trial_unittest.cc b/base/metrics/field_trial_unittest.cc
index ce95c2a..f1a1042 100644
--- a/base/metrics/field_trial_unittest.cc
+++ b/base/metrics/field_trial_unittest.cc
@@ -311,6 +311,36 @@
}
}
+TEST_F(FieldTrialTest, AllGroups) {
+ FieldTrial::FieldTrialState field_trial_state;
+ std::string one_winner("One Winner");
+ scoped_refptr<FieldTrial> trial =
+ CreateFieldTrial(one_winner, 10, "Default", NULL);
+ std::string winner("Winner");
+ trial->AppendGroup(winner, 10);
+ EXPECT_TRUE(trial->GetState(&field_trial_state));
+ EXPECT_EQ(one_winner, field_trial_state.trial_name);
+ EXPECT_EQ(winner, field_trial_state.group_name);
+ trial->group();
+ EXPECT_TRUE(trial->GetState(&field_trial_state));
+ EXPECT_EQ(one_winner, field_trial_state.trial_name);
+ EXPECT_EQ(winner, field_trial_state.group_name);
+
+ std::string multi_group("MultiGroup");
+ scoped_refptr<FieldTrial> multi_group_trial =
+ CreateFieldTrial(multi_group, 9, "Default", NULL);
+
+ multi_group_trial->AppendGroup("Me", 3);
+ multi_group_trial->AppendGroup("You", 3);
+ multi_group_trial->AppendGroup("Them", 3);
+ EXPECT_TRUE(multi_group_trial->GetState(&field_trial_state));
+ // Finalize the group selection by accessing the selected group.
+ multi_group_trial->group();
+ EXPECT_TRUE(multi_group_trial->GetState(&field_trial_state));
+ EXPECT_EQ(multi_group, field_trial_state.trial_name);
+ EXPECT_EQ(multi_group_trial->group_name(), field_trial_state.group_name);
+}
+
TEST_F(FieldTrialTest, ActiveGroupsNotFinalized) {
const char kTrialName[] = "TestTrial";
const char kSecondaryGroupName[] = "SecondaryGroup";
@@ -388,6 +418,44 @@
EXPECT_EQ("Some name/Winner/xxx/yyyy/zzz/default/", save_string);
}
+TEST_F(FieldTrialTest, SaveAll) {
+ std::string save_string;
+
+ scoped_refptr<FieldTrial> trial =
+ CreateFieldTrial("Some name", 10, "Default some name", NULL);
+ EXPECT_EQ("", trial->group_name_internal());
+ FieldTrialList::AllStatesToString(&save_string);
+ EXPECT_EQ("Some name/Default some name/", save_string);
+ save_string.clear();
+
+ // Create a winning group.
+ trial->AppendGroup("Winner", 10);
+ // Finalize the group selection by accessing the selected group.
+ trial->group();
+ FieldTrialList::AllStatesToString(&save_string);
+ EXPECT_EQ("*Some name/Winner/", save_string);
+ save_string.clear();
+
+ // Create a second trial and winning group.
+ scoped_refptr<FieldTrial> trial2 =
+ CreateFieldTrial("xxx", 10, "Default xxx", NULL);
+ trial2->AppendGroup("yyyy", 10);
+ // Finalize the group selection by accessing the selected group.
+ trial2->group();
+
+ FieldTrialList::AllStatesToString(&save_string);
+ // We assume names are alphabetized... though this is not critical.
+ EXPECT_EQ("*Some name/Winner/*xxx/yyyy/", save_string);
+ save_string.clear();
+
+ // Create a third trial with only the default group.
+ scoped_refptr<FieldTrial> trial3 =
+ CreateFieldTrial("zzz", 10, "default", NULL);
+
+ FieldTrialList::AllStatesToString(&save_string);
+ EXPECT_EQ("*Some name/Winner/*xxx/yyyy/zzz/default/", save_string);
+}
+
TEST_F(FieldTrialTest, Restore) {
ASSERT_FALSE(FieldTrialList::TrialExists("Some_name"));
ASSERT_FALSE(FieldTrialList::TrialExists("xxx"));
@@ -1014,6 +1082,43 @@
}
}
+TEST(FieldTrialTestWithoutList, StatesStringFormat) {
+ std::string save_string;
+
+ // Scoping the first FieldTrialList, as we need another one to test the
+ // importing function.
+ {
+ FieldTrialList field_trial_list(NULL);
+ scoped_refptr<FieldTrial> trial =
+ CreateFieldTrial("Abc", 10, "Default some name", NULL);
+ trial->AppendGroup("cba", 10);
+ trial->group();
+ scoped_refptr<FieldTrial> trial2 =
+ CreateFieldTrial("Xyz", 10, "Default xxx", NULL);
+ trial2->AppendGroup("zyx", 10);
+ trial2->group();
+ scoped_refptr<FieldTrial> trial3 =
+ CreateFieldTrial("zzz", 10, "default", NULL);
+
+ FieldTrialList::AllStatesToString(&save_string);
+ }
+
+ // Starting with a new blank FieldTrialList.
+ FieldTrialList field_trial_list(NULL);
+ ASSERT_TRUE(field_trial_list.CreateTrialsFromString(
+ save_string, FieldTrialList::DONT_ACTIVATE_TRIALS,
+ std::set<std::string>()));
+
+ FieldTrial::ActiveGroups active_groups;
+ field_trial_list.GetActiveFieldTrialGroups(&active_groups);
+ ASSERT_EQ(2U, active_groups.size());
+ EXPECT_EQ("Abc", active_groups[0].trial_name);
+ EXPECT_EQ("cba", active_groups[0].group_name);
+ EXPECT_EQ("Xyz", active_groups[1].trial_name);
+ EXPECT_EQ("zyx", active_groups[1].group_name);
+ EXPECT_TRUE(field_trial_list.TrialExists("zzz"));
+}
+
#if GTEST_HAS_DEATH_TEST
TEST(FieldTrialDeathTest, OneTimeRandomizedTrialWithoutFieldTrialList) {
// Trying to instantiate a one-time randomized field trial before the
diff --git a/base/power_monitor/power_monitor_device_source_win.cc b/base/power_monitor/power_monitor_device_source_win.cc
index b8b16e1..0e199dc 100644
--- a/base/power_monitor/power_monitor_device_source_win.cc
+++ b/base/power_monitor/power_monitor_device_source_win.cc
@@ -5,6 +5,7 @@
#include "base/power_monitor/power_monitor.h"
#include "base/power_monitor/power_monitor_device_source.h"
#include "base/power_monitor/power_monitor_source.h"
+#include "base/profiler/scoped_tracker.h"
#include "base/win/wrapped_window_proc.h"
namespace base {
@@ -98,6 +99,11 @@
UINT message,
WPARAM wparam,
LPARAM lparam) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "440919 PowerMonitorDeviceSource::PowerMessageWindow::WndProcThunk"));
+
switch (message) {
case WM_POWERBROADCAST:
ProcessWmPowerBroadcastMessage(wparam);
diff --git a/base/process/kill.h b/base/process/kill.h
index f697701..e8ce334 100644
--- a/base/process/kill.h
+++ b/base/process/kill.h
@@ -154,8 +154,8 @@
#if defined(OS_POSIX) && !defined(OS_MACOSX)
// The nicer version of EnsureProcessTerminated() that is patient and will
-// wait for |process_handle| to finish and then reap it.
-BASE_EXPORT void EnsureProcessGetsReaped(ProcessHandle process_handle);
+// wait for |pid| to finish and then reap it.
+BASE_EXPORT void EnsureProcessGetsReaped(ProcessId pid);
#endif
} // namespace base
diff --git a/base/process/kill_posix.cc b/base/process/kill_posix.cc
index 3f304ca..9e9b5fb 100644
--- a/base/process/kill_posix.cc
+++ b/base/process/kill_posix.cc
@@ -473,12 +473,12 @@
PlatformThread::CreateNonJoinable(0, reaper);
}
-void EnsureProcessGetsReaped(ProcessHandle process) {
+void EnsureProcessGetsReaped(ProcessId pid) {
// If the child is already dead, then there's nothing to do.
- if (IsChildDead(process))
+ if (IsChildDead(pid))
return;
- BackgroundReaper* reaper = new BackgroundReaper(process, 0);
+ BackgroundReaper* reaper = new BackgroundReaper(pid, 0);
PlatformThread::CreateNonJoinable(0, reaper);
}
diff --git a/base/process/launch.cc b/base/process/launch.cc
index a1c4d21..1c752bd 100644
--- a/base/process/launch.cc
+++ b/base/process/launch.cc
@@ -28,6 +28,9 @@
, clone_flags(0)
, allow_new_privs(false)
#endif // OS_LINUX
+#if defined(OS_POSIX)
+ , pre_exec_delegate(NULL)
+#endif // OS_POSIX
#if defined(OS_CHROMEOS)
, ctrl_terminal_fd(-1)
#endif // OS_CHROMEOS
diff --git a/base/process/launch.h b/base/process/launch.h
index 6cd02d6..eca4f8f 100644
--- a/base/process/launch.h
+++ b/base/process/launch.h
@@ -37,6 +37,24 @@
// Options for launching a subprocess that are passed to LaunchProcess().
// The default constructor constructs the object with default options.
struct BASE_EXPORT LaunchOptions {
+#if defined(OS_POSIX)
+ // Delegate to be run in between fork and exec in the subprocess (see
+ // pre_exec_delegate below)
+ class BASE_EXPORT PreExecDelegate {
+ public:
+ PreExecDelegate() {}
+ virtual ~PreExecDelegate() {}
+
+ // Since this is to be run between fork and exec, and fork may have happened
+ // while multiple threads were running, this function needs to be async
+ // safe.
+ virtual void RunAsyncSafe() = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PreExecDelegate);
+ };
+#endif // defined(OS_POSIX)
+
LaunchOptions();
~LaunchOptions();
@@ -115,6 +133,9 @@
#if defined(OS_LINUX)
// If non-zero, start the process using clone(), using flags as provided.
+ // Unlike in clone, clone_flags may not contain a custom termination signal
+ // that is sent to the parent when the child dies. The termination signal will
+ // always be set to SIGCHLD.
int clone_flags;
// By default, child processes will have the PR_SET_NO_NEW_PRIVS bit set. If
@@ -122,6 +143,16 @@
bool allow_new_privs;
#endif // defined(OS_LINUX)
+#if defined(OS_POSIX)
+ // If non-null, a delegate to be run immediately prior to executing the new
+ // program in the child process.
+ //
+ // WARNING: If LaunchProcess is called in the presence of multiple threads,
+ // code running in this delegate essentially needs to be async-signal safe
+ // (see man 7 signal for a list of allowed functions).
+ PreExecDelegate* pre_exec_delegate;
+#endif // defined(OS_POSIX)
+
#if defined(OS_CHROMEOS)
// If non-negative, the specified file descriptor will be set as the launched
// process' controlling terminal.
@@ -156,12 +187,6 @@
BASE_EXPORT Process LaunchProcess(const CommandLine& cmdline,
const LaunchOptions& options);
-// Deprecated version.
-// TODO(rvargas) crbug.com/417532: Remove this after migrating all consumers.
-BASE_EXPORT bool LaunchProcess(const CommandLine& cmdline,
- const LaunchOptions& options,
- ProcessHandle* process_handle);
-
#if defined(OS_WIN)
// Windows-specific LaunchProcess that takes the command line as a
// string. Useful for situations where you need to control the
@@ -192,12 +217,6 @@
BASE_EXPORT Process LaunchProcess(const std::vector<std::string>& argv,
const LaunchOptions& options);
-// Deprecated version.
-// TODO(rvargas) crbug.com/417532: Remove this after migrating all consumers.
-BASE_EXPORT bool LaunchProcess(const std::vector<std::string>& argv,
- const LaunchOptions& options,
- ProcessHandle* process_handle);
-
// Close all file descriptors, except those which are a destination in the
// given multimap. Only call this function in a child process where you know
// that there aren't any other threads.
diff --git a/base/process/launch_posix.cc b/base/process/launch_posix.cc
index c60cfdc..6c9ed3f 100644
--- a/base/process/launch_posix.cc
+++ b/base/process/launch_posix.cc
@@ -277,9 +277,13 @@
}
}
-bool LaunchProcess(const std::vector<std::string>& argv,
- const LaunchOptions& options,
- ProcessHandle* process_handle) {
+Process LaunchProcess(const CommandLine& cmdline,
+ const LaunchOptions& options) {
+ return LaunchProcess(cmdline.argv(), options);
+}
+
+Process LaunchProcess(const std::vector<std::string>& argv,
+ const LaunchOptions& options) {
size_t fd_shuffle_size = 0;
if (options.fds_to_remap) {
fd_shuffle_size = options.fds_to_remap->size();
@@ -311,7 +315,17 @@
// and that signal handling follows the process-creation rules.
RAW_CHECK(
!(options.clone_flags & (CLONE_SIGHAND | CLONE_THREAD | CLONE_VM)));
- pid = syscall(__NR_clone, options.clone_flags, 0, 0, 0);
+
+ // We specify a null ptid and ctid.
+ RAW_CHECK(
+ !(options.clone_flags &
+ (CLONE_CHILD_CLEARTID | CLONE_CHILD_SETTID | CLONE_PARENT_SETTID)));
+
+ // Since we use waitpid, we do not support custom termination signals in the
+ // clone flags.
+ RAW_CHECK((options.clone_flags & 0xff) == 0);
+
+ pid = ForkWithFlags(options.clone_flags | SIGCHLD, nullptr, nullptr);
} else
#endif
{
@@ -325,7 +339,7 @@
if (pid < 0) {
DPLOG(ERROR) << "fork";
- return false;
+ return Process();
} else if (pid == 0) {
// Child process
@@ -448,6 +462,12 @@
}
#endif
+#if defined(OS_POSIX)
+ if (options.pre_exec_delegate != nullptr) {
+ options.pre_exec_delegate->RunAsyncSafe();
+ }
+#endif
+
for (size_t i = 0; i < argv.size(); i++)
argv_cstr[i] = const_cast<char*>(argv[i].c_str());
argv_cstr[argv.size()] = NULL;
@@ -465,37 +485,9 @@
pid_t ret = HANDLE_EINTR(waitpid(pid, 0, 0));
DPCHECK(ret > 0);
}
-
- if (process_handle)
- *process_handle = pid;
}
- return true;
-}
-
-Process LaunchProcess(const std::vector<std::string>& argv,
- const LaunchOptions& options) {
- ProcessHandle process_handle;
- if (LaunchProcess(argv, options, &process_handle))
- return Process(process_handle);
-
- return Process();
-}
-
-
-bool LaunchProcess(const CommandLine& cmdline,
- const LaunchOptions& options,
- ProcessHandle* process_handle) {
- return LaunchProcess(cmdline.argv(), options, process_handle);
-}
-
-Process LaunchProcess(const CommandLine& cmdline,
- const LaunchOptions& options) {
- ProcessHandle process_handle;
- if (LaunchProcess(cmdline, options, &process_handle))
- return Process(process_handle);
-
- return Process();
+ return Process(pid);
}
void RaiseProcessToHighPriority() {
diff --git a/base/process/launch_win.cc b/base/process/launch_win.cc
index 1d83ef9..c2bd295 100644
--- a/base/process/launch_win.cc
+++ b/base/process/launch_win.cc
@@ -105,9 +105,13 @@
std::ios::sync_with_stdio();
}
-bool LaunchProcess(const string16& cmdline,
- const LaunchOptions& options,
- win::ScopedHandle* process_handle) {
+Process LaunchProcess(const CommandLine& cmdline,
+ const LaunchOptions& options) {
+ return LaunchProcess(cmdline.GetCommandLineString(), options);
+}
+
+Process LaunchProcess(const string16& cmdline,
+ const LaunchOptions& options) {
win::StartupInformation startup_info_wrapper;
STARTUPINFO* startup_info = startup_info_wrapper.startup_info();
@@ -119,18 +123,18 @@
} else {
if (base::win::GetVersion() < base::win::VERSION_VISTA) {
DLOG(ERROR) << "Specifying handles to inherit requires Vista or later.";
- return false;
+ return Process();
}
if (options.handles_to_inherit->size() >
std::numeric_limits<DWORD>::max() / sizeof(HANDLE)) {
DLOG(ERROR) << "Too many handles to inherit.";
- return false;
+ return Process();
}
if (!startup_info_wrapper.InitializeProcThreadAttributeList(1)) {
DPLOG(ERROR);
- return false;
+ return Process();
}
if (!startup_info_wrapper.UpdateProcThreadAttribute(
@@ -139,7 +143,7 @@
static_cast<DWORD>(options.handles_to_inherit->size() *
sizeof(HANDLE)))) {
DPLOG(ERROR);
- return false;
+ return Process();
}
inherit_handles = true;
@@ -184,7 +188,7 @@
if (!CreateEnvironmentBlock(&enviroment_block, options.as_user, FALSE)) {
DPLOG(ERROR);
- return false;
+ return Process();
}
BOOL launched =
@@ -197,7 +201,7 @@
if (!launched) {
DPLOG(ERROR) << "Command line:" << std::endl << UTF16ToUTF8(cmdline)
<< std::endl;;
- return false;
+ return Process();
}
} else {
if (!CreateProcess(NULL,
@@ -206,7 +210,7 @@
startup_info, &temp_process_info)) {
DPLOG(ERROR) << "Command line:" << std::endl << UTF16ToUTF8(cmdline)
<< std::endl;;
- return false;
+ return Process();
}
}
base::win::ScopedProcessInformation process_info(temp_process_info);
@@ -216,7 +220,7 @@
process_info.process_handle())) {
DLOG(ERROR) << "Could not AssignProcessToObject.";
KillProcess(process_info.process_handle(), kProcessKilledExitCode, true);
- return false;
+ return Process();
}
ResumeThread(process_info.thread_handle());
@@ -225,43 +229,7 @@
if (options.wait)
WaitForSingleObject(process_info.process_handle(), INFINITE);
- // If the caller wants the process handle, we won't close it.
- if (process_handle)
- process_handle->Set(process_info.TakeProcessHandle());
-
- return true;
-}
-
-// TODO(rvargas) crbug.com/416721: Remove this stub after LaunchProcess is
-// fully migrated to use Process.
-Process LaunchProcess(const string16& cmdline,
- const LaunchOptions& options) {
- win::ScopedHandle process_handle;
- if (LaunchProcess(cmdline, options, &process_handle))
- return Process(process_handle.Take());
-
- return Process();
-}
-
-bool LaunchProcess(const CommandLine& cmdline,
- const LaunchOptions& options,
- ProcessHandle* process_handle) {
- if (!process_handle)
- return LaunchProcess(cmdline.GetCommandLineString(), options, NULL);
-
- win::ScopedHandle process;
- bool rv = LaunchProcess(cmdline.GetCommandLineString(), options, &process);
- *process_handle = process.Take();
- return rv;
-}
-
-Process LaunchProcess(const CommandLine& cmdline,
- const LaunchOptions& options) {
- ProcessHandle process_handle;
- if (LaunchProcess(cmdline, options, &process_handle))
- return Process(process_handle);
-
- return Process();
+ return Process(process_info.TakeProcessHandle());
}
Process LaunchElevatedProcess(const CommandLine& cmdline,
diff --git a/base/process/process.h b/base/process/process.h
index ad8f8ee..b0fd8d9 100644
--- a/base/process/process.h
+++ b/base/process/process.h
@@ -49,6 +49,11 @@
// Returns an object for the current process.
static Process Current();
+ // 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);
+
// Creates an object from a |handle| owned by someone else.
// Don't use this for new code. It is only intended to ease the migration to
// a strict ownership model.
@@ -112,6 +117,25 @@
#endif
};
+#if defined(OS_LINUX)
+// A wrapper for clone with fork-like behavior, meaning that it returns the
+// child's pid in the parent and 0 in the child. |flags|, |ptid|, and |ctid| are
+// as in the clone system call (the CLONE_VM flag is not supported).
+//
+// This function uses the libc clone wrapper (which updates libc's pid cache)
+// internally, so callers may expect things like getpid() to work correctly
+// after in both the child and parent. An exception is when this code is run
+// under Valgrind. Valgrind does not support the libc clone wrapper, so the libc
+// pid cache may be incorrect after this function is called under Valgrind.
+//
+// As with fork(), callers should be extremely careful when calling this while
+// multiple threads are running, since at the time the fork happened, the
+// threads could have been in any state (potentially holding locks, etc.).
+// Callers should most likely call execve() in the child soon after calling
+// this.
+BASE_EXPORT pid_t ForkWithFlags(unsigned long flags, pid_t* ptid, pid_t* ctid);
+#endif
+
} // namespace base
#endif // BASE_PROCESS_PROCESS_PROCESS_H_
diff --git a/base/process/process_handle.h b/base/process/process_handle.h
index 6f8094e..368f952 100644
--- a/base/process/process_handle.h
+++ b/base/process/process_handle.h
@@ -44,15 +44,6 @@
// CloseProcessHandle when you are done with it. Returns true on success.
BASE_EXPORT bool OpenProcessHandle(ProcessId pid, ProcessHandle* handle);
-// Converts a PID to a process handle. On Windows the handle is opened
-// with more access rights and must only be used by trusted code.
-// You have to close returned handle using CloseProcessHandle. Returns true
-// on success.
-// TODO(sanjeevr): Replace all calls to OpenPrivilegedProcessHandle with the
-// more specific OpenProcessHandleWithAccess method and delete this.
-BASE_EXPORT bool OpenPrivilegedProcessHandle(ProcessId pid,
- ProcessHandle* handle);
-
// Converts a PID to a process handle using the desired access flags. Use a
// combination of the kProcessAccess* flags defined above for |access_flags|.
BASE_EXPORT bool OpenProcessHandleWithAccess(ProcessId pid,
diff --git a/base/process/process_handle_posix.cc b/base/process/process_handle_posix.cc
index 4013254..94b2c2f 100644
--- a/base/process/process_handle_posix.cc
+++ b/base/process/process_handle_posix.cc
@@ -23,12 +23,6 @@
return true;
}
-bool OpenPrivilegedProcessHandle(ProcessId pid, ProcessHandle* handle) {
- // On POSIX permissions are checked for each operation on process,
- // not when opening a "handle".
- return OpenProcessHandle(pid, handle);
-}
-
bool OpenProcessHandleWithAccess(ProcessId pid,
uint32 access_flags,
ProcessHandle* handle) {
diff --git a/base/process/process_handle_win.cc b/base/process/process_handle_win.cc
index 3bc3a12..595d5b0 100644
--- a/base/process/process_handle_win.cc
+++ b/base/process/process_handle_win.cc
@@ -36,21 +36,6 @@
return true;
}
-bool OpenPrivilegedProcessHandle(ProcessId pid, ProcessHandle* handle) {
- ProcessHandle result = OpenProcess(PROCESS_DUP_HANDLE |
- PROCESS_TERMINATE |
- PROCESS_QUERY_INFORMATION |
- PROCESS_VM_READ |
- SYNCHRONIZE,
- FALSE, pid);
-
- if (result == NULL)
- return false;
-
- *handle = result;
- return true;
-}
-
bool OpenProcessHandleWithAccess(ProcessId pid,
uint32 access_flags,
ProcessHandle* handle) {
diff --git a/base/process/process_linux.cc b/base/process/process_linux.cc
index 59ee288..cfa3ed5 100644
--- a/base/process/process_linux.cc
+++ b/base/process/process_linux.cc
@@ -5,14 +5,21 @@
#include "base/process/process.h"
#include <errno.h>
+#include <pthread.h>
+#include <sched.h>
+#include <setjmp.h>
#include <sys/resource.h>
+#include <sys/syscall.h>
+#include "base/compiler_specific.h"
#include "base/files/file_util.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/lock.h"
+#include "base/third_party/valgrind/valgrind.h"
+#include "build/build_config.h"
namespace base {
@@ -78,6 +85,52 @@
bool can_reraise_priority;
};
+bool IsRunningOnValgrind() {
+ return RUNNING_ON_VALGRIND;
+}
+
+// This function runs on the stack specified on the clone call. It uses longjmp
+// to switch back to the original stack so the child can return from sys_clone.
+int CloneHelper(void* arg) {
+ jmp_buf* env_ptr = reinterpret_cast<jmp_buf*>(arg);
+ longjmp(*env_ptr, 1);
+
+ // Should not be reached.
+ RAW_CHECK(false);
+ return 1;
+}
+
+// This function is noinline to ensure that stack_buf is below the stack pointer
+// that is saved when setjmp is called below. This is needed because when
+// compiled with FORTIFY_SOURCE, glibc's longjmp checks that the stack is moved
+// upwards. See crbug.com/442912 for more details.
+#if defined(ADDRESS_SANITIZER)
+// Disable AddressSanitizer instrumentation for this function to make sure
+// |stack_buf| is allocated on thread stack instead of ASan's fake stack.
+// Under ASan longjmp() will attempt to clean up the area between the old and
+// new stack pointers and print a warning that may confuse the user.
+__attribute__((no_sanitize_address))
+#endif
+NOINLINE pid_t CloneAndLongjmpInChild(unsigned long flags,
+ pid_t* ptid,
+ pid_t* ctid,
+ jmp_buf* env) {
+ // We use the libc clone wrapper instead of making the syscall
+ // directly because making the syscall may fail to update the libc's
+ // internal pid cache. The libc interface unfortunately requires
+ // specifying a new stack, so we use setjmp/longjmp to emulate
+ // fork-like behavior.
+ char stack_buf[PTHREAD_STACK_MIN];
+#if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
+ defined(ARCH_CPU_MIPS64_FAMILY) || defined(ARCH_CPU_MIPS_FAMILY)
+ // The stack grows downward.
+ void* stack = stack_buf + sizeof(stack_buf);
+#else
+#error "Unsupported architecture"
+#endif
+ return clone(&CloneHelper, stack, flags, env, ptid, nullptr, ctid);
+}
+
} // namespace
// static
@@ -136,4 +189,43 @@
return result == 0;
}
+pid_t ForkWithFlags(unsigned long flags, pid_t* ptid, pid_t* ctid) {
+ const bool clone_tls_used = flags & CLONE_SETTLS;
+ const bool invalid_ctid =
+ (flags & (CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID)) && !ctid;
+ const bool invalid_ptid = (flags & CLONE_PARENT_SETTID) && !ptid;
+
+ // We do not support CLONE_VM.
+ const bool clone_vm_used = flags & CLONE_VM;
+
+ if (clone_tls_used || invalid_ctid || invalid_ptid || clone_vm_used) {
+ RAW_LOG(FATAL, "Invalid usage of ForkWithFlags");
+ }
+
+ // Valgrind's clone implementation does not support specifiying a child_stack
+ // without CLONE_VM, so we cannot use libc's clone wrapper when running under
+ // Valgrind. As a result, the libc pid cache may be incorrect under Valgrind.
+ // See crbug.com/442817 for more details.
+ if (IsRunningOnValgrind()) {
+ // See kernel/fork.c in Linux. There is different ordering of sys_clone
+ // parameters depending on CONFIG_CLONE_BACKWARDS* configuration options.
+#if defined(ARCH_CPU_X86_64)
+ return syscall(__NR_clone, flags, nullptr, ptid, ctid, nullptr);
+#elif defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARM_FAMILY) || \
+ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_MIPS64_FAMILY)
+ // CONFIG_CLONE_BACKWARDS defined.
+ return syscall(__NR_clone, flags, nullptr, ptid, nullptr, ctid);
+#else
+#error "Unsupported architecture"
+#endif
+ }
+
+ jmp_buf env;
+ if (setjmp(env) == 0) {
+ return CloneAndLongjmpInChild(flags, ptid, ctid, &env);
+ }
+
+ return 0;
+}
+
} // namespace base
diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc
index 58852bc..93dec98 100644
--- a/base/process/process_posix.cc
+++ b/base/process/process_posix.cc
@@ -38,6 +38,16 @@
}
// static
+Process Process::OpenWithExtraPriviles(ProcessId pid) {
+ if (pid == GetCurrentProcId())
+ return Current();
+
+ // On POSIX process handles are the same as PIDs, and there are no privileges
+ // to set.
+ return Process(pid);
+}
+
+// static
Process Process::DeprecatedGetProcessFromHandle(ProcessHandle handle) {
DCHECK_NE(handle, GetCurrentProcessHandle());
return Process(handle);
diff --git a/base/process/process_unittest.cc b/base/process/process_unittest.cc
index 5180f64..8130726 100644
--- a/base/process/process_unittest.cc
+++ b/base/process/process_unittest.cc
@@ -4,13 +4,27 @@
#include "base/process/process.h"
+#include "base/files/file_path.h"
+#include "base/files/file_util.h"
+#include "base/files/scoped_file.h"
+#include "base/posix/eintr_wrapper.h"
#include "base/process/kill.h"
#include "base/test/multiprocess_test.h"
#include "base/test/test_timeouts.h"
+#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
#include "base/threading/platform_thread.h"
+#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/multiprocess_func_list.h"
+#if defined(OS_LINUX)
+#include <errno.h>
+#include <sched.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#endif
namespace {
@@ -201,4 +215,105 @@
EXPECT_EQ(old_priority, new_priority);
}
+#if defined(OS_LINUX)
+const int kSuccess = 0;
+
+MULTIPROCESS_TEST_MAIN(CheckPidProcess) {
+ const pid_t kInitPid = 1;
+ const pid_t pid = syscall(__NR_getpid);
+ CHECK(pid == kInitPid);
+ CHECK(getpid() == pid);
+ return kSuccess;
+}
+
+TEST_F(ProcessTest, CloneFlags) {
+ if (RunningOnValgrind() || !PathExists(FilePath("/proc/self/ns/user")) ||
+ !PathExists(FilePath("/proc/self/ns/pid"))) {
+ // User or PID namespaces are not supported.
+ return;
+ }
+
+ LaunchOptions options;
+ options.clone_flags = CLONE_NEWUSER | CLONE_NEWPID;
+
+ Process process(SpawnChildWithOptions("CheckPidProcess", options));
+ ASSERT_TRUE(process.IsValid());
+
+ int exit_code = 42;
+ EXPECT_TRUE(process.WaitForExit(&exit_code));
+ EXPECT_EQ(kSuccess, exit_code);
+}
+
+TEST(ForkWithFlagsTest, UpdatesPidCache) {
+ // The libc clone function, which allows ForkWithFlags to keep the pid cache
+ // up to date, does not work on Valgrind.
+ if (RunningOnValgrind()) {
+ return;
+ }
+
+ // Warm up the libc pid cache, if there is one.
+ ASSERT_EQ(syscall(__NR_getpid), getpid());
+
+ pid_t ctid = 0;
+ const pid_t pid = ForkWithFlags(SIGCHLD | CLONE_CHILD_SETTID, nullptr, &ctid);
+ if (pid == 0) {
+ // In child. Check both the raw getpid syscall and the libc getpid wrapper
+ // (which may rely on a pid cache).
+ RAW_CHECK(syscall(__NR_getpid) == ctid);
+ RAW_CHECK(getpid() == ctid);
+ _exit(kSuccess);
+ }
+
+ ASSERT_NE(-1, pid);
+ int status = 42;
+ ASSERT_EQ(pid, HANDLE_EINTR(waitpid(pid, &status, 0)));
+ ASSERT_TRUE(WIFEXITED(status));
+ EXPECT_EQ(kSuccess, WEXITSTATUS(status));
+}
+#endif
+
+#if defined(OS_POSIX) && !defined(OS_ANDROID)
+const char kPipeValue = '\xcc';
+
+class ReadFromPipeDelegate : public LaunchOptions::PreExecDelegate {
+ public:
+ explicit ReadFromPipeDelegate(int fd) : fd_(fd) {}
+ ~ReadFromPipeDelegate() override {}
+ void RunAsyncSafe() override {
+ char c;
+ RAW_CHECK(HANDLE_EINTR(read(fd_, &c, 1)) == 1);
+ RAW_CHECK(IGNORE_EINTR(close(fd_)) == 0);
+ RAW_CHECK(c == kPipeValue);
+ }
+
+ private:
+ int fd_;
+ DISALLOW_COPY_AND_ASSIGN(ReadFromPipeDelegate);
+};
+
+TEST_F(ProcessTest, PreExecHook) {
+ int pipe_fds[2];
+ ASSERT_EQ(0, pipe(pipe_fds));
+
+ ScopedFD read_fd(pipe_fds[0]);
+ ScopedFD write_fd(pipe_fds[1]);
+ base::FileHandleMappingVector fds_to_remap;
+ fds_to_remap.push_back(std::make_pair(read_fd.get(), read_fd.get()));
+
+ ReadFromPipeDelegate read_from_pipe_delegate(read_fd.get());
+ LaunchOptions options;
+ options.fds_to_remap = &fds_to_remap;
+ options.pre_exec_delegate = &read_from_pipe_delegate;
+ Process process(SpawnChildWithOptions("SimpleChildProcess", options));
+ ASSERT_TRUE(process.IsValid());
+
+ read_fd.reset();
+ ASSERT_EQ(1, HANDLE_EINTR(write(write_fd.get(), &kPipeValue, 1)));
+
+ int exit_code = 42;
+ EXPECT_TRUE(process.WaitForExit(&exit_code));
+ EXPECT_EQ(0, exit_code);
+}
+#endif // defined(OS_POSIX) && !defined(OS_ANDROID)
+
} // namespace base
diff --git a/base/process/process_util_unittest.cc b/base/process/process_util_unittest.cc
index 80e103d..4b2a575 100644
--- a/base/process/process_util_unittest.cc
+++ b/base/process/process_util_unittest.cc
@@ -607,7 +607,7 @@
#else
CHECK_EQ(0, clone_flags);
#endif // OS_LINUX
- EXPECT_TRUE(base::LaunchProcess(args, options, NULL));
+ EXPECT_TRUE(base::LaunchProcess(args, options).IsValid());
PCHECK(IGNORE_EINTR(close(fds[1])) == 0);
char buf[512];
@@ -679,10 +679,8 @@
// Test a non-trival value for clone_flags.
// Don't test on Valgrind as it has limited support for clone().
if (!RunningOnValgrind()) {
- EXPECT_EQ(
- "wibble\n",
- TestLaunchProcess(
- echo_base_test, env_changes, no_clear_environ, CLONE_FS | SIGCHLD));
+ EXPECT_EQ("wibble\n", TestLaunchProcess(echo_base_test, env_changes,
+ no_clear_environ, CLONE_FS));
}
EXPECT_EQ(
diff --git a/base/process/process_win.cc b/base/process/process_win.cc
index 96556a9..2c267aa 100644
--- a/base/process/process_win.cc
+++ b/base/process/process_win.cc
@@ -9,6 +9,13 @@
#include "base/process/kill.h"
#include "base/win/windows_version.h"
+namespace {
+
+DWORD kBasicProcessAccess =
+ PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION | SYNCHRONIZE;
+
+} // namespace
+
namespace base {
Process::Process(ProcessHandle handle)
@@ -40,6 +47,13 @@
}
// static
+Process Process::OpenWithExtraPriviles(ProcessId pid) {
+ DWORD access = kBasicProcessAccess | PROCESS_DUP_HANDLE | PROCESS_VM_READ;
+ ProcessHandle handle = ::OpenProcess(access, FALSE, pid);
+ return Process(handle);
+}
+
+// static
Process Process::DeprecatedGetProcessFromHandle(ProcessHandle handle) {
DCHECK_NE(handle, ::GetCurrentProcess());
ProcessHandle out_handle;
diff --git a/base/stl_util_unittest.cc b/base/stl_util_unittest.cc
index a3f8e16..06ea7cd 100644
--- a/base/stl_util_unittest.cc
+++ b/base/stl_util_unittest.cc
@@ -238,5 +238,30 @@
EXPECT_TRUE(STLIncludes<std::set<int> >(a3, a2));
}
+TEST(StringAsArrayTest, Empty) {
+ std::string empty;
+ EXPECT_EQ(nullptr, string_as_array(&empty));
+}
+
+TEST(StringAsArrayTest, NullTerminated) {
+ // If any std::string implementation is not null-terminated, this should
+ // fail. All compilers we use return a null-terminated buffer, but please do
+ // not rely on this fact in your code.
+ std::string str("abcde");
+ str.resize(3);
+ EXPECT_STREQ("abc", string_as_array(&str));
+}
+
+TEST(StringAsArrayTest, WriteCopy) {
+ // With a COW implementation, this test will fail if
+ // string_as_array(&str) is implemented as
+ // const_cast<char*>(str->data()).
+ std::string s1("abc");
+ const std::string s2(s1);
+ string_as_array(&s1)[1] = 'x';
+ EXPECT_EQ("axc", s1);
+ EXPECT_EQ("abc", s2);
+}
+
} // namespace
} // namespace base
diff --git a/base/test/gtest_util.cc b/base/test/gtest_util.cc
index 47fd639..f98320c 100644
--- a/base/test/gtest_util.cc
+++ b/base/test/gtest_util.cc
@@ -40,4 +40,39 @@
return serializer.Serialize(root);
}
+bool ReadTestNamesFromFile(const FilePath& path,
+ std::vector<SplitTestName>* output) {
+ JSONFileValueSerializer deserializer(path);
+ int error_code = 0;
+ std::string error_message;
+ scoped_ptr<base::Value> value(
+ deserializer.Deserialize(&error_code, &error_message));
+ if (!value.get())
+ return false;
+
+ base::ListValue* tests = nullptr;
+ if (!value->GetAsList(&tests))
+ return false;
+
+ std::vector<base::SplitTestName> result;
+ for (base::ListValue::iterator i = tests->begin(); i != tests->end(); ++i) {
+ base::DictionaryValue* test = nullptr;
+ if (!(*i)->GetAsDictionary(&test))
+ return false;
+
+ std::string test_case_name;
+ if (!test->GetStringASCII("test_case_name", &test_case_name))
+ return false;
+
+ std::string test_name;
+ if (!test->GetStringASCII("test_name", &test_name))
+ return false;
+
+ result.push_back(std::make_pair(test_case_name, test_name));
+ }
+
+ output->swap(result);
+ return true;
+}
+
} // namespace
diff --git a/base/test/gtest_util.h b/base/test/gtest_util.h
index 93382f8..d10c72f 100644
--- a/base/test/gtest_util.h
+++ b/base/test/gtest_util.h
@@ -26,6 +26,12 @@
// current executable as a JSON file. Returns true on success.
bool WriteCompiledInTestsToFile(const FilePath& path) WARN_UNUSED_RESULT;
+// Reads the list of gtest-based tests from |path| into |output|.
+// Returns true on success.
+bool ReadTestNamesFromFile(
+ const FilePath& path,
+ std::vector<SplitTestName>* output) WARN_UNUSED_RESULT;
+
} // namespace base
#endif // BASE_TEST_GTEST_UTIL_H_
diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc
index af2e461..b5316ad 100644
--- a/base/test/launcher/test_launcher.cc
+++ b/base/test/launcher/test_launcher.cc
@@ -829,6 +829,11 @@
}
}
+ if (!launcher_delegate_->GetTests(&tests_)) {
+ LOG(ERROR) << "Failed to get list of tests.";
+ return false;
+ }
+
if (!results_tracker_.Init(*command_line)) {
LOG(ERROR) << "Failed to initialize test results tracker.";
return 1;
@@ -900,12 +905,10 @@
}
void TestLauncher::RunTests() {
- std::vector<SplitTestName> tests(GetCompiledInTests());
-
std::vector<std::string> test_names;
-
- for (size_t i = 0; i < tests.size(); i++) {
- std::string test_name = FormatFullTestName(tests[i].first, tests[i].second);
+ for (size_t i = 0; i < tests_.size(); i++) {
+ std::string test_name = FormatFullTestName(
+ tests_[i].first, tests_[i].second);
results_tracker_.AddTest(test_name);
@@ -918,7 +921,7 @@
continue;
}
- if (!launcher_delegate_->ShouldRunTest(tests[i].first, tests[i].second))
+ if (!launcher_delegate_->ShouldRunTest(tests_[i].first, tests_[i].second))
continue;
// Skip the test that doesn't match the filter (if given).
diff --git a/base/test/launcher/test_launcher.h b/base/test/launcher/test_launcher.h
index 78a854b..27909d4 100644
--- a/base/test/launcher/test_launcher.h
+++ b/base/test/launcher/test_launcher.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "base/compiler_specific.h"
+#include "base/test/gtest_util.h"
#include "base/test/launcher/test_result.h"
#include "base/test/launcher/test_results_tracker.h"
#include "base/time/time.h"
@@ -40,6 +41,10 @@
// which tests and how are run.
class TestLauncherDelegate {
public:
+ // Called to get names of tests available for running. The delegate
+ // must put the result in |output| and return true on success.
+ virtual bool GetTests(std::vector<SplitTestName>* output) = 0;
+
// Called before a test is considered for running. If it returns false,
// the test is not run. If it returns true, the test will be run provided
// it is part of the current shard.
@@ -158,6 +163,9 @@
std::vector<std::string> positive_test_filter_;
std::vector<std::string> negative_test_filter_;
+ // Tests to use (cached result of TestLauncherDelegate::GetTests).
+ std::vector<SplitTestName> tests_;
+
// Number of tests started in this iteration.
size_t test_started_count_;
diff --git a/base/test/launcher/test_launcher_ios.cc b/base/test/launcher/test_launcher_ios.cc
index 39051ca..82353cc 100644
--- a/base/test/launcher/test_launcher_ios.cc
+++ b/base/test/launcher/test_launcher_ios.cc
@@ -5,18 +5,152 @@
#include "base/test/launcher/test_launcher.h"
#include "base/at_exit.h"
+#include "base/base_paths.h"
#include "base/bind.h"
+#include "base/command_line.h"
+#include "base/files/file_path.h"
+#include "base/files/file_util.h"
+#include "base/files/scoped_temp_dir.h"
+#include "base/format_macros.h"
+#include "base/message_loop/message_loop.h"
+#include "base/path_service.h"
+#include "base/process/launch.h"
#include "base/test/launcher/unit_test_launcher.h"
+#include "base/test/test_switches.h"
+#include "base/test/test_timeouts.h"
namespace {
-int DummyRunTestSuite(void) {
- return -1;
+const char kHelpFlag[] = "help";
+
+void PrintUsage() {
+ fprintf(stdout,
+ "Runs tests using the gtest framework, each batch of tests being\n"
+ "run in their own process. Supported command-line flags:\n"
+ "\n"
+ " Common flags:\n"
+ " --gtest_filter=...\n"
+ " Runs a subset of tests (see --gtest_help for more info).\n"
+ "\n"
+ " --help\n"
+ " Shows this message.\n"
+ "\n"
+ " Other flags:\n"
+ " --test-launcher-retry-limit=N\n"
+ " Sets the limit of test retries on failures to N.\n"
+ "\n"
+ " --test-launcher-summary-output=PATH\n"
+ " Saves a JSON machine-readable summary of the run.\n"
+ "\n"
+ " --test-launcher-print-test-stdio=auto|always|never\n"
+ " Controls when full test output is printed.\n"
+ " auto means to print it when the test failed.\n"
+ "\n"
+ " --test-launcher-total-shards=N\n"
+ " Sets the total number of shards to N.\n"
+ "\n"
+ " --test-launcher-shard-index=N\n"
+ " Sets the shard index to run to N (from 0 to TOTAL - 1).\n");
+ fflush(stdout);
}
+class IOSUnitTestLauncherDelegate : public base::UnitTestLauncherDelegate {
+ public:
+ IOSUnitTestLauncherDelegate() : base::UnitTestLauncherDelegate(0, false) {
+ }
+
+ bool Init() WARN_UNUSED_RESULT {
+ if (!PathService::Get(base::DIR_EXE, &dir_exe_)) {
+ LOG(ERROR) << "Failed to get directory of current executable.";
+ return false;
+ }
+
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ std::vector<std::string> args(command_line->GetArgs());
+ if (args.size() < 1) {
+ LOG(ERROR) << "Arguments expected.";
+ return false;
+ }
+ test_name_ = args[0];
+
+ base::CommandLine cmd_line(dir_exe_.AppendASCII(test_name_ + ".app"));
+ cmd_line.AppendSwitch(switches::kTestLauncherPrintWritablePath);
+ cmd_line.PrependWrapper(dir_exe_.AppendASCII("iossim").value());
+
+ std::string raw_output;
+ if (!base::GetAppOutput(cmd_line, &raw_output)) {
+ LOG(ERROR) << "GetAppOutput failed.";
+ return false;
+ }
+ writable_path_ = base::FilePath(raw_output);
+
+ return true;
+ }
+
+ bool GetTests(std::vector<base::SplitTestName>* output) override {
+ base::ScopedTempDir temp_dir;
+ if (!temp_dir.CreateUniqueTempDirUnderPath(writable_path_))
+ return false;
+ base::FilePath test_list_path(
+ temp_dir.path().AppendASCII("test_list.json"));
+
+ base::CommandLine cmd_line(dir_exe_.AppendASCII(test_name_ + ".app"));
+ cmd_line.AppendSwitchPath(switches::kTestLauncherListTests, test_list_path);
+ cmd_line.PrependWrapper(dir_exe_.AppendASCII("iossim").value());
+
+ base::LaunchOptions launch_options;
+ launch_options.wait = true;
+
+ if (!base::LaunchProcess(cmd_line, launch_options).IsValid())
+ return false;
+
+ return base::ReadTestNamesFromFile(test_list_path, output);
+ }
+
+ private:
+ // Directory containing test launcher's executable.
+ base::FilePath dir_exe_;
+
+ // Name of the test executable to run.
+ std::string test_name_;
+
+ // Path that launched test binary can write to.
+ base::FilePath writable_path_;
+
+ DISALLOW_COPY_AND_ASSIGN(IOSUnitTestLauncherDelegate);
+};
+
} // namespace
int main(int argc, char** argv) {
base::AtExitManager at_exit;
- return base::LaunchUnitTests(argc, argv, base::Bind(&DummyRunTestSuite));
+
+ base::CommandLine::Init(argc, argv);
+
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(kHelpFlag)) {
+ PrintUsage();
+ return 0;
+ }
+
+ base::TimeTicks start_time(base::TimeTicks::Now());
+
+ TestTimeouts::Initialize();
+
+ base::MessageLoopForIO message_loop;
+
+ IOSUnitTestLauncherDelegate delegate;
+ if (!delegate.Init()) {
+ fprintf(stderr, "Failed to intialize test launcher delegate.\n");
+ fflush(stderr);
+ return 1;
+ }
+ // Force one job since we can't run multiple simulators in parallel.
+ base::TestLauncher launcher(&delegate, 1);
+ bool success = launcher.Run();
+
+ fprintf(stdout, "Tests took %" PRId64 " seconds.\n",
+ (base::TimeTicks::Now() - start_time).InSeconds());
+ fflush(stdout);
+
+ return (success ? 0 : 1);
}
diff --git a/base/test/launcher/unit_test_launcher.cc b/base/test/launcher/unit_test_launcher.cc
index 6309cde..9a8b41f 100644
--- a/base/test/launcher/unit_test_launcher.cc
+++ b/base/test/launcher/unit_test_launcher.cc
@@ -100,34 +100,159 @@
return new_cmd_line;
}
-class UnitTestLauncherDelegate : public TestLauncherDelegate {
- public:
- explicit UnitTestLauncherDelegate(size_t batch_limit, bool use_job_objects)
- : batch_limit_(batch_limit),
- use_job_objects_(use_job_objects) {
+bool GetSwitchValueAsInt(const std::string& switch_name, int* result) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switch_name))
+ return true;
+
+ std::string switch_value =
+ CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switch_name);
+ if (!StringToInt(switch_value, result) || *result < 1) {
+ LOG(ERROR) << "Invalid value for " << switch_name << ": " << switch_value;
+ return false;
}
- ~UnitTestLauncherDelegate() override {
- DCHECK(thread_checker_.CalledOnValidThread());
+ return true;
+}
+
+int LaunchUnitTestsInternal(const RunTestSuiteCallback& run_test_suite,
+ int default_jobs,
+ bool use_job_objects,
+ const Closure& gtest_init) {
+#if defined(OS_ANDROID)
+ // We can't easily fork on Android, just run the test suite directly.
+ return run_test_suite.Run();
+#else
+ bool force_single_process = false;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kTestLauncherDebugLauncher)) {
+ fprintf(stdout, "Forcing test launcher debugging mode.\n");
+ fflush(stdout);
+ } else {
+ if (base::debug::BeingDebugged()) {
+ fprintf(stdout,
+ "Debugger detected, switching to single process mode.\n"
+ "Pass --test-launcher-debug-launcher to debug the launcher "
+ "itself.\n");
+ fflush(stdout);
+ force_single_process = true;
+ }
}
- private:
- struct GTestCallbackState {
- TestLauncher* test_launcher;
- std::vector<std::string> test_names;
- FilePath output_file;
- };
+ if (CommandLine::ForCurrentProcess()->HasSwitch(kGTestHelpFlag) ||
+ CommandLine::ForCurrentProcess()->HasSwitch(kGTestListTestsFlag) ||
+ CommandLine::ForCurrentProcess()->HasSwitch(kSingleProcessTestsFlag) ||
+ force_single_process) {
+ return run_test_suite.Run();
+ }
+#endif
- bool ShouldRunTest(const std::string& test_case_name,
- const std::string& test_name) override {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(kHelpFlag)) {
+ PrintUsage();
+ return 0;
+ }
+
+ base::TimeTicks start_time(base::TimeTicks::Now());
+
+ gtest_init.Run();
+ TestTimeouts::Initialize();
+
+ int batch_limit = kDefaultTestBatchLimit;
+ if (!GetSwitchValueAsInt(switches::kTestLauncherBatchLimit, &batch_limit))
+ return 1;
+
+ fprintf(stdout,
+ "IMPORTANT DEBUGGING NOTE: batches of tests are run inside their\n"
+ "own process. For debugging a test inside a debugger, use the\n"
+ "--gtest_filter=<your_test_name> flag along with\n"
+ "--single-process-tests.\n");
+ fflush(stdout);
+
+ MessageLoopForIO message_loop;
+
+ UnitTestLauncherDelegate delegate(batch_limit, use_job_objects);
+ base::TestLauncher launcher(&delegate, default_jobs);
+ bool success = launcher.Run();
+
+ fprintf(stdout, "Tests took %" PRId64 " seconds.\n",
+ (base::TimeTicks::Now() - start_time).InSeconds());
+ fflush(stdout);
+
+ return (success ? 0 : 1);
+}
+
+void InitGoogleTestChar(int* argc, char** argv) {
+ testing::InitGoogleTest(argc, argv);
+}
+
+#if defined(OS_WIN)
+void InitGoogleTestWChar(int* argc, wchar_t** argv) {
+ testing::InitGoogleTest(argc, argv);
+}
+#endif // defined(OS_WIN)
+
+} // namespace
+
+int LaunchUnitTests(int argc,
+ char** argv,
+ const RunTestSuiteCallback& run_test_suite) {
+ CommandLine::Init(argc, argv);
+ return LaunchUnitTestsInternal(run_test_suite, SysInfo::NumberOfProcessors(),
+ true, Bind(&InitGoogleTestChar, &argc, argv));
+}
+
+int LaunchUnitTestsSerially(int argc,
+ char** argv,
+ const RunTestSuiteCallback& run_test_suite) {
+ CommandLine::Init(argc, argv);
+ return LaunchUnitTestsInternal(run_test_suite, 1, true,
+ Bind(&InitGoogleTestChar, &argc, argv));
+}
+
+#if defined(OS_WIN)
+int LaunchUnitTests(int argc,
+ wchar_t** argv,
+ bool use_job_objects,
+ const RunTestSuiteCallback& run_test_suite) {
+ // Windows CommandLine::Init ignores argv anyway.
+ CommandLine::Init(argc, NULL);
+ return LaunchUnitTestsInternal(run_test_suite, SysInfo::NumberOfProcessors(),
+ use_job_objects,
+ Bind(&InitGoogleTestWChar, &argc, argv));
+}
+#endif // defined(OS_WIN)
+
+UnitTestLauncherDelegate::UnitTestLauncherDelegate(size_t batch_limit,
+ bool use_job_objects)
+ : batch_limit_(batch_limit), use_job_objects_(use_job_objects) {
+}
+
+UnitTestLauncherDelegate::~UnitTestLauncherDelegate() {
+ DCHECK(thread_checker_.CalledOnValidThread());
+}
+
+UnitTestLauncherDelegate::GTestCallbackState::GTestCallbackState() {
+}
+
+UnitTestLauncherDelegate::GTestCallbackState::~GTestCallbackState() {
+}
+
+bool UnitTestLauncherDelegate::GetTests(std::vector<SplitTestName>* output) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ *output = GetCompiledInTests();
+ return true;
+}
+
+bool UnitTestLauncherDelegate::ShouldRunTest(const std::string& test_case_name,
+ const std::string& test_name) {
DCHECK(thread_checker_.CalledOnValidThread());
// There is no additional logic to disable specific tests.
return true;
}
- size_t RunTests(TestLauncher* test_launcher,
- const std::vector<std::string>& test_names) override {
+ size_t UnitTestLauncherDelegate::RunTests(
+ TestLauncher* test_launcher,
+ const std::vector<std::string>& test_names) {
DCHECK(thread_checker_.CalledOnValidThread());
std::vector<std::string> batch;
@@ -145,8 +270,9 @@
return test_names.size();
}
- size_t RetryTests(TestLauncher* test_launcher,
- const std::vector<std::string>& test_names) override {
+ size_t UnitTestLauncherDelegate::RetryTests(
+ TestLauncher* test_launcher,
+ const std::vector<std::string>& test_names) {
MessageLoop::current()->PostTask(
FROM_HERE,
Bind(&UnitTestLauncherDelegate::RunSerially,
@@ -156,8 +282,9 @@
return test_names.size();
}
- void RunSerially(TestLauncher* test_launcher,
- const std::vector<std::string>& test_names) {
+ void UnitTestLauncherDelegate::RunSerially(
+ TestLauncher* test_launcher,
+ const std::vector<std::string>& test_names) {
if (test_names.empty())
return;
@@ -193,8 +320,9 @@
new_test_names));
}
- void RunBatch(TestLauncher* test_launcher,
- const std::vector<std::string>& test_names) {
+ void UnitTestLauncherDelegate::RunBatch(
+ TestLauncher* test_launcher,
+ const std::vector<std::string>& test_names) {
DCHECK(thread_checker_.CalledOnValidThread());
if (test_names.empty())
@@ -234,11 +362,12 @@
callback_state));
}
- void GTestCallback(const GTestCallbackState& callback_state,
- int exit_code,
- const TimeDelta& elapsed_time,
- bool was_timeout,
- const std::string& output) {
+ void UnitTestLauncherDelegate::GTestCallback(
+ const GTestCallbackState& callback_state,
+ int exit_code,
+ const TimeDelta& elapsed_time,
+ bool was_timeout,
+ const std::string& output) {
DCHECK(thread_checker_.CalledOnValidThread());
std::vector<std::string> tests_to_relaunch;
ProcessTestResults(callback_state.test_launcher,
@@ -262,12 +391,13 @@
DeleteFile(callback_state.output_file.DirName(), true);
}
- void SerialGTestCallback(const GTestCallbackState& callback_state,
- const std::vector<std::string>& test_names,
- int exit_code,
- const TimeDelta& elapsed_time,
- bool was_timeout,
- const std::string& output) {
+ void UnitTestLauncherDelegate::SerialGTestCallback(
+ const GTestCallbackState& callback_state,
+ const std::vector<std::string>& test_names,
+ int exit_code,
+ const TimeDelta& elapsed_time,
+ bool was_timeout,
+ const std::string& output) {
DCHECK(thread_checker_.CalledOnValidThread());
std::vector<std::string> tests_to_relaunch;
bool called_any_callbacks =
@@ -297,7 +427,8 @@
test_names));
}
- static bool ProcessTestResults(
+ // static
+ bool UnitTestLauncherDelegate::ProcessTestResults(
TestLauncher* test_launcher,
const std::vector<std::string>& test_names,
const base::FilePath& output_file,
@@ -434,143 +565,4 @@
return called_any_callback;
}
- ThreadChecker thread_checker_;
-
- // Maximum number of tests to run in a single batch.
- size_t batch_limit_;
-
- // Determines whether we use job objects on Windows.
- bool use_job_objects_;
-};
-
-bool GetSwitchValueAsInt(const std::string& switch_name, int* result) {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(switch_name))
- return true;
-
- std::string switch_value =
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switch_name);
- if (!StringToInt(switch_value, result) || *result < 1) {
- LOG(ERROR) << "Invalid value for " << switch_name << ": " << switch_value;
- return false;
- }
-
- return true;
-}
-
-int LaunchUnitTestsInternal(const RunTestSuiteCallback& run_test_suite,
- int default_jobs,
- bool use_job_objects,
- const Closure& gtest_init) {
-#if defined(OS_ANDROID)
- // We can't easily fork on Android, just run the test suite directly.
- return run_test_suite.Run();
-#else
- bool force_single_process = false;
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kTestLauncherDebugLauncher)) {
- fprintf(stdout, "Forcing test launcher debugging mode.\n");
- fflush(stdout);
- } else {
- if (base::debug::BeingDebugged()) {
- fprintf(stdout,
- "Debugger detected, switching to single process mode.\n"
- "Pass --test-launcher-debug-launcher to debug the launcher "
- "itself.\n");
- fflush(stdout);
- force_single_process = true;
- }
- }
-
- if (CommandLine::ForCurrentProcess()->HasSwitch(kGTestHelpFlag) ||
- CommandLine::ForCurrentProcess()->HasSwitch(kGTestListTestsFlag) ||
- CommandLine::ForCurrentProcess()->HasSwitch(kSingleProcessTestsFlag) ||
- force_single_process) {
- return run_test_suite.Run();
- }
-#endif
-
- if (CommandLine::ForCurrentProcess()->HasSwitch(kHelpFlag)) {
- PrintUsage();
- return 0;
- }
-
- base::TimeTicks start_time(base::TimeTicks::Now());
-
- gtest_init.Run();
- TestTimeouts::Initialize();
-
- int batch_limit = kDefaultTestBatchLimit;
- if (!GetSwitchValueAsInt(switches::kTestLauncherBatchLimit, &batch_limit))
- return 1;
-
- fprintf(stdout,
- "IMPORTANT DEBUGGING NOTE: batches of tests are run inside their\n"
- "own process. For debugging a test inside a debugger, use the\n"
- "--gtest_filter=<your_test_name> flag along with\n"
- "--single-process-tests.\n");
- fflush(stdout);
-
- MessageLoopForIO message_loop;
-
- UnitTestLauncherDelegate delegate(batch_limit, use_job_objects);
- base::TestLauncher launcher(&delegate, default_jobs);
- bool success = launcher.Run();
-
- fprintf(stdout,
- "Tests took %" PRId64 " seconds.\n",
- (base::TimeTicks::Now() - start_time).InSeconds());
- fflush(stdout);
-
- return (success ? 0 : 1);
-}
-
-void InitGoogleTestChar(int* argc, char** argv) {
- testing::InitGoogleTest(argc, argv);
-}
-
-#if defined(OS_WIN)
-void InitGoogleTestWChar(int* argc, wchar_t** argv) {
- testing::InitGoogleTest(argc, argv);
-}
-#endif // defined(OS_WIN)
-
-} // namespace
-
-int LaunchUnitTests(int argc,
- char** argv,
- const RunTestSuiteCallback& run_test_suite) {
- CommandLine::Init(argc, argv);
- return LaunchUnitTestsInternal(
- run_test_suite,
- SysInfo::NumberOfProcessors(),
- true,
- Bind(&InitGoogleTestChar, &argc, argv));
-}
-
-int LaunchUnitTestsSerially(int argc,
- char** argv,
- const RunTestSuiteCallback& run_test_suite) {
- CommandLine::Init(argc, argv);
- return LaunchUnitTestsInternal(
- run_test_suite,
- 1,
- true,
- Bind(&InitGoogleTestChar, &argc, argv));
-}
-
-#if defined(OS_WIN)
-int LaunchUnitTests(int argc,
- wchar_t** argv,
- bool use_job_objects,
- const RunTestSuiteCallback& run_test_suite) {
- // Windows CommandLine::Init ignores argv anyway.
- CommandLine::Init(argc, NULL);
- return LaunchUnitTestsInternal(
- run_test_suite,
- SysInfo::NumberOfProcessors(),
- use_job_objects,
- Bind(&InitGoogleTestWChar, &argc, argv));
-}
-#endif // defined(OS_WIN)
-
} // namespace base
diff --git a/base/test/launcher/unit_test_launcher.h b/base/test/launcher/unit_test_launcher.h
index 5682ed9..0f661db 100644
--- a/base/test/launcher/unit_test_launcher.h
+++ b/base/test/launcher/unit_test_launcher.h
@@ -6,6 +6,8 @@
#define BASE_TEST_LAUNCHER_UNIT_TEST_LAUNCHER_H_
#include "base/callback.h"
+#include "base/files/file_path.h"
+#include "base/test/launcher/test_launcher.h"
namespace base {
@@ -31,6 +33,75 @@
const RunTestSuiteCallback& run_test_suite);
#endif // defined(OS_WIN)
+// Test launcher delegate for unit tests (mostly to support batching).
+class UnitTestLauncherDelegate : public TestLauncherDelegate {
+ public:
+ explicit UnitTestLauncherDelegate(size_t batch_limit, bool use_job_objects);
+ ~UnitTestLauncherDelegate() override;
+
+ private:
+ struct GTestCallbackState {
+ GTestCallbackState();
+ ~GTestCallbackState();
+
+ TestLauncher* test_launcher;
+ std::vector<std::string> test_names;
+ FilePath output_file;
+ };
+
+ // TestLauncherDelegate:
+ bool GetTests(std::vector<SplitTestName>* output) override;
+ bool ShouldRunTest(const std::string& test_case_name,
+ const std::string& test_name) override;
+ size_t RunTests(TestLauncher* test_launcher,
+ const std::vector<std::string>& test_names) override;
+ size_t RetryTests(TestLauncher* test_launcher,
+ const std::vector<std::string>& test_names) override;
+
+ // Runs tests serially, each in its own process.
+ void RunSerially(TestLauncher* test_launcher,
+ const std::vector<std::string>& test_names);
+
+ // Runs tests in batches (each batch in its own process).
+ void RunBatch(TestLauncher* test_launcher,
+ const std::vector<std::string>& test_names);
+
+ // Callback for batched tests.
+ void GTestCallback(const GTestCallbackState& callback_state,
+ int exit_code,
+ const TimeDelta& elapsed_time,
+ bool was_timeout,
+ const std::string& output);
+
+ // Callback for serialized tests.
+ void SerialGTestCallback(const GTestCallbackState& callback_state,
+ const std::vector<std::string>& test_names,
+ int exit_code,
+ const TimeDelta& elapsed_time,
+ bool was_timeout,
+ const std::string& output);
+
+ // Interprets test results and reports to the test launcher. Returns true
+ // on success.
+ static bool ProcessTestResults(TestLauncher* test_launcher,
+ const std::vector<std::string>& test_names,
+ const base::FilePath& output_file,
+ const std::string& output,
+ int exit_code,
+ bool was_timeout,
+ std::vector<std::string>* tests_to_relaunch);
+
+ ThreadChecker thread_checker_;
+
+ // Maximum number of tests to run in a single batch.
+ size_t batch_limit_;
+
+ // Determines whether we use job objects on Windows.
+ bool use_job_objects_;
+
+ DISALLOW_COPY_AND_ASSIGN(UnitTestLauncherDelegate);
+};
+
} // namespace base
#endif // BASE_TEST_LAUNCHER_UNIT_TEST_LAUNCHER_H_
diff --git a/base/test/launcher/unit_test_launcher_ios.cc b/base/test/launcher/unit_test_launcher_ios.cc
index d4276c8..acb6c71 100644
--- a/base/test/launcher/unit_test_launcher_ios.cc
+++ b/base/test/launcher/unit_test_launcher_ios.cc
@@ -6,7 +6,9 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
+#include "base/files/file_util.h"
#include "base/logging.h"
+#include "base/mac/foundation_util.h"
#include "base/test/gtest_util.h"
#include "base/test/test_switches.h"
@@ -27,6 +29,11 @@
LOG(ERROR) << "Failed to write list of tests.";
return 1;
}
+ } else if (command_line->HasSwitch(
+ switches::kTestLauncherPrintWritablePath)) {
+ fprintf(stdout, "%s", mac::GetUserLibraryPath().value().c_str());
+ fflush(stdout);
+ return 0;
}
return run_test_suite.Run();
diff --git a/base/test/test_suite.cc b/base/test/test_suite.cc
index 383b82c..a6fc201 100644
--- a/base/test/test_suite.cc
+++ b/base/test/test_suite.cc
@@ -135,12 +135,12 @@
testing::GTEST_FLAG(catch_exceptions) = false;
#endif
base::EnableTerminationOnHeapCorruption();
-#if defined(OS_LINUX) && !defined(OS_ANDROID)
+#if defined(OS_LINUX) && defined(USE_AURA)
// When calling native char conversion functions (e.g wrctomb) we need to
// have the locale set. In the absence of such a call the "C" locale is the
// default. In the gtk code (below) gtk_init() implicitly sets a locale.
setlocale(LC_ALL, "");
-#endif // defined(OS_LINUX) && !defined(OS_ANDROID)
+#endif // defined(OS_LINUX) && defined(USE_AURA)
// On Android, AtExitManager is created in
// testing/android/native_test_wrapper.cc before main() is called.
diff --git a/base/test/test_switches.cc b/base/test/test_switches.cc
index 4d8331d..84aa53c 100644
--- a/base/test/test_switches.cc
+++ b/base/test/test_switches.cc
@@ -42,6 +42,10 @@
const char switches::kTestLauncherPrintTestStdio[] =
"test-launcher-print-test-stdio";
+// Print a writable path and exit (for internal use).
+const char switches::kTestLauncherPrintWritablePath[] =
+ "test-launcher-print-writable-path";
+
// Index of the test shard to run, starting from 0 (first shard) to total shards
// minus one (last shard).
const char switches::kTestLauncherShardIndex[] =
diff --git a/base/test/test_switches.h b/base/test/test_switches.h
index 336d036..f145f1e 100644
--- a/base/test/test_switches.h
+++ b/base/test/test_switches.h
@@ -19,6 +19,7 @@
extern const char kTestLauncherRetryLimit[];
extern const char kTestLauncherSummaryOutput[];
extern const char kTestLauncherPrintTestStdio[];
+extern const char kTestLauncherPrintWritablePath[];
extern const char kTestLauncherShardIndex[];
extern const char kTestLauncherTotalShards[];
extern const char kTestLauncherTimeout[];
diff --git a/base/test/test_timeouts.cc b/base/test/test_timeouts.cc
index 66ae85e..b30d6c3 100644
--- a/base/test/test_timeouts.cc
+++ b/base/test/test_timeouts.cc
@@ -23,7 +23,7 @@
#elif defined(ADDRESS_SANITIZER) && defined(OS_WIN)
// Asan/Win has not been optimized yet, give it a higher
// timeout multiplier. See http://crbug.com/412471
-static const int kTimeoutMultiplier = 8;
+static const int kTimeoutMultiplier = 3;
#elif defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) || \
defined(SYZYASAN)
static const int kTimeoutMultiplier = 2;
diff --git a/base/time/time.h b/base/time/time.h
index d61a351..915eac8 100644
--- a/base/time/time.h
+++ b/base/time/time.h
@@ -100,6 +100,15 @@
return delta_;
}
+ // Returns the magnitude (absolute value) of this TimeDelta.
+ TimeDelta magnitude() const {
+ // Some toolchains provide an incomplete C++11 implementation and lack an
+ // int64 overload for std::abs(). The following is a simple branchless
+ // implementation:
+ const int64 mask = delta_ >> (sizeof(delta_) * 8 - 1);
+ return TimeDelta((delta_ + mask) ^ mask);
+ }
+
// Returns true if the time delta is the maximum time delta.
bool is_max() const {
return delta_ == std::numeric_limits<int64>::max();
@@ -588,18 +597,26 @@
TimeTicks() : ticks_(0) {
}
- // Platform-dependent tick count representing "right now."
- // The resolution of this clock is ~1-15ms. Resolution varies depending
- // on hardware/operating system configuration.
+ // Platform-dependent tick count representing "right now." When
+ // IsHighResolution() returns false, the resolution of the clock could be
+ // as coarse as ~15.6ms. Otherwise, the resolution should be no worse than one
+ // microsecond.
static TimeTicks Now();
- // Returns a platform-dependent high-resolution tick count. Implementation
- // is hardware dependent and may or may not return sub-millisecond
- // resolution. THIS CALL IS GENERALLY MUCH MORE EXPENSIVE THAN Now() AND
- // SHOULD ONLY BE USED WHEN IT IS REALLY NEEDED.
- static TimeTicks HighResNow();
+ // DEPRECATED
+ // TODO(miu): Remove this function, and all callpoints should call Now().
+ static TimeTicks HighResNow() { return TimeTicks::Now(); }
- static bool IsHighResNowFastAndReliable();
+ // Returns true if the high resolution clock is working on this system and
+ // Now() will return high resolution values. Note that, on systems where the
+ // high resolution clock works but is deemed inefficient, the low resolution
+ // clock will be used instead.
+ static bool IsHighResolution();
+
+ // DEPRECATED
+ // TODO(miu): Remove this function, and all callpoints should call
+ // IsHighResolution().
+ static bool IsHighResNowFastAndReliable() { return IsHighResolution(); }
// Returns true if ThreadNow() is supported on this system.
static bool IsThreadNowSupported() {
@@ -616,24 +633,33 @@
// to (approximately) measure how much time the calling thread spent doing
// actual work vs. being de-scheduled. May return bogus results if the thread
// migrates to another CPU between two calls.
+ //
+ // WARNING: The returned value might NOT have the same origin as Now(). Do not
+ // perform math between TimeTicks values returned by Now() and ThreadNow() and
+ // expect meaningful results.
+ // TODO(miu): Since the timeline of these values is different, the values
+ // should be of a different type.
static TimeTicks ThreadNow();
- // Returns the current system trace time or, if none is defined, the current
- // high-res time (i.e. HighResNow()). On systems where a global trace clock
- // is defined, timestamping TraceEvents's with this value guarantees
- // synchronization between events collected inside chrome and events
- // collected outside (e.g. kernel, X server).
+ // Returns the current system trace time or, if not available on this
+ // platform, a high-resolution time value; or a low-resolution time value if
+ // neither are avalable. On systems where a global trace clock is defined,
+ // timestamping TraceEvents's with this value guarantees synchronization
+ // between events collected inside chrome and events collected outside
+ // (e.g. kernel, X server).
+ //
+ // WARNING: The returned value might NOT have the same origin as Now(). Do not
+ // perform math between TimeTicks values returned by Now() and
+ // NowFromSystemTraceTime() and expect meaningful results.
+ // TODO(miu): Since the timeline of these values is different, the values
+ // should be of a different type.
static TimeTicks NowFromSystemTraceTime();
#if defined(OS_WIN)
- // Get the absolute value of QPC time drift. For testing.
- static int64 GetQPCDriftMicroseconds();
-
+ // Translates an absolute QPC timestamp into a TimeTicks value. The returned
+ // value has the same origin as Now(). Do NOT attempt to use this if
+ // IsHighResolution() returns false.
static TimeTicks FromQPCValue(LONGLONG qpc_value);
-
- // Returns true if the high resolution clock is working on this system.
- // This is only for testing.
- static bool IsHighResClockWorking();
#endif
// Returns true if this object has not been initialized.
diff --git a/base/time/time_mac.cc b/base/time/time_mac.cc
index 26c5d7a..3944d06 100644
--- a/base/time/time_mac.cc
+++ b/base/time/time_mac.cc
@@ -219,12 +219,7 @@
}
// static
-TimeTicks TimeTicks::HighResNow() {
- return Now();
-}
-
-// static
-bool TimeTicks::IsHighResNowFastAndReliable() {
+bool TimeTicks::IsHighResolution() {
return true;
}
diff --git a/base/time/time_posix.cc b/base/time/time_posix.cc
index ad00c51..34b2f5a 100644
--- a/base/time/time_posix.cc
+++ b/base/time/time_posix.cc
@@ -314,12 +314,7 @@
}
// static
-TimeTicks TimeTicks::HighResNow() {
- return Now();
-}
-
-// static
-bool TimeTicks::IsHighResNowFastAndReliable() {
+bool TimeTicks::IsHighResolution() {
return true;
}
diff --git a/base/time/time_unittest.cc b/base/time/time_unittest.cc
index 16d6fe9..07b1e6b 100644
--- a/base/time/time_unittest.cc
+++ b/base/time/time_unittest.cc
@@ -6,6 +6,7 @@
#include <time.h>
+#include <limits>
#include <string>
#include "base/compiler_specific.h"
@@ -642,12 +643,10 @@
}
static void HighResClockTest(TimeTicks (*GetTicks)()) {
-#if defined(OS_WIN)
// HighResNow doesn't work on some systems. Since the product still works
// even if it doesn't work, it makes this entire test questionable.
- if (!TimeTicks::IsHighResClockWorking())
+ if (!TimeTicks::IsHighResolution())
return;
-#endif
// Why do we loop here?
// We're trying to measure that intervals increment in a VERY small amount
@@ -792,6 +791,26 @@
return oss.str();
}
+TEST(TimeDelta, Magnitude) {
+ const int64 zero = 0;
+ EXPECT_EQ(TimeDelta::FromMicroseconds(zero),
+ TimeDelta::FromMicroseconds(zero).magnitude());
+
+ const int64 one = 1;
+ const int64 negative_one = -1;
+ EXPECT_EQ(TimeDelta::FromMicroseconds(one),
+ TimeDelta::FromMicroseconds(one).magnitude());
+ EXPECT_EQ(TimeDelta::FromMicroseconds(one),
+ TimeDelta::FromMicroseconds(negative_one).magnitude());
+
+ const int64 max_int64_minus_one = std::numeric_limits<int64>::max() - 1;
+ const int64 min_int64_plus_two = std::numeric_limits<int64>::min() + 2;
+ EXPECT_EQ(TimeDelta::FromMicroseconds(max_int64_minus_one),
+ TimeDelta::FromMicroseconds(max_int64_minus_one).magnitude());
+ EXPECT_EQ(TimeDelta::FromMicroseconds(max_int64_minus_one),
+ TimeDelta::FromMicroseconds(min_int64_plus_two).magnitude());
+}
+
TEST(TimeDeltaLogging, DCheckEqCompiles) {
DCHECK_EQ(TimeDelta(), TimeDelta());
}
diff --git a/base/time/time_win.cc b/base/time/time_win.cc
index 9b4f17d..8ae7640 100644
--- a/base/time/time_win.cc
+++ b/base/time/time_win.cc
@@ -307,13 +307,13 @@
return timeGetTime();
}
-DWORD (*tick_function)(void) = &timeGetTimeWrapper;
+DWORD (*g_tick_function)(void) = &timeGetTimeWrapper;
// Accumulation of time lost due to rollover (in milliseconds).
-int64 rollover_ms = 0;
+int64 g_rollover_ms = 0;
// The last timeGetTime value we saw, to detect rollover.
-DWORD last_seen_now = 0;
+DWORD g_last_seen_now = 0;
// Lock protecting rollover_ms and last_seen_now.
// Note: this is a global object, and we usually avoid these. However, the time
@@ -321,169 +321,161 @@
// easy to use a Singleton without even knowing it, and that may lead to many
// gotchas). Its impact on startup time should be negligible due to low-level
// nature of time code.
-base::Lock rollover_lock;
+base::Lock g_rollover_lock;
// We use timeGetTime() to implement TimeTicks::Now(). This can be problematic
// because it returns the number of milliseconds since Windows has started,
// which will roll over the 32-bit value every ~49 days. We try to track
// rollover ourselves, which works if TimeTicks::Now() is called at least every
// 49 days.
-TimeDelta RolloverProtectedNow() {
- base::AutoLock locked(rollover_lock);
+TimeTicks RolloverProtectedNow() {
+ base::AutoLock locked(g_rollover_lock);
// We should hold the lock while calling tick_function to make sure that
// we keep last_seen_now stay correctly in sync.
- DWORD now = tick_function();
- if (now < last_seen_now)
- rollover_ms += 0x100000000I64; // ~49.7 days.
- last_seen_now = now;
- return TimeDelta::FromMilliseconds(now + rollover_ms);
+ DWORD now = g_tick_function();
+ if (now < g_last_seen_now)
+ g_rollover_ms += 0x100000000I64; // ~49.7 days.
+ g_last_seen_now = now;
+ return TimeTicks() + TimeDelta::FromMilliseconds(now + g_rollover_ms);
}
-bool IsBuggyAthlon(const base::CPU& cpu) {
- // On Athlon X2 CPUs (e.g. model 15) QueryPerformanceCounter is
- // unreliable. Fallback to low-res clock.
- return cpu.vendor_name() == "AuthenticAMD" && cpu.family() == 15;
-}
-
-// Overview of time counters:
+// Discussion of tick counter options on Windows:
+//
// (1) CPU cycle counter. (Retrieved via RDTSC)
// The CPU counter provides the highest resolution time stamp and is the least
-// expensive to retrieve. However, the CPU counter is unreliable and should not
-// be used in production. Its biggest issue is that it is per processor and it
-// is not synchronized between processors. Also, on some computers, the counters
-// will change frequency due to thermal and power changes, and stop in some
-// states.
+// expensive to retrieve. However, on older CPUs, two issues can affect its
+// reliability: First it is maintained per processor and not synchronized
+// between processors. Also, the counters will change frequency due to thermal
+// and power changes, and stop in some states.
//
// (2) QueryPerformanceCounter (QPC). The QPC counter provides a high-
-// resolution (100 nanoseconds) time stamp but is comparatively more expensive
-// to retrieve. What QueryPerformanceCounter actually does is up to the HAL.
-// (with some help from ACPI).
-// According to http://blogs.msdn.com/oldnewthing/archive/2005/09/02/459952.aspx
-// in the worst case, it gets the counter from the rollover interrupt on the
+// resolution (<1 microsecond) time stamp. On most hardware running today, it
+// auto-detects and uses the constant-rate RDTSC counter to provide extremely
+// efficient and reliable time stamps.
+//
+// On older CPUs where RDTSC is unreliable, it falls back to using more
+// expensive (20X to 40X more costly) alternate clocks, such as HPET or the ACPI
+// PM timer, and can involve system calls; and all this is up to the HAL (with
+// some help from ACPI). According to
+// http://blogs.msdn.com/oldnewthing/archive/2005/09/02/459952.aspx, in the
+// worst case, it gets the counter from the rollover interrupt on the
// programmable interrupt timer. In best cases, the HAL may conclude that the
// RDTSC counter runs at a constant frequency, then it uses that instead. On
// multiprocessor machines, it will try to verify the values returned from
// RDTSC on each processor are consistent with each other, and apply a handful
// of workarounds for known buggy hardware. In other words, QPC is supposed to
-// give consistent result on a multiprocessor computer, but it is unreliable in
-// reality due to bugs in BIOS or HAL on some, especially old computers.
-// With recent updates on HAL and newer BIOS, QPC is getting more reliable but
-// it should be used with caution.
+// give consistent results on a multiprocessor computer, but for older CPUs it
+// can be unreliable due bugs in BIOS or HAL.
//
-// (3) System time. The system time provides a low-resolution (typically 10ms
-// to 55 milliseconds) time stamp but is comparatively less expensive to
-// retrieve and more reliable.
-class HighResNowSingleton {
- public:
- HighResNowSingleton()
- : ticks_per_second_(0),
- skew_(0) {
+// (3) System time. The system time provides a low-resolution (from ~1 to ~15.6
+// milliseconds) time stamp but is comparatively less expensive to retrieve and
+// more reliable. Time::EnableHighResolutionTimer() and
+// Time::ActivateHighResolutionTimer() can be called to alter the resolution of
+// this timer; and also other Windows applications can alter it, affecting this
+// one.
- base::CPU cpu;
- if (IsBuggyAthlon(cpu))
- return;
+using NowFunction = TimeTicks (*)(void);
- // Synchronize the QPC clock with GetSystemTimeAsFileTime.
- LARGE_INTEGER ticks_per_sec = {0};
- if (!QueryPerformanceFrequency(&ticks_per_sec))
- return; // QPC is not available.
- ticks_per_second_ = ticks_per_sec.QuadPart;
+TimeTicks InitialNowFunction();
+TimeTicks InitialSystemTraceNowFunction();
- skew_ = UnreliableNow() - ReliableNow();
+// See "threading notes" in InitializeNowFunctionPointers() for details on how
+// concurrent reads/writes to these globals has been made safe.
+NowFunction g_now_function = &InitialNowFunction;
+NowFunction g_system_trace_now_function = &InitialSystemTraceNowFunction;
+int64 g_qpc_ticks_per_second = 0;
+
+// As of January 2015, use of <atomic> is forbidden in Chromium code. This is
+// what std::atomic_thread_fence does on Windows on all Intel architectures when
+// the memory_order argument is anything but std::memory_order_seq_cst:
+#define ATOMIC_THREAD_FENCE(memory_order) _ReadWriteBarrier();
+
+TimeDelta QPCValueToTimeDelta(LONGLONG qpc_value) {
+ // Ensure that the assignment to |g_qpc_ticks_per_second|, made in
+ // InitializeNowFunctionPointers(), has happened by this point.
+ ATOMIC_THREAD_FENCE(memory_order_acquire);
+
+ DCHECK_GT(g_qpc_ticks_per_second, 0);
+
+ // If the QPC Value is below the overflow threshold, we proceed with
+ // simple multiply and divide.
+ if (qpc_value < Time::kQPCOverflowThreshold) {
+ return TimeDelta::FromMicroseconds(
+ qpc_value * Time::kMicrosecondsPerSecond / g_qpc_ticks_per_second);
}
-
- bool IsUsingHighResClock() {
- return ticks_per_second_ != 0;
- }
-
- TimeDelta Now() {
- if (IsUsingHighResClock())
- return TimeDelta::FromMicroseconds(UnreliableNow());
-
- // Just fallback to the slower clock.
- return RolloverProtectedNow();
- }
-
- int64 GetQPCDriftMicroseconds() {
- if (!IsUsingHighResClock())
- return 0;
- return abs((UnreliableNow() - ReliableNow()) - skew_);
- }
-
- int64 QPCValueToMicroseconds(LONGLONG qpc_value) {
- if (!ticks_per_second_)
- return 0;
- // If the QPC Value is below the overflow threshold, we proceed with
- // simple multiply and divide.
- if (qpc_value < Time::kQPCOverflowThreshold)
- return qpc_value * Time::kMicrosecondsPerSecond / ticks_per_second_;
- // Otherwise, calculate microseconds in a round about manner to avoid
- // overflow and precision issues.
- int64 whole_seconds = qpc_value / ticks_per_second_;
- int64 leftover_ticks = qpc_value - (whole_seconds * ticks_per_second_);
- int64 microseconds = (whole_seconds * Time::kMicrosecondsPerSecond) +
- ((leftover_ticks * Time::kMicrosecondsPerSecond) /
- ticks_per_second_);
- return microseconds;
- }
-
- private:
- // Get the number of microseconds since boot in an unreliable fashion.
- int64 UnreliableNow() {
- LARGE_INTEGER now;
- QueryPerformanceCounter(&now);
- return QPCValueToMicroseconds(now.QuadPart);
- }
-
- // Get the number of microseconds since boot in a reliable fashion.
- int64 ReliableNow() {
- return RolloverProtectedNow().InMicroseconds();
- }
-
- int64 ticks_per_second_; // 0 indicates QPF failed and we're broken.
- int64 skew_; // Skew between lo-res and hi-res clocks (for debugging).
-};
-
-static base::LazyInstance<HighResNowSingleton>::Leaky
- leaky_high_res_now_singleton = LAZY_INSTANCE_INITIALIZER;
-
-HighResNowSingleton* GetHighResNowSingleton() {
- return leaky_high_res_now_singleton.Pointer();
+ // Otherwise, calculate microseconds in a round about manner to avoid
+ // overflow and precision issues.
+ int64 whole_seconds = qpc_value / g_qpc_ticks_per_second;
+ int64 leftover_ticks = qpc_value - (whole_seconds * g_qpc_ticks_per_second);
+ return TimeDelta::FromMicroseconds(
+ (whole_seconds * Time::kMicrosecondsPerSecond) +
+ ((leftover_ticks * Time::kMicrosecondsPerSecond) /
+ g_qpc_ticks_per_second));
}
-TimeDelta HighResNowWrapper() {
- return GetHighResNowSingleton()->Now();
+TimeTicks QPCNow() {
+ LARGE_INTEGER now;
+ QueryPerformanceCounter(&now);
+ return TimeTicks() + QPCValueToTimeDelta(now.QuadPart);
}
-typedef TimeDelta (*NowFunction)(void);
+bool IsBuggyAthlon(const base::CPU& cpu) {
+ // On Athlon X2 CPUs (e.g. model 15) QueryPerformanceCounter is unreliable.
+ return cpu.vendor_name() == "AuthenticAMD" && cpu.family() == 15;
+}
-bool CPUReliablySupportsHighResTime() {
+void InitializeNowFunctionPointers() {
+ LARGE_INTEGER ticks_per_sec = {0};
+ if (!QueryPerformanceFrequency(&ticks_per_sec))
+ ticks_per_sec.QuadPart = 0;
+
+ // If Windows cannot provide a QPC implementation, both Now() and
+ // NowFromSystemTraceTime() must use the low-resolution clock.
+ //
+ // If the QPC implementation is expensive and/or unreliable, Now() will use
+ // the low-resolution clock, but NowFromSystemTraceTime() will use the QPC (in
+ // the hope that it is still useful for tracing purposes). A CPU lacking a
+ // non-stop time counter will cause Windows to provide an alternate QPC
+ // implementation that works, but is expensive to use. Certain Athlon CPUs are
+ // known to make the QPC implementation unreliable.
+ //
+ // Otherwise, both Now functions can use the high-resolution QPC clock. As of
+ // 4 January 2015, ~68% of users fall within this category.
+ NowFunction now_function;
+ NowFunction system_trace_now_function;
base::CPU cpu;
- if (!cpu.has_non_stop_time_stamp_counter() ||
- !GetHighResNowSingleton()->IsUsingHighResClock())
- return false;
+ if (ticks_per_sec.QuadPart <= 0) {
+ now_function = system_trace_now_function = &RolloverProtectedNow;
+ } else if (!cpu.has_non_stop_time_stamp_counter() || IsBuggyAthlon(cpu)) {
+ now_function = &RolloverProtectedNow;
+ system_trace_now_function = &QPCNow;
+ } else {
+ now_function = system_trace_now_function = &QPCNow;
+ }
- if (IsBuggyAthlon(cpu))
- return false;
-
- return true;
+ // Threading note 1: In an unlikely race condition, it's possible for two or
+ // more threads to enter InitializeNowFunctionPointers() in parallel. This is
+ // not a problem since all threads should end up writing out the same values
+ // to the global variables.
+ //
+ // Threading note 2: A release fence is placed here to ensure, from the
+ // perspective of other threads using the function pointers, that the
+ // assignment to |g_qpc_ticks_per_second| happens before the function pointers
+ // are changed.
+ g_qpc_ticks_per_second = ticks_per_sec.QuadPart;
+ ATOMIC_THREAD_FENCE(memory_order_release);
+ g_now_function = now_function;
+ g_system_trace_now_function = system_trace_now_function;
}
-TimeDelta InitialNowFunction();
+TimeTicks InitialNowFunction() {
+ InitializeNowFunctionPointers();
+ return g_now_function();
+}
-volatile NowFunction now_function = InitialNowFunction;
-
-TimeDelta InitialNowFunction() {
- if (!CPUReliablySupportsHighResTime()) {
- InterlockedExchangePointer(
- reinterpret_cast<void* volatile*>(&now_function),
- &RolloverProtectedNow);
- return RolloverProtectedNow();
- }
- InterlockedExchangePointer(
- reinterpret_cast<void* volatile*>(&now_function),
- &HighResNowWrapper);
- return HighResNowWrapper();
+TimeTicks InitialSystemTraceNowFunction() {
+ InitializeNowFunctionPointers();
+ return g_system_trace_now_function();
}
} // namespace
@@ -491,27 +483,24 @@
// static
TimeTicks::TickFunctionType TimeTicks::SetMockTickFunction(
TickFunctionType ticker) {
- base::AutoLock locked(rollover_lock);
- TickFunctionType old = tick_function;
- tick_function = ticker;
- rollover_ms = 0;
- last_seen_now = 0;
+ base::AutoLock locked(g_rollover_lock);
+ TickFunctionType old = g_tick_function;
+ g_tick_function = ticker;
+ g_rollover_ms = 0;
+ g_last_seen_now = 0;
return old;
}
// static
TimeTicks TimeTicks::Now() {
- return TimeTicks() + now_function();
+ return g_now_function();
}
// static
-TimeTicks TimeTicks::HighResNow() {
- return TimeTicks() + HighResNowWrapper();
-}
-
-// static
-bool TimeTicks::IsHighResNowFastAndReliable() {
- return CPUReliablySupportsHighResTime();
+bool TimeTicks::IsHighResolution() {
+ if (g_now_function == &InitialNowFunction)
+ InitializeNowFunctionPointers();
+ return g_now_function == &QPCNow;
}
// static
@@ -522,27 +511,17 @@
// static
TimeTicks TimeTicks::NowFromSystemTraceTime() {
- return HighResNow();
-}
-
-// static
-int64 TimeTicks::GetQPCDriftMicroseconds() {
- return GetHighResNowSingleton()->GetQPCDriftMicroseconds();
+ return g_system_trace_now_function();
}
// static
TimeTicks TimeTicks::FromQPCValue(LONGLONG qpc_value) {
- return TimeTicks(GetHighResNowSingleton()->QPCValueToMicroseconds(qpc_value));
-}
-
-// static
-bool TimeTicks::IsHighResClockWorking() {
- return GetHighResNowSingleton()->IsUsingHighResClock();
+ return TimeTicks() + QPCValueToTimeDelta(qpc_value);
}
// TimeDelta ------------------------------------------------------------------
// static
TimeDelta TimeDelta::FromQPCValue(LONGLONG qpc_value) {
- return TimeDelta(GetHighResNowSingleton()->QPCValueToMicroseconds(qpc_value));
+ return QPCValueToTimeDelta(qpc_value);
}
diff --git a/base/time/time_win_unittest.cc b/base/time/time_win_unittest.cc
index 058dfd7..71cd29e 100644
--- a/base/time/time_win_unittest.cc
+++ b/base/time/time_win_unittest.cc
@@ -6,6 +6,10 @@
#include <mmsystem.h>
#include <process.h>
+#include <cmath>
+#include <limits>
+#include <vector>
+
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -114,7 +118,7 @@
TEST(TimeTicks, SubMillisecondTimers) {
// HighResNow doesn't work on some systems. Since the product still works
// even if it doesn't work, it makes this entire test questionable.
- if (!TimeTicks::IsHighResClockWorking())
+ if (!TimeTicks::IsHighResolution())
return;
const int kRetries = 1000;
@@ -183,7 +187,7 @@
TestCase cases[] = {
{ reinterpret_cast<TestFunc>(Time::Now), "Time::Now" },
{ TimeTicks::Now, "TimeTicks::Now" },
- { TimeTicks::HighResNow, "TimeTicks::HighResNow" },
+ { TimeTicks::NowFromSystemTraceTime, "TimeTicks::NowFromSystemTraceTime" },
{ NULL, "" }
};
@@ -207,65 +211,57 @@
}
}
-// http://crbug.com/396384
-TEST(TimeTicks, DISABLED_Drift) {
- // If QPC is disabled, this isn't measuring anything.
- if (!TimeTicks::IsHighResClockWorking())
- return;
-
- const int kIterations = 100;
- int64 total_drift = 0;
-
- for (int i = 0; i < kIterations; ++i) {
- int64 drift_microseconds = TimeTicks::GetQPCDriftMicroseconds();
-
- // Make sure the drift never exceeds our limit.
- EXPECT_LT(drift_microseconds, 50000);
-
- // Sleep for a few milliseconds (note that it means 1000 microseconds).
- // If we check the drift too frequently, it's going to increase
- // monotonically, making our measurement less realistic.
- base::PlatformThread::Sleep(
- base::TimeDelta::FromMilliseconds((i % 2 == 0) ? 1 : 2));
-
- total_drift += drift_microseconds;
- }
-
- // Sanity check. We expect some time drift to occur, especially across
- // the number of iterations we do.
- EXPECT_LT(0, total_drift);
-
- printf("average time drift in microseconds: %lld\n",
- total_drift / kIterations);
-}
-
-int64 QPCValueToMicrosecondsSafely(LONGLONG qpc_value,
- int64 ticks_per_second) {
- int64 whole_seconds = qpc_value / ticks_per_second;
- int64 leftover_ticks = qpc_value % ticks_per_second;
- int64 microseconds = (whole_seconds * Time::kMicrosecondsPerSecond) +
- ((leftover_ticks * Time::kMicrosecondsPerSecond) /
- ticks_per_second);
- return microseconds;
-}
-
TEST(TimeTicks, FromQPCValue) {
- if (!TimeTicks::IsHighResClockWorking())
+ if (!TimeTicks::IsHighResolution())
return;
+
LARGE_INTEGER frequency;
- QueryPerformanceFrequency(&frequency);
- int64 ticks_per_second = frequency.QuadPart;
- LONGLONG qpc_value = Time::kQPCOverflowThreshold;
- TimeTicks expected_value = TimeTicks::FromInternalValue(
- QPCValueToMicrosecondsSafely(qpc_value + 1, ticks_per_second));
- EXPECT_EQ(expected_value,
- TimeTicks::FromQPCValue(qpc_value + 1));
- expected_value = TimeTicks::FromInternalValue(
- QPCValueToMicrosecondsSafely(qpc_value, ticks_per_second));
- EXPECT_EQ(expected_value,
- TimeTicks::FromQPCValue(qpc_value));
- expected_value = TimeTicks::FromInternalValue(
- QPCValueToMicrosecondsSafely(qpc_value - 1, ticks_per_second));
- EXPECT_EQ(expected_value,
- TimeTicks::FromQPCValue(qpc_value - 1));
+ ASSERT_TRUE(QueryPerformanceFrequency(&frequency));
+ const int64 ticks_per_second = frequency.QuadPart;
+ ASSERT_GT(ticks_per_second, 0);
+
+ // Generate the tick values to convert, advancing the tick count by varying
+ // amounts. These values will ensure that both the fast and overflow-safe
+ // conversion logic in FromQPCValue() is tested, and across the entire range
+ // of possible QPC tick values.
+ std::vector<int64> test_cases;
+ test_cases.push_back(0);
+ const int kNumAdvancements = 100;
+ int64 ticks = 0;
+ int64 ticks_increment = 10;
+ for (int i = 0; i < kNumAdvancements; ++i) {
+ test_cases.push_back(ticks);
+ ticks += ticks_increment;
+ ticks_increment = ticks_increment * 6 / 5;
+ }
+ test_cases.push_back(Time::kQPCOverflowThreshold - 1);
+ test_cases.push_back(Time::kQPCOverflowThreshold);
+ test_cases.push_back(Time::kQPCOverflowThreshold + 1);
+ ticks = Time::kQPCOverflowThreshold + 10;
+ ticks_increment = 10;
+ for (int i = 0; i < kNumAdvancements; ++i) {
+ test_cases.push_back(ticks);
+ ticks += ticks_increment;
+ ticks_increment = ticks_increment * 6 / 5;
+ }
+ test_cases.push_back(std::numeric_limits<int64>::max());
+
+ // Test that the conversions using FromQPCValue() match those computed here
+ // using simple floating-point arithmetic. The floating-point math provides
+ // enough precision to confirm the implementation is correct to the
+ // microsecond for all |test_cases| (though it would be insufficient to
+ // confirm many "very large" tick values which are not being tested here).
+ for (int64 ticks : test_cases) {
+ const double expected_microseconds_since_origin =
+ (static_cast<double>(ticks) * Time::kMicrosecondsPerSecond) /
+ ticks_per_second;
+ const TimeTicks converted_value = TimeTicks::FromQPCValue(ticks);
+ const double converted_microseconds_since_origin =
+ static_cast<double>((converted_value - TimeTicks()).InMicroseconds());
+ EXPECT_NEAR(expected_microseconds_since_origin,
+ converted_microseconds_since_origin,
+ 1.0)
+ << "ticks=" << ticks << ", to be converted via logic path: "
+ << (ticks < Time::kQPCOverflowThreshold ? "FAST" : "SAFE");
+ }
}
diff --git a/base/values.cc b/base/values.cc
index b478b62..061b7a1 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -89,6 +89,10 @@
return new Value(TYPE_NULL);
}
+bool Value::GetAsBinary(const BinaryValue** out_value) const {
+ return false;
+}
+
bool Value::GetAsBoolean(bool* out_value) const {
return false;
}
@@ -319,6 +323,12 @@
return new BinaryValue(scoped_buffer_copy.Pass(), size);
}
+bool BinaryValue::GetAsBinary(const BinaryValue** out_value) const {
+ if (out_value)
+ *out_value = this;
+ return true;
+}
+
BinaryValue* BinaryValue::DeepCopy() const {
return CreateWithCopiedBuffer(buffer_.get(), size_);
}
diff --git a/base/values.h b/base/values.h
index 4c22f3d..4648283 100644
--- a/base/values.h
+++ b/base/values.h
@@ -33,6 +33,7 @@
namespace base {
+class BinaryValue;
class DictionaryValue;
class FundamentalValue;
class ListValue;
@@ -85,6 +86,7 @@
virtual bool GetAsString(std::string* out_value) const;
virtual bool GetAsString(string16* out_value) const;
virtual bool GetAsString(const StringValue** out_value) const;
+ virtual bool GetAsBinary(const BinaryValue** out_value) const;
virtual bool GetAsList(ListValue** out_value);
virtual bool GetAsList(const ListValue** out_value) const;
virtual bool GetAsDictionary(DictionaryValue** out_value);
@@ -188,6 +190,7 @@
const char* GetBuffer() const { return buffer_.get(); }
// Overridden from Value:
+ bool GetAsBinary(const BinaryValue** out_value) const override;
BinaryValue* DeepCopy() const override;
bool Equals(const Value* other) const override;
diff --git a/base/values_unittest.cc b/base/values_unittest.cc
index 296880a..b66730b 100644
--- a/base/values_unittest.cc
+++ b/base/values_unittest.cc
@@ -127,6 +127,12 @@
ASSERT_NE(stack_buffer, binary->GetBuffer());
ASSERT_EQ(42U, binary->GetSize());
ASSERT_EQ(0, memcmp(stack_buffer, binary->GetBuffer(), binary->GetSize()));
+
+ // Test overloaded GetAsBinary.
+ Value* narrow_value = binary.get();
+ const BinaryValue* narrow_binary = NULL;
+ ASSERT_TRUE(narrow_value->GetAsBinary(&narrow_binary));
+ EXPECT_EQ(binary.get(), narrow_binary);
}
TEST(ValuesTest, StringValue) {
diff --git a/base/win/message_window.cc b/base/win/message_window.cc
index 57fe64c..0b4b29f 100644
--- a/base/win/message_window.cc
+++ b/base/win/message_window.cc
@@ -7,6 +7,7 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/process/memory.h"
+#include "base/profiler/scoped_tracker.h"
#include "base/win/wrapped_window_proc.h"
const wchar_t kMessageWindowClassName[] = L"Chrome_MessageWindow";
@@ -120,6 +121,10 @@
UINT message,
WPARAM wparam,
LPARAM lparam) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("440919 MessageWindow::WindowProc"));
+
MessageWindow* self = reinterpret_cast<MessageWindow*>(
GetWindowLongPtr(hwnd, GWLP_USERDATA));
diff --git a/build/all.gyp b/build/all.gyp
index aa57010..b890f2c 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -29,8 +29,10 @@
'../third_party/libxml/libxml.gyp:*',
'../third_party/sqlite/sqlite.gyp:*',
'../third_party/zlib/zlib.gyp:*',
+ '../ui/accessibility/accessibility.gyp:*',
'../ui/base/ui_base.gyp:*',
'../ui/display/display.gyp:display_unittests',
+ '../ui/snapshot/snapshot.gyp:*',
'../url/url.gyp:*',
],
'conditions': [
@@ -49,17 +51,18 @@
# javascript-related targets cause v8 to be built.
'../mojo/mojo_base.gyp:mojo_common_lib',
'../mojo/mojo_base.gyp:mojo_common_unittests',
- '../mojo/mojo_edk.gyp:mojo_system_impl',
- '../mojo/mojo_edk_tests.gyp:mojo_public_bindings_unittests',
- '../mojo/mojo_edk_tests.gyp:mojo_public_environment_unittests',
- '../mojo/mojo_edk_tests.gyp:mojo_public_system_perftests',
- '../mojo/mojo_edk_tests.gyp:mojo_public_system_unittests',
- '../mojo/mojo_edk_tests.gyp:mojo_public_utility_unittests',
- '../mojo/mojo_edk_tests.gyp:mojo_system_unittests',
- '../mojo/mojo_public.gyp:mojo_cpp_bindings',
- '../mojo/mojo_public.gyp:mojo_public_test_utils',
- '../mojo/mojo_public.gyp:mojo_system',
'../google_apis/google_apis.gyp:google_apis_unittests',
+ '../skia/skia_tests.gyp:skia_unittests',
+ '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
+ '../third_party/mojo/mojo_edk_tests.gyp:mojo_public_bindings_unittests',
+ '../third_party/mojo/mojo_edk_tests.gyp:mojo_public_environment_unittests',
+ '../third_party/mojo/mojo_edk_tests.gyp:mojo_public_system_perftests',
+ '../third_party/mojo/mojo_edk_tests.gyp:mojo_public_system_unittests',
+ '../third_party/mojo/mojo_edk_tests.gyp:mojo_public_utility_unittests',
+ '../third_party/mojo/mojo_edk_tests.gyp:mojo_system_unittests',
+ '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
+ '../third_party/mojo/mojo_public.gyp:mojo_public_test_utils',
+ '../third_party/mojo/mojo_public.gyp:mojo_system',
'../ui/base/ui_base_tests.gyp:ui_base_unittests',
'../ui/ios/ui_ios_tests.gyp:ui_ios_unittests',
'../ui/gfx/gfx_tests.gyp:gfx_unittests',
@@ -100,6 +103,7 @@
['OS!="ios" and OS!="android"', {
'dependencies': [
'../third_party/re2/re2.gyp:re2',
+ '../chrome/chrome.gyp:*',
'../chrome/tools/profile_reset/jtl_compiler.gyp:*',
'../cc/blink/cc_blink_tests.gyp:*',
'../cc/cc_tests.gyp:*',
@@ -144,21 +148,6 @@
'../v8/tools/gyp/v8.gyp:*',
'<(libjpeg_gyp_path):*',
],
- 'conditions': [
- ['use_athena==1' , {
- 'dependencies': [
- # Athena temporarily depends upon a subset of chrome. Since most
- # tests do not compile, we only include dependencies to tests we
- # want to build.
- '../chrome/chrome.gyp:chrome',
- '../chrome/chrome.gyp:browser_tests',
- ]
- }, {
- 'dependencies': [
- '../chrome/chrome.gyp:*',
- ],
- }],
- ],
}],
['use_openssl==0 and (OS=="mac" or OS=="ios" or OS=="win")', {
'dependencies': [
@@ -228,6 +217,17 @@
'../third_party/libevent/libevent.gyp:*',
],
}],
+ ['toolkit_views==1', {
+ 'dependencies': [
+ '../ui/views/controls/webview/webview.gyp:*',
+ '../ui/views/views.gyp:*',
+ ],
+ }],
+ ['use_aura==1', {
+ 'dependencies': [
+ '../ui/aura/aura.gyp:*',
+ ],
+ }],
['use_ash==1', {
'dependencies': [
'../ash/ash.gyp:*',
@@ -264,11 +264,6 @@
'../extensions/shell/app_shell.gyp:*',
],
}],
- ['chromeos==1', {
- 'dependencies': [
- '../athena/main/athena_main.gyp:*',
- ],
- }],
['envoy==1', {
'dependencies': [
'../envoy/envoy.gyp:*',
@@ -319,6 +314,9 @@
'../chrome/chrome.gyp:browser_tests',
'../chrome/chrome.gyp:chromedriver_tests',
'../chrome/chrome.gyp:chromedriver_unittests',
+ '../chrome/chrome.gyp:interactive_ui_tests',
+ '../chrome/chrome.gyp:sync_integration_tests',
+ '../chrome/chrome.gyp:unit_tests',
'../cloud_print/cloud_print.gyp:cloud_print_unittests',
'../content/content_shell_and_tests.gyp:content_browsertests',
'../content/content_shell_and_tests.gyp:content_shell',
@@ -344,15 +342,6 @@
'../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests',
'../tools/telemetry/telemetry.gyp:*',
],
- 'conditions': [
- ['use_athena!=1', {
- 'dependencies' : [
- '../chrome/chrome.gyp:interactive_ui_tests',
- '../chrome/chrome.gyp:sync_integration_tests',
- '../chrome/chrome.gyp:unit_tests',
- ],
- }],
- ],
}],
['OS=="win"', {
'dependencies': [
@@ -437,6 +426,20 @@
'../printing/printing.gyp:printing_unittests',
],
}],
+ ['use_aura==1', {
+ 'dependencies': [
+ '../ui/app_list/app_list.gyp:app_list_unittests',
+ '../ui/aura/aura.gyp:aura_unittests',
+ '../ui/compositor/compositor.gyp:compositor_unittests',
+ '../ui/keyboard/keyboard.gyp:keyboard_unittests',
+ '../ui/views/views.gyp:views_unittests',
+ ],
+ }],
+ ['use_aura==1 or toolkit_views==1', {
+ 'dependencies': [
+ '../ui/events/events.gyp:events_unittests',
+ ],
+ }],
['use_ash==1', {
'dependencies': [
'../ash/ash.gyp:ash_unittests',
@@ -1073,6 +1076,7 @@
'../ui/events/events.gyp:events_unittests',
'../ui/gfx/gfx_tests.gyp:gfx_unittests',
'../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests',
+ '../ui/views/views.gyp:views_unittests',
'../url/url.gyp:url_unittests',
],
'conditions': [
@@ -1169,7 +1173,10 @@
'../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests',
'../third_party/WebKit/Source/platform/blink_platform_tests.gyp:blink_heap_unittests',
'../third_party/WebKit/Source/platform/blink_platform_tests.gyp:blink_platform_unittests',
+ '../ui/accessibility/accessibility.gyp:accessibility_unittests',
'../ui/app_list/app_list.gyp:app_list_unittests',
+ '../ui/aura/aura.gyp:aura_unittests',
+ '../ui/compositor/compositor.gyp:compositor_unittests',
'../ui/display/display.gyp:display_unittests',
'../ui/events/events.gyp:events_unittests',
'../ui/gfx/gfx_tests.gyp:gfx_unittests',
@@ -1216,6 +1223,7 @@
'../ui/base/ui_base_tests.gyp:ui_base_unittests',
'../ui/gfx/gfx_tests.gyp:gfx_unittests',
'../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests',
+ '../ui/views/views.gyp:views_unittests',
'../url/url.gyp:url_unittests',
],
'conditions': [
@@ -1246,6 +1254,8 @@
'../cc/cc_tests.gyp:cc_unittests',
'../chrome/chrome.gyp:browser_tests',
'../chrome/chrome.gyp:chrome',
+ '../chrome/chrome.gyp:interactive_ui_tests',
+ '../chrome/chrome.gyp:unit_tests',
'../components/components_tests.gyp:components_unittests',
'../content/content_shell_and_tests.gyp:content_browsertests',
'../content/content_shell_and_tests.gyp:content_unittests',
@@ -1255,7 +1265,9 @@
'../remoting/remoting.gyp:remoting_unittests',
'../skia/skia_tests.gyp:skia_unittests',
'../ui/app_list/app_list.gyp:*',
+ '../ui/aura/aura.gyp:*',
'../ui/base/ui_base_tests.gyp:ui_base_unittests',
+ '../ui/compositor/compositor.gyp:*',
'../ui/display/display.gyp:display_unittests',
'../ui/events/events.gyp:*',
'../ui/gfx/gfx_tests.gyp:gfx_unittests',
@@ -1263,15 +1275,13 @@
'../ui/message_center/message_center.gyp:*',
'../ui/snapshot/snapshot.gyp:snapshot_unittests',
'../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests',
+ '../ui/views/examples/examples.gyp:views_examples_with_content_exe',
+ '../ui/views/views.gyp:views',
+ '../ui/views/views.gyp:views_unittests',
+ '../ui/wm/wm.gyp:*',
'blink_tests',
],
'conditions': [
- ['use_athena!=1', {
- 'dependencies': [
- '../chrome/chrome.gyp:interactive_ui_tests',
- '../chrome/chrome.gyp:unit_tests',
- ],
- }],
['OS=="win"', {
'dependencies': [
'../chrome/chrome.gyp:crash_service',
@@ -1299,11 +1309,16 @@
}],
['chromeos==1', {
'dependencies': [
- '../athena/main/athena_main.gyp:*',
'../chromeos/chromeos.gyp:chromeos_unittests',
'../ui/chromeos/ui_chromeos.gyp:ui_chromeos_unittests',
],
}],
+ ['use_ozone==1', {
+ 'dependencies': [
+ '../ui/ozone/ozone.gyp:*',
+ '../ui/ozone/demo/ozone_demos.gyp:*',
+ ],
+ }],
],
},
], # targets
@@ -1331,19 +1346,13 @@
'dependencies': [
'../base/base.gyp:base_unittests_run',
'../chrome/chrome.gyp:browser_tests_run',
+ '../chrome/chrome.gyp:interactive_ui_tests_run',
+ '../chrome/chrome.gyp:sync_integration_tests_run',
+ '../chrome/chrome.gyp:unit_tests_run',
'../content/content_shell_and_tests.gyp:content_browsertests_run',
'../content/content_shell_and_tests.gyp:content_unittests_run',
'../net/net.gyp:net_unittests_run',
],
- 'conditions' : [
- ['use_athena!=1', {
- 'dependencies': [
- '../chrome/chrome.gyp:interactive_ui_tests_run',
- '../chrome/chrome.gyp:sync_integration_tests_run',
- '../chrome/chrome.gyp:unit_tests_run',
- ],
- }],
- ],
}, # target_name: chromium_swarm_tests
],
}],
@@ -1358,5 +1367,18 @@
}, # target_name: chromoting_swarm_tests
]
}],
+ ['OS=="mac" and toolkit_views==1', {
+ 'targets': [
+ {
+ 'target_name': 'macviews_builder',
+ 'type': 'none',
+ 'dependencies': [
+ '../ui/views/examples/examples.gyp:views_examples_with_content_exe',
+ '../ui/views/views.gyp:views',
+ '../ui/views/views.gyp:views_unittests',
+ ],
+ }, # target_name: macviews_builder
+ ], # targets
+ }], # os=='mac' and toolkit_views==1
], # conditions
}
diff --git a/build/android/PRESUBMIT.py b/build/android/PRESUBMIT.py
index b3dfd72..ad09630 100644
--- a/build/android/PRESUBMIT.py
+++ b/build/android/PRESUBMIT.py
@@ -69,7 +69,8 @@
J('pylib', 'utils', 'md5sum_test.py'),
],
env=pylib_test_env))
- output.extend(_CheckDeletionsOnlyFiles(input_api, output_api))
+ # TODO(jbudorick): Reenable this check once upstreaming is finished.
+ # output.extend(_CheckDeletionsOnlyFiles(input_api, output_api))
return output
diff --git a/build/android/adb_kill_android_webview_shell b/build/android/adb_kill_android_webview_shell
new file mode 100755
index 0000000..5f287f0
--- /dev/null
+++ b/build/android/adb_kill_android_webview_shell
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# 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.
+#
+# Kill a running android webview shell.
+#
+# Assumes you have sourced the build/android/envsetup.sh script.
+
+SHELL_PID_LINES=$(adb shell ps | grep ' org.chromium.android_webview.shell')
+VAL=$(echo "$SHELL_PID_LINES" | wc -l)
+if [ $VAL -lt 1 ] ; then
+ echo "Not running android webview shell."
+else
+ SHELL_PID=$(echo $SHELL_PID_LINES | awk '{print $2}')
+ if [ "$SHELL_PID" != "" ] ; then
+ set -x
+ adb shell kill $SHELL_PID
+ set -
+ else
+ echo "Android webview shell does not appear to be running."
+ fi
+fi
diff --git a/build/android/findbugs_filter/findbugs_exclude.xml b/build/android/findbugs_filter/findbugs_exclude.xml
index 0fff636..fba286d 100644
--- a/build/android/findbugs_filter/findbugs_exclude.xml
+++ b/build/android/findbugs_filter/findbugs_exclude.xml
@@ -17,29 +17,8 @@
<Match>
<Class name="~org\.chromium\..*\.Manifest(\$\w+)?" />
</Match>
- <!-- Ignore bugs in NativeLibraries.java (the auto-generation confuses findbugs). -->
- <Match>
- <Class name="~org\.chromium\.base\..*\.NativeLibraries.*?" />
- </Match>
- <!--
- Ignore bugs in CleanupReferenceTest.java (redundant null check)
- TODO(joth): Group all GC related tests and filter them out, since the null
- check is necessary to make sure the nullification is flushed to memory.
- -->
- <Match>
- <Class name="~org\.chromium\.content\..*\.CleanupReferenceTest.*?" />
- </Match>
- <!-- Ignore errors in JavaBridge due to reflection. -->
- <Match>
- <Class name="~.*\.JavaBridge.*"/>
- <Bug code="UuF,UrF,UMAC" />
- </Match>
- <!-- "Struct" like classes expect to have unused public data members -->
- <Match>
- <Class name="~.*android_webview.*FileChooserParams"/>
- <Bug code="UrF" />
- </Match>
<!-- Ignore "reliance on default String encoding" warnings, as we're not multi-platform -->
+
<Bug pattern="DM_DEFAULT_ENCODING" />
<!-- Ignore bugs that are often false-positives in test code -->
<Match>
@@ -50,67 +29,14 @@
</Or>
</Match>
<!--
- Ignore calls to System.exit() following errors during loading the native library.
- There is no way to recover from such errors without restarting the application,
- so System.exit() is the best solution.
+ crbug.com/449101
+ Ignore findbugs plugin test cases.
-->
<Match>
- <Class name="~org\.chromium\.chrome\..*\.ChromiumSyncAdapter.*" />
- <Method name="run" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="~org\.chromium\.chrome\..*\.ChromiumSyncAdapter" />
- <Method name="startBrowserProcessesSync" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="~org\.chromium\.chrome\..*\.ChromeShellActivity" />
- <Method name="onCreate" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="~org\.chromium\.chrome\..*\.AccountsChangedReceiver.*" />
- <Method name="run" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="~org\.chromium\.chrome\..*\.NotificationService" />
- <Method name="dispatchIntentOnUIThread" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="org.chromium.chrome.browser.preferences.Preferences" />
- <Method name="onCreate" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="~org\.chromium\.content\..*\.ChildProcessService.*" />
- <Method name="run" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="~org\.chromium\..*ContentBrowserTestsActivity" />
- <Method name="onCreate" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="~org\.chromium\..*ContentShellActivity" />
- <Method name="onCreate" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="~org\.chromium\.components\.gcm_driver\..*\.GCMDriver" />
- <Method name="launchNativeThen" />
- <Bug code="Dm" />
- </Match>
- <!--
- Ignore write to static field in GCMDriver, as it's the cleanest way to mark
- the singleton as null when the native counterpart is destroyed.
- -->
- <Match>
- <Class name="~org\.chromium\.components\.gcm_driver\..*\.GCMDriver" />
- <Method name="destroy" />
- <Bug code="ST" />
+ <Or>
+ <Class name="~org\.chromium\.tools\.findbugs\.plugin\.SimpleSynchronizedMethod" />
+ <Class name="~org\.chromium\.tools\.findbugs\.plugin\.SimpleSynchronizedStaticMethod" />
+ <Class name="~org\.chromium\.tools\.findbugs\.plugin\.SimpleSynchronizedThis" />
+ </Or>
</Match>
</FindBugsFilter>
diff --git a/build/android/findbugs_filter/findbugs_known_bugs.txt b/build/android/findbugs_filter/findbugs_known_bugs.txt
index 1a6bbdd..26c4b1c 100644
--- a/build/android/findbugs_filter/findbugs_known_bugs.txt
+++ b/build/android/findbugs_filter/findbugs_known_bugs.txt
@@ -1,33 +1,7 @@
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeArrayCoercionTest.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeArrayTest.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeBasicsTest.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeChildFrameTest.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeCoercionTest.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeFieldsTest.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeReturnValuesTest.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeTestBase.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At PerfTraceEvent.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At SimpleSynchronizedMethod.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At SimpleSynchronizedStaticMethod.java
-M C CST: Shouldn't use synchronized(this), please narrow down the synchronization scope. At SimpleSynchronizedThis.java
-M D DMI: Hard coded reference to an absolute pathname in org.chromium.android_webview.test.ArchiveTest.testAutoBadPath() At ArchiveTest.java
-M D DMI: Hard coded reference to an absolute pathname in org.chromium.android_webview.test.ArchiveTest.testExplicitBadPath() At ArchiveTest.java
-M D SF: Switch statement found in org.chromium.chrome.browser.ChromeBrowserProvider.insert(Uri, ContentValues) where one case falls through to the next case At ChromeBrowserProvider.java
-M M UG: org.chromium.content.browser.JavaBridgeReturnValuesTest$TestObject.getBooleanValue() is unsynchronized, org.chromium.content.browser.JavaBridgeReturnValuesTest$TestObject.setBooleanValue(boolean) is synchronized At JavaBridgeReturnValuesTest.java
-M M UG: org.chromium.content.browser.JavaBridgeReturnValuesTest$TestObject.getStringValue() is unsynchronized, org.chromium.content.browser.JavaBridgeReturnValuesTest$TestObject.setStringValue(String) is synchronized At JavaBridgeReturnValuesTest.java
-M V EI2: org.chromium.chrome.browser.ChromeBrowserProvider$BookmarkNode.setFavicon(byte[]) may expose internal representation by storing an externally mutable object into ChromeBrowserProvider$BookmarkNode.mFavicon At ChromeBrowserProvider.java
-M V EI2: org.chromium.chrome.browser.ChromeBrowserProvider$BookmarkNode.setThumbnail(byte[]) may expose internal representation by storing an externally mutable object into ChromeBrowserProvider$BookmarkNode.mThumbnail At ChromeBrowserProvider.java
-M V EI: org.chromium.chrome.browser.ChromeBrowserProvider$BookmarkNode.favicon() may expose internal representation by returning ChromeBrowserProvider$BookmarkNode.mFavicon At ChromeBrowserProvider.java
-M V EI: org.chromium.chrome.browser.ChromeBrowserProvider$BookmarkNode.thumbnail() may expose internal representation by returning ChromeBrowserProvider$BookmarkNode.mThumbnail At ChromeBrowserProvider.java
-M M LI: Incorrect lazy initialization of static field org.chromium.chrome.browser.sync.ProfileSyncService.sSyncSetupManager in org.chromium.chrome.browser.sync.ProfileSyncService.get(Context) At ProfileSyncService.java
-M V EI2: org.chromium.content_public.browser.LoadUrlParams.setPostData(byte[]) may expose internal representation by storing an externally mutable object into LoadUrlParams.mPostData At LoadUrlParams.java
-M V EI: org.chromium.content_public.browser.LoadUrlParams.getPostData() may expose internal representation by returning LoadUrlParams.mPostData At LoadUrlParams.java
-M V EI2: org.chromium.net.ChromiumUrlRequest.setUploadData(String, byte[]) may expose internal representation by storing an externally mutable object into ChromiumUrlRequest.mUploadData At ChromiumUrlRequest.java
+M M LI: Incorrect lazy initialization of static field org.chromium.chrome.browser.download.DownloadManagerService.sDownloadManagerService in org.chromium.chrome.browser.download.DownloadManagerService.getDownloadManagerService(Context) At DownloadManagerService.java
M D UrF: Unread public/protected field: org.chromium.chrome.browser.document.PendingDocumentData.extraHeaders At DocumentTabModelSelector.java
M D UrF: Unread public/protected field: org.chromium.chrome.browser.document.PendingDocumentData.postData At DocumentTabModelSelector.java
M D UrF: Unread public/protected field: org.chromium.chrome.browser.document.PendingDocumentData.referrer At DocumentTabModelSelector.java
M D UuF: Unused public or protected field: org.chromium.chrome.browser.document.PendingDocumentData.nativeWebContents In PendingDocumentData.java
M D UuF: Unused public or protected field: org.chromium.chrome.browser.document.PendingDocumentData.originalIntent In PendingDocumentData.java
M D UuF: Unused public or protected field: org.chromium.chrome.browser.document.PendingDocumentData.url In PendingDocumentData.java
-M V EI2: org.chromium.mojo.system.Core$WaitManyResult.setSignalStates(Core$HandleSignalsState[]) may expose internal representation by storing an externally mutable object into Core$WaitManyResult.mSignalStates At Core.java
-M V EI: org.chromium.mojo.system.Core$WaitManyResult.getSignalStates() may expose internal representation by returning Core$WaitManyResult.mSignalStates At Core.java
diff --git a/build/android/gyp/jinja_template.py b/build/android/gyp/jinja_template.py
index 8e579aa..3a93f74 100755
--- a/build/android/gyp/jinja_template.py
+++ b/build/android/gyp/jinja_template.py
@@ -6,6 +6,7 @@
"""Renders one or more template files using the Jinja template engine."""
+import codecs
import optparse
import os
import sys
@@ -18,13 +19,13 @@
def ProcessFile(input_filename, output_filename, variables):
- with open(input_filename, 'r') as input_file:
+ with codecs.open(input_filename, 'r', 'utf-8') as input_file:
input_ = input_file.read()
env = jinja2.Environment(undefined=jinja2.StrictUndefined)
template = env.from_string(input_)
template.filename = os.path.abspath(input_filename)
output = template.render(variables)
- with open(output_filename, 'w') as output_file:
+ with codecs.open(output_filename, 'w', 'utf-8') as output_file:
output_file.write(output)
diff --git a/build/android/gyp/write_ordered_libraries.py b/build/android/gyp/write_ordered_libraries.py
index b361bc3..49c933a 100755
--- a/build/android/gyp/write_ordered_libraries.py
+++ b/build/android/gyp/write_ordered_libraries.py
@@ -31,7 +31,7 @@
_library_dirs = None
_library_re = re.compile(
- '.*NEEDED.*Shared library: \[(?P<library_name>[\w/.]+)\]')
+ '.*NEEDED.*Shared library: \[(?P<library_name>.+)\]')
def SetReadelfPath(path):
diff --git a/build/android/pylib/gtest/filter/base_unittests_disabled b/build/android/pylib/gtest/filter/base_unittests_disabled
index a64dd57..bf2311d 100644
--- a/build/android/pylib/gtest/filter/base_unittests_disabled
+++ b/build/android/pylib/gtest/filter/base_unittests_disabled
@@ -20,6 +20,9 @@
ScopedJavaRefTest.RefCounts
# Death tests are not supported with apks.
*DeathTest*
+FileTest.MemoryCorruption
+MessagePumpLibeventTest.QuitOutsideOfRun
+ScopedFD.ScopedFDCrashesOnCloseFailure
# http://crbug.com/245043
StackContainer.BufferAlignment
diff --git a/build/android/pylib/gtest/filter/cc_unittests_disabled b/build/android/pylib/gtest/filter/cc_unittests_disabled
new file mode 100644
index 0000000..feab5ac
--- /dev/null
+++ b/build/android/pylib/gtest/filter/cc_unittests_disabled
@@ -0,0 +1,5 @@
+# Death tests are not supported with apks.
+BeginFrameObserverMixInTest.OnBeginFrameImplementation
+BeginFrameSourceMixInTest.ObserverManipulation
+BeginFrameSourceMultiplexerTest.SourcesManipulation
+BeginFrameSourceMultiplexerTest.MinimumIntervalNegativeFails
diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance.py b/build/android/pylib/instrumentation/instrumentation_test_instance.py
index 271f7d9..a87f81a 100644
--- a/build/android/pylib/instrumentation/instrumentation_test_instance.py
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py
@@ -152,7 +152,7 @@
self._test_package = None
self._test_runner = None
self._test_support_apk = None
- self.__inititalizeApkAttributes(args, error_func)
+ self.__initializeApkAttributes(args, error_func)
self._data_deps = None
self._isolate_abs_path = None
diff --git a/build/android/pylib/instrumentation/test_runner.py b/build/android/pylib/instrumentation/test_runner.py
index 74898c2..ec0baee 100644
--- a/build/android/pylib/instrumentation/test_runner.py
+++ b/build/android/pylib/instrumentation/test_runner.py
@@ -321,6 +321,10 @@
'%s/%s' % (self.test_pkg.GetPackageName(), self.options.test_runner),
raw=True, extras=extras, timeout=timeout, retries=0)
+ def _GenerateTestResult(self, test, instr_statuses, start_ms, duration_ms):
+ return instrumentation_test_instance.GenerateTestResult(
+ test, instr_statuses, start_ms, duration_ms)
+
#override
def RunTest(self, test):
results = base_test_result.TestRunResults()
@@ -344,8 +348,7 @@
# Parse the test output
_, _, statuses = (
instrumentation_test_instance.ParseAmInstrumentRawOutput(raw_output))
- result = instrumentation_test_instance.GenerateTestResult(
- test, statuses, start_ms, duration_ms)
+ result = self._GenerateTestResult(test, statuses, start_ms, duration_ms)
if local_device_instrumentation_test_run.DidPackageCrashOnDevice(
self.test_pkg.GetPackageName(), self.device):
result.SetType(base_test_result.ResultType.CRASH)
diff --git a/build/android/pylib/local/device/local_device_test_run.py b/build/android/pylib/local/device/local_device_test_run.py
index c6d29f4..53d6f17 100644
--- a/build/android/pylib/local/device/local_device_test_run.py
+++ b/build/android/pylib/local/device/local_device_test_run.py
@@ -58,7 +58,7 @@
all_fail_results[result.GetName()] = result
results_names = set(r.GetName() for r in results.GetAll())
- tests = [t for t in tests if t not in results_names]
+ tests = [t for t in tests if self._GetTestName(t) not in results_names]
tries += 1
all_unknown_test_names = set(tests)
@@ -85,6 +85,9 @@
def _CreateShards(self, tests):
raise NotImplementedError
+ def _GetTestName(self, test):
+ return test
+
def _GetTests(self):
raise NotImplementedError
diff --git a/build/android/pylib/remote/device/remote_device_environment.py b/build/android/pylib/remote/device/remote_device_environment.py
index 0e48ee6..3fdc716 100644
--- a/build/android/pylib/remote/device/remote_device_environment.py
+++ b/build/android/pylib/remote/device/remote_device_environment.py
@@ -17,6 +17,9 @@
class RemoteDeviceEnvironment(environment.Environment):
"""An environment for running on remote devices."""
+ _ENV_KEY = 'env'
+ _DEVICE_KEY = 'device'
+
def __init__(self, args, error_func):
"""Constructor.
@@ -102,6 +105,16 @@
"""Tears down the test run when used as a context manager."""
self.TearDown()
+ def DumpTo(self, persisted_data):
+ env_data = {
+ self._DEVICE_KEY: self._device,
+ }
+ persisted_data[self._ENV_KEY] = env_data
+
+ def LoadFrom(self, persisted_data):
+ env_data = persisted_data[self._ENV_KEY]
+ self._device = env_data[self._DEVICE_KEY]
+
def _GetAccessToken(self):
"""Generates access token for remote device service."""
logging.info('Generating remote service access token')
@@ -145,7 +158,7 @@
or device['available_devices_count']):
logging.info('Found device: %s %s',
device['name'], device['os_version'])
- return device['device_type_id']
+ return device
self._NoDeviceFound(device_list)
def _PrintAvailableDevices(self, device_list):
@@ -166,37 +179,42 @@
raise remote_device_helper.RemoteDeviceError('No device found.')
@property
- def device(self):
- return self._device
+ def collect(self):
+ return self._collect
@property
- def token(self):
- return self._access_token
+ def device_type_id(self):
+ return self._device['device_type_id']
+
+ @property
+ def only_output_failures(self):
+ # TODO(jbudorick): Remove this once b/18981674 is fixed.
+ return True
@property
def results_path(self):
return self._results_path
@property
+ def runner_package(self):
+ return self._runner_package
+
+ @property
def runner_type(self):
return self._runner_type
@property
- def runner_package(self):
- return self._runner_package
+ def timeouts(self):
+ return self._timeouts
+
+ @property
+ def token(self):
+ return self._access_token
@property
def trigger(self):
return self._trigger
@property
- def collect(self):
- return self._collect
-
- @property
def verbose_count(self):
return self._verbose_count
-
- @property
- def timeouts(self):
- return self._timeouts
diff --git a/build/android/pylib/remote/device/remote_device_gtest_run.py b/build/android/pylib/remote/device/remote_device_gtest_run.py
index 3a6c447..e5f6990 100644
--- a/build/android/pylib/remote/device/remote_device_gtest_run.py
+++ b/build/android/pylib/remote/device/remote_device_gtest_run.py
@@ -7,6 +7,7 @@
import logging
import os
import sys
+import tempfile
from pylib import constants
from pylib.base import base_test_result
@@ -15,6 +16,14 @@
from pylib.remote.device import remote_device_helper
+_EXTRA_COMMAND_LINE_FILE = (
+ 'org.chromium.native_test.ChromeNativeTestActivity.CommandLineFile')
+# TODO(jbudorick): Remove this extra when b/18981674 is fixed.
+_EXTRA_ONLY_OUTPUT_FAILURES = (
+ 'org.chromium.native_test.ChromeNativeTestInstrumentationTestRunner.'
+ 'OnlyOutputFailures')
+
+
class RemoteDeviceGtestRun(remote_device_test_run.RemoteDeviceTestRun):
"""Run gtests and uirobot tests on a remote device."""
@@ -43,8 +52,20 @@
dummy_app_path = os.path.join(
constants.GetOutDirectory(), 'apks', 'remote_device_dummy.apk')
- self._AmInstrumentTestSetup(dummy_app_path, self._test_instance.apk,
- runner_package)
+ with tempfile.NamedTemporaryFile(suffix='.flags.txt') as flag_file:
+ env_vars = {}
+ filter_string = self._test_instance._GenerateDisabledFilterString(None)
+ if filter_string:
+ flag_file.write('_ --gtest_filter=%s' % filter_string)
+ flag_file.flush()
+ env_vars[_EXTRA_COMMAND_LINE_FILE] = os.path.basename(flag_file.name)
+ self._test_instance._data_deps.append(
+ (os.path.abspath(flag_file.name), None))
+ if self._env.only_output_failures:
+ env_vars[_EXTRA_ONLY_OUTPUT_FAILURES] = None
+ self._AmInstrumentTestSetup(
+ dummy_app_path, self._test_instance.apk, runner_package,
+ environment_variables=env_vars)
_INSTRUMENTATION_STREAM_LEADER = 'INSTRUMENTATION_STATUS: stream='
@@ -62,6 +83,8 @@
if l.startswith(self._INSTRUMENTATION_STREAM_LEADER))
results_list = self._test_instance.ParseGTestOutput(output)
results.AddResults(results_list)
+ if self._env.only_output_failures:
+ logging.info('See logcat for more results information.')
if not self._results['results']['pass']:
results.AddResult(base_test_result.BaseTestResult(
'Remote Service detected error.',
diff --git a/build/android/pylib/remote/device/remote_device_test_run.py b/build/android/pylib/remote/device/remote_device_test_run.py
index cdc8777..86ee587 100644
--- a/build/android/pylib/remote/device/remote_device_test_run.py
+++ b/build/android/pylib/remote/device/remote_device_test_run.py
@@ -4,6 +4,7 @@
"""Run specific test on specific environment."""
+import json
import logging
import os
import sys
@@ -20,6 +21,9 @@
class RemoteDeviceTestRun(test_run.TestRun):
"""Run gtests and uirobot tests on a remote device."""
+ _TEST_RUN_KEY = 'test_run'
+ _TEST_RUN_ID_KEY = 'test_run_id'
+
WAIT_TIME = 5
COMPLETE = 'complete'
HEARTBEAT_INTERVAL = 300
@@ -40,29 +44,37 @@
self._test_run_id = ''
#override
+ def SetUp(self):
+ """Set up a test run."""
+ if self._env.trigger:
+ self._TriggerSetUp()
+ elif self._env.collect:
+ assert isinstance(self._env.trigger, basestring), (
+ 'File for storing test_run_id must be a string.')
+ with open(self._env.collect, 'r') as persisted_data_file:
+ persisted_data = json.loads(persisted_data_file.read())
+ self._env.LoadFrom(persisted_data)
+ self.LoadFrom(persisted_data)
+
+ def _TriggerSetUp(self):
+ """Set up the triggering of a test run."""
+ raise NotImplementedError
+
+ #override
def RunTests(self):
"""Run the test."""
if self._env.trigger:
with appurify_sanitized.SanitizeLogging(self._env.verbose_count,
logging.WARNING):
test_start_res = appurify_sanitized.api.tests_run(
- self._env.token, self._env.device, self._app_id, self._test_id)
+ self._env.token, self._env.device_type_id, self._app_id,
+ self._test_id)
remote_device_helper.TestHttpResponse(
test_start_res, 'Unable to run test.')
self._test_run_id = test_start_res.json()['response']['test_run_id']
logging.info('Test run id: %s' % self._test_run_id)
- if not self._env.collect:
- assert isinstance(self._env.trigger, basestring), (
- 'File for storing test_run_id must be a string.')
- with open(self._env.trigger, 'w') as test_run_id_file:
- test_run_id_file.write(self._test_run_id)
if self._env.collect:
- if not self._env.trigger:
- assert isinstance(self._env.trigger, basestring), (
- 'File for storing test_run_id must be a string.')
- with open(self._env.collect, 'r') as test_run_id_file:
- self._test_run_id = test_run_id_file.read().strip()
current_status = ''
timeout_counter = 0
heartbeat_counter = 0
@@ -91,8 +103,19 @@
#override
def TearDown(self):
"""Tear down the test run."""
- if (self._env.collect
- and self._GetTestStatus(self._test_run_id) != self.COMPLETE):
+ if self._env.collect:
+ self._CollectTearDown()
+ elif self._env.trigger:
+ assert isinstance(self._env.trigger, basestring), (
+ 'File for storing test_run_id must be a string.')
+ with open(self._env.trigger, 'w') as persisted_data_file:
+ persisted_data = {}
+ self.DumpTo(persisted_data)
+ self._env.DumpTo(persisted_data)
+ persisted_data_file.write(json.dumps(persisted_data))
+
+ def _CollectTearDown(self):
+ if self._GetTestStatus(self._test_run_id) != self.COMPLETE:
with appurify_sanitized.SanitizeLogging(self._env.verbose_count,
logging.WARNING):
test_abort_res = appurify_sanitized.api.tests_abort(
@@ -109,15 +132,15 @@
"""Tear down the test run when used as a context manager."""
self.TearDown()
- #override
- def SetUp(self):
- """Set up a test run."""
- if self._env.trigger:
- self._TriggerSetUp()
+ def DumpTo(self, persisted_data):
+ test_run_data = {
+ self._TEST_RUN_ID_KEY: self._test_run_id,
+ }
+ persisted_data[self._TEST_RUN_KEY] = test_run_data
- def _TriggerSetUp(self):
- """Set up the triggering of a test run."""
- raise NotImplementedError
+ def LoadFrom(self, persisted_data):
+ test_run_data = persisted_data[self._TEST_RUN_KEY]
+ self._test_run_id = test_run_data[self._TEST_RUN_ID_KEY]
def _ParseTestResults(self):
raise NotImplementedError
@@ -170,8 +193,12 @@
self._results = test_check_res.json()['response']
return self._results['status']
- def _AmInstrumentTestSetup(self, app_path, test_path, runner_package):
+ def _AmInstrumentTestSetup(self, app_path, test_path, runner_package,
+ environment_variables):
config = {'runner': runner_package}
+ if environment_variables:
+ config['environment_vars'] = ','.join(
+ '%s=%s' % (k, v) for k, v in environment_variables.iteritems())
self._app_id = self._UploadAppToDevice(app_path)
@@ -183,11 +210,12 @@
with zipfile.ZipFile(test_with_deps.name, 'w') as zip_file:
zip_file.write(test_path, host_test, zipfile.ZIP_DEFLATED)
for h, _ in data_deps:
- zip_utils.WriteToZipFile(zip_file, h, '.')
if os.path.isdir(h):
+ zip_utils.WriteToZipFile(zip_file, h, '.')
sdcard_files.extend(os.listdir(h))
else:
- sdcard_files.extend(h)
+ zip_utils.WriteToZipFile(zip_file, h, os.path.basename(h))
+ sdcard_files.append(os.path.basename(h))
config['sdcard_files'] = ','.join(sdcard_files)
config['host_test'] = host_test
self._test_id = self._UploadTestToDevice(
@@ -232,7 +260,13 @@
"""
logging.info('Generating config file for test.')
with tempfile.TemporaryFile() as config:
- config_data = ['[appurify]', '[%s]' % runner_type]
+ config_data = [
+ '[appurify]',
+ 'pcap=0',
+ 'profiler=0',
+ 'videocapture=0',
+ '[%s]' % runner_type
+ ]
config_data.extend('%s=%s' % (k, v) for k, v in body.iteritems())
config.write(''.join('%s\n' % l for l in config_data))
config.flush()
diff --git a/build/android/pylib/uiautomator/test_runner.py b/build/android/pylib/uiautomator/test_runner.py
index 48059a3..02f5d6a 100644
--- a/build/android/pylib/uiautomator/test_runner.py
+++ b/build/android/pylib/uiautomator/test_runner.py
@@ -74,7 +74,8 @@
force_stop=True)
cmd = ['uiautomator', 'runtest',
self.test_pkg.UIAUTOMATOR_PATH + self.test_pkg.GetPackageName(),
- '-e', 'class', test]
+ '-e', 'class', test,
+ '-e', 'test_package', self._package]
return self.device.RunShellCommand(cmd, timeout=timeout, retries=0)
#override
diff --git a/build/android/pylib/utils/findbugs.py b/build/android/pylib/utils/findbugs.py
index d946f31..82408b0 100644
--- a/build/android/pylib/utils/findbugs.py
+++ b/build/android/pylib/utils/findbugs.py
@@ -32,8 +32,11 @@
def _DiffKnownWarnings(current_warnings_set, known_bugs_file):
- with open(known_bugs_file, 'r') as known_bugs:
- known_bugs_set = set(known_bugs.read().splitlines())
+ if os.path.exists(known_bugs_file):
+ with open(known_bugs_file, 'r') as known_bugs:
+ known_bugs_set = set(known_bugs.read().splitlines())
+ else:
+ known_bugs_set = set()
new_warnings = current_warnings_set - known_bugs_set
_PrintMessage(sorted(new_warnings), 'New', 'Please fix, or perhaps add to',
diff --git a/build/android/test_runner.py b/build/android/test_runner.py
index 049b1ab..e92f851 100755
--- a/build/android/test_runner.py
+++ b/build/android/test_runner.py
@@ -123,39 +123,39 @@
group = parser.add_argument_group('Remote Device Options')
group.add_argument('--trigger', default='',
- help=('Only triggers the test if set. Stores test_run_id '
- 'in given file path. '))
+ help=('Only triggers the test if set. Stores test_run_id '
+ 'in given file path. '))
group.add_argument('--collect', default='',
- help=('Only collects the test results if set. '
- 'Gets test_run_id from given file path.'))
+ help=('Only collects the test results if set. '
+ 'Gets test_run_id from given file path.'))
group.add_argument('--remote-device', default='',
- help=('Device type to run test on.'))
+ help='Device type to run test on.')
group.add_argument('--remote-device-os', default='',
- help=('OS to have on the device.'))
+ help='OS to have on the device.')
group.add_argument('--results-path', default='',
- help=('File path to download results to.'))
+ help='File path to download results to.')
group.add_argument('--api-protocol',
- help=('HTTP protocol to use. (http or https)'))
- group.add_argument('--api-address', help=('Address to send HTTP requests.'))
- group.add_argument('--api-port', help=('Port to send HTTP requests to.'))
+ help='HTTP protocol to use. (http or https)')
+ group.add_argument('--api-address', help='Address to send HTTP requests.')
+ group.add_argument('--api-port', help='Port to send HTTP requests to.')
group.add_argument('--runner-type', default='',
- help=('Type of test to run as.'))
+ help='Type of test to run as.')
group.add_argument('--runner-package', default='',
- help=('Package name of test.'))
+ help='Package name of test.')
group.add_argument('--apk-under-test', default='apks/Chrome.apk',
- help=('APK to run tests on.'))
+ help='APK to run tests on.')
api_secret_group = group.add_mutually_exclusive_group()
api_secret_group.add_argument('--api-secret', default='',
- help=('API secret for remote devices.'))
+ help='API secret for remote devices.')
api_secret_group.add_argument('--api-secret-file', default='',
- help=('Path to file that contains API secret.'))
+ help='Path to file that contains API secret.')
api_key_group = group.add_mutually_exclusive_group()
api_key_group.add_argument('--api-key', default='',
- help=('API key for remote devices.'))
+ help='API key for remote devices.')
api_key_group.add_argument('--api-key-file', default='',
- help=('Path to file that contains API key.'))
+ help='Path to file that contains API key.')
def AddDeviceOptions(parser):
diff --git a/build/build_config.h b/build/build_config.h
index 57d41fb..b07660d 100644
--- a/build/build_config.h
+++ b/build/build_config.h
@@ -48,6 +48,7 @@
#endif
#elif defined(_WIN32)
#define OS_WIN 1
+#define TOOLKIT_VIEWS 1
#elif defined(__FreeBSD__)
#define OS_FREEBSD 1
#elif defined(__OpenBSD__)
diff --git a/build/common.gypi b/build/common.gypi
index 94d1877..119f5b4 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -190,6 +190,13 @@
'use_ash%': 0,
}],
+ # Set default value of toolkit_views based on OS.
+ ['OS=="win" or chromeos==1 or use_aura==1', {
+ 'toolkit_views%': 1,
+ }, {
+ 'toolkit_views%': 0,
+ }],
+
# Embedded builds use aura without ash or views.
['embedded==1', {
'use_aura%': 1,
@@ -424,11 +431,11 @@
# -fsanitize=undefined only works with clang, but ubsan=1 implies clang=1
# See http://clang.llvm.org/docs/UsersManual.html
'ubsan%': 0,
+ 'ubsan_blacklist%': '<(PRODUCT_DIR)/../../tools/ubsan/blacklist.txt',
# Enable building with UBsan's vptr (Clang's -fsanitize=vptr option).
# -fsanitize=vptr only works with clang, but ubsan_vptr=1 implies clang=1
'ubsan_vptr%': 0,
- 'ubsan_vptr_blacklist%': '<(PRODUCT_DIR)/../../tools/ubsan_vptr/blacklist.txt',
# Use the dynamic libraries instrumented by one of the sanitizers
# instead of the standard system libraries.
@@ -982,9 +989,9 @@
'optimize_jni_generation%': 0,
}],
- # TODO(baixo): Enable v8_use_external_startup_data
+ # TODO(rmcilroy): Enable v8_use_external_startup_data on ChromeOS
# http://crbug.com/421063
- ['android_webview_build==0 and chromecast==0 and chromeos==0 and (OS=="android" or OS=="linux" or OS=="mac")', {
+ ['android_webview_build==0 and chromecast==0 and chromeos==0 and OS!="ios"', {
'v8_use_external_startup_data%': 1,
}, {
'v8_use_external_startup_data%': 0,
@@ -1123,8 +1130,8 @@
'tsan%': '<(tsan)',
'tsan_blacklist%': '<(tsan_blacklist)',
'ubsan%': '<(ubsan)',
+ 'ubsan_blacklist%': '<(ubsan_blacklist)',
'ubsan_vptr%': '<(ubsan_vptr)',
- 'ubsan_vptr_blacklist%': '<(ubsan_vptr_blacklist)',
'use_instrumented_libraries%': '<(use_instrumented_libraries)',
'use_custom_libcxx%': '<(use_custom_libcxx)',
'use_system_libcxx%': '<(use_system_libcxx)',
@@ -1192,9 +1199,6 @@
'support_pre_M6_history_database%': '<(support_pre_M6_history_database)',
'v8_use_external_startup_data%': '<(v8_use_external_startup_data)',
- # Whether or not we are building the Athena shell.
- 'use_athena%': '0',
-
# Use system protobuf instead of bundled one.
'use_system_protobuf%': 0,
@@ -1449,6 +1453,10 @@
# Compile d8 for the host toolset.
'v8_toolset_for_d8': 'host',
+ # Enable the V8 heap verification code. The verification itself is enabled
+ # via a command line option.
+ 'v8_enable_verify_heap%': 1,
+
# Use brlapi from brltty for braille display support.
'use_brlapi%': 0,
@@ -1464,6 +1472,9 @@
# Set to 1 to compile with MSE support for MPEG2 TS
'enable_mpeg2ts_stream_parser%': 0,
+ # Support ChromeOS touchpad gestures with ozone.
+ 'use_evdev_gestures%': 0,
+
# Default ozone platform (if no --ozone-platform flag).
'ozone_platform%': "",
@@ -2126,7 +2137,7 @@
'conditions': [
# TODO(dcheng): https://crbug.com/417463 -- work to enable this flag
# on all platforms is currently underway.
- ['OS=="linux" and chromeos==0', {
+ ['(OS=="linux" and chromeos==0) or OS=="mac" or OS=="ios"', {
'clang_chrome_plugins_flags': [
'-Xclang',
'-plugin-arg-find-bad-constructs',
@@ -2341,11 +2352,6 @@
}, {
'use_seccomp_bpf%': 0,
}],
- # Set component build with LTO until all tests pass.
- # This also reduces link time.
- ['use_lto==1', {
- 'component%': "shared_library",
- }],
],
# older history files use fts2 instead of fts3
@@ -2579,9 +2585,15 @@
['component=="shared_library"', {
'defines': ['COMPONENT_BUILD'],
}],
+ ['toolkit_views==1', {
+ 'defines': ['TOOLKIT_VIEWS=1'],
+ }],
['ui_compositor_image_transport==1', {
'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
}],
+ ['use_aura==1', {
+ 'defines': ['USE_AURA=1'],
+ }],
['use_ash==1', {
'defines': ['USE_ASH=1'],
}],
@@ -3518,6 +3530,14 @@
],
},
}],
+ # TODO(thakis): Enable this everywhere. http://crbug.com/371125
+ ['(OS=="linux" or OS=="android") and asan==0 and msan==0 and tsan==0 and use_ozone!=1', {
+ 'target_defaults': {
+ 'ldflags': [
+ '-Wl,-z,defs',
+ ],
+ },
+ }],
['os_posix==1 and chromeos==0', {
# Chrome OS enables -fstack-protector-strong via its build wrapper,
# and we want to avoid overriding this, so stack-protector is only
@@ -4193,8 +4213,7 @@
['_toolset=="target"', {
'cflags': [
'-fsanitize=undefined',
- # -fsanitize=vptr is incompatible with -fno-rtti.
- '-fno-sanitize=vptr',
+ '-fsanitize-blacklist=<(ubsan_blacklist)',
# Employ the experimental PBQP register allocator to avoid
# slow compilation on files with too many basic blocks.
# See http://crbug.com/426271.
@@ -4203,10 +4222,17 @@
# generated by PBQP regallocator. May increase compile time.
'-mllvm -pbqp-coalescing',
],
+ 'cflags_cc!': [
+ '-fno-rtti',
+ ],
+ 'cflags!': [
+ '-fno-rtti',
+ ],
'ldflags': [
'-fsanitize=undefined',
- # -fsanitize=vptr is incompatible with -fno-rtti.
- '-fno-sanitize=vptr',
+ ],
+ 'defines': [
+ 'UNDEFINED_SANITIZER',
],
}],
],
@@ -4216,7 +4242,7 @@
['_toolset=="target"', {
'cflags': [
'-fsanitize=vptr',
- '-fsanitize-blacklist=<(ubsan_vptr_blacklist)',
+ '-fsanitize-blacklist=<(ubsan_blacklist)',
],
'cflags_cc!': [
'-fno-rtti',
@@ -5522,13 +5548,13 @@
# invoked via /fallback. This is critical for using macros
# like ASAN_UNPOISON_MEMORY_REGION in files where we fall
# back.
- '<(DEPTH)/<(make_clang_dir)/lib/clang/3.6.0/include_sanitizer',
+ '<(DEPTH)/<(make_clang_dir)/lib/clang/3.7.0/include_sanitizer',
],
},
'VCLinkerTool': {
'AdditionalLibraryDirectories': [
# TODO(hans): If make_clang_dir is absolute, this breaks.
- '<(DEPTH)/<(make_clang_dir)/lib/clang/3.6.0/lib/windows',
+ '<(DEPTH)/<(make_clang_dir)/lib/clang/3.7.0/lib/windows',
],
},
'target_conditions': [
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
index 0080085..c57ba3f 100644
--- a/build/config/BUILD.gn
+++ b/build/config/BUILD.gn
@@ -78,10 +78,31 @@
# TODO(brettw) should probably be "=1".
defines += [ "USE_UDEV" ]
}
+ if (toolkit_views) {
+ defines += [ "TOOLKIT_VIEWS=1" ]
+ }
if (ui_compositor_image_transport) {
# TODO(brettw) should probably be "=1".
defines += [ "UI_COMPOSITOR_IMAGE_TRANSPORT" ]
}
+ if (use_ash) {
+ defines += [ "USE_ASH=1" ]
+ }
+ if (use_aura) {
+ defines += [ "USE_AURA=1" ]
+ }
+ if (use_pango) {
+ defines += [ "USE_PANGO=1" ]
+ }
+ if (use_cairo) {
+ defines += [ "USE_CAIRO=1" ]
+ }
+ if (use_clipboard_aurax11) {
+ defines += [ "USE_CLIPBOARD_AURAX11=1" ]
+ }
+ if (use_default_render_theme) {
+ defines += [ "USE_DEFAULT_RENDER_THEME=1" ]
+ }
if (use_glib) {
defines += [ "USE_GLIB=1" ]
}
@@ -96,6 +117,9 @@
# to rename this but we're hoping to transition away from NSS.
defines += [ "USE_NSS=1" ]
}
+ if (use_ozone) {
+ defines += [ "USE_OZONE=1" ]
+ }
if (use_x11) {
defines += [ "USE_X11=1" ]
}
@@ -172,9 +196,6 @@
if (enable_one_click_signin) {
defines += [ "ENABLE_ONE_CLICK_SIGNIN" ]
}
- if (use_athena) {
- defines += [ "USE_ATHENA=1" ]
- }
if (enable_hidpi) {
defines += [ "ENABLE_HIDPI=1" ]
}
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index e9e7006..099db51 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -717,202 +717,3 @@
}
}
}
-
-# ==============================================================================
-# TEST SETUP
-# ==============================================================================
-
-# Define a test as an executable (or shared_library on Android) with the
-# "testonly" flag set.
-template("test") {
- if (is_android) {
- shared_library(target_name) {
- # Configs will always be defined since we set_defaults for a component
- # above. We want to use those rather than whatever came with the nested
- # shared/static library inside the component.
- configs = [] # Prevent list overwriting warning.
- configs = invoker.configs
-
- # See above call.
- set_sources_assignment_filter([])
-
- testonly = true
-
- if (defined(invoker.all_dependent_configs)) {
- all_dependent_configs = invoker.all_dependent_configs
- }
- if (defined(invoker.allow_circular_includes_from)) {
- allow_circular_includes_from = invoker.allow_circular_includes_from
- }
- if (defined(invoker.cflags)) {
- cflags = invoker.cflags
- }
- if (defined(invoker.cflags_c)) {
- cflags_c = invoker.cflags_c
- }
- if (defined(invoker.cflags_cc)) {
- cflags_cc = invoker.cflags_cc
- }
- if (defined(invoker.cflags_objc)) {
- cflags_objc = invoker.cflags_objc
- }
- if (defined(invoker.cflags_objcc)) {
- cflags_objcc = invoker.cflags_objcc
- }
- if (defined(invoker.check_includes)) {
- check_includes = invoker.check_includes
- }
- if (defined(invoker.data)) {
- data = invoker.data
- }
- if (defined(invoker.data_deps)) {
- data_deps = invoker.data_deps
- }
- if (defined(invoker.datadeps)) {
- datadeps = invoker.datadeps
- }
- if (defined(invoker.defines)) {
- defines = invoker.defines
- }
- if (defined(invoker.deps)) {
- deps = invoker.deps
- }
- if (defined(invoker.direct_dependent_configs)) {
- direct_dependent_configs = invoker.direct_dependent_configs
- }
- if (defined(invoker.forward_dependent_configs_from)) {
- forward_dependent_configs_from = invoker.forward_dependent_configs_from
- }
- if (defined(invoker.include_dirs)) {
- include_dirs = invoker.include_dirs
- }
- if (defined(invoker.ldflags)) {
- ldflags = invoker.ldflags
- }
- if (defined(invoker.lib_dirs)) {
- lib_dirs = invoker.lib_dirs
- }
- if (defined(invoker.libs)) {
- libs = invoker.libs
- }
- if (defined(invoker.output_extension)) {
- output_extension = invoker.output_extension
- }
- if (defined(invoker.output_name)) {
- output_name = invoker.output_name
- }
- if (defined(invoker.public)) {
- public = invoker.public
- }
- if (defined(invoker.public_configs)) {
- public_configs = invoker.public_configs
- }
- if (defined(invoker.public_deps)) {
- public_deps = invoker.public_deps
- }
- if (defined(invoker.sources)) {
- sources = invoker.sources
- }
- if (defined(invoker.visibility)) {
- visibility = invoker.visibility
- }
- }
- } else {
- executable(target_name) {
- # See above.
- configs = [] # Prevent list overwriting warning.
- configs = invoker.configs
-
- # See above call.
- set_sources_assignment_filter([])
-
- testonly = true
-
- if (defined(invoker.all_dependent_configs)) {
- all_dependent_configs = invoker.all_dependent_configs
- }
- if (defined(invoker.allow_circular_includes_from)) {
- allow_circular_includes_from = invoker.allow_circular_includes_from
- }
- if (defined(invoker.cflags)) {
- cflags = invoker.cflags
- }
- if (defined(invoker.cflags_c)) {
- cflags_c = invoker.cflags_c
- }
- if (defined(invoker.cflags_cc)) {
- cflags_cc = invoker.cflags_cc
- }
- if (defined(invoker.cflags_objc)) {
- cflags_objc = invoker.cflags_objc
- }
- if (defined(invoker.cflags_objcc)) {
- cflags_objcc = invoker.cflags_objcc
- }
- if (defined(invoker.check_includes)) {
- check_includes = invoker.check_includes
- }
- if (defined(invoker.data)) {
- data = invoker.data
- }
- if (defined(invoker.data_deps)) {
- data_deps = invoker.data_deps
- }
- if (defined(invoker.datadeps)) {
- datadeps = invoker.datadeps
- }
- if (defined(invoker.defines)) {
- defines = invoker.defines
- }
-
- # All shared libraries must have the sanitizer deps to properly link in
- # asan mode (this target will be empty in other cases).
- if (defined(invoker.deps)) {
- deps = invoker.deps + [ "//build/config/sanitizers:deps" ]
- } else {
- deps = [
- "//build/config/sanitizers:deps",
- ]
- }
- if (defined(invoker.direct_dependent_configs)) {
- direct_dependent_configs = invoker.direct_dependent_configs
- }
- if (defined(invoker.forward_dependent_configs_from)) {
- forward_dependent_configs_from = invoker.forward_dependent_configs_from
- }
- if (defined(invoker.include_dirs)) {
- include_dirs = invoker.include_dirs
- }
- if (defined(invoker.ldflags)) {
- ldflags = invoker.ldflags
- }
- if (defined(invoker.lib_dirs)) {
- lib_dirs = invoker.lib_dirs
- }
- if (defined(invoker.libs)) {
- libs = invoker.libs
- }
- if (defined(invoker.output_extension)) {
- output_extension = invoker.output_extension
- }
- if (defined(invoker.output_name)) {
- output_name = invoker.output_name
- }
- if (defined(invoker.public)) {
- public = invoker.public
- }
- if (defined(invoker.public_configs)) {
- public_configs = invoker.public_configs
- }
- if (defined(invoker.public_deps)) {
- public_deps = invoker.public_deps
- }
- if (defined(invoker.sources)) {
- sources = invoker.sources
- }
- if (defined(invoker.visibility)) {
- visibility = invoker.visibility
- }
- }
- }
-}
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni
index 3772769..4778705 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -15,6 +15,7 @@
rebased_android_sdk_jar = rebase_path(android_sdk_jar, root_build_dir)
template("android_lint") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -62,6 +63,7 @@
}
template("dex") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -113,6 +115,7 @@
# Creates a zip archive of the inputs.
# If base_dir is provided, the archive paths will be relative to it.
template("zip") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -155,6 +158,7 @@
# See build/android/gyp/write_build_config.py and
# build/android/gyp/util/build_utils.py:ExpandFileArgs
template("write_build_config") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -288,6 +292,7 @@
}
template("process_java_prebuilt") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -375,6 +380,7 @@
# Packages resources, assets, dex, and native libraries into an apk. Signs and
# zipaligns the apk.
template("create_apk") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -554,6 +560,7 @@
}
template("java_prebuilt_impl") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -633,6 +640,7 @@
# jar_path: Use this to explicitly set the output jar path. Defaults to
# "${target_gen_dir}/${target_name}.jar.
template("compile_java") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -733,6 +741,7 @@
}
template("java_library_impl") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -916,6 +925,7 @@
# Runs process_resources.py
template("process_resources") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -1006,6 +1016,7 @@
}
template("copy_ex") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -1053,6 +1064,7 @@
# Produces a single .dex.jar out of a set of Java dependencies.
template("deps_dex") {
+ set_sources_assignment_filter([])
build_config = "$target_gen_dir/${target_name}.build_config"
write_build_config("${target_name}__build_config") {
type = "deps_dex"
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index b33cd88..07431d7 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -30,6 +30,7 @@
# jni_package = "foo"
# }
template("generate_jni") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -128,6 +129,7 @@
# jni_package = "foo"
# }
template("generate_jar_jni") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -237,6 +239,7 @@
# include_path = "android/java/templates"
# }
template("java_cpp_template") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -333,6 +336,7 @@
# ]
# }
template("java_cpp_enum") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -392,6 +396,7 @@
# output = "$target_gen_dir/AndroidManifest.xml"
# }
template("jinja_template") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -448,6 +453,7 @@
# variables = ["color=red"]
# }
template("jinja_template_resources") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -530,6 +536,7 @@
# custom_package = "org.chromium.foo"
# }
template("android_resources") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -600,6 +607,7 @@
# grd_file = "foo_strings.grd"
# }
template("java_strings_grd") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -666,6 +674,7 @@
# ]
# }
template("java_strings_grd_prebuilt") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -725,6 +734,8 @@
# main_class = "org.chromium.foo.FooMain"
# }
template("java_binary") {
+ set_sources_assignment_filter([])
+
# TODO(cjhopman): This should not act like a java_library for dependents (i.e.
# dependents shouldn't get the jar in their classpath, etc.).
java_library_impl(target_name) {
@@ -810,6 +821,7 @@
# ]
# }
template("java_library") {
+ set_sources_assignment_filter([])
java_library_impl(target_name) {
if (defined(invoker.DEPRECATED_java_in_dir)) {
DEPRECATED_java_in_dir = invoker.DEPRECATED_java_in_dir
@@ -876,6 +888,7 @@
# ]
# }
template("java_prebuilt") {
+ set_sources_assignment_filter([])
java_prebuilt_impl(target_name) {
jar_path = invoker.jar_path
if (defined(invoker.testonly)) {
@@ -942,6 +955,7 @@
# ]
# }
template("android_library") {
+ set_sources_assignment_filter([])
assert(!defined(invoker.jar_path),
"android_library does not support a custom jar path")
java_library_impl(target_name) {
@@ -1008,6 +1022,7 @@
# will be packaged into the resulting .dex.jar file.
# dex_path: location at which the output file will be put
template("android_standalone_library") {
+ set_sources_assignment_filter([])
deps_dex(target_name) {
deps = invoker.deps
dex_path = invoker.dex_path
@@ -1037,6 +1052,7 @@
# ]
# }
template("android_java_prebuilt") {
+ set_sources_assignment_filter([])
java_prebuilt_impl(target_name) {
jar_path = invoker.jar_path
supports_android = true
@@ -1105,6 +1121,7 @@
# ]
# }
template("android_apk") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -1437,6 +1454,7 @@
# unittests_dep = ":foo_unittests"
# }
template("unittest_apk") {
+ set_sources_assignment_filter([])
testonly = true
assert(defined(invoker.unittests_dep), "Need unittests_dep for $target_name")
@@ -1508,6 +1526,7 @@
# ]
# }
template("android_aidl") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -1583,6 +1602,7 @@
# binary = "$root_build_dir/exe.stripped/foo"
# }
template("create_native_executable_dist") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -1663,6 +1683,7 @@
# sources = [ "$proto_path/foo.proto" ]
# }
template("proto_java_library") {
+ set_sources_assignment_filter([])
_protoc_dep = "//third_party/android_protobuf:android_protoc($host_toolchain)"
_protoc_out_dir = get_label_info(_protoc_dep, "root_out_dir")
_protoc_bin = "$_protoc_out_dir/android_protoc"
@@ -1705,6 +1726,7 @@
# TODO(GYP): implement this.
template("uiautomator_test") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index c61964f..b5c4a90 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -301,6 +301,7 @@
"-Wl,-z,noexecstack",
"-Wl,-z,now",
"-Wl,-z,relro",
+ "-Wl,-z,defs",
]
}
diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn
index 2b9962f..0453c84 100644
--- a/build/config/linux/BUILD.gn
+++ b/build/config/linux/BUILD.gn
@@ -52,6 +52,10 @@
]
}
+pkg_config("pangocairo") {
+ packages = [ "pangocairo" ]
+}
+
pkg_config("pangoft2") {
packages = [ "pangoft2" ]
}
@@ -62,6 +66,16 @@
packages = [ "dbus-1" ]
}
+if (use_evdev_gestures) {
+ pkg_config("libevdev-cros") {
+ packages = [ "libevdev-cros" ]
+ }
+
+ pkg_config("libgestures") {
+ packages = [ "libgestures" ]
+ }
+}
+
config("x11") {
libs = [
"X11",
diff --git a/build/config/ui.gni b/build/config/ui.gni
index 8c8834c..46154a3 100644
--- a/build/config/ui.gni
+++ b/build/config/ui.gni
@@ -11,19 +11,52 @@
#
# See also build/config/features.gni
+declare_args() {
+ # Indicates if Ash is enabled. Ash is the Aura Shell which provides a
+ # desktop-like environment for Aura. Requires use_aura = true
+ use_ash = is_win || is_linux
+
+ # Indicates if Ozone is enabled. Ozone is a low-level library layer for Linux
+ # that does not require X11.
+ use_ozone = false
+
+ # Support ChromeOS touchpad gestures with ozone.
+ use_evdev_gestures = false
+
+ # Indicates if Aura is enabled. Aura is a low-level windowing library, sort
+ # of a replacement for GDI or GTK.
+ use_aura = is_win || is_linux
+
+ # True means the UI is built using the "views" framework.
+ toolkit_views = is_win || is_chromeos || use_aura
+
+ # Whether we should use glib, a low level C utility library.
+ use_glib = is_linux && !use_ozone
+}
+
# Additional dependent variables -----------------------------------------------
#
# These variables depend on other variables and can't be set externally.
+if (is_linux && use_glib) {
+ use_cairo = true
+ use_pango = true
+} else {
+ use_cairo = false
+ use_pango = false
+}
+
# Use GPU accelerated cross process image transport by default on linux builds
# with the Aura window manager.
-ui_compositor_image_transport = is_linux
+ui_compositor_image_transport = use_aura && is_linux
+
+use_default_render_theme = use_aura || is_linux
# Indicates if the UI toolkit depends on X11.
-use_x11 = is_linux
+use_x11 = is_linux && !use_ozone
-use_glib = is_linux
+use_ozone_evdev = use_ozone
-use_athena = false
+use_clipboard_aurax11 = is_linux && use_aura && use_x11
enable_hidpi = is_mac || is_chromeos || is_win
diff --git a/build/filename_rules.gypi b/build/filename_rules.gypi
index 6062601..1bef75f 100644
--- a/build/filename_rules.gypi
+++ b/build/filename_rules.gypi
@@ -71,6 +71,9 @@
['exclude', '(^|/)x/'],
],
}],
+ ['<(toolkit_views)==0 or >(nacl_untrusted_build)==1', {
+ 'sources/': [ ['exclude', '_views(_browsertest|_unittest)?\\.(h|cc)$'] ]
+ }],
['<(use_aura)==0 or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '_aura(_browsertest|_unittest)?\\.(h|cc)$'],
['exclude', '(^|/)aura/'],
@@ -93,5 +96,23 @@
['<(use_ash)==0 or OS!="win" or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '_ashwin\\.(h|cc)$'] ]
}],
+ ['<(use_ozone)==0 or >(nacl_untrusted_build)==1', {
+ 'sources/': [ ['exclude', '_ozone(_browsertest|_unittest)?\\.(h|cc)$'],
+ ['exclude', '(^|/)ozone/'],
+ ]
+ }],
+ ['<(use_ozone_evdev)==0 or >(nacl_untrusted_build)==1', {
+ 'sources/': [ ['exclude', '_evdev(_browsertest|_unittest)?\\.(h|cc)$'],
+ ['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/get_landmines.py b/build/get_landmines.py
index eb59367..ac3d7d6 100755
--- a/build/get_landmines.py
+++ b/build/get_landmines.py
@@ -28,8 +28,7 @@
builder() == 'ninja'):
print 'Need to clobber winja goma due to backend cwd cache fix.'
if platform() == 'android':
- print 'Clobber: To delete newly generated mojo class files.'
- print 'Clobber to ensure that recipe tests do not break (issue 680923002).'
+ print 'Clobber: to handle new way of suppressing findbugs failures.'
if platform() == 'win' and builder() == 'ninja':
print 'Compile on cc_unittests fails due to symbols removed in r185063.'
if platform() == 'linux' and builder() == 'ninja':
@@ -54,13 +53,11 @@
if (platform() != 'ios'):
print 'Clobber to get rid of obselete test plugin after r248358'
print 'Clobber to rebuild GN files for V8'
+ print 'Clobber to get rid of stale generated mojom.h files'
print 'Need to clobber everything due to build_nexe change in nacl r13424'
print '[chromium-dev] PSA: clobber build needed for IDR_INSPECTOR_* compil...'
print 'blink_resources.grd changed: crbug.com/400860'
print 'ninja dependency cycle: crbug.com/408192'
- if platform() == 'android':
- print 'Delete stale generated .java files yet again. crbug.com/349592'
- print 'Clobber to delete incompatible object binary format with NDK r10c'
print 'Clobber to fix missing NaCl gyp dependencies (crbug.com/427427).'
print 'Another clobber for missing NaCl gyp deps (crbug.com/427427).'
print 'Clobber to fix GN not picking up increased ID range (crbug.com/444902)'
diff --git a/build/install-build-deps-android.sh b/build/install-build-deps-android.sh
index b61b033..4233c7f 100755
--- a/build/install-build-deps-android.sh
+++ b/build/install-build-deps-android.sh
@@ -12,6 +12,14 @@
# a license agreement, so upon installation it will prompt the user. To get
# past the curses-based dialog press TAB <ret> TAB <ret> to agree.
+args="$@"
+if test "$1" = "--skip-sdk-packages"; then
+ skip_inst_sdk_packages=1
+ args="${@:2}"
+else
+ skip_inst_sdk_packages=0
+fi
+
if ! uname -m | egrep -q "i686|x86_64"; then
echo "Only x86 architectures are currently supported" >&2
exit
@@ -19,7 +27,7 @@
# Install first the default Linux build deps.
"$(dirname "${BASH_SOURCE[0]}")/install-build-deps.sh" \
- --no-syms --lib32 --no-arm --no-chromeos-fonts --no-nacl --no-prompt "$@"
+ --no-syms --lib32 --no-arm --no-chromeos-fonts --no-nacl --no-prompt "${args}"
lsb_release=$(lsb_release --codename --short)
@@ -84,16 +92,21 @@
fi
fi
-# Get the SDK extras packages to install from the DEPS file 'sdkextras' hook.
-packages="$(python -c 'execfile("./get_sdk_extras_packages.py")')"
-for package in "${packages}"; do
- package_num=$(../third_party/android_tools/sdk/tools/android list sdk | \
- grep -i "$package," | \
- awk '/^[ ]*[0-9]*- / {gsub("-",""); print $1}')
- if [[ -n ${package_num} ]]; then
- ../third_party/android_tools/sdk/tools/android update sdk --no-ui --filter \
- ${package_num}
- fi
-done
+if test "$skip_inst_sdk_packages" != 1; then
+ echo 'checking for sdk packages install'
+ # Get the SDK extras packages to install from the DEPS file 'sdkextras' hook.
+ packages="$(python -c 'execfile("./get_sdk_extras_packages.py")')"
+ # Use absolute path to call 'android' so script can be run from any directory.
+ cwd=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+ for package in "${packages}"; do
+ pkg_id=$(${cwd}/../third_party/android_tools/sdk/tools/android list sdk | \
+ grep -i "$package," | \
+ awk '/^[ ]*[0-9]*- / {gsub("-",""); print $1}')
+ if [[ -n ${pkg_id} ]]; then
+ ${cwd}/../third_party/android_tools/sdk/tools/android update sdk --no-ui \
+ --filter ${pkg_id}
+ fi
+ done
+fi
echo "install-build-deps-android.sh complete."
diff --git a/build/isolate.gypi b/build/isolate.gypi
index e11fc39..e6d2f98 100644
--- a/build/isolate.gypi
+++ b/build/isolate.gypi
@@ -90,6 +90,7 @@
'--config-variable', 'libpeer_target_type=<(libpeer_target_type)',
'--config-variable', 'use_openssl=<(use_openssl)',
'--config-variable', 'target_arch=<(target_arch)',
+ '--config-variable', 'use_ozone=<(use_ozone)',
'--config-variable', 'disable_nacl=<(disable_nacl)',
],
'conditions': [
diff --git a/build/linux/system.gyp b/build/linux/system.gyp
index f1b0616..9079011 100644
--- a/build/linux/system.gyp
+++ b/build/linux/system.gyp
@@ -427,6 +427,44 @@
},
], # targets
}],
+ ['use_evdev_gestures==1', {
+ 'targets': [
+ {
+ 'target_name': 'libevdev-cros',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags libevdev-cros)'
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other libevdev-cros)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l libevdev-cros)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'libgestures',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags libgestures)'
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other libgestures)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l libgestures)',
+ ],
+ },
+ },
+ ],
+ }],
['use_xkbcommon==1', {
'targets': [
{
@@ -1068,6 +1106,46 @@
],
},
{
+ 'target_name': 'pangocairo',
+ 'type': 'none',
+ 'toolsets': ['host', 'target'],
+ 'conditions': [
+ ['use_pango==1 and use_cairo==1', {
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags pangocairo pangoft2)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo pangoft2)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l pangocairo pangoft2)',
+ ],
+ },
+ }, {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(pkg-config --cflags pangocairo pangoft2)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(pkg-config --libs-only-L --libs-only-other pangocairo pangoft2)',
+ ],
+ 'libraries': [
+ '<!@(pkg-config --libs-only-l pangocairo pangoft2)',
+ ],
+ },
+ }],
+ ],
+ }],
+ ],
+ },
+ {
'target_name': 'ssl',
'type': 'none',
'conditions': [
diff --git a/build/secondary/third_party/cacheinvalidation/BUILD.gn b/build/secondary/third_party/cacheinvalidation/BUILD.gn
index 53d8472..088f89a 100644
--- a/build/secondary/third_party/cacheinvalidation/BUILD.gn
+++ b/build/secondary/third_party/cacheinvalidation/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//testing/test.gni")
+
config("cacheinvalidation_config") {
include_dirs = [
"overrides",
diff --git a/build/secondary/third_party/leveldatabase/BUILD.gn b/build/secondary/third_party/leveldatabase/BUILD.gn
index 1ee030f..19eef15 100644
--- a/build/secondary/third_party/leveldatabase/BUILD.gn
+++ b/build/secondary/third_party/leveldatabase/BUILD.gn
@@ -4,6 +4,9 @@
# Snappy is a compression library we use.
# TODO(brettw) It's not clear why this needs to be parameterized.
+
+import("//testing/test.gni")
+
use_snappy = true
defines = [ "LEVELDB_PLATFORM_CHROMIUM=1" ]
diff --git a/build/secondary/tools/grit/grit_rule.gni b/build/secondary/tools/grit/grit_rule.gni
index d876f2b..7a1cc26 100644
--- a/build/secondary/tools/grit/grit_rule.gni
+++ b/build/secondary/tools/grit/grit_rule.gni
@@ -118,6 +118,27 @@
]
}
+if (toolkit_views) {
+ grit_defines += [
+ "-D",
+ "toolkit_views",
+ ]
+}
+
+if (use_aura) {
+ grit_defines += [
+ "-D",
+ "use_aura",
+ ]
+}
+
+if (use_ash) {
+ grit_defines += [
+ "-D",
+ "use_ash",
+ ]
+}
+
if (use_nss_certs) {
grit_defines += [
"-D",
@@ -125,6 +146,13 @@
]
}
+if (use_ozone) {
+ grit_defines += [
+ "-D",
+ "use_ozone",
+ ]
+}
+
if (enable_image_loader_extension) {
grit_defines += [
"-D",
diff --git a/cc/BUILD.gn b/cc/BUILD.gn
index 77b9161..2a8951b 100644
--- a/cc/BUILD.gn
+++ b/cc/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//testing/test.gni")
+
component("cc") {
sources = [
"animation/animation.cc",
@@ -78,6 +80,8 @@
"debug/devtools_instrumentation.h",
"debug/frame_rate_counter.cc",
"debug/frame_rate_counter.h",
+ "debug/frame_timing_tracker.cc",
+ "debug/frame_timing_tracker.h",
"debug/frame_viewer_instrumentation.cc",
"debug/frame_viewer_instrumentation.h",
"debug/invalidation_benchmark.cc",
@@ -329,6 +333,8 @@
"resources/bitmap_skpicture_content_layer_updater.h",
"resources/clip_display_item.cc",
"resources/clip_display_item.h",
+ "resources/clip_path_display_item.cc",
+ "resources/clip_path_display_item.h",
"resources/content_layer_updater.cc",
"resources/content_layer_updater.h",
"resources/display_item.cc",
@@ -724,6 +730,7 @@
"base/simple_enclosed_region_unittest.cc",
"base/tiling_data_unittest.cc",
"base/util_unittest.cc",
+ "debug/frame_timing_tracker_unittest.cc",
"debug/micro_benchmark_controller_unittest.cc",
"input/top_controls_manager_unittest.cc",
"layers/contents_scaling_layer_unittest.cc",
@@ -743,6 +750,7 @@
"layers/nine_patch_layer_unittest.cc",
"layers/painted_scrollbar_layer_impl_unittest.cc",
"layers/picture_image_layer_impl_unittest.cc",
+ "layers/picture_image_layer_unittest.cc",
"layers/picture_layer_impl_unittest.cc",
"layers/picture_layer_unittest.cc",
"layers/render_surface_unittest.cc",
diff --git a/cc/animation/animation.h b/cc/animation/animation.h
index 80c0763..9342f1a 100644
--- a/cc/animation/animation.h
+++ b/cc/animation/animation.h
@@ -174,14 +174,13 @@
scoped_ptr<AnimationCurve> curve_;
- // IDs are not necessarily unique.
+ // IDs must be unique.
int id_;
// Animations that must be run together are called 'grouped' and have the same
// group id. Grouped animations are guaranteed to start at the same time and
// no other animations may animate any of the group's target properties until
- // all animations in the group have finished animating. Note: an active
- // animation's group id and target property uniquely identify that animation.
+ // all animations in the group have finished animating.
int group_;
TargetProperty target_property_;
diff --git a/cc/animation/animation_id_provider.cc b/cc/animation/animation_id_provider.cc
index 5c7afb6..caefdb8 100644
--- a/cc/animation/animation_id_provider.cc
+++ b/cc/animation/animation_id_provider.cc
@@ -2,18 +2,22 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/atomic_sequence_num.h"
#include "cc/animation/animation_id_provider.h"
namespace cc {
+base::StaticAtomicSequenceNumber g_next_animation_id;
+base::StaticAtomicSequenceNumber g_next_group_id;
+
int AnimationIdProvider::NextAnimationId() {
- static int next_animation_id = 1;
- return next_animation_id++;
+ // Animation IDs start from 1.
+ return g_next_animation_id.GetNext() + 1;
}
int AnimationIdProvider::NextGroupId() {
- static int next_group_id = 1;
- return next_group_id++;
+ // Animation group IDs start from 1.
+ return g_next_group_id.GetNext() + 1;
}
} // namespace cc
diff --git a/cc/animation/layer_animation_controller.cc b/cc/animation/layer_animation_controller.cc
index 1f9e112..5f6beed 100644
--- a/cc/animation/layer_animation_controller.cc
+++ b/cc/animation/layer_animation_controller.cc
@@ -61,11 +61,15 @@
};
void LayerAnimationController::RemoveAnimation(int animation_id) {
- animations_.erase(cc::remove_if(&animations_,
- animations_.begin(),
- animations_.end(),
- HasAnimationId(animation_id)),
- animations_.end());
+ auto animations_to_remove =
+ animations_.remove_if(HasAnimationId(animation_id));
+ for (auto it = animations_to_remove; it != animations_.end(); ++it) {
+ if ((*it)->target_property() == Animation::ScrollOffset) {
+ NotifyObserversScrollOffsetAnimationRemoved();
+ break;
+ }
+ }
+ animations_.erase(animations_to_remove, animations_.end());
UpdateActivation(NormalActivation);
}
@@ -85,12 +89,13 @@
void LayerAnimationController::RemoveAnimation(
int animation_id,
Animation::TargetProperty target_property) {
- animations_.erase(
- cc::remove_if(&animations_,
- animations_.begin(),
- animations_.end(),
- HasAnimationIdAndProperty(animation_id, target_property)),
- animations_.end());
+ auto animations_to_remove = animations_.remove_if(
+ HasAnimationIdAndProperty(animation_id, target_property));
+ if (target_property == Animation::ScrollOffset &&
+ animations_to_remove != animations_.end())
+ NotifyObserversScrollOffsetAnimationRemoved();
+
+ animations_.erase(animations_to_remove, animations_.end());
UpdateActivation(NormalActivation);
}
@@ -261,16 +266,6 @@
}
Animation* LayerAnimationController::GetAnimation(
- int group_id,
- Animation::TargetProperty target_property) const {
- for (size_t i = 0; i < animations_.size(); ++i)
- if (animations_[i]->group() == group_id &&
- animations_[i]->target_property() == target_property)
- return animations_[i];
- return 0;
-}
-
-Animation* LayerAnimationController::GetAnimation(
Animation::TargetProperty target_property) const {
for (size_t i = 0; i < animations_.size(); ++i) {
size_t index = animations_.size() - i - 1;
@@ -280,6 +275,13 @@
return 0;
}
+Animation* LayerAnimationController::GetAnimationById(int animation_id) const {
+ for (size_t i = 0; i < animations_.size(); ++i)
+ if (animations_[i]->id() == animation_id)
+ return animations_[i];
+ return nullptr;
+}
+
bool LayerAnimationController::HasActiveAnimation() const {
for (size_t i = 0; i < animations_.size(); ++i) {
if (!animations_[i]->is_finished())
@@ -554,8 +556,7 @@
for (size_t i = 0; i < animations_.size(); ++i) {
// If the animation is already running on the impl thread, there is no
// need to copy it over.
- if (controller_impl->GetAnimation(animations_[i]->group(),
- animations_[i]->target_property()))
+ if (controller_impl->GetAnimationById(animations_[i]->id()))
continue;
// If the animation is not running on the impl thread, it does not
@@ -599,8 +600,7 @@
if (animation->is_impl_only()) {
return (animation->run_state() == Animation::WaitingForDeletion);
} else {
- return !main_thread_controller->GetAnimation(animation->group(),
- animation->target_property());
+ return !main_thread_controller->GetAnimationById(animation->id());
}
}
@@ -630,8 +630,8 @@
void LayerAnimationController::PushPropertiesToImplThread(
LayerAnimationController* controller_impl) const {
for (size_t i = 0; i < animations_.size(); ++i) {
- Animation* current_impl = controller_impl->GetAnimation(
- animations_[i]->group(), animations_[i]->target_property());
+ Animation* current_impl =
+ controller_impl->GetAnimationById(animations_[i]->id());
if (current_impl)
animations_[i]->PushPropertiesTo(current_impl);
}
@@ -1034,6 +1034,11 @@
OnAnimationWaitingForDeletion());
}
+void LayerAnimationController::NotifyObserversScrollOffsetAnimationRemoved() {
+ FOR_EACH_OBSERVER(LayerAnimationValueObserver, value_observers_,
+ OnScrollOffsetAnimationRemoved());
+}
+
bool LayerAnimationController::HasValueObserver() {
if (value_observers_.might_have_observers()) {
ObserverListBase<LayerAnimationValueObserver>::Iterator it(
diff --git a/cc/animation/layer_animation_controller.h b/cc/animation/layer_animation_controller.h
index 22c57b5..d776ee9 100644
--- a/cc/animation/layer_animation_controller.h
+++ b/cc/animation/layer_animation_controller.h
@@ -65,15 +65,13 @@
// are deleted.
void ActivateAnimations();
- // Returns the active animation in the given group, animating the given
- // property, if such an animation exists.
- Animation* GetAnimation(int group_id,
- Animation::TargetProperty target_property) const;
-
// Returns the active animation animating the given property that is either
// running, or is next to run, if such an animation exists.
Animation* GetAnimation(Animation::TargetProperty target_property) const;
+ // Returns the active animation for the given unique animation id.
+ Animation* GetAnimationById(int animation_id) const;
+
// Returns true if there are any animations that have neither finished nor
// aborted.
bool HasActiveAnimation() const;
@@ -193,6 +191,8 @@
void NotifyObserversAnimationWaitingForDeletion();
+ void NotifyObserversScrollOffsetAnimationRemoved();
+
bool HasValueObserver();
bool HasActiveValueObserver();
diff --git a/cc/animation/layer_animation_controller_unittest.cc b/cc/animation/layer_animation_controller_unittest.cc
index 464a973..7c2dc45 100644
--- a/cc/animation/layer_animation_controller_unittest.cc
+++ b/cc/animation/layer_animation_controller_unittest.cc
@@ -34,9 +34,9 @@
const TimeTicks kInitialTickTime = TicksFromSecondsF(1.0);
scoped_ptr<Animation> CreateAnimation(scoped_ptr<AnimationCurve> curve,
- int id,
+ int group_id,
Animation::TargetProperty property) {
- return Animation::Create(curve.Pass(), 0, id, property);
+ return Animation::Create(curve.Pass(), 0, group_id, property);
}
TEST(LayerAnimationControllerTest, SyncNewAnimation) {
@@ -54,18 +54,17 @@
EXPECT_FALSE(controller->needs_to_start_animations_for_testing());
EXPECT_FALSE(controller_impl->needs_to_start_animations_for_testing());
- AddOpacityTransitionToController(controller.get(), 1, 0, 1, false);
+ int animation_id =
+ AddOpacityTransitionToController(controller.get(), 1, 0, 1, false);
EXPECT_TRUE(controller->needs_to_start_animations_for_testing());
- int group_id = controller->GetAnimation(Animation::Opacity)->group();
controller->PushAnimationUpdatesTo(controller_impl.get());
EXPECT_TRUE(controller_impl->needs_to_start_animations_for_testing());
controller_impl->ActivateAnimations();
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity));
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id));
EXPECT_EQ(Animation::WaitingForTargetAvailability,
- controller_impl->GetAnimation(group_id,
- Animation::Opacity)->run_state());
+ controller_impl->GetAnimationById(animation_id)->run_state());
}
// If an animation is started on the impl thread before it is ticked on the main
@@ -82,16 +81,15 @@
EXPECT_FALSE(controller_impl->GetAnimation(Animation::Opacity));
- AddOpacityTransitionToController(controller.get(), 1, 0, 1, false);
- int group_id = controller->GetAnimation(Animation::Opacity)->group();
+ int animation_id =
+ AddOpacityTransitionToController(controller.get(), 1, 0, 1, false);
controller->PushAnimationUpdatesTo(controller_impl.get());
controller_impl->ActivateAnimations();
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity));
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id));
EXPECT_EQ(Animation::WaitingForTargetAvailability,
- controller_impl->GetAnimation(group_id,
- Animation::Opacity)->run_state());
+ controller_impl->GetAnimationById(animation_id)->run_state());
AnimationEventsVector events;
controller_impl->Animate(kInitialTickTime);
@@ -100,18 +98,14 @@
// Synchronize the start times.
EXPECT_EQ(1u, events.size());
controller->NotifyAnimationStarted(events[0]);
- EXPECT_EQ(controller->GetAnimation(group_id,
- Animation::Opacity)->start_time(),
- controller_impl->GetAnimation(group_id,
- Animation::Opacity)->start_time());
+ EXPECT_EQ(controller->GetAnimationById(animation_id)->start_time(),
+ controller_impl->GetAnimationById(animation_id)->start_time());
// Start the animation on the main thread. Should not affect the start time.
controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(500));
controller->UpdateState(true, nullptr);
- EXPECT_EQ(controller->GetAnimation(group_id,
- Animation::Opacity)->start_time(),
- controller_impl->GetAnimation(group_id,
- Animation::Opacity)->start_time());
+ EXPECT_EQ(controller->GetAnimationById(animation_id)->start_time(),
+ controller_impl->GetAnimationById(animation_id)->start_time());
}
TEST(LayerAnimationControllerTest, UseSpecifiedStartTimes) {
@@ -124,8 +118,8 @@
LayerAnimationController::Create(0));
controller->AddValueObserver(&dummy);
- AddOpacityTransitionToController(controller.get(), 1, 0, 1, false);
- int group_id = controller->GetAnimation(Animation::Opacity)->group();
+ int animation_id =
+ AddOpacityTransitionToController(controller.get(), 1, 0, 1, false);
const TimeTicks start_time = TicksFromSecondsF(123);
controller->GetAnimation(Animation::Opacity)->set_start_time(start_time);
@@ -133,10 +127,9 @@
controller->PushAnimationUpdatesTo(controller_impl.get());
controller_impl->ActivateAnimations();
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity));
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id));
EXPECT_EQ(Animation::WaitingForTargetAvailability,
- controller_impl->GetAnimation(group_id,
- Animation::Opacity)->run_state());
+ controller_impl->GetAnimationById(animation_id)->run_state());
AnimationEventsVector events;
controller_impl->Animate(kInitialTickTime);
@@ -147,23 +140,17 @@
controller->NotifyAnimationStarted(events[0]);
EXPECT_EQ(start_time,
- controller->GetAnimation(group_id,
- Animation::Opacity)->start_time());
- EXPECT_EQ(controller->GetAnimation(group_id,
- Animation::Opacity)->start_time(),
- controller_impl->GetAnimation(group_id,
- Animation::Opacity)->start_time());
+ controller->GetAnimationById(animation_id)->start_time());
+ EXPECT_EQ(controller->GetAnimationById(animation_id)->start_time(),
+ controller_impl->GetAnimationById(animation_id)->start_time());
// Start the animation on the main thread. Should not affect the start time.
controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(500));
controller->UpdateState(true, nullptr);
EXPECT_EQ(start_time,
- controller->GetAnimation(group_id,
- Animation::Opacity)->start_time());
- EXPECT_EQ(controller->GetAnimation(group_id,
- Animation::Opacity)->start_time(),
- controller_impl->GetAnimation(group_id,
- Animation::Opacity)->start_time());
+ controller->GetAnimationById(animation_id)->start_time());
+ EXPECT_EQ(controller->GetAnimationById(animation_id)->start_time(),
+ controller_impl->GetAnimationById(animation_id)->start_time());
}
// Tests that controllers activate and deactivate as expected.
@@ -262,17 +249,15 @@
EXPECT_FALSE(controller_impl->GetAnimation(Animation::Opacity));
- AddOpacityTransitionToController(controller.get(), 1, 0, 1, false);
- int group_id = controller->GetAnimation(Animation::Opacity)->group();
- int animation_id = controller->GetAnimation(Animation::Opacity)->id();
+ int animation_id =
+ AddOpacityTransitionToController(controller.get(), 1, 0, 1, false);
controller->PushAnimationUpdatesTo(controller_impl.get());
controller_impl->ActivateAnimations();
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity));
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id));
EXPECT_EQ(Animation::WaitingForTargetAvailability,
- controller_impl->GetAnimation(group_id,
- Animation::Opacity)->run_state());
+ controller_impl->GetAnimationById(animation_id)->run_state());
// Start the animations on each controller.
AnimationEventsVector events;
@@ -281,26 +266,22 @@
controller->Animate(kInitialTickTime);
controller->UpdateState(true, nullptr);
EXPECT_EQ(Animation::Running,
- controller_impl->GetAnimation(group_id,
- Animation::Opacity)->run_state());
+ controller_impl->GetAnimationById(animation_id)->run_state());
EXPECT_EQ(Animation::Running,
- controller->GetAnimation(group_id,
- Animation::Opacity)->run_state());
+ controller->GetAnimationById(animation_id)->run_state());
// Pause the main-thread animation.
controller->PauseAnimation(
animation_id,
TimeDelta::FromMilliseconds(1000) + TimeDelta::FromMilliseconds(1000));
EXPECT_EQ(Animation::Paused,
- controller->GetAnimation(group_id,
- Animation::Opacity)->run_state());
+ controller->GetAnimationById(animation_id)->run_state());
// The pause run state change should make it to the impl thread controller.
controller->PushAnimationUpdatesTo(controller_impl.get());
controller_impl->ActivateAnimations();
EXPECT_EQ(Animation::Paused,
- controller_impl->GetAnimation(group_id,
- Animation::Opacity)->run_state());
+ controller_impl->GetAnimationById(animation_id)->run_state());
}
TEST(LayerAnimationControllerTest, DoNotSyncFinishedAnimation) {
@@ -317,15 +298,14 @@
int animation_id =
AddOpacityTransitionToController(controller.get(), 1, 0, 1, false);
- int group_id = controller->GetAnimation(Animation::Opacity)->group();
+ int group_id = controller->GetAnimationById(animation_id)->group();
controller->PushAnimationUpdatesTo(controller_impl.get());
controller_impl->ActivateAnimations();
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity));
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id));
EXPECT_EQ(Animation::WaitingForTargetAvailability,
- controller_impl->GetAnimation(group_id,
- Animation::Opacity)->run_state());
+ controller_impl->GetAnimationById(animation_id)->run_state());
// Notify main thread controller that the animation has started.
AnimationEvent animation_started_event(AnimationEvent::Started,
@@ -338,14 +318,14 @@
// Force animation to complete on impl thread.
controller_impl->RemoveAnimation(animation_id);
- EXPECT_FALSE(controller_impl->GetAnimation(group_id, Animation::Opacity));
+ EXPECT_FALSE(controller_impl->GetAnimationById(animation_id));
controller->PushAnimationUpdatesTo(controller_impl.get());
controller_impl->ActivateAnimations();
// Even though the main thread has a 'new' animation, it should not be pushed
// because the animation has already completed on the impl thread.
- EXPECT_FALSE(controller_impl->GetAnimation(group_id, Animation::Opacity));
+ EXPECT_FALSE(controller_impl->GetAnimationById(animation_id));
}
// Ensure that a finished animation is eventually deleted by both the
@@ -853,6 +833,51 @@
EXPECT_FALSE(event);
}
+TEST(LayerAnimationControllerTest, ScrollOffsetRemovalNotifiesObserver) {
+ FakeLayerAnimationValueObserver dummy;
+ scoped_refptr<LayerAnimationController> controller(
+ LayerAnimationController::Create(0));
+ controller->AddValueObserver(&dummy);
+
+ // First test the 1-argument version of RemoveAnimation.
+ gfx::ScrollOffset target_value(300.f, 200.f);
+ scoped_ptr<ScrollOffsetAnimationCurve> curve(
+ ScrollOffsetAnimationCurve::Create(
+ target_value, EaseInOutTimingFunction::Create().Pass()));
+
+ int animation_id = 1;
+ scoped_ptr<Animation> animation(Animation::Create(
+ curve.Pass(), animation_id, 0, Animation::ScrollOffset));
+ controller->AddAnimation(animation.Pass());
+
+ controller->RemoveAnimation(animation_id);
+ EXPECT_TRUE(dummy.scroll_offset_animation_removed());
+
+ // Now, test the 2-argument version of RemoveAnimation.
+ dummy.reset_scroll_offset_animation_removed();
+ curve = ScrollOffsetAnimationCurve::Create(
+ target_value, EaseInOutTimingFunction::Create().Pass());
+ animation =
+ Animation::Create(curve.Pass(), animation_id, 0, Animation::ScrollOffset);
+ controller->AddAnimation(animation.Pass());
+
+ controller->RemoveAnimation(animation_id, Animation::ScrollOffset);
+ EXPECT_TRUE(dummy.scroll_offset_animation_removed());
+
+ // Check that removing non-scroll-offset animations does not cause the
+ // observer to get notified.
+ dummy.reset_scroll_offset_animation_removed();
+ animation_id = AddAnimatedTransformToController(controller.get(), 1.0, 1, 2);
+ controller->RemoveAnimation(animation_id);
+ EXPECT_FALSE(dummy.scroll_offset_animation_removed());
+
+ dummy.reset_scroll_offset_animation_removed();
+ animation_id =
+ AddAnimatedFilterToController(controller.get(), 1.0, 0.1f, 0.2f);
+ controller->RemoveAnimation(animation_id, Animation::Filter);
+ EXPECT_FALSE(dummy.scroll_offset_animation_removed());
+}
+
class FakeAnimationDelegate : public AnimationDelegate {
public:
FakeAnimationDelegate()
@@ -1188,11 +1213,9 @@
LayerAnimationController::Create(0));
controller->AddValueObserver(&dummy);
- const int id = 1;
scoped_ptr<Animation> to_add(CreateAnimation(
scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)).Pass(),
- id,
- Animation::Opacity));
+ 1, Animation::Opacity));
to_add->set_iterations(-1);
controller->AddAnimation(to_add.Pass());
@@ -1220,9 +1243,10 @@
EXPECT_TRUE(controller->HasActiveAnimation());
EXPECT_EQ(0.75f, dummy.opacity());
- EXPECT_TRUE(controller->GetAnimation(id, Animation::Opacity));
- controller->GetAnimation(id, Animation::Opacity)->SetRunState(
- Animation::Aborted, kInitialTickTime + TimeDelta::FromMilliseconds(750));
+ EXPECT_TRUE(controller->GetAnimation(Animation::Opacity));
+ controller->GetAnimation(Animation::Opacity)
+ ->SetRunState(Animation::Aborted,
+ kInitialTickTime + TimeDelta::FromMilliseconds(750));
EXPECT_FALSE(controller->HasActiveAnimation());
EXPECT_EQ(0.75f, dummy.opacity());
}
@@ -1236,11 +1260,9 @@
LayerAnimationController::Create(0));
controller->AddValueObserver(&dummy);
- const int id = 1;
controller->AddAnimation(CreateAnimation(
scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)).Pass(),
- id,
- Animation::Opacity));
+ 1, Animation::Opacity));
controller->Animate(kInitialTickTime);
controller->UpdateState(true, events.get());
@@ -1251,17 +1273,18 @@
EXPECT_TRUE(controller->HasActiveAnimation());
EXPECT_EQ(0.5f, dummy.opacity());
- EXPECT_TRUE(controller->GetAnimation(id, Animation::Opacity));
- controller->GetAnimation(id, Animation::Opacity)->SetRunState(
- Animation::Paused, kInitialTickTime + TimeDelta::FromMilliseconds(500));
+ EXPECT_TRUE(controller->GetAnimation(Animation::Opacity));
+ controller->GetAnimation(Animation::Opacity)
+ ->SetRunState(Animation::Paused,
+ kInitialTickTime + TimeDelta::FromMilliseconds(500));
controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(1024000));
controller->UpdateState(true, events.get());
EXPECT_TRUE(controller->HasActiveAnimation());
EXPECT_EQ(0.5f, dummy.opacity());
- EXPECT_TRUE(controller->GetAnimation(id, Animation::Opacity));
- controller->GetAnimation(id, Animation::Opacity)
+ EXPECT_TRUE(controller->GetAnimation(Animation::Opacity));
+ controller->GetAnimation(Animation::Opacity)
->SetRunState(Animation::Running,
kInitialTickTime + TimeDelta::FromMilliseconds(1024000));
controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(1024250));
@@ -1283,20 +1306,17 @@
LayerAnimationController::Create(0));
controller->AddValueObserver(&dummy);
- const int id = 1;
- controller->AddAnimation(CreateAnimation(
- scoped_ptr<AnimationCurve>(new FakeTransformTransition(1)).Pass(),
- id,
+ const int animation_id = 2;
+ controller->AddAnimation(Animation::Create(
+ scoped_ptr<AnimationCurve>(new FakeTransformTransition(1)).Pass(), 1, 1,
Animation::Transform));
- controller->AddAnimation(CreateAnimation(
+ controller->AddAnimation(Animation::Create(
scoped_ptr<AnimationCurve>(new FakeFloatTransition(2.0, 0.f, 1.f)).Pass(),
- id,
- Animation::Opacity));
- controller->AddAnimation(CreateAnimation(
- scoped_ptr<AnimationCurve>(
- new FakeFloatTransition(1.0, 1.f, 0.75f)).Pass(),
- 2,
- Animation::Opacity));
+ animation_id, 1, Animation::Opacity));
+ controller->AddAnimation(Animation::Create(
+ scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 1.f, 0.75f))
+ .Pass(),
+ 3, 2, Animation::Opacity));
controller->Animate(kInitialTickTime);
controller->UpdateState(true, events.get());
@@ -1307,9 +1327,10 @@
EXPECT_TRUE(controller->HasActiveAnimation());
EXPECT_EQ(0.5f, dummy.opacity());
- EXPECT_TRUE(controller->GetAnimation(id, Animation::Opacity));
- controller->GetAnimation(id, Animation::Opacity)->SetRunState(
- Animation::Aborted, kInitialTickTime + TimeDelta::FromMilliseconds(1000));
+ EXPECT_TRUE(controller->GetAnimationById(animation_id));
+ controller->GetAnimationById(animation_id)
+ ->SetRunState(Animation::Aborted,
+ kInitialTickTime + TimeDelta::FromMilliseconds(1000));
controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(1000));
controller->UpdateState(true, events.get());
EXPECT_TRUE(controller->HasActiveAnimation());
@@ -1342,14 +1363,14 @@
controller->Animate(kInitialTickTime);
controller->UpdateState(true, events.get());
EXPECT_TRUE(controller->HasActiveAnimation());
- Animation* active_animation = controller->GetAnimation(0, Animation::Opacity);
+ Animation* active_animation = controller->GetAnimation(Animation::Opacity);
EXPECT_TRUE(active_animation);
EXPECT_TRUE(active_animation->needs_synchronized_start_time());
controller->PushAnimationUpdatesTo(controller_impl.get());
controller_impl->ActivateAnimations();
- active_animation = controller_impl->GetAnimation(0, Animation::Opacity);
+ active_animation = controller_impl->GetAnimation(Animation::Opacity);
EXPECT_TRUE(active_animation);
EXPECT_EQ(Animation::WaitingForTargetAvailability,
active_animation->run_state());
@@ -1422,7 +1443,7 @@
controller->UpdateState(true, events.get());
EXPECT_EQ(0u, events->size());
EXPECT_EQ(Animation::WaitingForTargetAvailability,
- controller->GetAnimation(id, Animation::Opacity)->run_state());
+ controller->GetAnimation(Animation::Opacity)->run_state());
controller->AddValueObserver(&pending_dummy);
@@ -1433,7 +1454,7 @@
controller->UpdateState(true, events.get());
EXPECT_EQ(0u, events->size());
EXPECT_EQ(Animation::Starting,
- controller->GetAnimation(id, Animation::Opacity)->run_state());
+ controller->GetAnimation(Animation::Opacity)->run_state());
EXPECT_EQ(0.5f, pending_dummy.opacity());
// Even when already in the Starting state, the animation should stay
@@ -1442,7 +1463,7 @@
controller->UpdateState(true, events.get());
EXPECT_EQ(0u, events->size());
EXPECT_EQ(Animation::Starting,
- controller->GetAnimation(id, Animation::Opacity)->run_state());
+ controller->GetAnimation(Animation::Opacity)->run_state());
EXPECT_EQ(0.5f, pending_dummy.opacity());
controller->AddValueObserver(&dummy);
@@ -1453,7 +1474,7 @@
controller->UpdateState(true, events.get());
EXPECT_EQ(1u, events->size());
EXPECT_EQ(Animation::Running,
- controller->GetAnimation(id, Animation::Opacity)->run_state());
+ controller->GetAnimation(Animation::Opacity)->run_state());
EXPECT_EQ(0.5f, pending_dummy.opacity());
EXPECT_EQ(0.5f, dummy.opacity());
@@ -1501,7 +1522,7 @@
EXPECT_EQ(gfx::BoxF(1.f, 2.f, -4.f, 13.f, 19.f, 20.f).ToString(),
bounds.ToString());
- controller_impl->GetAnimation(1, Animation::Transform)
+ controller_impl->GetAnimationById(1)
->SetRunState(Animation::Finished, TicksFromSecondsF(0.0));
// Only the unfinished animation should affect the animated bounds.
@@ -1509,7 +1530,7 @@
EXPECT_EQ(gfx::BoxF(1.f, 2.f, -4.f, 7.f, 16.f, 20.f).ToString(),
bounds.ToString());
- controller_impl->GetAnimation(2, Animation::Transform)
+ controller_impl->GetAnimationById(2)
->SetRunState(Animation::Finished, TicksFromSecondsF(0.0));
// There are no longer any running animations.
@@ -1541,56 +1562,42 @@
// Start with several animations, and allow some of them to reach the finished
// state.
- controller->AddAnimation(CreateAnimation(
- scoped_ptr<AnimationCurve>(new FakeTransformTransition(1.0)).Pass(),
- 1,
+ controller->AddAnimation(Animation::Create(
+ scoped_ptr<AnimationCurve>(new FakeTransformTransition(1.0)).Pass(), 1, 1,
Animation::Transform));
- controller->AddAnimation(CreateAnimation(
+ controller->AddAnimation(Animation::Create(
scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)).Pass(),
- 2,
- Animation::Opacity));
- controller->AddAnimation(CreateAnimation(
- scoped_ptr<AnimationCurve>(new FakeTransformTransition(1.0)).Pass(),
- 3,
+ 2, 2, Animation::Opacity));
+ controller->AddAnimation(Animation::Create(
+ scoped_ptr<AnimationCurve>(new FakeTransformTransition(1.0)).Pass(), 3, 3,
Animation::Transform));
- controller->AddAnimation(CreateAnimation(
- scoped_ptr<AnimationCurve>(new FakeTransformTransition(2.0)).Pass(),
- 4,
+ controller->AddAnimation(Animation::Create(
+ scoped_ptr<AnimationCurve>(new FakeTransformTransition(2.0)).Pass(), 4, 4,
Animation::Transform));
- controller->AddAnimation(CreateAnimation(
+ controller->AddAnimation(Animation::Create(
scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)).Pass(),
- 5,
- Animation::Opacity));
+ 5, 5, Animation::Opacity));
controller->Animate(kInitialTickTime);
controller->UpdateState(true, nullptr);
controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(1000));
controller->UpdateState(true, nullptr);
- EXPECT_EQ(Animation::Finished,
- controller->GetAnimation(1, Animation::Transform)->run_state());
- EXPECT_EQ(Animation::Finished,
- controller->GetAnimation(2, Animation::Opacity)->run_state());
- EXPECT_EQ(Animation::Running,
- controller->GetAnimation(3, Animation::Transform)->run_state());
+ EXPECT_EQ(Animation::Finished, controller->GetAnimationById(1)->run_state());
+ EXPECT_EQ(Animation::Finished, controller->GetAnimationById(2)->run_state());
+ EXPECT_EQ(Animation::Running, controller->GetAnimationById(3)->run_state());
EXPECT_EQ(Animation::WaitingForTargetAvailability,
- controller->GetAnimation(4, Animation::Transform)->run_state());
- EXPECT_EQ(Animation::Running,
- controller->GetAnimation(5, Animation::Opacity)->run_state());
+ controller->GetAnimationById(4)->run_state());
+ EXPECT_EQ(Animation::Running, controller->GetAnimationById(5)->run_state());
controller->AbortAnimations(Animation::Transform);
// Only un-finished Transform animations should have been aborted.
- EXPECT_EQ(Animation::Finished,
- controller->GetAnimation(1, Animation::Transform)->run_state());
- EXPECT_EQ(Animation::Finished,
- controller->GetAnimation(2, Animation::Opacity)->run_state());
- EXPECT_EQ(Animation::Aborted,
- controller->GetAnimation(3, Animation::Transform)->run_state());
- EXPECT_EQ(Animation::Aborted,
- controller->GetAnimation(4, Animation::Transform)->run_state());
- EXPECT_EQ(Animation::Running,
- controller->GetAnimation(5, Animation::Opacity)->run_state());
+ EXPECT_EQ(Animation::Finished, controller->GetAnimationById(1)->run_state());
+ EXPECT_EQ(Animation::Finished, controller->GetAnimationById(2)->run_state());
+ EXPECT_EQ(Animation::Aborted, controller->GetAnimationById(3)->run_state());
+ EXPECT_EQ(Animation::Aborted, controller->GetAnimationById(4)->run_state());
+ EXPECT_EQ(Animation::Running, controller->GetAnimationById(5)->run_state());
}
// An animation aborted on the main thread should get deleted on both threads.
@@ -1604,12 +1611,12 @@
LayerAnimationController::Create(0));
controller->AddValueObserver(&dummy);
- AddOpacityTransitionToController(controller.get(), 1.0, 0.f, 1.f, false);
- int group_id = controller->GetAnimation(Animation::Opacity)->group();
+ int animation_id =
+ AddOpacityTransitionToController(controller.get(), 1.0, 0.f, 1.f, false);
controller->PushAnimationUpdatesTo(controller_impl.get());
controller_impl->ActivateAnimations();
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity));
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id));
controller->AbortAnimations(Animation::Opacity);
EXPECT_EQ(Animation::Aborted,
@@ -1625,8 +1632,8 @@
controller->PushAnimationUpdatesTo(controller_impl.get());
controller_impl->ActivateAnimations();
- EXPECT_FALSE(controller->GetAnimation(group_id, Animation::Opacity));
- EXPECT_FALSE(controller_impl->GetAnimation(group_id, Animation::Opacity));
+ EXPECT_FALSE(controller->GetAnimationById(animation_id));
+ EXPECT_FALSE(controller_impl->GetAnimationById(animation_id));
}
// An animation aborted on the impl thread should get deleted on both threads.
@@ -1640,12 +1647,12 @@
LayerAnimationController::Create(0));
controller->AddValueObserver(&dummy);
- AddOpacityTransitionToController(controller.get(), 1.0, 0.f, 1.f, false);
- int group_id = controller->GetAnimation(Animation::Opacity)->group();
+ int animation_id =
+ AddOpacityTransitionToController(controller.get(), 1.0, 0.f, 1.f, false);
controller->PushAnimationUpdatesTo(controller_impl.get());
controller_impl->ActivateAnimations();
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity));
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id));
controller_impl->AbortAnimations(Animation::Opacity);
EXPECT_EQ(Animation::Aborted,
@@ -1674,8 +1681,8 @@
controller->PushAnimationUpdatesTo(controller_impl.get());
controller_impl->ActivateAnimations();
- EXPECT_FALSE(controller->GetAnimation(group_id, Animation::Opacity));
- EXPECT_FALSE(controller_impl->GetAnimation(group_id, Animation::Opacity));
+ EXPECT_FALSE(controller->GetAnimationById(animation_id));
+ EXPECT_FALSE(controller_impl->GetAnimationById(animation_id));
}
// Ensure that we only generate Finished events for animations in a group
@@ -1688,15 +1695,15 @@
LayerAnimationController::Create(0));
controller_impl->AddValueObserver(&dummy_impl);
+ const int group_id = 1;
+
// Add two animations with the same group id but different durations.
- controller_impl->AddAnimation(CreateAnimation(
- scoped_ptr<AnimationCurve>(new FakeTransformTransition(2.0)).Pass(),
- 1,
- Animation::Transform));
- controller_impl->AddAnimation(CreateAnimation(
+ controller_impl->AddAnimation(Animation::Create(
+ scoped_ptr<AnimationCurve>(new FakeTransformTransition(2.0)).Pass(), 1,
+ group_id, Animation::Transform));
+ controller_impl->AddAnimation(Animation::Create(
scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)).Pass(),
- 1,
- Animation::Opacity));
+ 2, group_id, Animation::Opacity));
controller_impl->Animate(kInitialTickTime);
controller_impl->UpdateState(true, events.get());
@@ -1715,10 +1722,9 @@
// a Finished event yet.
EXPECT_EQ(0u, events->size());
EXPECT_EQ(Animation::Finished,
- controller_impl->GetAnimation(1, Animation::Opacity)->run_state());
+ controller_impl->GetAnimationById(2)->run_state());
EXPECT_EQ(Animation::Running,
- controller_impl->GetAnimation(1,
- Animation::Transform)->run_state());
+ controller_impl->GetAnimationById(1)->run_state());
controller_impl->Animate(kInitialTickTime +
TimeDelta::FromMilliseconds(2000));
@@ -1821,7 +1827,7 @@
EXPECT_TRUE(controller_impl->HasAnimationThatAffectsScale());
- controller_impl->GetAnimation(3, Animation::Transform)
+ controller_impl->GetAnimationById(3)
->SetRunState(Animation::Finished, TicksFromSecondsF(0.0));
// Only unfinished animations should be considered by
@@ -1876,7 +1882,7 @@
// A scale animation is not a translation.
EXPECT_FALSE(controller_impl->HasOnlyTranslationTransforms());
- controller_impl->GetAnimation(3, Animation::Transform)
+ controller_impl->GetAnimationById(3)
->SetRunState(Animation::Finished, TicksFromSecondsF(0.0));
// Only unfinished animations should be considered by
@@ -1940,9 +1946,9 @@
EXPECT_FALSE(controller_impl->MaximumTargetScale(&max_scale));
- controller_impl->GetAnimation(3, Animation::Transform)
+ controller_impl->GetAnimationById(3)
->SetRunState(Animation::Finished, TicksFromSecondsF(0.0));
- controller_impl->GetAnimation(2, Animation::Transform)
+ controller_impl->GetAnimationById(2)
->SetRunState(Animation::Finished, TicksFromSecondsF(0.0));
// Only unfinished animations should be considered by
@@ -2033,21 +2039,20 @@
controller->AddValueObserver(&dummy);
EXPECT_FALSE(controller->needs_to_start_animations_for_testing());
- AddOpacityTransitionToController(controller.get(), 1, 0.5f, 1.f, false);
- int group_id = controller->GetAnimation(Animation::Opacity)->group();
+ int animation_id =
+ AddOpacityTransitionToController(controller.get(), 1, 0.5f, 1.f, false);
EXPECT_TRUE(controller->needs_to_start_animations_for_testing());
EXPECT_FALSE(controller_impl->needs_to_start_animations_for_testing());
controller->PushAnimationUpdatesTo(controller_impl.get());
EXPECT_TRUE(controller_impl->needs_to_start_animations_for_testing());
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity));
- EXPECT_EQ(
- Animation::WaitingForTargetAvailability,
- controller_impl->GetAnimation(group_id, Animation::Opacity)->run_state());
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity)
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id));
+ EXPECT_EQ(Animation::WaitingForTargetAvailability,
+ controller_impl->GetAnimationById(animation_id)->run_state());
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id)
->affects_pending_observers());
- EXPECT_FALSE(controller_impl->GetAnimation(group_id, Animation::Opacity)
+ EXPECT_FALSE(controller_impl->GetAnimationById(animation_id)
->affects_active_observers());
controller_impl->Animate(kInitialTickTime);
@@ -2056,9 +2061,8 @@
// Since the animation hasn't been activated, it should still be Starting
// rather than Running.
- EXPECT_EQ(
- Animation::Starting,
- controller_impl->GetAnimation(group_id, Animation::Opacity)->run_state());
+ EXPECT_EQ(Animation::Starting,
+ controller_impl->GetAnimationById(animation_id)->run_state());
// Since the animation hasn't been activated, only the pending observer
// should have been ticked.
@@ -2066,9 +2070,9 @@
EXPECT_EQ(0.f, dummy_impl.opacity());
controller_impl->ActivateAnimations();
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity)
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id)
->affects_pending_observers());
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity)
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id)
->affects_active_observers());
controller_impl->Animate(kInitialTickTime +
@@ -2077,9 +2081,8 @@
// Since the animation has been activated, it should have reached the
// Running state and the active observer should start to get ticked.
- EXPECT_EQ(
- Animation::Running,
- controller_impl->GetAnimation(group_id, Animation::Opacity)->run_state());
+ EXPECT_EQ(Animation::Running,
+ controller_impl->GetAnimationById(animation_id)->run_state());
EXPECT_EQ(0.5f, pending_dummy_impl.opacity());
EXPECT_EQ(0.5f, dummy_impl.opacity());
}
@@ -2098,18 +2101,17 @@
LayerAnimationController::Create(0));
controller->AddValueObserver(&dummy);
- AddOpacityTransitionToController(controller.get(), 1, 0.5f, 1.f, true);
- int group_id = controller->GetAnimation(Animation::Opacity)->group();
+ int animation_id =
+ AddOpacityTransitionToController(controller.get(), 1, 0.5f, 1.f, true);
controller->PushAnimationUpdatesTo(controller_impl.get());
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity));
- EXPECT_EQ(
- Animation::WaitingForTargetAvailability,
- controller_impl->GetAnimation(group_id, Animation::Opacity)->run_state());
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity)
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id));
+ EXPECT_EQ(Animation::WaitingForTargetAvailability,
+ controller_impl->GetAnimationById(animation_id)->run_state());
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id)
->affects_pending_observers());
- EXPECT_FALSE(controller_impl->GetAnimation(group_id, Animation::Opacity)
+ EXPECT_FALSE(controller_impl->GetAnimationById(animation_id)
->affects_active_observers());
controller_impl->Animate(kInitialTickTime);
@@ -2120,18 +2122,17 @@
EXPECT_EQ(0.f, dummy_impl.opacity());
controller_impl->ActivateAnimations();
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity)
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id)
->affects_pending_observers());
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity)
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id)
->affects_active_observers());
controller_impl->UpdateState(true, events.get());
// Since the animation has been activated, it should have reached the
// Running state.
- EXPECT_EQ(
- Animation::Running,
- controller_impl->GetAnimation(group_id, Animation::Opacity)->run_state());
+ EXPECT_EQ(Animation::Running,
+ controller_impl->GetAnimationById(animation_id)->run_state());
controller_impl->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(500));
@@ -2186,22 +2187,21 @@
LayerAnimationController::Create(0));
controller->AddValueObserver(&dummy);
- AddOpacityTransitionToController(controller.get(), 1, 0.5f, 1.f, true);
- int group_id = controller->GetAnimation(Animation::Opacity)->group();
+ int animation_id =
+ AddOpacityTransitionToController(controller.get(), 1, 0.5f, 1.f, true);
controller->PushAnimationUpdatesTo(controller_impl.get());
controller_impl->ActivateAnimations();
controller_impl->Animate(kInitialTickTime);
controller_impl->UpdateState(true, events.get());
- EXPECT_EQ(
- Animation::Running,
- controller_impl->GetAnimation(group_id, Animation::Opacity)->run_state());
+ EXPECT_EQ(Animation::Running,
+ controller_impl->GetAnimationById(animation_id)->run_state());
EXPECT_EQ(0.5f, pending_dummy_impl.opacity());
EXPECT_EQ(0.5f, dummy_impl.opacity());
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity)
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id)
->affects_pending_observers());
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity)
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id)
->affects_active_observers());
// Delete the animation on the main-thread controller.
@@ -2210,9 +2210,9 @@
controller->PushAnimationUpdatesTo(controller_impl.get());
// The animation should no longer affect pending observers.
- EXPECT_FALSE(controller_impl->GetAnimation(group_id, Animation::Opacity)
+ EXPECT_FALSE(controller_impl->GetAnimationById(animation_id)
->affects_pending_observers());
- EXPECT_TRUE(controller_impl->GetAnimation(group_id, Animation::Opacity)
+ EXPECT_TRUE(controller_impl->GetAnimationById(animation_id)
->affects_active_observers());
controller_impl->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(500));
@@ -2244,9 +2244,8 @@
LayerAnimationController::Create(0));
controller->AddValueObserver(&dummy);
- AddOpacityTransitionToController(controller.get(), 1, 0.f, 1.f, true);
- int first_animation_group_id =
- controller->GetAnimation(Animation::Opacity)->group();
+ int first_animation_id =
+ AddOpacityTransitionToController(controller.get(), 1, 0.f, 1.f, true);
controller->PushAnimationUpdatesTo(controller_impl.get());
controller_impl->ActivateAnimations();
@@ -2257,24 +2256,19 @@
// new animation affecting the same property.
controller->RemoveAnimation(
controller->GetAnimation(Animation::Opacity)->id());
- AddOpacityTransitionToController(controller.get(), 1, 1.f, 0.5f, true);
- int second_animation_group_id =
- controller->GetAnimation(Animation::Opacity)->group();
+ int second_animation_id =
+ AddOpacityTransitionToController(controller.get(), 1, 1.f, 0.5f, true);
controller->PushAnimationUpdatesTo(controller_impl.get());
// The original animation should only affect active observers, and the new
// animation should only affect pending observers.
- EXPECT_FALSE(controller_impl->GetAnimation(first_animation_group_id,
- Animation::Opacity)
+ EXPECT_FALSE(controller_impl->GetAnimationById(first_animation_id)
->affects_pending_observers());
- EXPECT_TRUE(controller_impl->GetAnimation(first_animation_group_id,
- Animation::Opacity)
+ EXPECT_TRUE(controller_impl->GetAnimationById(first_animation_id)
->affects_active_observers());
- EXPECT_TRUE(controller_impl->GetAnimation(second_animation_group_id,
- Animation::Opacity)
+ EXPECT_TRUE(controller_impl->GetAnimationById(second_animation_id)
->affects_pending_observers());
- EXPECT_FALSE(controller_impl->GetAnimation(second_animation_group_id,
- Animation::Opacity)
+ EXPECT_FALSE(controller_impl->GetAnimationById(second_animation_id)
->affects_active_observers());
controller_impl->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(500));
@@ -2283,11 +2277,10 @@
// The original animation should still be running, and the new animation
// should be starting.
EXPECT_EQ(Animation::Running,
- controller_impl->GetAnimation(first_animation_group_id,
- Animation::Opacity)->run_state());
- EXPECT_EQ(Animation::Starting,
- controller_impl->GetAnimation(second_animation_group_id,
- Animation::Opacity)->run_state());
+ controller_impl->GetAnimationById(first_animation_id)->run_state());
+ EXPECT_EQ(
+ Animation::Starting,
+ controller_impl->GetAnimationById(second_animation_id)->run_state());
// The active observer should have been ticked by the original animation,
// and the pending observer should have been ticked by the new animation.
@@ -2298,13 +2291,10 @@
// The original animation should have been deleted, and the new animation
// should now affect both observers.
- EXPECT_FALSE(controller_impl->GetAnimation(first_animation_group_id,
- Animation::Opacity));
- EXPECT_TRUE(controller_impl->GetAnimation(second_animation_group_id,
- Animation::Opacity)
+ EXPECT_FALSE(controller_impl->GetAnimationById(first_animation_id));
+ EXPECT_TRUE(controller_impl->GetAnimationById(second_animation_id)
->affects_pending_observers());
- EXPECT_TRUE(controller_impl->GetAnimation(second_animation_group_id,
- Animation::Opacity)
+ EXPECT_TRUE(controller_impl->GetAnimationById(second_animation_id)
->affects_active_observers());
controller_impl->Animate(kInitialTickTime +
@@ -2313,9 +2303,9 @@
// The new animation should be running, and the active observer should have
// been ticked at the new animation's starting point.
- EXPECT_EQ(Animation::Running,
- controller_impl->GetAnimation(second_animation_group_id,
- Animation::Opacity)->run_state());
+ EXPECT_EQ(
+ Animation::Running,
+ controller_impl->GetAnimationById(second_animation_id)->run_state());
EXPECT_EQ(1.f, pending_dummy_impl.opacity());
EXPECT_EQ(1.f, dummy_impl.opacity());
}
diff --git a/cc/animation/layer_animation_value_observer.h b/cc/animation/layer_animation_value_observer.h
index fb9901d..acd7c9d 100644
--- a/cc/animation/layer_animation_value_observer.h
+++ b/cc/animation/layer_animation_value_observer.h
@@ -26,6 +26,7 @@
virtual void OnScrollOffsetAnimated(
const gfx::ScrollOffset& scroll_offset) = 0;
virtual void OnAnimationWaitingForDeletion() = 0;
+ virtual void OnScrollOffsetAnimationRemoved() = 0;
virtual bool IsActive() const = 0;
};
diff --git a/cc/base/math_util.cc b/cc/base/math_util.cc
index 816f6fc..99c3cf3 100644
--- a/cc/base/math_util.cc
+++ b/cc/base/math_util.cc
@@ -733,59 +733,85 @@
return res.Pass();
}
-void MathUtil::AddToTracedValue(const gfx::Size& s,
+void MathUtil::AddToTracedValue(const char* name,
+ const gfx::Size& s,
base::debug::TracedValue* res) {
+ res->BeginDictionary(name);
res->SetDouble("width", s.width());
res->SetDouble("height", s.height());
+ res->EndDictionary();
}
-void MathUtil::AddToTracedValue(const gfx::SizeF& s,
+void MathUtil::AddToTracedValue(const char* name,
+ const gfx::SizeF& s,
base::debug::TracedValue* res) {
+ res->BeginDictionary(name);
res->SetDouble("width", s.width());
res->SetDouble("height", s.height());
+ res->EndDictionary();
}
-void MathUtil::AddToTracedValue(const gfx::Rect& r,
+void MathUtil::AddToTracedValue(const char* name,
+ const gfx::Rect& r,
base::debug::TracedValue* res) {
+ res->BeginArray(name);
res->AppendInteger(r.x());
res->AppendInteger(r.y());
res->AppendInteger(r.width());
res->AppendInteger(r.height());
+ res->EndArray();
}
-void MathUtil::AddToTracedValue(const gfx::PointF& pt,
+void MathUtil::AddToTracedValue(const char* name,
+ const gfx::PointF& pt,
base::debug::TracedValue* res) {
+ res->BeginArray(name);
res->AppendDouble(pt.x());
res->AppendDouble(pt.y());
+ res->EndArray();
}
-void MathUtil::AddToTracedValue(const gfx::Point3F& pt,
+void MathUtil::AddToTracedValue(const char* name,
+ const gfx::Point3F& pt,
base::debug::TracedValue* res) {
+ res->BeginArray(name);
res->AppendDouble(pt.x());
res->AppendDouble(pt.y());
res->AppendDouble(pt.z());
+ res->EndArray();
}
-void MathUtil::AddToTracedValue(const gfx::Vector2d& v,
+void MathUtil::AddToTracedValue(const char* name,
+ const gfx::Vector2d& v,
base::debug::TracedValue* res) {
+ res->BeginArray(name);
res->AppendInteger(v.x());
res->AppendInteger(v.y());
+ res->EndArray();
}
-void MathUtil::AddToTracedValue(const gfx::Vector2dF& v,
+void MathUtil::AddToTracedValue(const char* name,
+ const gfx::Vector2dF& v,
base::debug::TracedValue* res) {
+ res->BeginArray(name);
res->AppendDouble(v.x());
res->AppendDouble(v.y());
+ res->EndArray();
}
-void MathUtil::AddToTracedValue(const gfx::ScrollOffset& v,
+void MathUtil::AddToTracedValue(const char* name,
+ const gfx::ScrollOffset& v,
base::debug::TracedValue* res) {
+ res->BeginArray(name);
res->AppendDouble(v.x());
res->AppendDouble(v.y());
+ res->EndArray();
}
-void MathUtil::AddToTracedValue(const gfx::QuadF& q,
+void MathUtil::AddToTracedValue(const char* name,
+ const gfx::QuadF& q,
base::debug::TracedValue* res) {
+ res->BeginArray(name);
res->AppendDouble(q.p1().x());
res->AppendDouble(q.p1().y());
res->AppendDouble(q.p2().x());
@@ -794,33 +820,43 @@
res->AppendDouble(q.p3().y());
res->AppendDouble(q.p4().x());
res->AppendDouble(q.p4().y());
+ res->EndArray();
}
-void MathUtil::AddToTracedValue(const gfx::RectF& rect,
+void MathUtil::AddToTracedValue(const char* name,
+ const gfx::RectF& rect,
base::debug::TracedValue* res) {
+ res->BeginArray(name);
res->AppendDouble(rect.x());
res->AppendDouble(rect.y());
res->AppendDouble(rect.width());
res->AppendDouble(rect.height());
+ res->EndArray();
}
-void MathUtil::AddToTracedValue(const gfx::Transform& transform,
+void MathUtil::AddToTracedValue(const char* name,
+ const gfx::Transform& transform,
base::debug::TracedValue* res) {
+ res->BeginArray(name);
const SkMatrix44& m = transform.matrix();
for (int row = 0; row < 4; ++row) {
for (int col = 0; col < 4; ++col)
res->AppendDouble(m.getDouble(row, col));
}
+ res->EndArray();
}
-void MathUtil::AddToTracedValue(const gfx::BoxF& box,
+void MathUtil::AddToTracedValue(const char* name,
+ const gfx::BoxF& box,
base::debug::TracedValue* res) {
+ res->BeginArray(name);
res->AppendInteger(box.x());
res->AppendInteger(box.y());
res->AppendInteger(box.z());
res->AppendInteger(box.width());
res->AppendInteger(box.height());
res->AppendInteger(box.depth());
+ res->EndArray();
}
double MathUtil::AsDoubleSafely(double value) {
diff --git a/cc/base/math_util.h b/cc/base/math_util.h
index 50494e1..d9cc43b 100644
--- a/cc/base/math_util.h
+++ b/cc/base/math_util.h
@@ -199,29 +199,41 @@
static bool FromValue(const base::Value*, gfx::Rect* out_rect);
static scoped_ptr<base::Value> AsValue(const gfx::PointF& q);
- static void AddToTracedValue(const gfx::Size& s,
+ static void AddToTracedValue(const char* name,
+ const gfx::Size& s,
base::debug::TracedValue* res);
- static void AddToTracedValue(const gfx::SizeF& s,
+ static void AddToTracedValue(const char* name,
+ const gfx::SizeF& s,
base::debug::TracedValue* res);
- static void AddToTracedValue(const gfx::Rect& r,
+ static void AddToTracedValue(const char* name,
+ const gfx::Rect& r,
base::debug::TracedValue* res);
- static void AddToTracedValue(const gfx::PointF& q,
+ static void AddToTracedValue(const char* name,
+ const gfx::PointF& q,
base::debug::TracedValue* res);
- static void AddToTracedValue(const gfx::Point3F&,
+ static void AddToTracedValue(const char* name,
+ const gfx::Point3F&,
base::debug::TracedValue* res);
- static void AddToTracedValue(const gfx::Vector2d& v,
+ static void AddToTracedValue(const char* name,
+ const gfx::Vector2d& v,
base::debug::TracedValue* res);
- static void AddToTracedValue(const gfx::Vector2dF& v,
+ static void AddToTracedValue(const char* name,
+ const gfx::Vector2dF& v,
base::debug::TracedValue* res);
- static void AddToTracedValue(const gfx::ScrollOffset& v,
+ static void AddToTracedValue(const char* name,
+ const gfx::ScrollOffset& v,
base::debug::TracedValue* res);
- static void AddToTracedValue(const gfx::QuadF& q,
+ static void AddToTracedValue(const char* name,
+ const gfx::QuadF& q,
base::debug::TracedValue* res);
- static void AddToTracedValue(const gfx::RectF& rect,
+ static void AddToTracedValue(const char* name,
+ const gfx::RectF& rect,
base::debug::TracedValue* res);
- static void AddToTracedValue(const gfx::Transform& transform,
+ static void AddToTracedValue(const char* name,
+ const gfx::Transform& transform,
base::debug::TracedValue* res);
- static void AddToTracedValue(const gfx::BoxF& box,
+ static void AddToTracedValue(const char* name,
+ const gfx::BoxF& box,
base::debug::TracedValue* res);
// Returns a base::Value representation of the floating point value.
diff --git a/cc/blink/BUILD.gn b/cc/blink/BUILD.gn
index f95291a..e930277 100644
--- a/cc/blink/BUILD.gn
+++ b/cc/blink/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//testing/test.gni")
+
# GYP version: //cc/blink/cc_blink.gyp:cc_blink
component("blink") {
output_name = "cc_blink"
diff --git a/cc/blink/web_display_item_list_impl.cc b/cc/blink/web_display_item_list_impl.cc
index d682b2d..fdd05df 100644
--- a/cc/blink/web_display_item_list_impl.cc
+++ b/cc/blink/web_display_item_list_impl.cc
@@ -8,6 +8,7 @@
#include "cc/blink/web_blend_mode.h"
#include "cc/resources/clip_display_item.h"
+#include "cc/resources/clip_path_display_item.h"
#include "cc/resources/drawing_display_item.h"
#include "cc/resources/filter_display_item.h"
#include "cc/resources/float_clip_display_item.h"
@@ -53,6 +54,17 @@
display_item_list_->AppendItem(cc::EndClipDisplayItem::Create());
}
+void WebDisplayItemListImpl::appendClipPathItem(const SkPath& clip_path,
+ SkRegion::Op clip_op,
+ bool antialias) {
+ display_item_list_->AppendItem(
+ cc::ClipPathDisplayItem::Create(clip_path, clip_op, antialias));
+}
+
+void WebDisplayItemListImpl::appendEndClipPathItem() {
+ display_item_list_->AppendItem(cc::EndClipPathDisplayItem::Create());
+}
+
void WebDisplayItemListImpl::appendFloatClipItem(
const blink::WebFloatRect& clip_rect) {
display_item_list_->AppendItem(cc::FloatClipDisplayItem::Create(clip_rect));
diff --git a/cc/blink/web_display_item_list_impl.h b/cc/blink/web_display_item_list_impl.h
index 28fd472..cd35975 100644
--- a/cc/blink/web_display_item_list_impl.h
+++ b/cc/blink/web_display_item_list_impl.h
@@ -13,9 +13,11 @@
#include "third_party/WebKit/public/platform/WebDisplayItemList.h"
#include "third_party/WebKit/public/platform/WebFloatPoint.h"
#include "third_party/WebKit/public/platform/WebVector.h"
+#include "third_party/skia/include/core/SkRegion.h"
class SkImageFilter;
class SkMatrix44;
+class SkPath;
class SkPicture;
class SkRRect;
@@ -35,6 +37,10 @@
const blink::WebRect& clip_rect,
const blink::WebVector<SkRRect>& rounded_clip_rects);
virtual void appendEndClipItem();
+ virtual void appendClipPathItem(const SkPath& clip_path,
+ SkRegion::Op clip_op,
+ bool antialias);
+ virtual void appendEndClipPathItem();
virtual void appendFloatClipItem(const blink::WebFloatRect& clip_rect);
virtual void appendEndFloatClipItem();
virtual void appendTransformItem(const SkMatrix44& matrix);
diff --git a/cc/cc.gyp b/cc/cc.gyp
index dfe632f..69d1907 100644
--- a/cc/cc.gyp
+++ b/cc/cc.gyp
@@ -106,6 +106,8 @@
'debug/devtools_instrumentation.h',
'debug/frame_rate_counter.cc',
'debug/frame_rate_counter.h',
+ 'debug/frame_timing_tracker.cc',
+ 'debug/frame_timing_tracker.h',
'debug/frame_viewer_instrumentation.cc',
'debug/frame_viewer_instrumentation.h',
'debug/invalidation_benchmark.cc',
@@ -364,6 +366,8 @@
'resources/bitmap_skpicture_content_layer_updater.h',
'resources/clip_display_item.cc',
'resources/clip_display_item.h',
+ 'resources/clip_path_display_item.cc',
+ 'resources/clip_path_display_item.h',
'resources/content_layer_updater.cc',
'resources/content_layer_updater.h',
'resources/display_item.cc',
diff --git a/cc/cc_tests.gyp b/cc/cc_tests.gyp
index 73c72a8..74cb1bf 100644
--- a/cc/cc_tests.gyp
+++ b/cc/cc_tests.gyp
@@ -23,6 +23,7 @@
'base/tiling_data_unittest.cc',
'base/unique_notifier_unittest.cc',
'base/util_unittest.cc',
+ 'debug/frame_timing_tracker_unittest.cc',
'debug/micro_benchmark_controller_unittest.cc',
'debug/rendering_stats_unittest.cc',
'input/top_controls_manager_unittest.cc',
@@ -43,6 +44,7 @@
'layers/nine_patch_layer_unittest.cc',
'layers/painted_scrollbar_layer_impl_unittest.cc',
'layers/picture_image_layer_impl_unittest.cc',
+ 'layers/picture_image_layer_unittest.cc',
'layers/picture_layer_impl_unittest.cc',
'layers/picture_layer_unittest.cc',
'layers/render_surface_unittest.cc',
diff --git a/cc/debug/frame_timing_tracker.cc b/cc/debug/frame_timing_tracker.cc
new file mode 100644
index 0000000..009d298
--- /dev/null
+++ b/cc/debug/frame_timing_tracker.cc
@@ -0,0 +1,59 @@
+// 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/debug/frame_timing_tracker.h"
+
+#include <algorithm>
+#include <limits>
+
+#include "base/metrics/histogram.h"
+#include "cc/trees/proxy.h"
+
+namespace cc {
+
+FrameTimingTracker::CompositeTimingEvent::CompositeTimingEvent(
+ int _frame_id,
+ base::TimeTicks _timestamp)
+ : frame_id(_frame_id), timestamp(_timestamp) {
+}
+
+FrameTimingTracker::CompositeTimingEvent::~CompositeTimingEvent() {
+}
+
+// static
+scoped_ptr<FrameTimingTracker> FrameTimingTracker::Create() {
+ return make_scoped_ptr(new FrameTimingTracker);
+}
+
+FrameTimingTracker::FrameTimingTracker() {
+}
+
+FrameTimingTracker::~FrameTimingTracker() {
+}
+
+void FrameTimingTracker::SaveTimeStamps(
+ base::TimeTicks timestamp,
+ const std::vector<FrameAndRectIds>& frame_ids) {
+ if (!composite_events_)
+ composite_events_.reset(new CompositeTimingSet);
+ for (const auto& pair : frame_ids)
+ (*composite_events_)[pair.second].push_back(
+ CompositeTimingEvent(pair.first, timestamp));
+}
+
+scoped_ptr<FrameTimingTracker::CompositeTimingSet>
+FrameTimingTracker::GroupCountsByRectId() {
+ if (!composite_events_)
+ return make_scoped_ptr(new CompositeTimingSet);
+ scoped_ptr<CompositeTimingSet> composite_info(new CompositeTimingSet);
+ for (auto& infos : *composite_events_)
+ std::sort(
+ infos.second.begin(), infos.second.end(),
+ [](const CompositeTimingEvent& lhs, const CompositeTimingEvent& rhs) {
+ return lhs.timestamp < rhs.timestamp;
+ });
+ return composite_events_.Pass();
+}
+
+} // namespace cc
diff --git a/cc/debug/frame_timing_tracker.h b/cc/debug/frame_timing_tracker.h
new file mode 100644
index 0000000..019fe79
--- /dev/null
+++ b/cc/debug/frame_timing_tracker.h
@@ -0,0 +1,63 @@
+// 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_DEBUG_FRAME_TIMING_TRACKER_H_
+#define CC_DEBUG_FRAME_TIMING_TRACKER_H_
+
+#include <utility>
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/containers/hash_tables.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/time/time.h"
+#include "cc/base/cc_export.h"
+
+namespace cc {
+
+// This class maintains a history of timestamps and rect IDs to communicate
+// frame events back to Blink
+// TODO(mpb): Start using this. crbug.com/442554
+class CC_EXPORT FrameTimingTracker {
+ public:
+ struct CC_EXPORT CompositeTimingEvent {
+ CompositeTimingEvent(int, base::TimeTicks);
+ ~CompositeTimingEvent();
+
+ int frame_id;
+ base::TimeTicks timestamp;
+ };
+
+ using CompositeTimingSet =
+ base::hash_map<int, std::vector<CompositeTimingEvent>>;
+
+ static scoped_ptr<FrameTimingTracker> Create();
+
+ ~FrameTimingTracker();
+
+ // This routine takes all of the individual CompositeEvents stored in the
+ // tracker and collects them by "rect_id", as in the example below.
+ // [ {f_id1,r_id1,t1}, {f_id2,r_id1,t2}, {f_id3,r_id2,t3} ]
+ // ====>
+ // [ {r_id1,<{f_id1,t1},{f_id2,t2}>}, {r_id2,<{f_id3,t3}>} ]
+ scoped_ptr<CompositeTimingSet> GroupCountsByRectId();
+
+ // This routine takes a timestamp and an array of frame_id,rect_id pairs
+ // and generates CompositeTimingEvents (frame_id, timestamp) and adds them to
+ // internal hash_map keyed on rect_id
+ using FrameAndRectIds = std::pair<int, int64_t>;
+ void SaveTimeStamps(base::TimeTicks timestamp,
+ const std::vector<FrameAndRectIds>& frame_ids);
+
+ private:
+ FrameTimingTracker();
+
+ scoped_ptr<CompositeTimingSet> composite_events_;
+
+ DISALLOW_COPY_AND_ASSIGN(FrameTimingTracker);
+};
+
+} // namespace cc
+
+#endif // CC_DEBUG_FRAME_TIMING_TRACKER_H_
diff --git a/cc/debug/frame_timing_tracker_unittest.cc b/cc/debug/frame_timing_tracker_unittest.cc
new file mode 100644
index 0000000..b27dd07
--- /dev/null
+++ b/cc/debug/frame_timing_tracker_unittest.cc
@@ -0,0 +1,125 @@
+// 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 <string>
+
+#include "base/debug/trace_event_argument.h"
+#include "base/time/time.h"
+#include "base/values.h"
+#include "cc/debug/frame_timing_tracker.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace cc {
+namespace {
+
+static std::string ToString(
+ scoped_ptr<FrameTimingTracker::CompositeTimingSet> timingset) {
+ scoped_refptr<base::debug::TracedValue> value =
+ new base::debug::TracedValue();
+ value->BeginArray("values");
+ for (const auto& it : *timingset) {
+ value->BeginDictionary();
+ value->SetInteger("rect_id", it.first);
+ value->BeginArray("events");
+ for (const auto& event : it.second) {
+ value->BeginDictionary();
+ value->SetInteger("frame_id", event.frame_id);
+ value->SetInteger("timestamp", event.timestamp.ToInternalValue());
+ value->EndDictionary();
+ }
+ value->EndArray();
+ value->EndDictionary();
+ }
+ value->EndArray();
+ return value->ToString();
+}
+
+TEST(FrameTimingTrackerTest, DefaultTrackerIsEmpty) {
+ scoped_ptr<FrameTimingTracker> tracker(FrameTimingTracker::Create());
+ EXPECT_EQ("{\"values\":[]}", ToString(tracker->GroupCountsByRectId()));
+}
+
+TEST(FrameTimingTrackerTest, NoFrameIdsIsEmpty) {
+ scoped_ptr<FrameTimingTracker> tracker(FrameTimingTracker::Create());
+ std::vector<std::pair<int, int64_t>> ids;
+ tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(100), ids);
+ EXPECT_EQ("{\"values\":[]}", ToString(tracker->GroupCountsByRectId()));
+}
+
+TEST(FrameTimingTrackerTest, OneFrameId) {
+ scoped_ptr<FrameTimingTracker> tracker(FrameTimingTracker::Create());
+ std::vector<std::pair<int, int64_t>> ids;
+ ids.push_back(std::make_pair(1, 2));
+ tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(100), ids);
+ EXPECT_EQ(
+ "{\"values\":[{\"events\":["
+ "{\"frame_id\":1,\"timestamp\":100}],\"rect_id\":2}]}",
+ ToString(tracker->GroupCountsByRectId()));
+}
+
+TEST(FrameTimingTrackerTest, UnsortedTimestampsIds) {
+ scoped_ptr<FrameTimingTracker> tracker(FrameTimingTracker::Create());
+ std::vector<std::pair<int, int64_t>> ids;
+ ids.push_back(std::make_pair(1, 2));
+ tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(200), ids);
+ tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(400), ids);
+ tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(100), ids);
+ EXPECT_EQ(
+ "{\"values\":[{\"events\":["
+ "{\"frame_id\":1,\"timestamp\":100},"
+ "{\"frame_id\":1,\"timestamp\":200},"
+ "{\"frame_id\":1,\"timestamp\":400}],\"rect_id\":2}]}",
+ ToString(tracker->GroupCountsByRectId()));
+}
+
+TEST(FrameTimingTrackerTest, MultipleFrameIds) {
+ scoped_ptr<FrameTimingTracker> tracker(FrameTimingTracker::Create());
+
+ std::vector<std::pair<int, int64_t>> ids200;
+ ids200.push_back(std::make_pair(1, 2));
+ ids200.push_back(std::make_pair(1, 3));
+ tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(200), ids200);
+
+ std::vector<std::pair<int, int64_t>> ids400;
+ ids400.push_back(std::make_pair(2, 2));
+ tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(400), ids400);
+
+ std::vector<std::pair<int, int64_t>> ids100;
+ ids100.push_back(std::make_pair(3, 2));
+ ids100.push_back(std::make_pair(2, 3));
+ ids100.push_back(std::make_pair(3, 4));
+ tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(100), ids100);
+
+ std::string result = ToString(tracker->GroupCountsByRectId());
+
+ EXPECT_EQ(strlen(
+ "{\"values\":[{\"events\":["
+ "{\"frame_id\":3,\"timestamp\":100},"
+ "{\"frame_id\":1,\"timestamp\":200},"
+ "{\"frame_id\":2,\"timestamp\":400}],\"rect_id\":2},"
+ "{\"events\":["
+ "{\"frame_id\":2,\"timestamp\":100},"
+ "{\"frame_id\":1,\"timestamp\":200}],\"rect_id\":3},"
+ "{\"events\":["
+ "{\"frame_id\":3,\"timestamp\":100}],\"rect_id\":4}"
+ "]}"),
+ result.size());
+ EXPECT_NE(std::string::npos,
+ result.find(
+ "{\"frame_id\":3,\"timestamp\":100},"
+ "{\"frame_id\":1,\"timestamp\":200},"
+ "{\"frame_id\":2,\"timestamp\":400}],\"rect_id\":2}"));
+ EXPECT_NE(std::string::npos,
+ result.find(
+ "{\"events\":["
+ "{\"frame_id\":2,\"timestamp\":100},"
+ "{\"frame_id\":1,\"timestamp\":200}],\"rect_id\":3}"));
+ EXPECT_NE(std::string::npos,
+ result.find(
+ "{\"events\":["
+ "{\"frame_id\":3,\"timestamp\":100}],\"rect_id\":4}"));
+}
+
+} // namespace
+} // namespace cc
diff --git a/cc/debug/picture_record_benchmark.cc b/cc/debug/picture_record_benchmark.cc
index ab50c7c..cc01448 100644
--- a/cc/debug/picture_record_benchmark.cc
+++ b/cc/debug/picture_record_benchmark.cc
@@ -13,7 +13,6 @@
#include "cc/resources/picture.h"
#include "cc/trees/layer_tree_host.h"
#include "cc/trees/layer_tree_host_common.h"
-#include "third_party/skia/include/core/SkBBHFactory.h"
#include "ui/gfx/geometry/rect.h"
namespace cc {
@@ -22,7 +21,6 @@
const int kPositionIncrement = 100;
const int kTileGridSize = 512;
-const int kTileGridBorder = 1;
} // namespace
@@ -93,11 +91,7 @@
ContentLayerClient* painter = layer->client();
gfx::Size content_bounds = layer->content_bounds();
- SkTileGridFactory::TileGridInfo tile_grid_info;
- tile_grid_info.fTileInterval.set(kTileGridSize - 2 * kTileGridBorder,
- kTileGridSize - 2 * kTileGridBorder);
- tile_grid_info.fMargin.set(kTileGridBorder, kTileGridBorder);
- tile_grid_info.fOffset.set(-kTileGridBorder, -kTileGridBorder);
+ gfx::Size tile_grid_size(kTileGridSize, kTileGridSize);
for (size_t i = 0; i < dimensions_.size(); ++i) {
std::pair<int, int> dimensions = dimensions_[i];
@@ -113,7 +107,7 @@
base::TimeTicks start = base::TimeTicks::HighResNow();
scoped_refptr<Picture> picture = Picture::Create(
- rect, painter, tile_grid_info, false, Picture::RECORD_NORMALLY);
+ rect, painter, tile_grid_size, false, Picture::RECORD_NORMALLY);
base::TimeTicks end = base::TimeTicks::HighResNow();
base::TimeDelta duration = end - start;
diff --git a/cc/debug/rasterize_and_record_benchmark.cc b/cc/debug/rasterize_and_record_benchmark.cc
index 41d6210..51edc98 100644
--- a/cc/debug/rasterize_and_record_benchmark.cc
+++ b/cc/debug/rasterize_and_record_benchmark.cc
@@ -108,9 +108,6 @@
DCHECK(host_);
gfx::Size tile_grid_size = host_->settings().default_tile_size;
- SkTileGridFactory::TileGridInfo tile_grid_info;
- PicturePile::ComputeTileGridInfo(tile_grid_size, &tile_grid_info);
-
gfx::Rect visible_content_rect = gfx::ScaleToEnclosingRect(
layer->visible_content_rect(), 1.f / layer->contents_scale_x());
if (visible_content_rect.IsEmpty())
@@ -136,7 +133,7 @@
kTimeCheckInterval);
scoped_refptr<Picture> picture;
do {
- picture = Picture::Create(visible_content_rect, painter, tile_grid_info,
+ picture = Picture::Create(visible_content_rect, painter, tile_grid_size,
false, mode);
timer.NextLap();
} while (!timer.HasTimeLimitExpired());
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index fb72c73..3817115 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -71,6 +71,7 @@
force_render_surface_(false),
transform_is_invertible_(true),
has_render_surface_(false),
+ clear_impl_scroll_delta_(false),
background_color_(0),
opacity_(1.f),
blend_mode_(SkXfermode::kSrcOver_Mode),
@@ -970,12 +971,18 @@
// in LayerImpl::ApplyScrollDeltasSinceBeginMainFrame in a separate tree walk.
if (layer->layer_tree_impl()->settings().impl_side_painting) {
layer->SetScrollOffset(scroll_offset_);
+ if (clear_impl_scroll_delta_)
+ layer->ClearScrollDeltaAtActivation();
} else {
- layer->SetScrollOffsetAndDelta(
- scroll_offset_,
- layer->ScrollDelta() - layer->sent_scroll_delta());
+ if (clear_impl_scroll_delta_) {
+ layer->SetScrollOffsetAndDelta(scroll_offset_, gfx::Vector2dF());
+ } else {
+ layer->SetScrollOffsetAndDelta(
+ scroll_offset_, layer->ScrollDelta() - layer->sent_scroll_delta());
+ }
layer->SetSentScrollDelta(gfx::Vector2dF());
}
+ clear_impl_scroll_delta_ = false;
// Wrap the copy_requests_ in a PostTask to the main thread.
ScopedPtrVector<CopyOutputRequest> main_thread_copy_requests;
@@ -1145,6 +1152,10 @@
SetNeedsPushProperties();
}
+void Layer::OnScrollOffsetAnimationRemoved() {
+ clear_impl_scroll_delta_ = true;
+}
+
bool Layer::IsActive() const {
return true;
}
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index 017df68..91dbdee 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -607,6 +607,7 @@
void OnTransformAnimated(const gfx::Transform& transform) override;
void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override;
void OnAnimationWaitingForDeletion() override;
+ void OnScrollOffsetAnimationRemoved() override;
bool IsActive() const override;
// If this layer has a scroll parent, it removes |this| from its list of
@@ -659,6 +660,7 @@
bool force_render_surface_ : 1;
bool transform_is_invertible_ : 1;
bool has_render_surface_ : 1;
+ bool clear_impl_scroll_delta_ : 1;
Region non_fast_scrollable_region_;
Region touch_event_handler_region_;
gfx::PointF position_;
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 281a3ae..d6e2a23 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -60,6 +60,7 @@
draw_checkerboard_for_missing_tiles_(false),
draws_content_(false),
hide_layer_and_subtree_(false),
+ clear_scroll_delta_at_activation_(false),
transform_is_invertible_(true),
is_container_for_fixed_position_layers_(false),
background_color_(0),
@@ -356,6 +357,10 @@
sent_scroll_delta_ = sent_scroll_delta;
}
+void LayerImpl::ClearScrollDeltaAtActivation() {
+ clear_scroll_delta_at_activation_ = true;
+}
+
gfx::Vector2dF LayerImpl::ScrollBy(const gfx::Vector2dF& scroll) {
gfx::Vector2dF adjusted_scroll = scroll;
if (layer_tree_impl()->settings().use_pinch_virtual_viewport) {
@@ -544,7 +549,11 @@
// Save the difference but clear the sent delta so that we don't subtract
// it again in SetScrollOffsetAndDelta's pending twin mirroring logic.
gfx::Vector2dF remaining_delta =
- layer->ScrollDelta() - layer->sent_scroll_delta();
+ clear_scroll_delta_at_activation_
+ ? gfx::Vector2dF()
+ : layer->ScrollDelta() - layer->sent_scroll_delta();
+ clear_scroll_delta_at_activation_ = false;
+
layer->SetSentScrollDelta(gfx::Vector2dF());
layer->SetScrollOffsetAndDelta(scroll_offset_, remaining_delta);
@@ -782,6 +791,9 @@
void LayerImpl::OnAnimationWaitingForDeletion() {}
+void LayerImpl::OnScrollOffsetAnimationRemoved() {
+}
+
bool LayerImpl::IsActive() const {
return layer_tree_impl_->IsActiveTree();
}
@@ -1162,6 +1174,8 @@
}
void LayerImpl::SetScrollDelta(const gfx::Vector2dF& scroll_delta) {
+ if (!IsActive() && clear_scroll_delta_at_activation_)
+ return;
SetScrollOffsetAndDelta(scroll_offset_, scroll_delta);
}
@@ -1452,35 +1466,24 @@
LayerTypeAsString(),
this);
state->SetInteger("layer_id", id());
- state->BeginDictionary("bounds");
- MathUtil::AddToTracedValue(bounds_, state);
- state->EndDictionary();
+ MathUtil::AddToTracedValue("bounds", bounds_, state);
state->SetDouble("opacity", opacity());
- state->BeginArray("position");
- MathUtil::AddToTracedValue(position_, state);
- state->EndArray();
+ MathUtil::AddToTracedValue("position", position_, state);
state->SetInteger("draws_content", DrawsContent());
state->SetInteger("gpu_memory_usage", GPUMemoryUsageInBytes());
- state->BeginArray("scroll_offset");
- MathUtil::AddToTracedValue(scroll_offset_, state);
- state->EndArray();
-
- state->BeginArray("transform_origin");
- MathUtil::AddToTracedValue(transform_origin_, state);
- state->EndArray();
+ MathUtil::AddToTracedValue("scroll_offset", scroll_offset_, state);
+ MathUtil::AddToTracedValue("transform_origin", transform_origin_, state);
bool clipped;
gfx::QuadF layer_quad = MathUtil::MapQuad(
screen_space_transform(),
gfx::QuadF(gfx::Rect(content_bounds())),
&clipped);
- state->BeginArray("layer_quad");
- MathUtil::AddToTracedValue(layer_quad, state);
- state->EndArray();
+ MathUtil::AddToTracedValue("layer_quad", layer_quad, state);
if (!touch_event_handler_region_.IsEmpty()) {
state->BeginArray("touch_event_handler_region");
touch_event_handler_region_.AsValueInto(state);
@@ -1538,11 +1541,8 @@
layer_animation_controller()->HasAnimationThatInflatesBounds());
gfx::BoxF box;
- if (LayerUtils::GetAnimationBounds(*this, &box)) {
- state->BeginArray("animation_bounds");
- MathUtil::AddToTracedValue(box, state);
- state->EndArray();
- }
+ if (LayerUtils::GetAnimationBounds(*this, &box))
+ MathUtil::AddToTracedValue("animation_bounds", box, state);
if (debug_info_.get()) {
std::string str;
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index d1cf053..b205143 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -108,6 +108,7 @@
void OnTransformAnimated(const gfx::Transform& transform) override;
void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override;
void OnAnimationWaitingForDeletion() override;
+ void OnScrollOffsetAnimationRemoved() override;
bool IsActive() const override;
// AnimationDelegate implementation.
@@ -404,6 +405,8 @@
void SetSentScrollDelta(const gfx::Vector2dF& sent_scroll_delta);
gfx::Vector2dF sent_scroll_delta() const { return sent_scroll_delta_; }
+ void ClearScrollDeltaAtActivation();
+
// Returns the delta of the scroll that was outside of the bounds of the
// initial scroll
gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll);
@@ -646,6 +649,7 @@
bool draw_checkerboard_for_missing_tiles_ : 1;
bool draws_content_ : 1;
bool hide_layer_and_subtree_ : 1;
+ bool clear_scroll_delta_at_activation_ : 1;
// Cache transform_'s invertibility.
bool transform_is_invertible_ : 1;
diff --git a/cc/layers/painted_scrollbar_layer_impl.cc b/cc/layers/painted_scrollbar_layer_impl.cc
index 152f14d..068d42f 100644
--- a/cc/layers/painted_scrollbar_layer_impl.cc
+++ b/cc/layers/painted_scrollbar_layer_impl.cc
@@ -35,9 +35,8 @@
thumb_thickness_(0),
thumb_length_(0),
track_start_(0),
- track_length_(0),
- vertical_adjust_(0.f),
- scroll_layer_id_(Layer::INVALID_ID) {}
+ track_length_(0) {
+}
PaintedScrollbarLayerImpl::~PaintedScrollbarLayerImpl() {}
diff --git a/cc/layers/painted_scrollbar_layer_impl.h b/cc/layers/painted_scrollbar_layer_impl.h
index d54de6b..8708b74 100644
--- a/cc/layers/painted_scrollbar_layer_impl.h
+++ b/cc/layers/painted_scrollbar_layer_impl.h
@@ -68,12 +68,6 @@
int track_start_;
int track_length_;
- // Difference between the clip layer's height and the visible viewport
- // height (which may differ in the presence of top-controls hiding).
- float vertical_adjust_;
-
- int scroll_layer_id_;
-
DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayerImpl);
};
diff --git a/cc/layers/picture_image_layer.cc b/cc/layers/picture_image_layer.cc
index cebc8b7..85bc582 100644
--- a/cc/layers/picture_image_layer.cc
+++ b/cc/layers/picture_image_layer.cc
@@ -5,7 +5,10 @@
#include "cc/layers/picture_image_layer.h"
#include "cc/layers/picture_image_layer_impl.h"
+#include "cc/resources/drawing_display_item.h"
#include "third_party/skia/include/core/SkCanvas.h"
+#include "third_party/skia/include/core/SkPictureRecorder.h"
+#include "ui/gfx/skia_util.h"
namespace cc {
@@ -63,8 +66,16 @@
scoped_refptr<DisplayItemList> PictureImageLayer::PaintContentsToDisplayList(
const gfx::Rect& clip,
GraphicsContextStatus gc_status) {
- NOTIMPLEMENTED();
- return DisplayItemList::Create();
+ scoped_refptr<DisplayItemList> display_item_list = DisplayItemList::Create();
+
+ SkPictureRecorder recorder;
+ SkCanvas* canvas = recorder.beginRecording(gfx::RectToSkRect(clip));
+ PaintContents(canvas, clip, gc_status);
+
+ skia::RefPtr<SkPicture> picture = skia::AdoptRef(recorder.endRecording());
+ display_item_list->AppendItem(
+ DrawingDisplayItem::Create(picture, gfx::Point()));
+ return display_item_list;
}
bool PictureImageLayer::FillsBoundsCompletely() const {
diff --git a/cc/layers/picture_image_layer_unittest.cc b/cc/layers/picture_image_layer_unittest.cc
new file mode 100644
index 0000000..acf691d
--- /dev/null
+++ b/cc/layers/picture_image_layer_unittest.cc
@@ -0,0 +1,46 @@
+// 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/layers/picture_image_layer.h"
+
+#include "cc/resources/display_item.h"
+#include "cc/test/skia_common.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+#include "third_party/skia/include/core/SkCanvas.h"
+#include "third_party/skia/include/core/SkColor.h"
+
+namespace cc {
+namespace {
+
+TEST(PictureImageLayerTest, PaintContentsToDisplayList) {
+ scoped_refptr<PictureImageLayer> layer = PictureImageLayer::Create();
+ gfx::Rect layer_rect(200, 200);
+
+ SkBitmap image_bitmap;
+ unsigned char image_pixels[4 * 200 * 200] = {0};
+ SkImageInfo info =
+ SkImageInfo::MakeN32Premul(layer_rect.width(), layer_rect.height());
+ image_bitmap.installPixels(info, image_pixels, info.minRowBytes());
+ SkCanvas image_canvas(image_bitmap);
+ image_canvas.clear(SK_ColorRED);
+ SkPaint blue_paint;
+ blue_paint.setColor(SK_ColorBLUE);
+ image_canvas.drawRectCoords(0.f, 0.f, 100.f, 100.f, blue_paint);
+ image_canvas.drawRectCoords(100.f, 100.f, 200.f, 200.f, blue_paint);
+
+ layer->SetBitmap(image_bitmap);
+ layer->SetBounds(gfx::Size(layer_rect.width(), layer_rect.height()));
+
+ scoped_refptr<DisplayItemList> display_list =
+ layer->PaintContentsToDisplayList(
+ layer_rect, ContentLayerClient::GRAPHICS_CONTEXT_ENABLED);
+ unsigned char actual_pixels[4 * 200 * 200] = {0};
+ DrawDisplayList(actual_pixels, layer_rect, display_list);
+
+ EXPECT_EQ(0, memcmp(actual_pixels, image_pixels, 4 * 200 * 200));
+}
+
+} // namespace
+} // namespace cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 8db30c6..6845a07 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -1179,13 +1179,10 @@
tilings_->AsValueInto(state);
state->EndArray();
- state->BeginArray("tile_priority_rect");
- MathUtil::AddToTracedValue(GetViewportForTilePriorityInContentSpace(), state);
- state->EndArray();
+ MathUtil::AddToTracedValue("tile_priority_rect",
+ GetViewportForTilePriorityInContentSpace(), state);
- state->BeginArray("visible_rect");
- MathUtil::AddToTracedValue(visible_content_rect(), state);
- state->EndArray();
+ MathUtil::AddToTracedValue("visible_rect", visible_content_rect(), state);
state->BeginArray("pictures");
raster_source_->AsValueInto(state);
@@ -1202,9 +1199,7 @@
iter; ++iter) {
state->BeginDictionary();
- state->BeginArray("geometry_rect");
- MathUtil::AddToTracedValue(iter.geometry_rect(), state);
- state->EndArray();
+ MathUtil::AddToTracedValue("geometry_rect", iter.geometry_rect(), state);
if (*iter)
TracedValue::SetIDRef(*iter, state, "tile");
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index 6709b10..0c22377 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -2930,6 +2930,23 @@
EXPECT_TRUE(queue->IsEmpty());
}
+TEST_F(PictureLayerImplTest, TilingSetRasterQueueRequiredNoHighRes) {
+ scoped_refptr<FakePicturePileImpl> pending_pile =
+ FakePicturePileImpl::CreateEmptyPile(gfx::Size(256, 256),
+ gfx::Size(1024, 1024));
+ pending_pile->set_is_solid_color(true);
+
+ SetupPendingTree(pending_pile);
+ EXPECT_FALSE(
+ pending_layer_->picture_layer_tiling_set()->FindTilingWithResolution(
+ HIGH_RESOLUTION));
+
+ scoped_ptr<TilingSetRasterQueue> queue(new TilingSetRasterQueueRequired(
+ pending_layer_->picture_layer_tiling_set(),
+ RasterTilePriorityQueue::Type::REQUIRED_FOR_ACTIVATION));
+ EXPECT_TRUE(queue->IsEmpty());
+}
+
TEST_F(PictureLayerImplTest, TilingSetEvictionQueue) {
gfx::Size tile_size(100, 100);
gfx::Size layer_bounds(1000, 1000);
diff --git a/cc/layers/picture_layer_unittest.cc b/cc/layers/picture_layer_unittest.cc
index ac20e4c..9327e13 100644
--- a/cc/layers/picture_layer_unittest.cc
+++ b/cc/layers/picture_layer_unittest.cc
@@ -106,10 +106,10 @@
host->SetRootLayer(layer);
// Tile-grid is set according to its setting.
- SkTileGridFactory::TileGridInfo info =
- layer->GetRecordingSourceForTesting()->GetTileGridInfoForTesting();
- EXPECT_EQ(info.fTileInterval.width(), 123 - 2 * info.fMargin.width());
- EXPECT_EQ(info.fTileInterval.height(), 123 - 2 * info.fMargin.height());
+ gfx::Size size =
+ layer->GetRecordingSourceForTesting()->GetTileGridSizeForTesting();
+ EXPECT_EQ(size.width(), 123);
+ EXPECT_EQ(size.height(), 123);
}
} // namespace
diff --git a/cc/layers/tiled_layer_impl.cc b/cc/layers/tiled_layer_impl.cc
index a36c030..5816fc5 100644
--- a/cc/layers/tiled_layer_impl.cc
+++ b/cc/layers/tiled_layer_impl.cc
@@ -107,9 +107,7 @@
void TiledLayerImpl::AsValueInto(base::debug::TracedValue* state) const {
LayerImpl::AsValueInto(state);
- state->BeginArray("invalidation");
- MathUtil::AddToTracedValue(update_rect(), state);
- state->EndArray();
+ MathUtil::AddToTracedValue("invalidation", update_rect(), state);
}
size_t TiledLayerImpl::GPUMemoryUsageInBytes() const {
diff --git a/cc/output/filter_operation.cc b/cc/output/filter_operation.cc
index 173985b..b4a84bd 100644
--- a/cc/output/filter_operation.cc
+++ b/cc/output/filter_operation.cc
@@ -272,9 +272,7 @@
break;
case FilterOperation::DROP_SHADOW:
value->SetDouble("std_deviation", amount_);
- value->BeginArray("offset");
- MathUtil::AddToTracedValue(drop_shadow_offset_, value);
- value->EndArray();
+ MathUtil::AddToTracedValue("offset", drop_shadow_offset_, value);
value->SetInteger("color", drop_shadow_color_);
break;
case FilterOperation::COLOR_MATRIX: {
diff --git a/cc/quads/content_draw_quad_base.cc b/cc/quads/content_draw_quad_base.cc
index 7304498..0a2a2f4 100644
--- a/cc/quads/content_draw_quad_base.cc
+++ b/cc/quads/content_draw_quad_base.cc
@@ -55,13 +55,8 @@
}
void ContentDrawQuadBase::ExtendValue(base::debug::TracedValue* value) const {
- value->BeginArray("tex_coord_rect");
- MathUtil::AddToTracedValue(tex_coord_rect, value);
- value->EndArray();
-
- value->BeginDictionary("texture_size");
- MathUtil::AddToTracedValue(texture_size, value);
- value->EndDictionary();
+ MathUtil::AddToTracedValue("tex_coord_rect", tex_coord_rect, value);
+ MathUtil::AddToTracedValue("texture_size", texture_size, value);
value->SetBoolean("swizzle_contents", swizzle_contents);
value->SetBoolean("nearest_neighbor", nearest_neighbor);
diff --git a/cc/quads/draw_quad.cc b/cc/quads/draw_quad.cc
index 7322a7a..f8f00b6 100644
--- a/cc/quads/draw_quad.cc
+++ b/cc/quads/draw_quad.cc
@@ -61,39 +61,31 @@
value->SetInteger("material", material);
TracedValue::SetIDRef(shared_quad_state, value, "shared_state");
- value->BeginArray("content_space_rect");
- MathUtil::AddToTracedValue(rect, value);
- value->EndArray();
+ MathUtil::AddToTracedValue("content_space_rect", rect, value);
bool rect_is_clipped;
gfx::QuadF rect_as_target_space_quad = MathUtil::MapQuad(
shared_quad_state->content_to_target_transform,
gfx::QuadF(rect),
&rect_is_clipped);
- value->BeginArray("rect_as_target_space_quad");
- MathUtil::AddToTracedValue(rect_as_target_space_quad, value);
- value->EndArray();
+ MathUtil::AddToTracedValue("rect_as_target_space_quad",
+ rect_as_target_space_quad, value);
value->SetBoolean("rect_is_clipped", rect_is_clipped);
- value->BeginArray("content_space_opaque_rect");
- MathUtil::AddToTracedValue(opaque_rect, value);
- value->EndArray();
+ MathUtil::AddToTracedValue("content_space_opaque_rect", opaque_rect, value);
bool opaque_rect_is_clipped;
gfx::QuadF opaque_rect_as_target_space_quad = MathUtil::MapQuad(
shared_quad_state->content_to_target_transform,
gfx::QuadF(opaque_rect),
&opaque_rect_is_clipped);
- value->BeginArray("opaque_rect_as_target_space_quad");
- MathUtil::AddToTracedValue(opaque_rect_as_target_space_quad, value);
- value->EndArray();
+ MathUtil::AddToTracedValue("opaque_rect_as_target_space_quad",
+ opaque_rect_as_target_space_quad, value);
value->SetBoolean("opaque_rect_is_clipped", opaque_rect_is_clipped);
- value->BeginArray("content_space_visible_rect");
- MathUtil::AddToTracedValue(visible_rect, value);
- value->EndArray();
+ MathUtil::AddToTracedValue("content_space_visible_rect", visible_rect, value);
bool visible_rect_is_clipped;
gfx::QuadF visible_rect_as_target_space_quad = MathUtil::MapQuad(
@@ -101,9 +93,8 @@
gfx::QuadF(visible_rect),
&visible_rect_is_clipped);
- value->BeginArray("visible_rect_as_target_space_quad");
- MathUtil::AddToTracedValue(visible_rect_as_target_space_quad, value);
- value->EndArray();
+ MathUtil::AddToTracedValue("visible_rect_as_target_space_quad",
+ visible_rect_as_target_space_quad, value);
value->SetBoolean("visible_rect_is_clipped", visible_rect_is_clipped);
diff --git a/cc/quads/io_surface_draw_quad.cc b/cc/quads/io_surface_draw_quad.cc
index e565a43..b0eba53 100644
--- a/cc/quads/io_surface_draw_quad.cc
+++ b/cc/quads/io_surface_draw_quad.cc
@@ -58,9 +58,7 @@
}
void IOSurfaceDrawQuad::ExtendValue(base::debug::TracedValue* value) const {
- value->BeginDictionary("io_surface_size");
- MathUtil::AddToTracedValue(io_surface_size, value);
- value->EndDictionary();
+ MathUtil::AddToTracedValue("io_surface_size", io_surface_size, value);
value->SetInteger("io_surface_resource_id", io_surface_resource_id);
const char* orientation_string = NULL;
diff --git a/cc/quads/picture_draw_quad.cc b/cc/quads/picture_draw_quad.cc
index 2171542..24c8c15 100644
--- a/cc/quads/picture_draw_quad.cc
+++ b/cc/quads/picture_draw_quad.cc
@@ -86,9 +86,7 @@
void PictureDrawQuad::ExtendValue(base::debug::TracedValue* value) const {
ContentDrawQuadBase::ExtendValue(value);
- value->BeginArray("content_rect");
- MathUtil::AddToTracedValue(content_rect, value);
- value->EndArray();
+ MathUtil::AddToTracedValue("content_rect", content_rect, value);
value->SetDouble("contents_scale", contents_scale);
value->SetInteger("texture_format", texture_format);
// TODO(piman): raster_source?
diff --git a/cc/quads/render_pass.cc b/cc/quads/render_pass.cc
index a1426f5..0a77a90 100644
--- a/cc/quads/render_pass.cc
+++ b/cc/quads/render_pass.cc
@@ -181,13 +181,8 @@
}
void RenderPass::AsValueInto(base::debug::TracedValue* value) const {
- value->BeginArray("output_rect");
- MathUtil::AddToTracedValue(output_rect, value);
- value->EndArray();
-
- value->BeginArray("damage_rect");
- MathUtil::AddToTracedValue(damage_rect, value);
- value->EndArray();
+ MathUtil::AddToTracedValue("output_rect", output_rect, value);
+ MathUtil::AddToTracedValue("damage_rect", damage_rect, value);
value->SetBoolean("has_transparent_background", has_transparent_background);
value->SetInteger("copy_requests", copy_requests.size());
diff --git a/cc/quads/render_pass_draw_quad.cc b/cc/quads/render_pass_draw_quad.cc
index d3aeb05..ce5065f 100644
--- a/cc/quads/render_pass_draw_quad.cc
+++ b/cc/quads/render_pass_draw_quad.cc
@@ -98,22 +98,13 @@
void RenderPassDrawQuad::ExtendValue(base::debug::TracedValue* value) const {
TracedValue::SetIDRef(render_pass_id.AsTracingId(), value, "render_pass_id");
value->SetInteger("mask_resource_id", mask_resource_id);
-
- value->BeginDictionary("mask_texture_size");
- MathUtil::AddToTracedValue(mask_texture_size, value);
- value->EndDictionary();
-
- value->BeginArray("mask_uv_scale");
- MathUtil::AddToTracedValue(mask_uv_scale, value);
- value->EndArray();
+ MathUtil::AddToTracedValue("mask_texture_size", mask_texture_size, value);
+ MathUtil::AddToTracedValue("mask_uv_scale", mask_uv_scale, value);
value->BeginDictionary("filters");
filters.AsValueInto(value);
value->EndDictionary();
-
- value->BeginArray("filters_scale");
- MathUtil::AddToTracedValue(filters_scale, value);
- value->EndArray();
+ MathUtil::AddToTracedValue("filters_scale", filters_scale, value);
value->BeginDictionary("background_filters");
background_filters.AsValueInto(value);
diff --git a/cc/quads/shared_quad_state.cc b/cc/quads/shared_quad_state.cc
index 83df365..e13a122 100644
--- a/cc/quads/shared_quad_state.cc
+++ b/cc/quads/shared_quad_state.cc
@@ -47,23 +47,14 @@
}
void SharedQuadState::AsValueInto(base::debug::TracedValue* value) const {
- value->BeginArray("transform");
- MathUtil::AddToTracedValue(content_to_target_transform, value);
- value->EndArray();
-
- value->BeginDictionary("layer_content_bounds");
- MathUtil::AddToTracedValue(content_bounds, value);
- value->EndDictionary();
-
- value->BeginArray("layer_visible_content_rect");
- MathUtil::AddToTracedValue(visible_content_rect, value);
- value->EndArray();
+ MathUtil::AddToTracedValue("transform", content_to_target_transform, value);
+ MathUtil::AddToTracedValue("layer_content_bounds", content_bounds, value);
+ MathUtil::AddToTracedValue("layer_visible_content_rect", visible_content_rect,
+ value);
value->SetBoolean("is_clipped", is_clipped);
- value->BeginArray("clip_rect");
- MathUtil::AddToTracedValue(clip_rect, value);
- value->EndArray();
+ MathUtil::AddToTracedValue("clip_rect", clip_rect, value);
value->SetDouble("opacity", opacity);
value->SetString("blend_mode", SkXfermode::ModeName(blend_mode));
diff --git a/cc/quads/stream_video_draw_quad.cc b/cc/quads/stream_video_draw_quad.cc
index 6b5a509..1f5f05e 100644
--- a/cc/quads/stream_video_draw_quad.cc
+++ b/cc/quads/stream_video_draw_quad.cc
@@ -52,9 +52,7 @@
void StreamVideoDrawQuad::ExtendValue(base::debug::TracedValue* value) const {
value->SetInteger("resource_id", resource_id);
- value->BeginArray("matrix");
- MathUtil::AddToTracedValue(matrix, value);
- value->EndArray();
+ MathUtil::AddToTracedValue("matrix", matrix, value);
}
} // namespace cc
diff --git a/cc/quads/texture_draw_quad.cc b/cc/quads/texture_draw_quad.cc
index d430c72..5d01e81 100644
--- a/cc/quads/texture_draw_quad.cc
+++ b/cc/quads/texture_draw_quad.cc
@@ -94,13 +94,9 @@
void TextureDrawQuad::ExtendValue(base::debug::TracedValue* value) const {
value->SetInteger("resource_id", resource_id);
value->SetBoolean("premultiplied_alpha", premultiplied_alpha);
- value->BeginArray("uv_top_left");
- MathUtil::AddToTracedValue(uv_top_left, value);
- value->EndArray();
- value->BeginArray("uv_bottom_right");
- MathUtil::AddToTracedValue(uv_bottom_right, value);
- value->EndArray();
+ MathUtil::AddToTracedValue("uv_top_left", uv_top_left, value);
+ MathUtil::AddToTracedValue("uv_bottom_right", uv_bottom_right, value);
value->SetInteger("background_color", background_color);
diff --git a/cc/quads/yuv_video_draw_quad.cc b/cc/quads/yuv_video_draw_quad.cc
index 612362e..6d3a828 100644
--- a/cc/quads/yuv_video_draw_quad.cc
+++ b/cc/quads/yuv_video_draw_quad.cc
@@ -76,9 +76,7 @@
}
void YUVVideoDrawQuad::ExtendValue(base::debug::TracedValue* value) const {
- value->BeginArray("tex_coord_rect");
- MathUtil::AddToTracedValue(tex_coord_rect, value);
- value->EndArray();
+ MathUtil::AddToTracedValue("tex_coord_rect", tex_coord_rect, value);
value->SetInteger("y_plane_resource_id", y_plane_resource_id);
value->SetInteger("u_plane_resource_id", u_plane_resource_id);
value->SetInteger("v_plane_resource_id", v_plane_resource_id);
diff --git a/cc/resources/clip_path_display_item.cc b/cc/resources/clip_path_display_item.cc
new file mode 100644
index 0000000..4012124
--- /dev/null
+++ b/cc/resources/clip_path_display_item.cc
@@ -0,0 +1,62 @@
+// 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/resources/clip_path_display_item.h"
+
+#include "third_party/skia/include/core/SkCanvas.h"
+
+namespace cc {
+
+ClipPathDisplayItem::ClipPathDisplayItem(const SkPath& clip_path,
+ SkRegion::Op clip_op,
+ bool antialias)
+ : clip_path_(clip_path), clip_op_(clip_op), antialias_(antialias) {
+}
+
+ClipPathDisplayItem::~ClipPathDisplayItem() {
+}
+
+void ClipPathDisplayItem::Raster(SkCanvas* canvas,
+ SkDrawPictureCallback* callback) const {
+ canvas->save();
+ canvas->clipPath(clip_path_, clip_op_, antialias_);
+}
+
+bool ClipPathDisplayItem::IsSuitableForGpuRasterization() const {
+ return true;
+}
+
+int ClipPathDisplayItem::ApproximateOpCount() const {
+ return 1;
+}
+
+size_t ClipPathDisplayItem::PictureMemoryUsage() const {
+ size_t total_size = sizeof(SkPath) + sizeof(SkRegion::Op) + sizeof(bool);
+ return total_size;
+}
+
+EndClipPathDisplayItem::EndClipPathDisplayItem() {
+}
+
+EndClipPathDisplayItem::~EndClipPathDisplayItem() {
+}
+
+void EndClipPathDisplayItem::Raster(SkCanvas* canvas,
+ SkDrawPictureCallback* callback) const {
+ canvas->restore();
+}
+
+bool EndClipPathDisplayItem::IsSuitableForGpuRasterization() const {
+ return true;
+}
+
+int EndClipPathDisplayItem::ApproximateOpCount() const {
+ return 0;
+}
+
+size_t EndClipPathDisplayItem::PictureMemoryUsage() const {
+ return 0;
+}
+
+} // namespace cc
diff --git a/cc/resources/clip_path_display_item.h b/cc/resources/clip_path_display_item.h
new file mode 100644
index 0000000..6144201
--- /dev/null
+++ b/cc/resources/clip_path_display_item.h
@@ -0,0 +1,64 @@
+// 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_RESOURCES_CLIP_PATH_DISPLAY_ITEM_H_
+#define CC_RESOURCES_CLIP_PATH_DISPLAY_ITEM_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "cc/base/cc_export.h"
+#include "cc/resources/display_item.h"
+#include "third_party/skia/include/core/SkPath.h"
+#include "third_party/skia/include/core/SkRegion.h"
+
+class SkCanvas;
+class SkDrawPictureCallback;
+
+namespace cc {
+
+class CC_EXPORT ClipPathDisplayItem : public DisplayItem {
+ public:
+ ~ClipPathDisplayItem() override;
+
+ static scoped_ptr<ClipPathDisplayItem> Create(const SkPath& path,
+ SkRegion::Op clip_op,
+ bool antialias) {
+ return make_scoped_ptr(new ClipPathDisplayItem(path, clip_op, antialias));
+ }
+
+ void Raster(SkCanvas* canvas, SkDrawPictureCallback* callback) const override;
+
+ bool IsSuitableForGpuRasterization() const override;
+ int ApproximateOpCount() const override;
+ size_t PictureMemoryUsage() const override;
+
+ protected:
+ ClipPathDisplayItem(const SkPath& path, SkRegion::Op clip_op, bool antialias);
+
+ private:
+ SkPath clip_path_;
+ SkRegion::Op clip_op_;
+ bool antialias_;
+};
+
+class CC_EXPORT EndClipPathDisplayItem : public DisplayItem {
+ public:
+ ~EndClipPathDisplayItem() override;
+
+ static scoped_ptr<EndClipPathDisplayItem> Create() {
+ return make_scoped_ptr(new EndClipPathDisplayItem());
+ }
+
+ void Raster(SkCanvas* canvas, SkDrawPictureCallback* callback) const override;
+
+ bool IsSuitableForGpuRasterization() const override;
+ int ApproximateOpCount() const override;
+ size_t PictureMemoryUsage() const override;
+
+ protected:
+ EndClipPathDisplayItem();
+};
+
+} // namespace cc
+
+#endif // CC_RESOURCES_CLIP_PATH_DISPLAY_ITEM_H_
diff --git a/cc/resources/display_list_recording_source.cc b/cc/resources/display_list_recording_source.cc
index a3c3d47..64ad63b 100644
--- a/cc/resources/display_list_recording_source.cc
+++ b/cc/resources/display_list_recording_source.cc
@@ -60,9 +60,10 @@
}
gfx::Rect old_recorded_viewport = recorded_viewport_;
- recorded_viewport_ = visible_layer_rect;
- recorded_viewport_.Inset(-pixel_record_distance_, -pixel_record_distance_);
- recorded_viewport_.Intersect(gfx::Rect(GetSize()));
+ // TODO(wangxianzhu): Blink slimming paint doesn't support incremental
+ // painting for now so we must record for the whole layer. Should measure
+ // performance and determine the best choice. Consider display item caching.
+ recorded_viewport_ = gfx::Rect(GetSize());
if (recorded_viewport_ != old_recorded_viewport) {
// Invalidate newly-exposed and no-longer-exposed areas.
@@ -130,9 +131,8 @@
DisplayListRasterSource::CreateFromDisplayListRecordingSource(this));
}
-SkTileGridFactory::TileGridInfo
-DisplayListRecordingSource::GetTileGridInfoForTesting() const {
- return SkTileGridFactory::TileGridInfo();
+gfx::Size DisplayListRecordingSource::GetTileGridSizeForTesting() const {
+ return gfx::Size();
}
void DisplayListRecordingSource::DetermineIfSolidColor() {
diff --git a/cc/resources/display_list_recording_source.h b/cc/resources/display_list_recording_source.h
index 6bc8208..bc87c12 100644
--- a/cc/resources/display_list_recording_source.h
+++ b/cc/resources/display_list_recording_source.h
@@ -34,7 +34,7 @@
bool IsSuitableForGpuRasterization() const override;
void SetTileGridSize(const gfx::Size& tile_grid_size) override;
void SetUnsuitableForGpuRasterizationForTesting() override;
- SkTileGridFactory::TileGridInfo GetTileGridInfoForTesting() const override;
+ gfx::Size GetTileGridSizeForTesting() const override;
protected:
void Clear();
diff --git a/cc/resources/gpu_rasterizer.cc b/cc/resources/gpu_rasterizer.cc
index fe1025c..6f9786d 100644
--- a/cc/resources/gpu_rasterizer.cc
+++ b/cc/resources/gpu_rasterizer.cc
@@ -68,7 +68,8 @@
// TODO(hendrikw): Don't create resources for solid color tiles.
// See crbug.com/445919
scoped_ptr<ScopedResource> resource =
- resource_pool->AcquireResource(tile->desired_texture_size());
+ resource_pool->AcquireResource(tile->desired_texture_size(),
+ resource_pool->default_format());
const ScopedResource* const_resource = resource.get();
RasterSource::SolidColorAnalysis analysis;
diff --git a/cc/resources/gpu_tile_task_worker_pool.cc b/cc/resources/gpu_tile_task_worker_pool.cc
index 52222db..8615730 100644
--- a/cc/resources/gpu_tile_task_worker_pool.cc
+++ b/cc/resources/gpu_tile_task_worker_pool.cc
@@ -51,7 +51,6 @@
: task_runner_(task_runner),
task_graph_runner_(task_graph_runner),
namespace_token_(task_graph_runner_->GetNamespaceToken()),
- run_tasks_on_origin_thread_pending_(false),
task_set_finished_weak_ptr_factory_(this),
weak_ptr_factory_(this) {
}
diff --git a/cc/resources/gpu_tile_task_worker_pool.h b/cc/resources/gpu_tile_task_worker_pool.h
index e62c17f..5d35ef9 100644
--- a/cc/resources/gpu_tile_task_worker_pool.h
+++ b/cc/resources/gpu_tile_task_worker_pool.h
@@ -47,8 +47,6 @@
const NamespaceToken namespace_token_;
TileTaskRunnerClient* client_;
- bool run_tasks_on_origin_thread_pending_;
-
TaskSetCollection tasks_pending_;
scoped_refptr<TileTask> task_set_finished_tasks_[kNumberOfTaskSets];
diff --git a/cc/resources/one_copy_tile_task_worker_pool.cc b/cc/resources/one_copy_tile_task_worker_pool.cc
index dcb8dea..d4a333f 100644
--- a/cc/resources/one_copy_tile_task_worker_pool.cc
+++ b/cc/resources/one_copy_tile_task_worker_pool.cc
@@ -30,7 +30,9 @@
resource_provider_(resource_provider),
resource_pool_(resource_pool),
resource_(resource),
- raster_resource_(resource_pool->AcquireResource(resource->size())),
+ raster_resource_(
+ resource_pool->AcquireResource(resource->size(),
+ resource_pool->default_format())),
lock_(new ResourceProvider::ScopedWriteLockGpuMemoryBuffer(
resource_provider_,
raster_resource_->id())),
@@ -249,7 +251,7 @@
scoped_ptr<RasterBuffer> OneCopyTileTaskWorkerPool::AcquireBufferForRaster(
const Resource* resource) {
- DCHECK_EQ(resource->format(), resource_pool_->resource_format());
+ DCHECK_EQ(resource->format(), resource_pool_->default_format());
return make_scoped_ptr<RasterBuffer>(
new RasterBufferImpl(this, resource_provider_, resource_pool_, resource));
}
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc
index e0435dc..b1ca99d 100644
--- a/cc/resources/picture.cc
+++ b/cc/resources/picture.cc
@@ -19,7 +19,6 @@
#include "cc/debug/traced_value.h"
#include "cc/layers/content_layer_client.h"
#include "skia/ext/pixel_ref_utils.h"
-#include "third_party/skia/include/core/SkBBHFactory.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkDrawPictureCallback.h"
#include "third_party/skia/include/core/SkPaint.h"
@@ -54,17 +53,16 @@
} // namespace
-scoped_refptr<Picture> Picture::Create(
- const gfx::Rect& layer_rect,
- ContentLayerClient* client,
- const SkTileGridFactory::TileGridInfo& tile_grid_info,
- bool gather_pixel_refs,
- RecordingMode recording_mode) {
+scoped_refptr<Picture> Picture::Create(const gfx::Rect& layer_rect,
+ ContentLayerClient* client,
+ const gfx::Size& tile_grid_size,
+ bool gather_pixel_refs,
+ RecordingMode recording_mode) {
scoped_refptr<Picture> picture = make_scoped_refptr(new Picture(layer_rect));
- picture->Record(client, tile_grid_info, recording_mode);
+ picture->Record(client, tile_grid_size, recording_mode);
if (gather_pixel_refs)
- picture->GatherPixelRefs(tile_grid_info);
+ picture->GatherPixelRefs(tile_grid_size);
return picture;
}
@@ -170,7 +168,7 @@
}
void Picture::Record(ContentLayerClient* painter,
- const SkTileGridFactory::TileGridInfo& tile_grid_info,
+ const gfx::Size& tile_grid_size,
RecordingMode recording_mode) {
TRACE_EVENT2("cc",
"Picture::Record",
@@ -180,7 +178,7 @@
recording_mode);
DCHECK(!picture_);
- DCHECK(!tile_grid_info.fTileInterval.isEmpty());
+ DCHECK(!tile_grid_size.IsEmpty());
// TODO(mtklein): If SkRTree sticks, clean up tile_grid_info. skbug.com/3085
SkRTreeFactory factory;
@@ -232,8 +230,7 @@
EmitTraceSnapshot();
}
-void Picture::GatherPixelRefs(
- const SkTileGridFactory::TileGridInfo& tile_grid_info) {
+void Picture::GatherPixelRefs(const gfx::Size& tile_grid_size) {
TRACE_EVENT2("cc", "Picture::GatherPixelRefs",
"width", layer_rect_.width(),
"height", layer_rect_.height());
@@ -242,11 +239,7 @@
DCHECK(pixel_refs_.empty());
if (!WillPlayBackBitmaps())
return;
- cell_size_ = gfx::Size(
- tile_grid_info.fTileInterval.width() +
- 2 * tile_grid_info.fMargin.width(),
- tile_grid_info.fTileInterval.height() +
- 2 * tile_grid_info.fMargin.height());
+ cell_size_ = tile_grid_size;
DCHECK_GT(cell_size_.width(), 0);
DCHECK_GT(cell_size_.height(), 0);
@@ -477,9 +470,7 @@
scoped_refptr<base::debug::TracedValue> record_data =
new base::debug::TracedValue();
TracedValue::SetIDRef(this, record_data.get(), "picture_id");
- record_data->BeginArray("layer_rect");
- MathUtil::AddToTracedValue(layer_rect_, record_data.get());
- record_data->EndArray();
+ MathUtil::AddToTracedValue("layer_rect", layer_rect_, record_data.get());
return record_data;
}
diff --git a/cc/resources/picture.h b/cc/resources/picture.h
index a3d252a..75f92f2 100644
--- a/cc/resources/picture.h
+++ b/cc/resources/picture.h
@@ -19,7 +19,6 @@
#include "cc/base/cc_export.h"
#include "cc/base/region.h"
#include "skia/ext/refptr.h"
-#include "third_party/skia/include/core/SkBBHFactory.h"
#include "third_party/skia/include/core/SkPicture.h"
#include "ui/gfx/geometry/rect.h"
@@ -52,12 +51,11 @@
RECORDING_MODE_COUNT, // Must be the last entry.
};
- static scoped_refptr<Picture> Create(
- const gfx::Rect& layer_rect,
- ContentLayerClient* client,
- const SkTileGridFactory::TileGridInfo& tile_grid_info,
- bool gather_pixels_refs,
- RecordingMode recording_mode);
+ static scoped_refptr<Picture> Create(const gfx::Rect& layer_rect,
+ ContentLayerClient* client,
+ const gfx::Size& tile_grid_size,
+ bool gather_pixels_refs,
+ RecordingMode recording_mode);
static scoped_refptr<Picture> CreateFromValue(const base::Value* value);
static scoped_refptr<Picture> CreateFromSkpValue(const base::Value* value);
@@ -142,11 +140,11 @@
// Record a paint operation. To be able to safely use this SkPicture for
// playback on a different thread this can only be called once.
void Record(ContentLayerClient* client,
- const SkTileGridFactory::TileGridInfo& tile_grid_info,
+ const gfx::Size& tile_grid_size,
RecordingMode recording_mode);
// Gather pixel refs from recording.
- void GatherPixelRefs(const SkTileGridFactory::TileGridInfo& tile_grid_info);
+ void GatherPixelRefs(const gfx::Size& tile_grid_info);
gfx::Rect layer_rect_;
skia::RefPtr<SkPicture> picture_;
diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
index 341e6e3..aab740a 100644
--- a/cc/resources/picture_layer_tiling.cc
+++ b/cc/resources/picture_layer_tiling.cc
@@ -869,9 +869,7 @@
void PictureLayerTiling::AsValueInto(base::debug::TracedValue* state) const {
state->SetInteger("num_tiles", tiles_.size());
state->SetDouble("content_scale", contents_scale_);
- state->BeginDictionary("tiling_size");
- MathUtil::AddToTracedValue(tiling_size(), state);
- state->EndDictionary();
+ MathUtil::AddToTracedValue("tiling_size", tiling_size(), state);
}
size_t PictureLayerTiling::GPUMemoryUsageInBytes() const {
diff --git a/cc/resources/picture_pile.cc b/cc/resources/picture_pile.cc
index 31bc2d3..1057d2d 100644
--- a/cc/resources/picture_pile.cc
+++ b/cc/resources/picture_pile.cc
@@ -25,7 +25,6 @@
// Dimensions of the tiles in this picture pile as well as the dimensions of
// the base picture in each tile.
const int kBasePictureSize = 512;
-const int kTileGridBorderPixels = 1;
// Invalidation frequency settings. kInvalidationFrequencyThreshold is a value
// between 0 and 1 meaning invalidation frequency between 0% and 100% that
@@ -167,9 +166,6 @@
pixel_record_distance_(kPixelDistanceToRecord),
is_suitable_for_gpu_rasterization_(true) {
tiling_.SetMaxTextureSize(gfx::Size(kBasePictureSize, kBasePictureSize));
- tile_grid_info_.fTileInterval.setEmpty();
- tile_grid_info_.fMargin.setEmpty();
- tile_grid_info_.fOffset.setZero();
}
PicturePile::~PicturePile() {
@@ -548,7 +544,7 @@
bool gather_pixel_refs = TileTaskWorkerPool::GetNumWorkerThreads() > 1;
for (int i = 0; i < repeat_count; i++) {
- picture = Picture::Create(padded_record_rect, painter, tile_grid_info_,
+ picture = Picture::Create(padded_record_rect, painter, tile_grid_size_,
gather_pixel_refs, recording_mode);
// Note the '&&' with previous is-suitable state.
// This means that once a picture-pile becomes unsuitable for gpu
@@ -628,31 +624,19 @@
return is_suitable_for_gpu_rasterization_;
}
-// static
-void PicturePile::ComputeTileGridInfo(const gfx::Size& tile_grid_size,
- SkTileGridFactory::TileGridInfo* info) {
- DCHECK(info);
- info->fTileInterval.set(tile_grid_size.width() - 2 * kTileGridBorderPixels,
- tile_grid_size.height() - 2 * kTileGridBorderPixels);
- DCHECK_GT(info->fTileInterval.width(), 0);
- DCHECK_GT(info->fTileInterval.height(), 0);
- info->fMargin.set(kTileGridBorderPixels, kTileGridBorderPixels);
- // Offset the tile grid coordinate space to take into account the fact
- // that the top-most and left-most tiles do not have top and left borders
- // respectively.
- info->fOffset.set(-kTileGridBorderPixels, -kTileGridBorderPixels);
-}
-
void PicturePile::SetTileGridSize(const gfx::Size& tile_grid_size) {
- ComputeTileGridInfo(tile_grid_size, &tile_grid_info_);
+ DCHECK_GT(tile_grid_size.width(), 0);
+ DCHECK_GT(tile_grid_size.height(), 0);
+
+ tile_grid_size_ = tile_grid_size;
}
void PicturePile::SetUnsuitableForGpuRasterizationForTesting() {
is_suitable_for_gpu_rasterization_ = false;
}
-SkTileGridFactory::TileGridInfo PicturePile::GetTileGridInfoForTesting() const {
- return tile_grid_info_;
+gfx::Size PicturePile::GetTileGridSizeForTesting() const {
+ return tile_grid_size_;
}
bool PicturePile::CanRasterSlowTileCheck(const gfx::Rect& layer_rect) const {
diff --git a/cc/resources/picture_pile.h b/cc/resources/picture_pile.h
index fd1c454..0a67c09 100644
--- a/cc/resources/picture_pile.h
+++ b/cc/resources/picture_pile.h
@@ -39,10 +39,7 @@
bool IsSuitableForGpuRasterization() const override;
void SetTileGridSize(const gfx::Size& tile_grid_size) override;
void SetUnsuitableForGpuRasterizationForTesting() override;
- SkTileGridFactory::TileGridInfo GetTileGridInfoForTesting() const override;
-
- static void ComputeTileGridInfo(const gfx::Size& tile_grid_size,
- SkTileGridFactory::TileGridInfo* info);
+ gfx::Size GetTileGridSizeForTesting() const override;
protected:
class CC_EXPORT PictureInfo {
@@ -94,7 +91,7 @@
// recorded.
gfx::Rect recorded_viewport_;
float min_contents_scale_;
- SkTileGridFactory::TileGridInfo tile_grid_info_;
+ gfx::Size tile_grid_size_;
int slow_down_raster_scale_factor_for_debug_;
bool can_use_lcd_text_;
// A hint about whether there are any recordings. This may be a false
diff --git a/cc/resources/picture_unittest.cc b/cc/resources/picture_unittest.cc
index 07faf0c..0c41215 100644
--- a/cc/resources/picture_unittest.cc
+++ b/cc/resources/picture_unittest.cc
@@ -10,7 +10,6 @@
#include "cc/test/fake_content_layer_client.h"
#include "cc/test/skia_common.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/skia/include/core/SkBBHFactory.h"
#include "third_party/skia/include/core/SkGraphics.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/skia_util.h"
@@ -23,10 +22,7 @@
gfx::Rect layer_rect(100, 100);
- SkTileGridFactory::TileGridInfo tile_grid_info;
- tile_grid_info.fTileInterval = SkISize::Make(100, 100);
- tile_grid_info.fMargin.setEmpty();
- tile_grid_info.fOffset.setZero();
+ gfx::Size tile_grid_size(100, 100);
FakeContentLayerClient content_layer_client;
@@ -47,10 +43,7 @@
content_layer_client.add_draw_rect(layer_rect, red_paint);
scoped_refptr<Picture> one_rect_picture =
- Picture::Create(layer_rect,
- &content_layer_client,
- tile_grid_info,
- false,
+ Picture::Create(layer_rect, &content_layer_client, tile_grid_size, false,
Picture::RECORD_NORMALLY);
scoped_ptr<base::Value> serialized_one_rect(one_rect_picture->AsValue());
@@ -72,10 +65,7 @@
content_layer_client.add_draw_rect(gfx::Rect(25, 25, 50, 50), green_paint);
scoped_refptr<Picture> two_rect_picture =
- Picture::Create(layer_rect,
- &content_layer_client,
- tile_grid_info,
- false,
+ Picture::Create(layer_rect, &content_layer_client, tile_grid_size, false,
Picture::RECORD_NORMALLY);
scoped_ptr<base::Value> serialized_two_rect(two_rect_picture->AsValue());
@@ -98,10 +88,7 @@
TEST(PictureTest, PixelRefIterator) {
gfx::Rect layer_rect(2048, 2048);
- SkTileGridFactory::TileGridInfo tile_grid_info;
- tile_grid_info.fTileInterval = SkISize::Make(512, 512);
- tile_grid_info.fMargin.setEmpty();
- tile_grid_info.fOffset.setZero();
+ gfx::Size tile_grid_size(512, 512);
FakeContentLayerClient content_layer_client;
@@ -129,11 +116,9 @@
}
}
- scoped_refptr<Picture> picture = Picture::Create(layer_rect,
- &content_layer_client,
- tile_grid_info,
- true,
- Picture::RECORD_NORMALLY);
+ scoped_refptr<Picture> picture =
+ Picture::Create(layer_rect, &content_layer_client, tile_grid_size, true,
+ Picture::RECORD_NORMALLY);
// Default iterator does not have any pixel refs
{
@@ -198,10 +183,7 @@
TEST(PictureTest, PixelRefIteratorNonZeroLayer) {
gfx::Rect layer_rect(1024, 0, 2048, 2048);
- SkTileGridFactory::TileGridInfo tile_grid_info;
- tile_grid_info.fTileInterval = SkISize::Make(512, 512);
- tile_grid_info.fMargin.setEmpty();
- tile_grid_info.fOffset.setZero();
+ gfx::Size tile_grid_size(512, 512);
FakeContentLayerClient content_layer_client;
@@ -229,11 +211,9 @@
}
}
- scoped_refptr<Picture> picture = Picture::Create(layer_rect,
- &content_layer_client,
- tile_grid_info,
- true,
- Picture::RECORD_NORMALLY);
+ scoped_refptr<Picture> picture =
+ Picture::Create(layer_rect, &content_layer_client, tile_grid_size, true,
+ Picture::RECORD_NORMALLY);
// Default iterator does not have any pixel refs
{
@@ -321,10 +301,7 @@
TEST(PictureTest, PixelRefIteratorOnePixelQuery) {
gfx::Rect layer_rect(2048, 2048);
- SkTileGridFactory::TileGridInfo tile_grid_info;
- tile_grid_info.fTileInterval = SkISize::Make(512, 512);
- tile_grid_info.fMargin.setEmpty();
- tile_grid_info.fOffset.setZero();
+ gfx::Size tile_grid_size(512, 512);
FakeContentLayerClient content_layer_client;
@@ -352,11 +329,9 @@
}
}
- scoped_refptr<Picture> picture = Picture::Create(layer_rect,
- &content_layer_client,
- tile_grid_info,
- true,
- Picture::RECORD_NORMALLY);
+ scoped_refptr<Picture> picture =
+ Picture::Create(layer_rect, &content_layer_client, tile_grid_size, true,
+ Picture::RECORD_NORMALLY);
for (int y = 0; y < 4; ++y) {
for (int x = 0; x < 4; ++x) {
@@ -378,10 +353,7 @@
gfx::Rect layer_rect(100, 200);
- SkTileGridFactory::TileGridInfo tile_grid_info;
- tile_grid_info.fTileInterval = SkISize::Make(100, 200);
- tile_grid_info.fMargin.setEmpty();
- tile_grid_info.fOffset.setZero();
+ gfx::Size tile_grid_size(100, 200);
FakeContentLayerClient content_layer_client;
@@ -401,10 +373,7 @@
// Single full-size rect picture.
content_layer_client.add_draw_rect(layer_rect, red_paint);
scoped_refptr<Picture> one_rect_picture =
- Picture::Create(layer_rect,
- &content_layer_client,
- tile_grid_info,
- false,
+ Picture::Create(layer_rect, &content_layer_client, tile_grid_size, false,
Picture::RECORD_NORMALLY);
scoped_ptr<base::Value> serialized_one_rect(
one_rect_picture->AsValue());
@@ -430,39 +399,28 @@
gfx::Rect layer_rect(100, 200);
- SkTileGridFactory::TileGridInfo tile_grid_info;
- tile_grid_info.fTileInterval = SkISize::Make(100, 200);
- tile_grid_info.fMargin.setEmpty();
- tile_grid_info.fOffset.setZero();
+ gfx::Size tile_grid_size(100, 200);
FakeContentLayerClient content_layer_client;
EXPECT_EQ(NULL, content_layer_client.last_canvas());
- scoped_refptr<Picture> picture = Picture::Create(layer_rect,
- &content_layer_client,
- tile_grid_info,
- false,
- Picture::RECORD_NORMALLY);
+ scoped_refptr<Picture> picture =
+ Picture::Create(layer_rect, &content_layer_client, tile_grid_size, false,
+ Picture::RECORD_NORMALLY);
EXPECT_TRUE(content_layer_client.last_canvas() != NULL);
EXPECT_EQ(ContentLayerClient::GRAPHICS_CONTEXT_ENABLED,
content_layer_client.last_context_status());
EXPECT_TRUE(picture.get());
- picture = Picture::Create(layer_rect,
- &content_layer_client,
- tile_grid_info,
- false,
- Picture::RECORD_WITH_SK_NULL_CANVAS);
+ picture = Picture::Create(layer_rect, &content_layer_client, tile_grid_size,
+ false, Picture::RECORD_WITH_SK_NULL_CANVAS);
EXPECT_TRUE(content_layer_client.last_canvas() != NULL);
EXPECT_EQ(ContentLayerClient::GRAPHICS_CONTEXT_ENABLED,
content_layer_client.last_context_status());
EXPECT_TRUE(picture.get());
- picture = Picture::Create(layer_rect,
- &content_layer_client,
- tile_grid_info,
- false,
- Picture::RECORD_WITH_PAINTING_DISABLED);
+ picture = Picture::Create(layer_rect, &content_layer_client, tile_grid_size,
+ false, Picture::RECORD_WITH_PAINTING_DISABLED);
EXPECT_TRUE(content_layer_client.last_canvas() != NULL);
EXPECT_EQ(ContentLayerClient::GRAPHICS_CONTEXT_DISABLED,
content_layer_client.last_context_status());
diff --git a/cc/resources/recording_source.h b/cc/resources/recording_source.h
index 173e1a0..7af2255 100644
--- a/cc/resources/recording_source.h
+++ b/cc/resources/recording_source.h
@@ -7,7 +7,6 @@
#include "cc/base/cc_export.h"
#include "cc/resources/picture.h"
-#include "third_party/skia/include/core/SkBBHFactory.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
@@ -47,7 +46,7 @@
// TODO(hendrikw): Figure out how to remove this.
virtual void SetUnsuitableForGpuRasterizationForTesting() = 0;
- virtual SkTileGridFactory::TileGridInfo GetTileGridInfoForTesting() const = 0;
+ virtual gfx::Size GetTileGridSizeForTesting() const = 0;
};
} // namespace cc
diff --git a/cc/resources/resource_pool.cc b/cc/resources/resource_pool.cc
index 45f36e2..f0a871d 100644
--- a/cc/resources/resource_pool.cc
+++ b/cc/resources/resource_pool.cc
@@ -11,10 +11,10 @@
ResourcePool::ResourcePool(ResourceProvider* resource_provider,
GLenum target,
- ResourceFormat format)
+ ResourceFormat default_format)
: resource_provider_(resource_provider),
target_(target),
- format_(format),
+ default_format_(default_format),
max_memory_usage_bytes_(0),
max_unused_memory_usage_bytes_(0),
max_resource_count_(0),
@@ -36,13 +36,15 @@
}
scoped_ptr<ScopedResource> ResourcePool::AcquireResource(
- const gfx::Size& size) {
+ const gfx::Size& size, ResourceFormat format) {
for (ResourceList::iterator it = unused_resources_.begin();
it != unused_resources_.end();
++it) {
ScopedResource* resource = *it;
DCHECK(resource_provider_->CanLockForWrite(resource->id()));
+ if (resource->format() != format)
+ continue;
if (resource->size() != size)
continue;
@@ -53,7 +55,7 @@
scoped_ptr<ScopedResource> resource =
ScopedResource::Create(resource_provider_);
- resource->AllocateManaged(size, target_, format_);
+ resource->AllocateManaged(size, target_, format);
memory_usage_bytes_ += resource->bytes();
++resource_count_;
diff --git a/cc/resources/resource_pool.h b/cc/resources/resource_pool.h
index e1ee35a..72467c9 100644
--- a/cc/resources/resource_pool.h
+++ b/cc/resources/resource_pool.h
@@ -20,13 +20,16 @@
public:
static scoped_ptr<ResourcePool> Create(ResourceProvider* resource_provider,
GLenum target,
- ResourceFormat format) {
- return make_scoped_ptr(new ResourcePool(resource_provider, target, format));
+ ResourceFormat default_format) {
+ return make_scoped_ptr(new ResourcePool(resource_provider,
+ target,
+ default_format));
}
virtual ~ResourcePool();
- scoped_ptr<ScopedResource> AcquireResource(const gfx::Size& size);
+ scoped_ptr<ScopedResource> AcquireResource(const gfx::Size& size,
+ ResourceFormat format);
void ReleaseResource(scoped_ptr<ScopedResource>);
void SetResourceUsageLimits(size_t max_memory_usage_bytes,
@@ -49,12 +52,12 @@
}
size_t busy_resource_count() const { return busy_resources_.size(); }
- ResourceFormat resource_format() const { return format_; }
+ ResourceFormat default_format() const { return default_format_; }
protected:
ResourcePool(ResourceProvider* resource_provider,
GLenum target,
- ResourceFormat format);
+ ResourceFormat default_format);
bool ResourceUsageTooHigh();
@@ -63,7 +66,9 @@
ResourceProvider* resource_provider_;
const GLenum target_;
- const ResourceFormat format_;
+ // TODO(peterp): Remove the format state and let the clients keep track of
+ // this instead.
+ const ResourceFormat default_format_;
size_t max_memory_usage_bytes_;
size_t max_unused_memory_usage_bytes_;
size_t max_resource_count_;
diff --git a/cc/resources/resource_update_controller.h b/cc/resources/resource_update_controller.h
index 994ae2f..1946df4 100644
--- a/cc/resources/resource_update_controller.h
+++ b/cc/resources/resource_update_controller.h
@@ -71,7 +71,6 @@
ResourceUpdateControllerClient* client_;
scoped_ptr<ResourceUpdateQueue> queue_;
- bool contents_textures_purged_;
ResourceProvider* resource_provider_;
base::TimeTicks time_limit_;
size_t texture_updates_per_tick_;
diff --git a/cc/resources/tile.cc b/cc/resources/tile.cc
index 8a09cfc..6734bab 100644
--- a/cc/resources/tile.cc
+++ b/cc/resources/tile.cc
@@ -55,9 +55,7 @@
TracedValue::SetIDRef(raster_source_.get(), res, "picture_pile");
res->SetDouble("contents_scale", contents_scale_);
- res->BeginArray("content_rect");
- MathUtil::AddToTracedValue(content_rect_, res);
- res->EndArray();
+ MathUtil::AddToTracedValue("content_rect", content_rect_, res);
res->SetInteger("layer_id", layer_id_);
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index 824dca9..81ae8b5 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -135,10 +135,8 @@
class ImageDecodeTaskImpl : public ImageDecodeTask {
public:
ImageDecodeTaskImpl(SkPixelRef* pixel_ref,
- int layer_id,
const base::Callback<void(bool was_canceled)>& reply)
: pixel_ref_(skia::SharePtr(pixel_ref)),
- layer_id_(layer_id),
reply_(reply) {}
// Overridden from Task:
@@ -162,7 +160,6 @@
private:
skia::RefPtr<SkPixelRef> pixel_ref_;
- int layer_id_;
const base::Callback<void(bool was_canceled)> reply_;
DISALLOW_COPY_AND_ASSIGN(ImageDecodeTaskImpl);
@@ -363,8 +360,12 @@
CleanUpReleasedTiles();
TileVector tiles_that_need_to_be_rasterized;
- AssignGpuMemoryToTiles(&tiles_that_need_to_be_rasterized,
- scheduled_raster_task_limit_, false);
+ RasterTilePriorityQueue raster_priority_queue;
+ client_->BuildRasterQueue(&raster_priority_queue,
+ global_state_.tree_priority,
+ RasterTilePriorityQueue::Type::ALL);
+ AssignGpuMemoryToTiles(&raster_priority_queue, scheduled_raster_task_limit_,
+ &tiles_that_need_to_be_rasterized);
// Schedule tile tasks.
ScheduleTasks(tiles_that_need_to_be_rasterized);
@@ -373,10 +374,15 @@
did_notify_ready_to_draw_ = false;
} else {
if (global_state_.hard_memory_limit_in_bytes == 0) {
- TileVector tiles_that_need_to_be_rasterized;
- AssignGpuMemoryToTiles(&tiles_that_need_to_be_rasterized,
- scheduled_raster_task_limit_, false);
- DCHECK(tiles_that_need_to_be_rasterized.empty());
+ // TODO(vmpstr): Add a function to unconditionally create an eviction
+ // queue and guard the rest of the calls sites with this flag, instead of
+ // clearing here and building, which is a bit awkward.
+ eviction_priority_queue_is_up_to_date_ = false;
+ resource_pool_->CheckBusyResources(false);
+ MemoryUsage memory_limit(0, 0);
+ MemoryUsage memory_usage(resource_pool_->acquired_memory_usage_bytes(),
+ resource_pool_->acquired_resource_count());
+ FreeTileResourcesUntilUsageIsWithinLimit(memory_limit, &memory_usage);
}
did_notify_ready_to_activate_ = false;
@@ -405,9 +411,14 @@
FreeResourcesForReleasedTiles();
CleanUpReleasedTiles();
+ RasterTilePriorityQueue required_for_draw_queue;
+ client_->BuildRasterQueue(&required_for_draw_queue,
+ global_state_.tree_priority,
+ RasterTilePriorityQueue::Type::REQUIRED_FOR_DRAW);
TileVector tiles_that_need_to_be_rasterized;
- AssignGpuMemoryToTiles(&tiles_that_need_to_be_rasterized,
- std::numeric_limits<size_t>::max(), true);
+ AssignGpuMemoryToTiles(&required_for_draw_queue,
+ std::numeric_limits<size_t>::max(),
+ &tiles_that_need_to_be_rasterized);
// We must reduce the amount of unused resources before calling
// RunTasks to prevent usage from rising above limits.
@@ -418,6 +429,23 @@
tiles_that_need_to_be_rasterized, resource_pool_,
base::Bind(&TileManager::UpdateTileDrawInfo, base::Unretained(this)));
+ // Use on-demand raster for any required-for-draw tiles that have not been
+ // assigned memory after reaching a steady memory state.
+ // TODO(hendrikw): Figure out why this would improve jank on some tests - See
+ // crbug.com/449288
+ required_for_draw_queue.Reset();
+ client_->BuildRasterQueue(&required_for_draw_queue,
+ global_state_.tree_priority,
+ RasterTilePriorityQueue::Type::REQUIRED_FOR_DRAW);
+
+ // Use on-demand raster for any tiles that have not been been assigned
+ // memory. This ensures that we draw even when OOM.
+ for (; !required_for_draw_queue.IsEmpty(); required_for_draw_queue.Pop()) {
+ Tile* tile = required_for_draw_queue.Top();
+ tile->draw_info().set_rasterize_on_demand();
+ client_->NotifyTileStateChanged(tile);
+ }
+
TRACE_EVENT_INSTANT1("cc", "DidRasterize", TRACE_EVENT_SCOPE_THREAD, "state",
BasicStateAsValue());
@@ -532,15 +560,14 @@
}
void TileManager::AssignGpuMemoryToTiles(
- TileVector* tiles_that_need_to_be_rasterized,
+ RasterTilePriorityQueue* raster_priority_queue,
size_t scheduled_raster_task_limit,
- bool required_for_draw_only) {
+ TileVector* tiles_that_need_to_be_rasterized) {
TRACE_EVENT_BEGIN0("cc", "TileManager::AssignGpuMemoryToTiles");
// Maintain the list of released resources that can potentially be re-used
- // or deleted.
- // If this operation becomes expensive too, only do this after some
- // resource(s) was returned. Note that in that case, one also need to
+ // or deleted. If this operation becomes expensive too, only do this after
+ // some resource(s) was returned. Note that in that case, one also need to
// invalidate when releasing some resource from the pool.
resource_pool_->CheckBusyResources(false);
@@ -558,23 +585,8 @@
resource_pool_->acquired_resource_count());
eviction_priority_queue_is_up_to_date_ = false;
- // TODO(vmpstr): Take this as a parameter and have SynchronousRaster build a
- // REQUIRED_FOR_DRAW queue.
- client_->BuildRasterQueue(&raster_priority_queue_,
- global_state_.tree_priority,
- RasterTilePriorityQueue::Type::ALL);
-
- while (!raster_priority_queue_.IsEmpty()) {
- Tile* tile = raster_priority_queue_.Top();
-
- // TODO(vmpstr): Remove this when the iterator returns the correct tiles
- // to draw for GPU rasterization.
- if (required_for_draw_only) {
- if (!tile->required_for_draw()) {
- raster_priority_queue_.Pop();
- continue;
- }
- }
+ for (; !raster_priority_queue->IsEmpty(); raster_priority_queue->Pop()) {
+ Tile* tile = raster_priority_queue->Top();
TilePriority priority = tile->combined_priority();
if (TilePriorityViolatesMemoryPolicy(priority)) {
@@ -603,7 +615,7 @@
MemoryUsage memory_required_by_tile_to_be_scheduled;
if (!tile->raster_task_.get()) {
memory_required_by_tile_to_be_scheduled = MemoryUsage::FromConfig(
- tile->desired_texture_size(), resource_pool_->resource_format());
+ tile->desired_texture_size(), resource_pool_->default_format());
}
bool tile_is_needed_now = priority.priority_bin == TilePriority::NOW;
@@ -630,7 +642,6 @@
memory_usage += memory_required_by_tile_to_be_scheduled;
tiles_that_need_to_be_rasterized->push_back(tile);
- raster_priority_queue_.Pop();
}
// Note that we should try and further reduce memory in case the above loop
@@ -648,8 +659,6 @@
memory_stats_from_last_assign_.had_enough_memory =
had_enough_memory_to_schedule_tiles_needed_now;
- raster_priority_queue_.Reset();
-
TRACE_EVENT_END2("cc", "TileManager::AssignGpuMemoryToTiles",
"all_tiles_that_need_to_be_rasterized_are_scheduled",
all_tiles_that_need_to_be_rasterized_are_scheduled_,
@@ -728,7 +737,6 @@
SkPixelRef* pixel_ref) {
return make_scoped_refptr(new ImageDecodeTaskImpl(
pixel_ref,
- tile->layer_id(),
base::Bind(&TileManager::OnImageDecodeTaskCompleted,
base::Unretained(this),
tile->layer_id(),
@@ -737,7 +745,8 @@
scoped_refptr<RasterTask> TileManager::CreateRasterTask(Tile* tile) {
scoped_ptr<ScopedResource> resource =
- resource_pool_->AcquireResource(tile->desired_texture_size());
+ resource_pool_->AcquireResource(tile->desired_texture_size(),
+ resource_pool_->default_format());
const ScopedResource* const_resource = resource.get();
// Create and queue all image decode tasks that this tile depends on.
@@ -862,7 +871,7 @@
const std::vector<PictureLayerImpl*>& layers = client_->GetPictureLayers();
// TODO(vmpstr): Replace this with building a REQUIRED_TO_ACTIVATE raster
- // queue and checking if it's empty.
+ // queue and checking if the tiles it contains are all ready to draw.
for (const auto& layer : layers) {
if (!layer->AllTilesRequiredForActivationAreReadyToDraw())
return false;
@@ -875,7 +884,7 @@
const std::vector<PictureLayerImpl*>& layers = client_->GetPictureLayers();
// TODO(vmpstr): Replace this with building a REQUIRED_TO_DRAW raster queue
- // and checking if it's empty.
+ // and checking if the tiles it contains are all ready to draw.
for (const auto& layer : layers) {
if (!layer->AllTilesRequiredForDrawAreReadyToDraw())
return false;
@@ -935,8 +944,11 @@
// When OOM, keep re-assigning memory until we reach a steady state
// where top-priority tiles are initialized.
TileVector tiles_that_need_to_be_rasterized;
- AssignGpuMemoryToTiles(&tiles_that_need_to_be_rasterized,
- scheduled_raster_task_limit_, false);
+ RasterTilePriorityQueue raster_priority_queue;
+ client_->BuildRasterQueue(&raster_priority_queue, global_state_.tree_priority,
+ RasterTilePriorityQueue::Type::ALL);
+ AssignGpuMemoryToTiles(&raster_priority_queue, scheduled_raster_task_limit_,
+ &tiles_that_need_to_be_rasterized);
// |tiles_that_need_to_be_rasterized| will be empty when we reach a
// steady memory state. Keep scheduling tasks until we reach this state.
@@ -961,36 +973,30 @@
// Use on-demand raster for any required-for-activation tiles that have
// not been been assigned memory after reaching a steady memory state. This
- // ensures that we activate even when OOM. Note that we have to rebuilt the
- // queue in case the last AssignGpuMemoryToTiles evicted some tiles that
- // would otherwise not be picked up by the old raster queue.
- // TODO(vmpstr): Make this use REQUIRED_FOR_ACTIVAITON queue.
- client_->BuildRasterQueue(&raster_priority_queue_,
- global_state_.tree_priority,
- RasterTilePriorityQueue::Type::ALL);
- bool ready_to_activate = true;
- while (!raster_priority_queue_.IsEmpty()) {
- Tile* tile = raster_priority_queue_.Top();
- TileDrawInfo& draw_info = tile->draw_info();
+ // ensures that we activate even when OOM. Note that we can't reuse the queue
+ // we used for AssignGpuMemoryToTiles, since the AssignGpuMemoryToTiles call
+ // could have evicted some tiles that would not be picked up by the old raster
+ // queue.
+ RasterTilePriorityQueue required_for_activation_queue;
+ client_->BuildRasterQueue(
+ &required_for_activation_queue, global_state_.tree_priority,
+ RasterTilePriorityQueue::Type::REQUIRED_FOR_ACTIVATION);
- if (tile->required_for_activation() && !draw_info.IsReadyToDraw()) {
- // If we can't raster on demand, give up early (and don't activate).
- if (!allow_rasterize_on_demand) {
- ready_to_activate = false;
- break;
- }
+ // If we have tiles to mark as rasterize on demand, but we don't allow
+ // rasterize on demand, then skip activation and return early.
+ if (!required_for_activation_queue.IsEmpty() && !allow_rasterize_on_demand)
+ return;
- draw_info.set_rasterize_on_demand();
- client_->NotifyTileStateChanged(tile);
- }
- raster_priority_queue_.Pop();
+ // Mark required tiles as rasterize on demand.
+ for (; !required_for_activation_queue.IsEmpty();
+ required_for_activation_queue.Pop()) {
+ Tile* tile = required_for_activation_queue.Top();
+ tile->draw_info().set_rasterize_on_demand();
+ client_->NotifyTileStateChanged(tile);
}
- if (ready_to_activate) {
- DCHECK(IsReadyToActivate());
- ready_to_activate_check_notifier_.Schedule();
- }
- raster_priority_queue_.Reset();
+ DCHECK(IsReadyToActivate());
+ ready_to_activate_check_notifier_.Schedule();
}
TileManager::MemoryUsage::MemoryUsage() : memory_bytes_(0), resource_count_(0) {
diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
index f1d00fe..e93373a 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -99,8 +99,9 @@
// rasterizer.h
};
- COMPILE_ASSERT(NamedTaskSet::ALL == (kNumberOfTaskSets - 1),
- NamedTaskSet_ALL_not_kNumberOfTaskSets_minus_1);
+ static_assert(NamedTaskSet::ALL == (kNumberOfTaskSets - 1),
+ "NamedTaskSet::ALL should be equal to kNumberOfTaskSets"
+ "minus 1");
static scoped_ptr<TileManager> Create(TileManagerClient* client,
base::SequencedTaskRunner* task_runner,
@@ -138,7 +139,8 @@
for (size_t i = 0; i < tiles.size(); ++i) {
TileDrawInfo& draw_info = tiles[i]->draw_info();
draw_info.resource_ =
- resource_pool_->AcquireResource(tiles[i]->desired_texture_size());
+ resource_pool_->AcquireResource(tiles[i]->desired_texture_size(),
+ resource_pool_->default_format());
}
}
@@ -200,9 +202,9 @@
virtual void ScheduleTasks(
const TileVector& tiles_that_need_to_be_rasterized);
- void AssignGpuMemoryToTiles(TileVector* tiles_that_need_to_be_rasterized,
+ void AssignGpuMemoryToTiles(RasterTilePriorityQueue* raster_priority_queue,
size_t scheduled_raser_task_limit,
- bool required_for_draw_only);
+ TileVector* tiles_that_need_to_be_rasterized);
void SynchronouslyRasterizeTiles(
const GlobalStateThatImpactsTilePriority& state);
@@ -303,7 +305,6 @@
UniqueNotifier ready_to_draw_check_notifier_;
UniqueNotifier more_tiles_need_prepare_check_notifier_;
- RasterTilePriorityQueue raster_priority_queue_;
EvictionTilePriorityQueue eviction_priority_queue_;
bool eviction_priority_queue_is_up_to_date_;
diff --git a/cc/resources/tiling_set_eviction_queue.cc b/cc/resources/tiling_set_eviction_queue.cc
index f5b3b2c..f13c915 100644
--- a/cc/resources/tiling_set_eviction_queue.cc
+++ b/cc/resources/tiling_set_eviction_queue.cc
@@ -8,21 +8,6 @@
namespace cc {
-TilingSetEvictionQueue::TilingSetEvictionQueue()
- : tiling_set_(nullptr),
- tree_(ACTIVE_TREE),
- tree_priority_(SAME_PRIORITY_FOR_BOTH_TREES),
- skip_all_shared_tiles_(false),
- skip_shared_out_of_order_tiles_(false),
- processing_soon_border_rect_(false),
- processing_tiling_with_required_for_activation_tiles_(false),
- tiling_index_with_required_for_activation_tiles_(0u),
- current_priority_bin_(TilePriority::EVENTUALLY),
- current_tiling_index_(0u),
- current_tiling_range_type_(PictureLayerTilingSet::HIGHER_THAN_HIGH_RES),
- current_eviction_tile_(nullptr) {
-}
-
TilingSetEvictionQueue::TilingSetEvictionQueue(
PictureLayerTilingSet* tiling_set,
TreePriority tree_priority,
diff --git a/cc/resources/tiling_set_eviction_queue.h b/cc/resources/tiling_set_eviction_queue.h
index 4463cc3..b7027c4 100644
--- a/cc/resources/tiling_set_eviction_queue.h
+++ b/cc/resources/tiling_set_eviction_queue.h
@@ -74,7 +74,6 @@
// eviction queue.
class CC_EXPORT TilingSetEvictionQueue {
public:
- TilingSetEvictionQueue();
TilingSetEvictionQueue(PictureLayerTilingSet* tiling_set,
TreePriority tree_priority,
bool skip_shared_out_of_order_tiles);
diff --git a/cc/resources/tiling_set_raster_queue_required.cc b/cc/resources/tiling_set_raster_queue_required.cc
index 7d76d2c..89ddb04 100644
--- a/cc/resources/tiling_set_raster_queue_required.cc
+++ b/cc/resources/tiling_set_raster_queue_required.cc
@@ -25,7 +25,12 @@
// resolution is not HIGH_RESOLUTION.
PictureLayerTiling* tiling =
tiling_set->FindTilingWithResolution(HIGH_RESOLUTION);
- DCHECK(tiling);
+ // If we don't have a high res tiling, then this queue will yield no tiles.
+ // See PictureLayerImpl::CanHaveTilings for examples of when a HIGH_RESOLUTION
+ // tiling would not be generated.
+ if (!tiling)
+ return;
+
iterator_ = TilingIterator(tiling, &tiling->tiling_data_);
while (!iterator_.done() && !IsTileRequired(*iterator_))
++iterator_;
diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
index b24430f..35f13f4 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -561,9 +561,9 @@
state_machine_.SetSkipNextBeginMainFrameToReduceLatency();
}
- client_->WillBeginImplFrame(begin_impl_frame_args_);
state_machine_.OnBeginImplFrame(begin_impl_frame_args_);
devtools_instrumentation::DidBeginFrame(layer_tree_host_id_);
+ client_->WillBeginImplFrame(begin_impl_frame_args_);
ProcessScheduledActions();
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
index c3a4a1e..d54907f 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -875,12 +875,6 @@
if (pending_swaps_ >= max_pending_swaps_)
return false;
- if (active_tree_needs_first_draw_)
- return true;
-
- if (!needs_redraw_)
- return false;
-
// This is used to prioritize impl-thread draws when the main thread isn't
// producing anything, e.g., after an aborted commit. We also check that we
// don't have a pending tree -- otherwise we should give it a chance to
@@ -889,6 +883,12 @@
if (commit_state_ == COMMIT_STATE_IDLE && !has_pending_tree_)
return true;
+ if (!needs_redraw_)
+ return false;
+
+ if (active_tree_needs_first_draw_)
+ return true;
+
// Prioritize impl-thread draws in impl_latency_takes_priority_ mode.
if (impl_latency_takes_priority_)
return true;
diff --git a/cc/scheduler/scheduler_unittest.cc b/cc/scheduler/scheduler_unittest.cc
index 29e4c49..ea3cf10 100644
--- a/cc/scheduler/scheduler_unittest.cc
+++ b/cc/scheduler/scheduler_unittest.cc
@@ -2318,5 +2318,34 @@
EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client, 0, 1);
}
+TEST(SchedulerTest, BeginMainFrameAbortedTriggersImmediateDeadline) {
+ FakeSchedulerClient client;
+ SchedulerSettings settings;
+ settings.use_external_begin_frame_source = true;
+
+ CREATE_SCHEDULER_AND_INIT_SURFACE(settings);
+
+ scheduler->SetNeedsCommit();
+ EXPECT_SINGLE_ACTION("SetNeedsBeginFrames(true)", client);
+ client.Reset();
+
+ client.AdvanceFrame();
+ EXPECT_ACTION("WillBeginImplFrame", client, 0, 2);
+ EXPECT_ACTION("ScheduledActionSendBeginMainFrame", client, 1, 2);
+ EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending());
+ client.Reset();
+
+ client.task_runner().RunUntilTime(client.now_src()->Now());
+ EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending());
+
+ scheduler->BeginMainFrameAborted(CommitEarlyOutReason::ABORTED_NOT_VISIBLE);
+
+ EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending());
+ client.task_runner().RunUntilTime(client.now_src()->Now());
+ EXPECT_FALSE(scheduler->BeginImplFrameDeadlinePending());
+
+ EXPECT_NO_ACTION(client);
+}
+
} // namespace
} // namespace cc
diff --git a/cc/test/animation_test_common.cc b/cc/test/animation_test_common.cc
index ccd0828..f3fc212 100644
--- a/cc/test/animation_test_common.cc
+++ b/cc/test/animation_test_common.cc
@@ -207,7 +207,9 @@
FakeLayerAnimationValueObserver::FakeLayerAnimationValueObserver()
: opacity_(0.0f),
- animation_waiting_for_deletion_(false) {}
+ animation_waiting_for_deletion_(false),
+ scroll_offset_animation_removed_(false) {
+}
FakeLayerAnimationValueObserver::~FakeLayerAnimationValueObserver() {}
@@ -234,6 +236,10 @@
animation_waiting_for_deletion_ = true;
}
+void FakeLayerAnimationValueObserver::OnScrollOffsetAnimationRemoved() {
+ scroll_offset_animation_removed_ = true;
+}
+
bool FakeLayerAnimationValueObserver::IsActive() const {
return true;
}
diff --git a/cc/test/animation_test_common.h b/cc/test/animation_test_common.h
index b2909b8..57d2e97 100644
--- a/cc/test/animation_test_common.h
+++ b/cc/test/animation_test_common.h
@@ -82,6 +82,7 @@
void OnTransformAnimated(const gfx::Transform& transform) override;
void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override;
void OnAnimationWaitingForDeletion() override;
+ void OnScrollOffsetAnimationRemoved() override;
bool IsActive() const override;
const FilterOperations& filters() const { return filters_; }
@@ -93,12 +94,20 @@
return animation_waiting_for_deletion_;
}
+ bool scroll_offset_animation_removed() const {
+ return scroll_offset_animation_removed_;
+ }
+ void reset_scroll_offset_animation_removed() {
+ scroll_offset_animation_removed_ = false;
+ }
+
private:
FilterOperations filters_;
float opacity_;
gfx::Transform transform_;
gfx::ScrollOffset scroll_offset_;
bool animation_waiting_for_deletion_;
+ bool scroll_offset_animation_removed_;
};
class FakeInactiveLayerAnimationValueObserver
diff --git a/cc/test/fake_picture_pile_impl.cc b/cc/test/fake_picture_pile_impl.cc
index 8b6cb8d..c400298 100644
--- a/cc/test/fake_picture_pile_impl.cc
+++ b/cc/test/fake_picture_pile_impl.cc
@@ -24,7 +24,7 @@
base::WaitableEvent* playback_allowed_event)
: PicturePileImpl(other),
playback_allowed_event_(playback_allowed_event),
- tile_grid_info_(other->GetTileGridInfoForTesting()) {
+ tile_grid_size_(other->GetTileGridSizeForTesting()) {
}
FakePicturePileImpl::~FakePicturePileImpl() {}
@@ -118,7 +118,7 @@
bounds.Inset(-buffer_pixels(), -buffer_pixels());
scoped_refptr<Picture> picture(Picture::Create(
- bounds, &client_, tile_grid_info_, true, Picture::RECORD_NORMALLY));
+ bounds, &client_, tile_grid_size_, true, Picture::RECORD_NORMALLY));
picture_map_[std::pair<int, int>(x, y)].SetPicture(picture);
EXPECT_TRUE(HasRecordingAt(x, y));
diff --git a/cc/test/fake_picture_pile_impl.h b/cc/test/fake_picture_pile_impl.h
index 4f7b5af..3a43702 100644
--- a/cc/test/fake_picture_pile_impl.h
+++ b/cc/test/fake_picture_pile_impl.h
@@ -102,7 +102,7 @@
FakeContentLayerClient client_;
SkPaint default_paint_;
base::WaitableEvent* playback_allowed_event_;
- SkTileGridFactory::TileGridInfo tile_grid_info_;
+ gfx::Size tile_grid_size_;
};
} // namespace cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index db9b072..526d456 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -3298,9 +3298,8 @@
ActivationStateAsValueInto(state);
state->EndDictionary();
}
- state->BeginDictionary("device_viewport_size");
- MathUtil::AddToTracedValue(device_viewport_size_, state);
- state->EndDictionary();
+ MathUtil::AddToTracedValue("device_viewport_size", device_viewport_size_,
+ state);
std::set<const Tile*> tiles;
active_tree_->GetAllTilesForTracing(&tiles);
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 69e5272..356bb5f 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -5779,6 +5779,66 @@
MULTI_THREAD_IMPL_TEST_F(RasterizeWithGpuRasterizationCreatesResources);
+class GpuRasterizationRasterizesVisibleOnly : public LayerTreeHostTest {
+ protected:
+ GpuRasterizationRasterizesVisibleOnly() : viewport_size_(1024, 2048) {}
+
+ void InitializeSettings(LayerTreeSettings* settings) override {
+ settings->impl_side_painting = true;
+ settings->gpu_rasterization_enabled = true;
+ settings->gpu_rasterization_forced = true;
+ }
+
+ void SetupTree() override {
+ client_.set_fill_with_nonsolid_color(true);
+
+ scoped_ptr<FakePicturePile> pile(new FakePicturePile);
+ scoped_refptr<FakePictureLayer> root =
+ FakePictureLayer::CreateWithRecordingSource(&client_, pile.Pass());
+ root->SetBounds(gfx::Size(viewport_size_.width(), 10000));
+ root->SetContentsOpaque(true);
+
+ layer_tree_host()->SetRootLayer(root);
+ LayerTreeHostTest::SetupTree();
+ layer_tree_host()->SetViewportSize(viewport_size_);
+ }
+
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+
+ DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
+ LayerTreeHostImpl::FrameData* frame_data,
+ DrawResult draw_result) override {
+ EXPECT_EQ(4u, host_impl->resource_provider()->num_resources());
+
+ // Verify which tiles got resources using an eviction iterator, which has to
+ // return all tiles that have resources.
+ EvictionTilePriorityQueue eviction_queue;
+ host_impl->BuildEvictionQueue(&eviction_queue,
+ SAME_PRIORITY_FOR_BOTH_TREES);
+ int tile_count = 0;
+ for (; !eviction_queue.IsEmpty(); eviction_queue.Pop()) {
+ Tile* tile = eviction_queue.Top();
+ // Ensure this tile is within the viewport.
+ EXPECT_TRUE(tile->content_rect().Intersects(gfx::Rect(viewport_size_)));
+ // Ensure that the tile is 1/4 of the viewport tall (plus padding).
+ EXPECT_EQ(tile->content_rect().height(),
+ (viewport_size_.height() / 4) + 2);
+ ++tile_count;
+ }
+ EXPECT_EQ(4, tile_count);
+ EndTest();
+ return draw_result;
+ }
+
+ void AfterTest() override {}
+
+ private:
+ FakeContentLayerClient client_;
+ gfx::Size viewport_size_;
+};
+
+MULTI_THREAD_IMPL_TEST_F(GpuRasterizationRasterizesVisibleOnly);
+
class LayerTreeHostTestContinuousDrawWhenCreatingVisibleTiles
: public LayerTreeHostTest {
protected:
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc
index f6bc4d9..75d8ab0 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -1013,6 +1013,108 @@
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestScrollOffsetChangesArePropagated);
+// Verifies that when the main thread removes a scroll animation and sets a new
+// scroll position, the active tree takes on exactly this new scroll position
+// after activation, and the main thread doesn't receive a spurious scroll
+// delta.
+class LayerTreeHostAnimationTestScrollOffsetAnimationRemoval
+ : public LayerTreeHostAnimationTest {
+ public:
+ LayerTreeHostAnimationTestScrollOffsetAnimationRemoval()
+ : final_postion_(50.0, 100.0) {}
+
+ void SetupTree() override {
+ LayerTreeHostAnimationTest::SetupTree();
+
+ scroll_layer_ = FakeContentLayer::Create(&client_);
+ scroll_layer_->SetScrollClipLayerId(layer_tree_host()->root_layer()->id());
+ scroll_layer_->SetBounds(gfx::Size(10000, 10000));
+ scroll_layer_->SetScrollOffset(gfx::ScrollOffset(100.0, 200.0));
+ layer_tree_host()->root_layer()->AddChild(scroll_layer_);
+
+ scoped_ptr<ScrollOffsetAnimationCurve> curve(
+ ScrollOffsetAnimationCurve::Create(gfx::ScrollOffset(6500.f, 7500.f),
+ EaseInOutTimingFunction::Create()));
+ scoped_ptr<Animation> animation(
+ Animation::Create(curve.Pass(), 1, 0, Animation::ScrollOffset));
+ animation->set_needs_synchronized_start_time(true);
+ scroll_layer_->AddAnimation(animation.Pass());
+ }
+
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
+
+ void DidCommit() override {
+ Animation* animation =
+ scroll_layer_->layer_animation_controller()->GetAnimation(
+ Animation::ScrollOffset);
+ if (animation) {
+ scroll_layer_->layer_animation_controller()->RemoveAnimation(
+ animation->id());
+ scroll_layer_->SetScrollOffset(final_postion_);
+ } else {
+ EXPECT_EQ(final_postion_, scroll_layer_->scroll_offset());
+ }
+ }
+
+ void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override {
+ if (host_impl->settings().impl_side_painting)
+ host_impl->BlockNotifyReadyToActivateForTesting(true);
+ }
+
+ void WillBeginImplFrameOnThread(LayerTreeHostImpl* host_impl,
+ const BeginFrameArgs& args) override {
+ if (!host_impl->pending_tree())
+ return;
+
+ if (!host_impl->active_tree()->root_layer()) {
+ host_impl->BlockNotifyReadyToActivateForTesting(false);
+ return;
+ }
+
+ LayerImpl* scroll_layer_impl =
+ host_impl->active_tree()->root_layer()->children()[0];
+ Animation* animation =
+ scroll_layer_impl->layer_animation_controller()->GetAnimation(
+ Animation::ScrollOffset);
+
+ if (!animation || animation->run_state() != Animation::Running) {
+ host_impl->BlockNotifyReadyToActivateForTesting(false);
+ return;
+ }
+
+ // Block activation until the running animation has a chance to produce a
+ // scroll delta.
+ gfx::Vector2dF scroll_delta = scroll_layer_impl->ScrollDelta() -
+ scroll_layer_impl->sent_scroll_delta();
+ if (scroll_delta.x() < 1.f || scroll_delta.y() < 1.f)
+ return;
+
+ host_impl->BlockNotifyReadyToActivateForTesting(false);
+ }
+
+ void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
+ LayerImpl* scroll_layer_impl =
+ host_impl->active_tree()->root_layer()->children()[0];
+ if (scroll_layer_impl->layer_animation_controller()->GetAnimation(
+ Animation::ScrollOffset))
+ return;
+
+ EXPECT_EQ(final_postion_, scroll_layer_impl->TotalScrollOffset());
+ EndTest();
+ }
+
+ void AfterTest() override {
+ EXPECT_EQ(final_postion_, scroll_layer_->scroll_offset());
+ }
+
+ private:
+ FakeContentLayerClient client_;
+ scoped_refptr<FakeContentLayer> scroll_layer_;
+ const gfx::ScrollOffset final_postion_;
+};
+
+MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestScrollOffsetAnimationRemoval);
+
// When animations are simultaneously added to an existing layer and to a new
// layer, they should start at the same time, even when there's already a
// running animation on the existing layer.
diff --git a/crypto/BUILD.gn b/crypto/BUILD.gn
index 94388f7..f6c45aa 100644
--- a/crypto/BUILD.gn
+++ b/crypto/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/crypto.gni")
+import("//testing/test.gni")
component("crypto") {
output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto.
diff --git a/crypto/mock_apple_keychain.cc b/crypto/mock_apple_keychain.cc
index 1ddfc86..a1faa65 100644
--- a/crypto/mock_apple_keychain.cc
+++ b/crypto/mock_apple_keychain.cc
@@ -3,9 +3,23 @@
// found in the LICENSE file.
#include "base/logging.h"
+#include "base/metrics/histogram.h"
#include "base/time/time.h"
#include "crypto/mock_apple_keychain.h"
+namespace {
+
+// Adds an entry to a local histogram to indicate that the Apple Keychain would
+// have been accessed, if this class were not a mock of the Apple Keychain.
+void IncrementKeychainAccessHistogram() {
+ // This local histogram is accessed by Telemetry to track the number of times
+ // the keychain is accessed, since keychain access is known to be synchronous
+ // and slow.
+ LOCAL_HISTOGRAM_BOOLEAN("OSX.Keychain.Access", true);
+}
+
+} // namespace
+
namespace crypto {
OSStatus MockAppleKeychain::FindGenericPassword(
@@ -17,6 +31,8 @@
UInt32* passwordLength,
void** passwordData,
SecKeychainItemRef* itemRef) const {
+ IncrementKeychainAccessHistogram();
+
// When simulating |noErr|, return canned |passwordData| and
// |passwordLength|. Otherwise, just return given code.
if (find_generic_result_ == noErr) {
@@ -48,6 +64,8 @@
UInt32 passwordLength,
const void* passwordData,
SecKeychainItemRef* itemRef) const {
+ IncrementKeychainAccessHistogram();
+
called_add_generic_ = true;
DCHECK_GT(passwordLength, 0U);
@@ -58,4 +76,9 @@
return noErr;
}
+std::string MockAppleKeychain::GetEncryptionPassword() const {
+ IncrementKeychainAccessHistogram();
+ return "mock_password";
+}
+
} // namespace crypto
diff --git a/crypto/mock_apple_keychain.h b/crypto/mock_apple_keychain.h
index 28c77b8..3948d48 100644
--- a/crypto/mock_apple_keychain.h
+++ b/crypto/mock_apple_keychain.h
@@ -51,6 +51,9 @@
const void* passwordData,
SecKeychainItemRef* itemRef) const override;
+ // Returns the password that OSCrypt uses to generate its encryption key.
+ std::string GetEncryptionPassword() const;
+
#if !defined(OS_IOS)
OSStatus ItemCopyAttributesAndData(SecKeychainItemRef itemRef,
SecKeychainAttributeInfo* info,
diff --git a/crypto/signature_creator.h b/crypto/signature_creator.h
index 840d1ff..c221e7b 100644
--- a/crypto/signature_creator.h
+++ b/crypto/signature_creator.h
@@ -59,8 +59,6 @@
// Private constructor. Use the Create() method instead.
SignatureCreator();
- RSAPrivateKey* key_;
-
#if defined(USE_OPENSSL)
EVP_MD_CTX* sign_context_;
#elif defined(USE_NSS) || defined(OS_WIN) || defined(OS_MACOSX)
diff --git a/crypto/signature_creator_nss.cc b/crypto/signature_creator_nss.cc
index 47728b0..da03312 100644
--- a/crypto/signature_creator_nss.cc
+++ b/crypto/signature_creator_nss.cc
@@ -50,8 +50,6 @@
SignatureCreator* SignatureCreator::Create(RSAPrivateKey* key,
HashAlgorithm hash_alg) {
scoped_ptr<SignatureCreator> result(new SignatureCreator);
- result->key_ = key;
-
result->sign_context_ = SGN_NewContext(ToNSSSigOid(hash_alg), key->key());
if (!result->sign_context_) {
NOTREACHED();
@@ -113,9 +111,7 @@
return true;
}
-SignatureCreator::SignatureCreator()
- : key_(NULL),
- sign_context_(NULL) {
+SignatureCreator::SignatureCreator() : sign_context_(NULL) {
EnsureNSSInit();
}
diff --git a/crypto/signature_creator_openssl.cc b/crypto/signature_creator_openssl.cc
index 7a1349b..0d90d50 100644
--- a/crypto/signature_creator_openssl.cc
+++ b/crypto/signature_creator_openssl.cc
@@ -45,14 +45,15 @@
HashAlgorithm hash_alg) {
OpenSSLErrStackTracer err_tracer(FROM_HERE);
scoped_ptr<SignatureCreator> result(new SignatureCreator);
- result->key_ = key;
const EVP_MD* const digest = ToOpenSSLDigest(hash_alg);
DCHECK(digest);
if (!digest) {
return NULL;
}
- if (!EVP_SignInit_ex(result->sign_context_, digest, NULL))
+ if (!EVP_DigestSignInit(result->sign_context_, NULL, digest, NULL,
+ key->key())) {
return NULL;
+ }
return result.release();
}
@@ -87,17 +88,22 @@
bool SignatureCreator::Update(const uint8* data_part, int data_part_len) {
OpenSSLErrStackTracer err_tracer(FROM_HERE);
- return EVP_SignUpdate(sign_context_, data_part, data_part_len) == 1;
+ return !!EVP_DigestSignUpdate(sign_context_, data_part, data_part_len);
}
bool SignatureCreator::Final(std::vector<uint8>* signature) {
OpenSSLErrStackTracer err_tracer(FROM_HERE);
- EVP_PKEY* key = key_->key();
- signature->resize(EVP_PKEY_size(key));
- unsigned int len = 0;
- int rv = EVP_SignFinal(sign_context_, vector_as_array(signature), &len, key);
- if (!rv) {
+ // Determine the maximum length of the signature.
+ size_t len = 0;
+ if (!EVP_DigestSignFinal(sign_context_, NULL, &len)) {
+ signature->clear();
+ return false;
+ }
+ signature->resize(len);
+
+ // Sign it.
+ if (!EVP_DigestSignFinal(sign_context_, vector_as_array(signature), &len)) {
signature->clear();
return false;
}
diff --git a/gin/BUILD.gn b/gin/BUILD.gn
index d389b84..8f7e360 100644
--- a/gin/BUILD.gn
+++ b/gin/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/module_args/v8.gni")
+import("//testing/test.gni")
component("gin") {
sources = [
diff --git a/gin/array_buffer.cc b/gin/array_buffer.cc
index b777402..d592b27 100644
--- a/gin/array_buffer.cc
+++ b/gin/array_buffer.cc
@@ -16,8 +16,8 @@
} // namespace
-COMPILE_ASSERT(V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT == 2,
- array_buffers_must_have_two_internal_fields);
+static_assert(V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT == 2,
+ "array buffers must have two internal fields");
// ArrayBufferAllocator -------------------------------------------------------
diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn
index 99060ba..1c1445b 100644
--- a/gpu/BUILD.gn
+++ b/gpu/BUILD.gn
@@ -32,6 +32,8 @@
#
# gpu/skia_bindings/skia_bindings.gyp:gpu_skia_bindings => //gpu/skia_bindings
+import("//testing/test.gni")
+
component("gpu") {
public_deps = [
"//gpu/command_buffer/client",
diff --git a/gpu/GLES2/gl2chromium_autogen.h b/gpu/GLES2/gl2chromium_autogen.h
index 30f3cfa..e315a9f 100644
--- a/gpu/GLES2/gl2chromium_autogen.h
+++ b/gpu/GLES2/gl2chromium_autogen.h
@@ -33,6 +33,10 @@
#define glBufferSubData GLES2_GET_FUN(BufferSubData)
#define glCheckFramebufferStatus GLES2_GET_FUN(CheckFramebufferStatus)
#define glClear GLES2_GET_FUN(Clear)
+#define glClearBufferfi GLES2_GET_FUN(ClearBufferfi)
+#define glClearBufferfv GLES2_GET_FUN(ClearBufferfv)
+#define glClearBufferiv GLES2_GET_FUN(ClearBufferiv)
+#define glClearBufferuiv GLES2_GET_FUN(ClearBufferuiv)
#define glClearColor GLES2_GET_FUN(ClearColor)
#define glClearDepthf GLES2_GET_FUN(ClearDepthf)
#define glClearStencil GLES2_GET_FUN(ClearStencil)
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index 922a496..38cbb49 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -598,6 +598,44 @@
'GL_RENDERBUFFER',
],
},
+ 'Bufferiv': {
+ 'type': 'GLenum',
+ 'valid': [
+ 'GL_COLOR',
+ 'GL_STENCIL',
+ ],
+ 'invalid': [
+ 'GL_RENDERBUFFER',
+ ],
+ },
+ 'Bufferuiv': {
+ 'type': 'GLenum',
+ 'valid': [
+ 'GL_COLOR',
+ ],
+ 'invalid': [
+ 'GL_RENDERBUFFER',
+ ],
+ },
+ 'Bufferfv': {
+ 'type': 'GLenum',
+ 'valid': [
+ 'GL_COLOR',
+ 'GL_DEPTH',
+ ],
+ 'invalid': [
+ 'GL_RENDERBUFFER',
+ ],
+ },
+ 'Bufferfi': {
+ 'type': 'GLenum',
+ 'valid': [
+ 'GL_DEPTH_STENCIL',
+ ],
+ 'invalid': [
+ 'GL_RENDERBUFFER',
+ ],
+ },
'BufferUsage': {
'type': 'GLenum',
'valid': [
@@ -1377,6 +1415,8 @@
# for this command.
# needs_size: If True a data_size field is added to the command.
# count: The number of units per element. For PUTn or PUT types.
+# use_count_func: If True the actual data count needs to be computed; the count
+# argument specifies the maximum count.
# unit_test: If False no service side unit test will be generated.
# client_test: If False no client side unit test will be generated.
# expectation: If False the unit test will have no expected calls.
@@ -1504,6 +1544,26 @@
'defer_draws': True,
'trace_level': 1,
},
+ 'ClearBufferiv': {
+ 'type': 'PUT',
+ 'use_count_func': True,
+ 'count': 4,
+ 'unsafe': True,
+ },
+ 'ClearBufferuiv': {
+ 'type': 'PUT',
+ 'count': 4,
+ 'unsafe': True,
+ },
+ 'ClearBufferfv': {
+ 'type': 'PUT',
+ 'use_count_func': True,
+ 'count': 4,
+ 'unsafe': True,
+ },
+ 'ClearBufferfi': {
+ 'unsafe': True,
+ },
'ClearColor': {
'type': 'StateSet',
'state': 'ClearColor',
@@ -5624,6 +5684,10 @@
file.Write(" return error::kOutOfBounds;\n")
file.Write(" }\n")
+ def __NeedsToCalcDataCount(self, func):
+ use_count_func = func.GetInfo('use_count_func')
+ return use_count_func != None and use_count_func != False
+
def WriteGLES2Implementation(self, func, file):
"""Overrriden from TypeHandler."""
impl_func = func.GetInfo('impl_func')
@@ -5635,11 +5699,16 @@
file.Write(" GPU_CLIENT_SINGLE_THREAD_CHECK();\n")
func.WriteDestinationInitalizationValidation(file)
self.WriteClientGLCallLog(func, file)
- last_arg_name = func.GetLastOriginalArg().name
- values_str = ' << ", " << '.join(
- ["%s[%d]" % (last_arg_name, ndx) \
- for ndx in range(0, self.GetArrayCount(func))])
- file.Write(' GPU_CLIENT_LOG("values: " << %s);\n' % values_str)
+
+ if self.__NeedsToCalcDataCount(func):
+ file.Write(" size_t count = GLES2Util::Calc%sDataCount(%s);\n" %
+ (func.name, func.GetOriginalArgs()[0].name))
+ file.Write(" DCHECK_LE(count, %du);\n" % self.GetArrayCount(func))
+ else:
+ file.Write(" size_t count = %d;" % self.GetArrayCount(func))
+ file.Write(" for (size_t ii = 0; ii < count; ++ii)\n")
+ file.Write(' GPU_CLIENT_LOG("value[" << ii << "]: " << %s[ii]);\n' %
+ func.GetLastOriginalArg().name)
for arg in func.GetOriginalArgs():
arg.WriteClientSideValidationCode(file, func)
file.Write(" helper_->%sImmediate(%s);\n" %
@@ -5689,14 +5758,24 @@
"""Overrriden from TypeHandler."""
file.Write(" static uint32_t ComputeDataSize() {\n")
file.Write(" return static_cast<uint32_t>(\n")
- file.Write(" sizeof(%s) * %d); // NOLINT\n" %
+ file.Write(" sizeof(%s) * %d);\n" %
(self.GetArrayType(func), self.GetArrayCount(func)))
file.Write(" }\n")
file.Write("\n")
+ if self.__NeedsToCalcDataCount(func):
+ file.Write(" static uint32_t ComputeEffectiveDataSize(%s %s) {\n" %
+ (func.GetOriginalArgs()[0].type,
+ func.GetOriginalArgs()[0].name))
+ file.Write(" return static_cast<uint32_t>(\n")
+ file.Write(" sizeof(%s) * GLES2Util::Calc%sDataCount(%s));\n" %
+ (self.GetArrayType(func), func.original_name,
+ func.GetOriginalArgs()[0].name))
+ file.Write(" }\n")
+ file.Write("\n")
file.Write(" static uint32_t ComputeSize() {\n")
file.Write(" return static_cast<uint32_t>(\n")
file.Write(
- " sizeof(ValueType) + ComputeDataSize()); // NOLINT\n")
+ " sizeof(ValueType) + ComputeDataSize());\n")
file.Write(" }\n")
file.Write("\n")
@@ -5719,7 +5798,17 @@
for arg in args:
file.Write(" %s = _%s;\n" % (arg.name, arg.name))
file.Write(" memcpy(ImmediateDataAddress(this),\n")
- file.Write(" _%s, ComputeDataSize());\n" % last_arg.name)
+ if self.__NeedsToCalcDataCount(func):
+ file.Write(" _%s, ComputeEffectiveDataSize(%s));" %
+ (last_arg.name, func.GetOriginalArgs()[0].name))
+ file.Write("""
+ DCHECK_GE(ComputeDataSize(), ComputeEffectiveDataSize(%(arg)s));
+ char* pointer = reinterpret_cast<char*>(ImmediateDataAddress(this)) +
+ ComputeEffectiveDataSize(%(arg)s);
+ memset(pointer, 0, ComputeDataSize() - ComputeEffectiveDataSize(%(arg)s));
+""" % { 'arg': func.GetOriginalArgs()[0].name, })
+ else:
+ file.Write(" _%s, ComputeDataSize());\n" % last_arg.name)
file.Write(" }\n")
file.Write("\n")
@@ -9307,7 +9396,8 @@
gen.WriteCommonUtilsImpl(
"gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h")
gen.WriteGLES2Header("gpu/GLES2/gl2chromium_autogen.h")
- mojo_gles2_prefix = "mojo/public/c/gles2/gles2_call_visitor"
+ mojo_gles2_prefix = ("third_party/mojo/src/mojo/public/c/gles2/"
+ "gles2_call_visitor")
gen.WriteMojoGLCallVisitor(mojo_gles2_prefix + "_autogen.h")
gen.WriteMojoGLCallVisitorForExtension(
mojo_gles2_prefix + "_chromium_texture_mailbox_autogen.h",
diff --git a/gpu/command_buffer/client/gles2_c_lib_autogen.h b/gpu/command_buffer/client/gles2_c_lib_autogen.h
index 9264881..597ab2e 100644
--- a/gpu/command_buffer/client/gles2_c_lib_autogen.h
+++ b/gpu/command_buffer/client/gles2_c_lib_autogen.h
@@ -88,6 +88,25 @@
void GLES2Clear(GLbitfield mask) {
gles2::GetGLContext()->Clear(mask);
}
+void GLES2ClearBufferfi(GLenum buffer,
+ GLint drawbuffers,
+ GLfloat depth,
+ GLint stencil) {
+ gles2::GetGLContext()->ClearBufferfi(buffer, drawbuffers, depth, stencil);
+}
+void GLES2ClearBufferfv(GLenum buffer,
+ GLint drawbuffers,
+ const GLfloat* value) {
+ gles2::GetGLContext()->ClearBufferfv(buffer, drawbuffers, value);
+}
+void GLES2ClearBufferiv(GLenum buffer, GLint drawbuffers, const GLint* value) {
+ gles2::GetGLContext()->ClearBufferiv(buffer, drawbuffers, value);
+}
+void GLES2ClearBufferuiv(GLenum buffer,
+ GLint drawbuffers,
+ const GLuint* value) {
+ gles2::GetGLContext()->ClearBufferuiv(buffer, drawbuffers, value);
+}
void GLES2ClearColor(GLclampf red,
GLclampf green,
GLclampf blue,
@@ -1277,6 +1296,22 @@
reinterpret_cast<GLES2FunctionPointer>(glClear),
},
{
+ "glClearBufferfi",
+ reinterpret_cast<GLES2FunctionPointer>(glClearBufferfi),
+ },
+ {
+ "glClearBufferfv",
+ reinterpret_cast<GLES2FunctionPointer>(glClearBufferfv),
+ },
+ {
+ "glClearBufferiv",
+ reinterpret_cast<GLES2FunctionPointer>(glClearBufferiv),
+ },
+ {
+ "glClearBufferuiv",
+ reinterpret_cast<GLES2FunctionPointer>(glClearBufferuiv),
+ },
+ {
"glClearColor",
reinterpret_cast<GLES2FunctionPointer>(glClearColor),
},
diff --git a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
index 7f79e34..dc31b96 100644
--- a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
+++ b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
@@ -176,6 +176,49 @@
}
}
+void ClearBufferfi(GLenum buffer,
+ GLint drawbuffers,
+ GLfloat depth,
+ GLint stencil) {
+ gles2::cmds::ClearBufferfi* c = GetCmdSpace<gles2::cmds::ClearBufferfi>();
+ if (c) {
+ c->Init(buffer, drawbuffers, depth, stencil);
+ }
+}
+
+void ClearBufferfvImmediate(GLenum buffer,
+ GLint drawbuffers,
+ const GLfloat* value) {
+ const uint32_t size = gles2::cmds::ClearBufferfvImmediate::ComputeSize();
+ gles2::cmds::ClearBufferfvImmediate* c =
+ GetImmediateCmdSpaceTotalSize<gles2::cmds::ClearBufferfvImmediate>(size);
+ if (c) {
+ c->Init(buffer, drawbuffers, value);
+ }
+}
+
+void ClearBufferivImmediate(GLenum buffer,
+ GLint drawbuffers,
+ const GLint* value) {
+ const uint32_t size = gles2::cmds::ClearBufferivImmediate::ComputeSize();
+ gles2::cmds::ClearBufferivImmediate* c =
+ GetImmediateCmdSpaceTotalSize<gles2::cmds::ClearBufferivImmediate>(size);
+ if (c) {
+ c->Init(buffer, drawbuffers, value);
+ }
+}
+
+void ClearBufferuivImmediate(GLenum buffer,
+ GLint drawbuffers,
+ const GLuint* value) {
+ const uint32_t size = gles2::cmds::ClearBufferuivImmediate::ComputeSize();
+ gles2::cmds::ClearBufferuivImmediate* c =
+ GetImmediateCmdSpaceTotalSize<gles2::cmds::ClearBufferuivImmediate>(size);
+ if (c) {
+ c->Init(buffer, drawbuffers, value);
+ }
+}
+
void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
gles2::cmds::ClearColor* c = GetCmdSpace<gles2::cmds::ClearColor>();
if (c) {
diff --git a/gpu/command_buffer/client/gles2_implementation_autogen.h b/gpu/command_buffer/client/gles2_implementation_autogen.h
index c2be814..16753ae 100644
--- a/gpu/command_buffer/client/gles2_implementation_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_autogen.h
@@ -71,6 +71,23 @@
void Clear(GLbitfield mask) override;
+void ClearBufferfi(GLenum buffer,
+ GLint drawbuffers,
+ GLfloat depth,
+ GLint stencil) override;
+
+void ClearBufferfv(GLenum buffer,
+ GLint drawbuffers,
+ const GLfloat* value) override;
+
+void ClearBufferiv(GLenum buffer,
+ GLint drawbuffers,
+ const GLint* value) override;
+
+void ClearBufferuiv(GLenum buffer,
+ GLint drawbuffers,
+ const GLuint* value) override;
+
void ClearColor(GLclampf red,
GLclampf green,
GLclampf blue,
diff --git a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
index 95ca175..71ad0db 100644
--- a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
@@ -222,6 +222,65 @@
CheckGLError();
}
+void GLES2Implementation::ClearBufferfi(GLenum buffer,
+ GLint drawbuffers,
+ GLfloat depth,
+ GLint stencil) {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glClearBufferfi("
+ << GLES2Util::GetStringBufferfv(buffer) << ", "
+ << drawbuffers << ", " << depth << ", " << stencil << ")");
+ helper_->ClearBufferfi(buffer, drawbuffers, depth, stencil);
+ CheckGLError();
+}
+
+void GLES2Implementation::ClearBufferfv(GLenum buffer,
+ GLint drawbuffers,
+ const GLfloat* value) {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glClearBufferfv("
+ << GLES2Util::GetStringBufferfv(buffer) << ", "
+ << drawbuffers << ", " << static_cast<const void*>(value)
+ << ")");
+ size_t count = GLES2Util::CalcClearBufferfvDataCount(buffer);
+ DCHECK_LE(count, 4u);
+ for (size_t ii = 0; ii < count; ++ii)
+ GPU_CLIENT_LOG("value[" << ii << "]: " << value[ii]);
+ helper_->ClearBufferfvImmediate(buffer, drawbuffers, value);
+ CheckGLError();
+}
+
+void GLES2Implementation::ClearBufferiv(GLenum buffer,
+ GLint drawbuffers,
+ const GLint* value) {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glClearBufferiv("
+ << GLES2Util::GetStringBufferiv(buffer) << ", "
+ << drawbuffers << ", " << static_cast<const void*>(value)
+ << ")");
+ size_t count = GLES2Util::CalcClearBufferivDataCount(buffer);
+ DCHECK_LE(count, 4u);
+ for (size_t ii = 0; ii < count; ++ii)
+ GPU_CLIENT_LOG("value[" << ii << "]: " << value[ii]);
+ helper_->ClearBufferivImmediate(buffer, drawbuffers, value);
+ CheckGLError();
+}
+
+void GLES2Implementation::ClearBufferuiv(GLenum buffer,
+ GLint drawbuffers,
+ const GLuint* value) {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glClearBufferuiv("
+ << GLES2Util::GetStringBufferuiv(buffer) << ", "
+ << drawbuffers << ", " << static_cast<const void*>(value)
+ << ")");
+ size_t count = 4;
+ for (size_t ii = 0; ii < count; ++ii)
+ GPU_CLIENT_LOG("value[" << ii << "]: " << value[ii]);
+ helper_->ClearBufferuivImmediate(buffer, drawbuffers, value);
+ CheckGLError();
+}
+
void GLES2Implementation::ClearColor(GLclampf red,
GLclampf green,
GLclampf blue,
@@ -1536,7 +1595,9 @@
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glSamplerParameterfv(" << sampler
<< ", " << GLES2Util::GetStringSamplerParameter(pname)
<< ", " << static_cast<const void*>(params) << ")");
- GPU_CLIENT_LOG("values: " << params[0]);
+ size_t count = 1;
+ for (size_t ii = 0; ii < count; ++ii)
+ GPU_CLIENT_LOG("value[" << ii << "]: " << params[ii]);
helper_->SamplerParameterfvImmediate(sampler, pname, params);
CheckGLError();
}
@@ -1559,7 +1620,9 @@
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glSamplerParameteriv(" << sampler
<< ", " << GLES2Util::GetStringSamplerParameter(pname)
<< ", " << static_cast<const void*>(params) << ")");
- GPU_CLIENT_LOG("values: " << params[0]);
+ size_t count = 1;
+ for (size_t ii = 0; ii < count; ++ii)
+ GPU_CLIENT_LOG("value[" << ii << "]: " << params[ii]);
helper_->SamplerParameterivImmediate(sampler, pname, params);
CheckGLError();
}
@@ -1665,7 +1728,9 @@
<< GLES2Util::GetStringTextureBindTarget(target) << ", "
<< GLES2Util::GetStringTextureParameter(pname) << ", "
<< static_cast<const void*>(params) << ")");
- GPU_CLIENT_LOG("values: " << params[0]);
+ size_t count = 1;
+ for (size_t ii = 0; ii < count; ++ii)
+ GPU_CLIENT_LOG("value[" << ii << "]: " << params[ii]);
helper_->TexParameterfvImmediate(target, pname, params);
CheckGLError();
}
@@ -1690,7 +1755,9 @@
<< GLES2Util::GetStringTextureBindTarget(target) << ", "
<< GLES2Util::GetStringTextureParameter(pname) << ", "
<< static_cast<const void*>(params) << ")");
- GPU_CLIENT_LOG("values: " << params[0]);
+ size_t count = 1;
+ for (size_t ii = 0; ii < count; ++ii)
+ GPU_CLIENT_LOG("value[" << ii << "]: " << params[ii]);
helper_->TexParameterivImmediate(target, pname, params);
CheckGLError();
}
@@ -2391,7 +2458,9 @@
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib1fv(" << indx << ", "
<< static_cast<const void*>(values) << ")");
- GPU_CLIENT_LOG("values: " << values[0]);
+ size_t count = 1;
+ for (size_t ii = 0; ii < count; ++ii)
+ GPU_CLIENT_LOG("value[" << ii << "]: " << values[ii]);
helper_->VertexAttrib1fvImmediate(indx, values);
CheckGLError();
}
@@ -2408,7 +2477,9 @@
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib2fv(" << indx << ", "
<< static_cast<const void*>(values) << ")");
- GPU_CLIENT_LOG("values: " << values[0] << ", " << values[1]);
+ size_t count = 2;
+ for (size_t ii = 0; ii < count; ++ii)
+ GPU_CLIENT_LOG("value[" << ii << "]: " << values[ii]);
helper_->VertexAttrib2fvImmediate(indx, values);
CheckGLError();
}
@@ -2428,8 +2499,9 @@
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib3fv(" << indx << ", "
<< static_cast<const void*>(values) << ")");
- GPU_CLIENT_LOG("values: " << values[0] << ", " << values[1] << ", "
- << values[2]);
+ size_t count = 3;
+ for (size_t ii = 0; ii < count; ++ii)
+ GPU_CLIENT_LOG("value[" << ii << "]: " << values[ii]);
helper_->VertexAttrib3fvImmediate(indx, values);
CheckGLError();
}
@@ -2450,8 +2522,9 @@
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttrib4fv(" << indx << ", "
<< static_cast<const void*>(values) << ")");
- GPU_CLIENT_LOG("values: " << values[0] << ", " << values[1] << ", "
- << values[2] << ", " << values[3]);
+ size_t count = 4;
+ for (size_t ii = 0; ii < count; ++ii)
+ GPU_CLIENT_LOG("value[" << ii << "]: " << values[ii]);
helper_->VertexAttrib4fvImmediate(indx, values);
CheckGLError();
}
@@ -2472,8 +2545,9 @@
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttribI4iv(" << indx
<< ", " << static_cast<const void*>(values) << ")");
- GPU_CLIENT_LOG("values: " << values[0] << ", " << values[1] << ", "
- << values[2] << ", " << values[3]);
+ size_t count = 4;
+ for (size_t ii = 0; ii < count; ++ii)
+ GPU_CLIENT_LOG("value[" << ii << "]: " << values[ii]);
helper_->VertexAttribI4ivImmediate(indx, values);
CheckGLError();
}
@@ -2495,8 +2569,9 @@
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttribI4uiv(" << indx
<< ", " << static_cast<const void*>(values) << ")");
- GPU_CLIENT_LOG("values: " << values[0] << ", " << values[1] << ", "
- << values[2] << ", " << values[3]);
+ size_t count = 4;
+ for (size_t ii = 0; ii < count; ++ii)
+ GPU_CLIENT_LOG("value[" << ii << "]: " << values[ii]);
helper_->VertexAttribI4uivImmediate(indx, values);
CheckGLError();
}
@@ -3089,12 +3164,9 @@
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glMatrixLoadfCHROMIUM("
<< GLES2Util::GetStringMatrixMode(matrixMode) << ", "
<< static_cast<const void*>(m) << ")");
- GPU_CLIENT_LOG("values: " << m[0] << ", " << m[1] << ", " << m[2] << ", "
- << m[3] << ", " << m[4] << ", " << m[5] << ", "
- << m[6] << ", " << m[7] << ", " << m[8] << ", "
- << m[9] << ", " << m[10] << ", " << m[11] << ", "
- << m[12] << ", " << m[13] << ", " << m[14] << ", "
- << m[15]);
+ size_t count = 16;
+ for (size_t ii = 0; ii < count; ++ii)
+ GPU_CLIENT_LOG("value[" << ii << "]: " << m[ii]);
helper_->MatrixLoadfCHROMIUMImmediate(matrixMode, m);
CheckGLError();
}
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest.cc b/gpu/command_buffer/client/gles2_implementation_unittest.cc
index 0d49e42..29e86df 100644
--- a/gpu/command_buffer/client/gles2_implementation_unittest.cc
+++ b/gpu/command_buffer/client/gles2_implementation_unittest.cc
@@ -2647,6 +2647,9 @@
&size, &unpadded_row_size, &padded_row_size));
// Makes sure we can just send over the data in one command.
const GLsizei kHeight = MaxTransferBufferSize() / padded_row_size / kDepth;
+ ASSERT_TRUE(GLES2Util::ComputeImageDataSizes(
+ kWidth, kHeight, kDepth, kFormat, kType, kPixelStoreUnpackAlignment,
+ &size, NULL, NULL));
scoped_ptr<uint8[]> pixels(new uint8[size]);
for (uint32 ii = 0; ii < size; ++ii) {
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
index c398d61..a327aee 100644
--- a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
@@ -196,6 +196,65 @@
EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
}
+TEST_F(GLES2ImplementationTest, ClearBufferfi) {
+ struct Cmds {
+ cmds::ClearBufferfi cmd;
+ };
+ Cmds expected;
+ expected.cmd.Init(GL_COLOR, 2, 3, 4);
+
+ gl_->ClearBufferfi(GL_COLOR, 2, 3, 4);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, ClearBufferfv) {
+ GLfloat data[4] = {0};
+ struct Cmds {
+ cmds::ClearBufferfvImmediate cmd;
+ GLfloat data[4];
+ };
+
+ for (int jj = 0; jj < 4; ++jj) {
+ data[jj] = static_cast<GLfloat>(jj);
+ }
+ Cmds expected;
+ expected.cmd.Init(GL_COLOR, 2, &data[0]);
+ gl_->ClearBufferfv(GL_COLOR, 2, &data[0]);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, ClearBufferiv) {
+ GLint data[4] = {0};
+ struct Cmds {
+ cmds::ClearBufferivImmediate cmd;
+ GLint data[4];
+ };
+
+ for (int jj = 0; jj < 4; ++jj) {
+ data[jj] = static_cast<GLint>(jj);
+ }
+ Cmds expected;
+ expected.cmd.Init(GL_COLOR, 2, &data[0]);
+ gl_->ClearBufferiv(GL_COLOR, 2, &data[0]);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, ClearBufferuiv) {
+ GLuint data[4] = {0};
+ struct Cmds {
+ cmds::ClearBufferuivImmediate cmd;
+ GLuint data[4];
+ };
+
+ for (int jj = 0; jj < 4; ++jj) {
+ data[jj] = static_cast<GLuint>(jj);
+ }
+ Cmds expected;
+ expected.cmd.Init(GL_COLOR, 2, &data[0]);
+ gl_->ClearBufferuiv(GL_COLOR, 2, &data[0]);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
TEST_F(GLES2ImplementationTest, ClearColor) {
struct Cmds {
cmds::ClearColor cmd;
diff --git a/gpu/command_buffer/client/gles2_interface_autogen.h b/gpu/command_buffer/client/gles2_interface_autogen.h
index 56f4e10..42262ce 100644
--- a/gpu/command_buffer/client/gles2_interface_autogen.h
+++ b/gpu/command_buffer/client/gles2_interface_autogen.h
@@ -51,6 +51,19 @@
const void* data) = 0;
virtual GLenum CheckFramebufferStatus(GLenum target) = 0;
virtual void Clear(GLbitfield mask) = 0;
+virtual void ClearBufferfi(GLenum buffer,
+ GLint drawbuffers,
+ GLfloat depth,
+ GLint stencil) = 0;
+virtual void ClearBufferfv(GLenum buffer,
+ GLint drawbuffers,
+ const GLfloat* value) = 0;
+virtual void ClearBufferiv(GLenum buffer,
+ GLint drawbuffers,
+ const GLint* value) = 0;
+virtual void ClearBufferuiv(GLenum buffer,
+ GLint drawbuffers,
+ const GLuint* value) = 0;
virtual void ClearColor(GLclampf red,
GLclampf green,
GLclampf blue,
diff --git a/gpu/command_buffer/client/gles2_interface_stub_autogen.h b/gpu/command_buffer/client/gles2_interface_stub_autogen.h
index d2902c5..974bf39 100644
--- a/gpu/command_buffer/client/gles2_interface_stub_autogen.h
+++ b/gpu/command_buffer/client/gles2_interface_stub_autogen.h
@@ -50,6 +50,19 @@
const void* data) override;
GLenum CheckFramebufferStatus(GLenum target) override;
void Clear(GLbitfield mask) override;
+void ClearBufferfi(GLenum buffer,
+ GLint drawbuffers,
+ GLfloat depth,
+ GLint stencil) override;
+void ClearBufferfv(GLenum buffer,
+ GLint drawbuffers,
+ const GLfloat* value) override;
+void ClearBufferiv(GLenum buffer,
+ GLint drawbuffers,
+ const GLint* value) override;
+void ClearBufferuiv(GLenum buffer,
+ GLint drawbuffers,
+ const GLuint* value) override;
void ClearColor(GLclampf red,
GLclampf green,
GLclampf blue,
diff --git a/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h b/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
index b53085f..ce953d7 100644
--- a/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
+++ b/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
@@ -79,6 +79,23 @@
}
void GLES2InterfaceStub::Clear(GLbitfield /* mask */) {
}
+void GLES2InterfaceStub::ClearBufferfi(GLenum /* buffer */,
+ GLint /* drawbuffers */,
+ GLfloat /* depth */,
+ GLint /* stencil */) {
+}
+void GLES2InterfaceStub::ClearBufferfv(GLenum /* buffer */,
+ GLint /* drawbuffers */,
+ const GLfloat* /* value */) {
+}
+void GLES2InterfaceStub::ClearBufferiv(GLenum /* buffer */,
+ GLint /* drawbuffers */,
+ const GLint* /* value */) {
+}
+void GLES2InterfaceStub::ClearBufferuiv(GLenum /* buffer */,
+ GLint /* drawbuffers */,
+ const GLuint* /* value */) {
+}
void GLES2InterfaceStub::ClearColor(GLclampf /* red */,
GLclampf /* green */,
GLclampf /* blue */,
diff --git a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h b/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
index 8d4d69c..1f8008b 100644
--- a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
+++ b/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
@@ -50,6 +50,19 @@
const void* data) override;
GLenum CheckFramebufferStatus(GLenum target) override;
void Clear(GLbitfield mask) override;
+void ClearBufferfi(GLenum buffer,
+ GLint drawbuffers,
+ GLfloat depth,
+ GLint stencil) override;
+void ClearBufferfv(GLenum buffer,
+ GLint drawbuffers,
+ const GLfloat* value) override;
+void ClearBufferiv(GLenum buffer,
+ GLint drawbuffers,
+ const GLint* value) override;
+void ClearBufferuiv(GLenum buffer,
+ GLint drawbuffers,
+ const GLuint* value) override;
void ClearColor(GLclampf red,
GLclampf green,
GLclampf blue,
diff --git a/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h b/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
index 8e05baa..ed5c148 100644
--- a/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
+++ b/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
@@ -136,6 +136,35 @@
gl_->Clear(mask);
}
+void GLES2TraceImplementation::ClearBufferfi(GLenum buffer,
+ GLint drawbuffers,
+ GLfloat depth,
+ GLint stencil) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::ClearBufferfi");
+ gl_->ClearBufferfi(buffer, drawbuffers, depth, stencil);
+}
+
+void GLES2TraceImplementation::ClearBufferfv(GLenum buffer,
+ GLint drawbuffers,
+ const GLfloat* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::ClearBufferfv");
+ gl_->ClearBufferfv(buffer, drawbuffers, value);
+}
+
+void GLES2TraceImplementation::ClearBufferiv(GLenum buffer,
+ GLint drawbuffers,
+ const GLint* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::ClearBufferiv");
+ gl_->ClearBufferiv(buffer, drawbuffers, value);
+}
+
+void GLES2TraceImplementation::ClearBufferuiv(GLenum buffer,
+ GLint drawbuffers,
+ const GLuint* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::ClearBufferuiv");
+ gl_->ClearBufferuiv(buffer, drawbuffers, value);
+}
+
void GLES2TraceImplementation::ClearColor(GLclampf red,
GLclampf green,
GLclampf blue,
diff --git a/gpu/command_buffer/cmd_buffer_functions.txt b/gpu/command_buffer/cmd_buffer_functions.txt
index f82248c..71e99e1 100644
--- a/gpu/command_buffer/cmd_buffer_functions.txt
+++ b/gpu/command_buffer/cmd_buffer_functions.txt
@@ -24,6 +24,10 @@
GL_APICALL void GL_APIENTRY glBufferSubData (GLenumBufferTarget target, GLintptrNotNegative offset, GLsizeiptr size, const void* data);
GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenumFrameBufferTarget target);
GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
+GL_APICALL void GL_APIENTRY glClearBufferfi (GLenumBufferfv buffer, GLint drawbuffers, GLfloat depth, GLint stencil);
+GL_APICALL void GL_APIENTRY glClearBufferfv (GLenumBufferfv buffer, GLint drawbuffers, const GLfloat* value);
+GL_APICALL void GL_APIENTRY glClearBufferiv (GLenumBufferiv buffer, GLint drawbuffers, const GLint* value);
+GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenumBufferuiv buffer, GLint drawbuffers, const GLuint* value);
GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth);
GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
diff --git a/gpu/command_buffer/common/gles2_cmd_format.h b/gpu/command_buffer/common/gles2_cmd_format.h
index 765eeac..b23cae3 100644
--- a/gpu/command_buffer/common/gles2_cmd_format.h
+++ b/gpu/command_buffer/common/gles2_cmd_format.h
@@ -19,6 +19,7 @@
#include "gpu/command_buffer/common/bitfield_helpers.h"
#include "gpu/command_buffer/common/cmd_buffer_common.h"
#include "gpu/command_buffer/common/gles2_cmd_ids.h"
+#include "gpu/command_buffer/common/gles2_cmd_utils.h"
// GL types are forward declared to avoid including the GL headers. The problem
// is determining which GL headers to include from code that is common to the
diff --git a/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
index eb6bde3..eb35d4a 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -845,6 +845,216 @@
"offset of Clear header should be 0");
static_assert(offsetof(Clear, mask) == 4, "offset of Clear mask should be 4");
+struct ClearBufferfi {
+ typedef ClearBufferfi ValueType;
+ static const CommandId kCmdId = kClearBufferfi;
+ static const cmd::ArgFlags kArgFlags = cmd::kFixed;
+ static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
+ }
+
+ void SetHeader() { header.SetCmd<ValueType>(); }
+
+ void Init(GLenum _buffer,
+ GLint _drawbuffers,
+ GLfloat _depth,
+ GLint _stencil) {
+ SetHeader();
+ buffer = _buffer;
+ drawbuffers = _drawbuffers;
+ depth = _depth;
+ stencil = _stencil;
+ }
+
+ void* Set(void* cmd,
+ GLenum _buffer,
+ GLint _drawbuffers,
+ GLfloat _depth,
+ GLint _stencil) {
+ static_cast<ValueType*>(cmd)->Init(_buffer, _drawbuffers, _depth, _stencil);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t buffer;
+ int32_t drawbuffers;
+ float depth;
+ int32_t stencil;
+};
+
+static_assert(sizeof(ClearBufferfi) == 20,
+ "size of ClearBufferfi should be 20");
+static_assert(offsetof(ClearBufferfi, header) == 0,
+ "offset of ClearBufferfi header should be 0");
+static_assert(offsetof(ClearBufferfi, buffer) == 4,
+ "offset of ClearBufferfi buffer should be 4");
+static_assert(offsetof(ClearBufferfi, drawbuffers) == 8,
+ "offset of ClearBufferfi drawbuffers should be 8");
+static_assert(offsetof(ClearBufferfi, depth) == 12,
+ "offset of ClearBufferfi depth should be 12");
+static_assert(offsetof(ClearBufferfi, stencil) == 16,
+ "offset of ClearBufferfi stencil should be 16");
+
+struct ClearBufferfvImmediate {
+ typedef ClearBufferfvImmediate ValueType;
+ static const CommandId kCmdId = kClearBufferfvImmediate;
+ static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
+ static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
+
+ static uint32_t ComputeDataSize() {
+ return static_cast<uint32_t>(sizeof(GLfloat) * 4);
+ }
+
+ static uint32_t ComputeEffectiveDataSize(GLenum buffer) {
+ return static_cast<uint32_t>(sizeof(GLfloat) *
+ GLES2Util::CalcClearBufferfvDataCount(buffer));
+ }
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
+ }
+
+ void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
+
+ void Init(GLenum _buffer, GLint _drawbuffers, const GLfloat* _value) {
+ SetHeader();
+ buffer = _buffer;
+ drawbuffers = _drawbuffers;
+ memcpy(ImmediateDataAddress(this), _value,
+ ComputeEffectiveDataSize(buffer));
+ DCHECK_GE(ComputeDataSize(), ComputeEffectiveDataSize(buffer));
+ char* pointer = reinterpret_cast<char*>(ImmediateDataAddress(this)) +
+ ComputeEffectiveDataSize(buffer);
+ memset(pointer, 0, ComputeDataSize() - ComputeEffectiveDataSize(buffer));
+ }
+
+ void* Set(void* cmd,
+ GLenum _buffer,
+ GLint _drawbuffers,
+ const GLfloat* _value) {
+ static_cast<ValueType*>(cmd)->Init(_buffer, _drawbuffers, _value);
+ const uint32_t size = ComputeSize();
+ return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t buffer;
+ int32_t drawbuffers;
+};
+
+static_assert(sizeof(ClearBufferfvImmediate) == 12,
+ "size of ClearBufferfvImmediate should be 12");
+static_assert(offsetof(ClearBufferfvImmediate, header) == 0,
+ "offset of ClearBufferfvImmediate header should be 0");
+static_assert(offsetof(ClearBufferfvImmediate, buffer) == 4,
+ "offset of ClearBufferfvImmediate buffer should be 4");
+static_assert(offsetof(ClearBufferfvImmediate, drawbuffers) == 8,
+ "offset of ClearBufferfvImmediate drawbuffers should be 8");
+
+struct ClearBufferivImmediate {
+ typedef ClearBufferivImmediate ValueType;
+ static const CommandId kCmdId = kClearBufferivImmediate;
+ static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
+ static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
+
+ static uint32_t ComputeDataSize() {
+ return static_cast<uint32_t>(sizeof(GLint) * 4);
+ }
+
+ static uint32_t ComputeEffectiveDataSize(GLenum buffer) {
+ return static_cast<uint32_t>(sizeof(GLint) *
+ GLES2Util::CalcClearBufferivDataCount(buffer));
+ }
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
+ }
+
+ void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
+
+ void Init(GLenum _buffer, GLint _drawbuffers, const GLint* _value) {
+ SetHeader();
+ buffer = _buffer;
+ drawbuffers = _drawbuffers;
+ memcpy(ImmediateDataAddress(this), _value,
+ ComputeEffectiveDataSize(buffer));
+ DCHECK_GE(ComputeDataSize(), ComputeEffectiveDataSize(buffer));
+ char* pointer = reinterpret_cast<char*>(ImmediateDataAddress(this)) +
+ ComputeEffectiveDataSize(buffer);
+ memset(pointer, 0, ComputeDataSize() - ComputeEffectiveDataSize(buffer));
+ }
+
+ void* Set(void* cmd,
+ GLenum _buffer,
+ GLint _drawbuffers,
+ const GLint* _value) {
+ static_cast<ValueType*>(cmd)->Init(_buffer, _drawbuffers, _value);
+ const uint32_t size = ComputeSize();
+ return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t buffer;
+ int32_t drawbuffers;
+};
+
+static_assert(sizeof(ClearBufferivImmediate) == 12,
+ "size of ClearBufferivImmediate should be 12");
+static_assert(offsetof(ClearBufferivImmediate, header) == 0,
+ "offset of ClearBufferivImmediate header should be 0");
+static_assert(offsetof(ClearBufferivImmediate, buffer) == 4,
+ "offset of ClearBufferivImmediate buffer should be 4");
+static_assert(offsetof(ClearBufferivImmediate, drawbuffers) == 8,
+ "offset of ClearBufferivImmediate drawbuffers should be 8");
+
+struct ClearBufferuivImmediate {
+ typedef ClearBufferuivImmediate ValueType;
+ static const CommandId kCmdId = kClearBufferuivImmediate;
+ static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
+ static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
+
+ static uint32_t ComputeDataSize() {
+ return static_cast<uint32_t>(sizeof(GLuint) * 4);
+ }
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
+ }
+
+ void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
+
+ void Init(GLenum _buffer, GLint _drawbuffers, const GLuint* _value) {
+ SetHeader();
+ buffer = _buffer;
+ drawbuffers = _drawbuffers;
+ memcpy(ImmediateDataAddress(this), _value, ComputeDataSize());
+ }
+
+ void* Set(void* cmd,
+ GLenum _buffer,
+ GLint _drawbuffers,
+ const GLuint* _value) {
+ static_cast<ValueType*>(cmd)->Init(_buffer, _drawbuffers, _value);
+ const uint32_t size = ComputeSize();
+ return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t buffer;
+ int32_t drawbuffers;
+};
+
+static_assert(sizeof(ClearBufferuivImmediate) == 12,
+ "size of ClearBufferuivImmediate should be 12");
+static_assert(offsetof(ClearBufferuivImmediate, header) == 0,
+ "offset of ClearBufferuivImmediate header should be 0");
+static_assert(offsetof(ClearBufferuivImmediate, buffer) == 4,
+ "offset of ClearBufferuivImmediate buffer should be 4");
+static_assert(offsetof(ClearBufferuivImmediate, drawbuffers) == 8,
+ "offset of ClearBufferuivImmediate drawbuffers should be 8");
+
struct ClearColor {
typedef ClearColor ValueType;
static const CommandId kCmdId = kClearColor;
@@ -5509,12 +5719,11 @@
static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeDataSize() {
- return static_cast<uint32_t>(sizeof(GLfloat) * 1); // NOLINT
+ return static_cast<uint32_t>(sizeof(GLfloat) * 1);
}
static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType) +
- ComputeDataSize()); // NOLINT
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
@@ -5594,12 +5803,11 @@
static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeDataSize() {
- return static_cast<uint32_t>(sizeof(GLint) * 1); // NOLINT
+ return static_cast<uint32_t>(sizeof(GLint) * 1);
}
static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType) +
- ComputeDataSize()); // NOLINT
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
@@ -6246,12 +6454,11 @@
static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeDataSize() {
- return static_cast<uint32_t>(sizeof(GLfloat) * 1); // NOLINT
+ return static_cast<uint32_t>(sizeof(GLfloat) * 1);
}
static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType) +
- ComputeDataSize()); // NOLINT
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
@@ -6331,12 +6538,11 @@
static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeDataSize() {
- return static_cast<uint32_t>(sizeof(GLint) * 1); // NOLINT
+ return static_cast<uint32_t>(sizeof(GLint) * 1);
}
static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType) +
- ComputeDataSize()); // NOLINT
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
@@ -8231,12 +8437,11 @@
static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeDataSize() {
- return static_cast<uint32_t>(sizeof(GLfloat) * 1); // NOLINT
+ return static_cast<uint32_t>(sizeof(GLfloat) * 1);
}
static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType) +
- ComputeDataSize()); // NOLINT
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
@@ -8312,12 +8517,11 @@
static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeDataSize() {
- return static_cast<uint32_t>(sizeof(GLfloat) * 2); // NOLINT
+ return static_cast<uint32_t>(sizeof(GLfloat) * 2);
}
static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType) +
- ComputeDataSize()); // NOLINT
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
@@ -8397,12 +8601,11 @@
static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeDataSize() {
- return static_cast<uint32_t>(sizeof(GLfloat) * 3); // NOLINT
+ return static_cast<uint32_t>(sizeof(GLfloat) * 3);
}
static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType) +
- ComputeDataSize()); // NOLINT
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
@@ -8491,12 +8694,11 @@
static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeDataSize() {
- return static_cast<uint32_t>(sizeof(GLfloat) * 4); // NOLINT
+ return static_cast<uint32_t>(sizeof(GLfloat) * 4);
}
static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType) +
- ComputeDataSize()); // NOLINT
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
@@ -8580,12 +8782,11 @@
static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeDataSize() {
- return static_cast<uint32_t>(sizeof(GLint) * 4); // NOLINT
+ return static_cast<uint32_t>(sizeof(GLint) * 4);
}
static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType) +
- ComputeDataSize()); // NOLINT
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
@@ -8674,12 +8875,11 @@
static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeDataSize() {
- return static_cast<uint32_t>(sizeof(GLuint) * 4); // NOLINT
+ return static_cast<uint32_t>(sizeof(GLuint) * 4);
}
static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType) +
- ComputeDataSize()); // NOLINT
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
@@ -10370,12 +10570,11 @@
static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
static uint32_t ComputeDataSize() {
- return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT
+ return static_cast<uint32_t>(sizeof(GLbyte) * 64);
}
static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType) +
- ComputeDataSize()); // NOLINT
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
@@ -10410,12 +10609,11 @@
static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
static uint32_t ComputeDataSize() {
- return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT
+ return static_cast<uint32_t>(sizeof(GLbyte) * 64);
}
static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType) +
- ComputeDataSize()); // NOLINT
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
@@ -10460,12 +10658,11 @@
static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
static uint32_t ComputeDataSize() {
- return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT
+ return static_cast<uint32_t>(sizeof(GLbyte) * 64);
}
static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType) +
- ComputeDataSize()); // NOLINT
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
@@ -11570,12 +11767,11 @@
static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
static uint32_t ComputeDataSize() {
- return static_cast<uint32_t>(sizeof(GLfloat) * 16); // NOLINT
+ return static_cast<uint32_t>(sizeof(GLfloat) * 16);
}
static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType) +
- ComputeDataSize()); // NOLINT
+ return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
}
void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
diff --git a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
index 12b9842..319ce6e 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -275,6 +275,90 @@
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
+TEST_F(GLES2FormatTest, ClearBufferfi) {
+ cmds::ClearBufferfi& cmd = *GetBufferAs<cmds::ClearBufferfi>();
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLint>(12),
+ static_cast<GLfloat>(13), static_cast<GLint>(14));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::ClearBufferfi::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLenum>(11), cmd.buffer);
+ EXPECT_EQ(static_cast<GLint>(12), cmd.drawbuffers);
+ EXPECT_EQ(static_cast<GLfloat>(13), cmd.depth);
+ EXPECT_EQ(static_cast<GLint>(14), cmd.stencil);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
+TEST_F(GLES2FormatTest, ClearBufferfvImmediate) {
+ const int kSomeBaseValueToTestWith = 51;
+ static GLfloat data[] = {
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 0),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 1),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 2),
+ static_cast<GLfloat>(kSomeBaseValueToTestWith + 3),
+ };
+ cmds::ClearBufferfvImmediate& cmd =
+ *GetBufferAs<cmds::ClearBufferfvImmediate>();
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLint>(12), data);
+ EXPECT_EQ(static_cast<uint32_t>(cmds::ClearBufferfvImmediate::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)),
+ cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLenum>(11), cmd.buffer);
+ EXPECT_EQ(static_cast<GLint>(12), cmd.drawbuffers);
+ CheckBytesWrittenMatchesExpectedSize(
+ next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)));
+ // TODO(gman): Check that data was inserted;
+}
+
+TEST_F(GLES2FormatTest, ClearBufferivImmediate) {
+ const int kSomeBaseValueToTestWith = 51;
+ static GLint data[] = {
+ static_cast<GLint>(kSomeBaseValueToTestWith + 0),
+ static_cast<GLint>(kSomeBaseValueToTestWith + 1),
+ static_cast<GLint>(kSomeBaseValueToTestWith + 2),
+ static_cast<GLint>(kSomeBaseValueToTestWith + 3),
+ };
+ cmds::ClearBufferivImmediate& cmd =
+ *GetBufferAs<cmds::ClearBufferivImmediate>();
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLint>(12), data);
+ EXPECT_EQ(static_cast<uint32_t>(cmds::ClearBufferivImmediate::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)),
+ cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLenum>(11), cmd.buffer);
+ EXPECT_EQ(static_cast<GLint>(12), cmd.drawbuffers);
+ CheckBytesWrittenMatchesExpectedSize(
+ next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)));
+ // TODO(gman): Check that data was inserted;
+}
+
+TEST_F(GLES2FormatTest, ClearBufferuivImmediate) {
+ const int kSomeBaseValueToTestWith = 51;
+ static GLuint data[] = {
+ static_cast<GLuint>(kSomeBaseValueToTestWith + 0),
+ static_cast<GLuint>(kSomeBaseValueToTestWith + 1),
+ static_cast<GLuint>(kSomeBaseValueToTestWith + 2),
+ static_cast<GLuint>(kSomeBaseValueToTestWith + 3),
+ };
+ cmds::ClearBufferuivImmediate& cmd =
+ *GetBufferAs<cmds::ClearBufferuivImmediate>();
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLenum>(11), static_cast<GLint>(12), data);
+ EXPECT_EQ(static_cast<uint32_t>(cmds::ClearBufferuivImmediate::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)),
+ cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLenum>(11), cmd.buffer);
+ EXPECT_EQ(static_cast<GLint>(12), cmd.drawbuffers);
+ CheckBytesWrittenMatchesExpectedSize(
+ next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)));
+ // TODO(gman): Check that data was inserted;
+}
+
TEST_F(GLES2FormatTest, ClearColor) {
cmds::ClearColor& cmd = *GetBufferAs<cmds::ClearColor>();
void* next_cmd =
diff --git a/gpu/command_buffer/common/gles2_cmd_ids_autogen.h b/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
index c1dc521..b3ca924 100644
--- a/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
@@ -32,240 +32,244 @@
OP(BufferSubData) /* 273 */ \
OP(CheckFramebufferStatus) /* 274 */ \
OP(Clear) /* 275 */ \
- OP(ClearColor) /* 276 */ \
- OP(ClearDepthf) /* 277 */ \
- OP(ClearStencil) /* 278 */ \
- OP(ColorMask) /* 279 */ \
- OP(CompileShader) /* 280 */ \
- OP(CompressedTexImage2DBucket) /* 281 */ \
- OP(CompressedTexImage2D) /* 282 */ \
- OP(CompressedTexSubImage2DBucket) /* 283 */ \
- OP(CompressedTexSubImage2D) /* 284 */ \
- OP(CopyBufferSubData) /* 285 */ \
- OP(CopyTexImage2D) /* 286 */ \
- OP(CopyTexSubImage2D) /* 287 */ \
- OP(CreateProgram) /* 288 */ \
- OP(CreateShader) /* 289 */ \
- OP(CullFace) /* 290 */ \
- OP(DeleteBuffersImmediate) /* 291 */ \
- OP(DeleteFramebuffersImmediate) /* 292 */ \
- OP(DeleteProgram) /* 293 */ \
- OP(DeleteRenderbuffersImmediate) /* 294 */ \
- OP(DeleteSamplersImmediate) /* 295 */ \
- OP(DeleteShader) /* 296 */ \
- OP(DeleteTexturesImmediate) /* 297 */ \
- OP(DeleteTransformFeedbacksImmediate) /* 298 */ \
- OP(DepthFunc) /* 299 */ \
- OP(DepthMask) /* 300 */ \
- OP(DepthRangef) /* 301 */ \
- OP(DetachShader) /* 302 */ \
- OP(Disable) /* 303 */ \
- OP(DisableVertexAttribArray) /* 304 */ \
- OP(DrawArrays) /* 305 */ \
- OP(DrawElements) /* 306 */ \
- OP(Enable) /* 307 */ \
- OP(EnableVertexAttribArray) /* 308 */ \
- OP(Finish) /* 309 */ \
- OP(Flush) /* 310 */ \
- OP(FramebufferRenderbuffer) /* 311 */ \
- OP(FramebufferTexture2D) /* 312 */ \
- OP(FramebufferTextureLayer) /* 313 */ \
- OP(FrontFace) /* 314 */ \
- OP(GenBuffersImmediate) /* 315 */ \
- OP(GenerateMipmap) /* 316 */ \
- OP(GenFramebuffersImmediate) /* 317 */ \
- OP(GenRenderbuffersImmediate) /* 318 */ \
- OP(GenSamplersImmediate) /* 319 */ \
- OP(GenTexturesImmediate) /* 320 */ \
- OP(GenTransformFeedbacksImmediate) /* 321 */ \
- OP(GetActiveAttrib) /* 322 */ \
- OP(GetActiveUniform) /* 323 */ \
- OP(GetAttachedShaders) /* 324 */ \
- OP(GetAttribLocation) /* 325 */ \
- OP(GetBooleanv) /* 326 */ \
- OP(GetBufferParameteriv) /* 327 */ \
- OP(GetError) /* 328 */ \
- OP(GetFloatv) /* 329 */ \
- OP(GetFramebufferAttachmentParameteriv) /* 330 */ \
- OP(GetIntegerv) /* 331 */ \
- OP(GetInternalformativ) /* 332 */ \
- OP(GetProgramiv) /* 333 */ \
- OP(GetProgramInfoLog) /* 334 */ \
- OP(GetRenderbufferParameteriv) /* 335 */ \
- OP(GetSamplerParameterfv) /* 336 */ \
- OP(GetSamplerParameteriv) /* 337 */ \
- OP(GetShaderiv) /* 338 */ \
- OP(GetShaderInfoLog) /* 339 */ \
- OP(GetShaderPrecisionFormat) /* 340 */ \
- OP(GetShaderSource) /* 341 */ \
- OP(GetString) /* 342 */ \
- OP(GetTexParameterfv) /* 343 */ \
- OP(GetTexParameteriv) /* 344 */ \
- OP(GetUniformfv) /* 345 */ \
- OP(GetUniformiv) /* 346 */ \
- OP(GetUniformLocation) /* 347 */ \
- OP(GetVertexAttribfv) /* 348 */ \
- OP(GetVertexAttribiv) /* 349 */ \
- OP(GetVertexAttribPointerv) /* 350 */ \
- OP(Hint) /* 351 */ \
- OP(InvalidateFramebufferImmediate) /* 352 */ \
- OP(InvalidateSubFramebufferImmediate) /* 353 */ \
- OP(IsBuffer) /* 354 */ \
- OP(IsEnabled) /* 355 */ \
- OP(IsFramebuffer) /* 356 */ \
- OP(IsProgram) /* 357 */ \
- OP(IsRenderbuffer) /* 358 */ \
- OP(IsSampler) /* 359 */ \
- OP(IsShader) /* 360 */ \
- OP(IsTexture) /* 361 */ \
- OP(IsTransformFeedback) /* 362 */ \
- OP(LineWidth) /* 363 */ \
- OP(LinkProgram) /* 364 */ \
- OP(PauseTransformFeedback) /* 365 */ \
- OP(PixelStorei) /* 366 */ \
- OP(PolygonOffset) /* 367 */ \
- OP(ReadBuffer) /* 368 */ \
- OP(ReadPixels) /* 369 */ \
- OP(ReleaseShaderCompiler) /* 370 */ \
- OP(RenderbufferStorage) /* 371 */ \
- OP(ResumeTransformFeedback) /* 372 */ \
- OP(SampleCoverage) /* 373 */ \
- OP(SamplerParameterf) /* 374 */ \
- OP(SamplerParameterfvImmediate) /* 375 */ \
- OP(SamplerParameteri) /* 376 */ \
- OP(SamplerParameterivImmediate) /* 377 */ \
- OP(Scissor) /* 378 */ \
- OP(ShaderBinary) /* 379 */ \
- OP(ShaderSourceBucket) /* 380 */ \
- OP(StencilFunc) /* 381 */ \
- OP(StencilFuncSeparate) /* 382 */ \
- OP(StencilMask) /* 383 */ \
- OP(StencilMaskSeparate) /* 384 */ \
- OP(StencilOp) /* 385 */ \
- OP(StencilOpSeparate) /* 386 */ \
- OP(TexImage2D) /* 387 */ \
- OP(TexImage3D) /* 388 */ \
- OP(TexParameterf) /* 389 */ \
- OP(TexParameterfvImmediate) /* 390 */ \
- OP(TexParameteri) /* 391 */ \
- OP(TexParameterivImmediate) /* 392 */ \
- OP(TexStorage3D) /* 393 */ \
- OP(TexSubImage2D) /* 394 */ \
- OP(TexSubImage3D) /* 395 */ \
- OP(Uniform1f) /* 396 */ \
- OP(Uniform1fvImmediate) /* 397 */ \
- OP(Uniform1i) /* 398 */ \
- OP(Uniform1ivImmediate) /* 399 */ \
- OP(Uniform1ui) /* 400 */ \
- OP(Uniform1uivImmediate) /* 401 */ \
- OP(Uniform2f) /* 402 */ \
- OP(Uniform2fvImmediate) /* 403 */ \
- OP(Uniform2i) /* 404 */ \
- OP(Uniform2ivImmediate) /* 405 */ \
- OP(Uniform2ui) /* 406 */ \
- OP(Uniform2uivImmediate) /* 407 */ \
- OP(Uniform3f) /* 408 */ \
- OP(Uniform3fvImmediate) /* 409 */ \
- OP(Uniform3i) /* 410 */ \
- OP(Uniform3ivImmediate) /* 411 */ \
- OP(Uniform3ui) /* 412 */ \
- OP(Uniform3uivImmediate) /* 413 */ \
- OP(Uniform4f) /* 414 */ \
- OP(Uniform4fvImmediate) /* 415 */ \
- OP(Uniform4i) /* 416 */ \
- OP(Uniform4ivImmediate) /* 417 */ \
- OP(Uniform4ui) /* 418 */ \
- OP(Uniform4uivImmediate) /* 419 */ \
- OP(UniformMatrix2fvImmediate) /* 420 */ \
- OP(UniformMatrix2x3fvImmediate) /* 421 */ \
- OP(UniformMatrix2x4fvImmediate) /* 422 */ \
- OP(UniformMatrix3fvImmediate) /* 423 */ \
- OP(UniformMatrix3x2fvImmediate) /* 424 */ \
- OP(UniformMatrix3x4fvImmediate) /* 425 */ \
- OP(UniformMatrix4fvImmediate) /* 426 */ \
- OP(UniformMatrix4x2fvImmediate) /* 427 */ \
- OP(UniformMatrix4x3fvImmediate) /* 428 */ \
- OP(UseProgram) /* 429 */ \
- OP(ValidateProgram) /* 430 */ \
- OP(VertexAttrib1f) /* 431 */ \
- OP(VertexAttrib1fvImmediate) /* 432 */ \
- OP(VertexAttrib2f) /* 433 */ \
- OP(VertexAttrib2fvImmediate) /* 434 */ \
- OP(VertexAttrib3f) /* 435 */ \
- OP(VertexAttrib3fvImmediate) /* 436 */ \
- OP(VertexAttrib4f) /* 437 */ \
- OP(VertexAttrib4fvImmediate) /* 438 */ \
- OP(VertexAttribI4i) /* 439 */ \
- OP(VertexAttribI4ivImmediate) /* 440 */ \
- OP(VertexAttribI4ui) /* 441 */ \
- OP(VertexAttribI4uivImmediate) /* 442 */ \
- OP(VertexAttribIPointer) /* 443 */ \
- OP(VertexAttribPointer) /* 444 */ \
- OP(Viewport) /* 445 */ \
- OP(BlitFramebufferCHROMIUM) /* 446 */ \
- OP(RenderbufferStorageMultisampleCHROMIUM) /* 447 */ \
- OP(RenderbufferStorageMultisampleEXT) /* 448 */ \
- OP(FramebufferTexture2DMultisampleEXT) /* 449 */ \
- OP(TexStorage2DEXT) /* 450 */ \
- OP(GenQueriesEXTImmediate) /* 451 */ \
- OP(DeleteQueriesEXTImmediate) /* 452 */ \
- OP(BeginQueryEXT) /* 453 */ \
- OP(BeginTransformFeedback) /* 454 */ \
- OP(EndQueryEXT) /* 455 */ \
- OP(EndTransformFeedback) /* 456 */ \
- OP(InsertEventMarkerEXT) /* 457 */ \
- OP(PushGroupMarkerEXT) /* 458 */ \
- OP(PopGroupMarkerEXT) /* 459 */ \
- OP(GenVertexArraysOESImmediate) /* 460 */ \
- OP(DeleteVertexArraysOESImmediate) /* 461 */ \
- OP(IsVertexArrayOES) /* 462 */ \
- OP(BindVertexArrayOES) /* 463 */ \
- OP(SwapBuffers) /* 464 */ \
- OP(GetMaxValueInBufferCHROMIUM) /* 465 */ \
- OP(EnableFeatureCHROMIUM) /* 466 */ \
- OP(ResizeCHROMIUM) /* 467 */ \
- OP(GetRequestableExtensionsCHROMIUM) /* 468 */ \
- OP(RequestExtensionCHROMIUM) /* 469 */ \
- OP(GetProgramInfoCHROMIUM) /* 470 */ \
- OP(GetTranslatedShaderSourceANGLE) /* 471 */ \
- OP(PostSubBufferCHROMIUM) /* 472 */ \
- OP(TexImageIOSurface2DCHROMIUM) /* 473 */ \
- OP(CopyTextureCHROMIUM) /* 474 */ \
- OP(DrawArraysInstancedANGLE) /* 475 */ \
- OP(DrawElementsInstancedANGLE) /* 476 */ \
- OP(VertexAttribDivisorANGLE) /* 477 */ \
- OP(GenMailboxCHROMIUM) /* 478 */ \
- OP(ProduceTextureCHROMIUMImmediate) /* 479 */ \
- OP(ProduceTextureDirectCHROMIUMImmediate) /* 480 */ \
- OP(ConsumeTextureCHROMIUMImmediate) /* 481 */ \
- OP(CreateAndConsumeTextureCHROMIUMImmediate) /* 482 */ \
- OP(BindUniformLocationCHROMIUMBucket) /* 483 */ \
- OP(GenValuebuffersCHROMIUMImmediate) /* 484 */ \
- OP(DeleteValuebuffersCHROMIUMImmediate) /* 485 */ \
- OP(IsValuebufferCHROMIUM) /* 486 */ \
- OP(BindValuebufferCHROMIUM) /* 487 */ \
- OP(SubscribeValueCHROMIUM) /* 488 */ \
- OP(PopulateSubscribedValuesCHROMIUM) /* 489 */ \
- OP(UniformValuebufferCHROMIUM) /* 490 */ \
- OP(BindTexImage2DCHROMIUM) /* 491 */ \
- OP(ReleaseTexImage2DCHROMIUM) /* 492 */ \
- OP(TraceBeginCHROMIUM) /* 493 */ \
- OP(TraceEndCHROMIUM) /* 494 */ \
- OP(AsyncTexSubImage2DCHROMIUM) /* 495 */ \
- OP(AsyncTexImage2DCHROMIUM) /* 496 */ \
- OP(WaitAsyncTexImage2DCHROMIUM) /* 497 */ \
- OP(WaitAllAsyncTexImage2DCHROMIUM) /* 498 */ \
- OP(DiscardFramebufferEXTImmediate) /* 499 */ \
- OP(LoseContextCHROMIUM) /* 500 */ \
- OP(InsertSyncPointCHROMIUM) /* 501 */ \
- OP(WaitSyncPointCHROMIUM) /* 502 */ \
- OP(DrawBuffersEXTImmediate) /* 503 */ \
- OP(DiscardBackbufferCHROMIUM) /* 504 */ \
- OP(ScheduleOverlayPlaneCHROMIUM) /* 505 */ \
- OP(SwapInterval) /* 506 */ \
- OP(MatrixLoadfCHROMIUMImmediate) /* 507 */ \
- OP(MatrixLoadIdentityCHROMIUM) /* 508 */ \
- OP(BlendBarrierKHR) /* 509 */
+ OP(ClearBufferfi) /* 276 */ \
+ OP(ClearBufferfvImmediate) /* 277 */ \
+ OP(ClearBufferivImmediate) /* 278 */ \
+ OP(ClearBufferuivImmediate) /* 279 */ \
+ OP(ClearColor) /* 280 */ \
+ OP(ClearDepthf) /* 281 */ \
+ OP(ClearStencil) /* 282 */ \
+ OP(ColorMask) /* 283 */ \
+ OP(CompileShader) /* 284 */ \
+ OP(CompressedTexImage2DBucket) /* 285 */ \
+ OP(CompressedTexImage2D) /* 286 */ \
+ OP(CompressedTexSubImage2DBucket) /* 287 */ \
+ OP(CompressedTexSubImage2D) /* 288 */ \
+ OP(CopyBufferSubData) /* 289 */ \
+ OP(CopyTexImage2D) /* 290 */ \
+ OP(CopyTexSubImage2D) /* 291 */ \
+ OP(CreateProgram) /* 292 */ \
+ OP(CreateShader) /* 293 */ \
+ OP(CullFace) /* 294 */ \
+ OP(DeleteBuffersImmediate) /* 295 */ \
+ OP(DeleteFramebuffersImmediate) /* 296 */ \
+ OP(DeleteProgram) /* 297 */ \
+ OP(DeleteRenderbuffersImmediate) /* 298 */ \
+ OP(DeleteSamplersImmediate) /* 299 */ \
+ OP(DeleteShader) /* 300 */ \
+ OP(DeleteTexturesImmediate) /* 301 */ \
+ OP(DeleteTransformFeedbacksImmediate) /* 302 */ \
+ OP(DepthFunc) /* 303 */ \
+ OP(DepthMask) /* 304 */ \
+ OP(DepthRangef) /* 305 */ \
+ OP(DetachShader) /* 306 */ \
+ OP(Disable) /* 307 */ \
+ OP(DisableVertexAttribArray) /* 308 */ \
+ OP(DrawArrays) /* 309 */ \
+ OP(DrawElements) /* 310 */ \
+ OP(Enable) /* 311 */ \
+ OP(EnableVertexAttribArray) /* 312 */ \
+ OP(Finish) /* 313 */ \
+ OP(Flush) /* 314 */ \
+ OP(FramebufferRenderbuffer) /* 315 */ \
+ OP(FramebufferTexture2D) /* 316 */ \
+ OP(FramebufferTextureLayer) /* 317 */ \
+ OP(FrontFace) /* 318 */ \
+ OP(GenBuffersImmediate) /* 319 */ \
+ OP(GenerateMipmap) /* 320 */ \
+ OP(GenFramebuffersImmediate) /* 321 */ \
+ OP(GenRenderbuffersImmediate) /* 322 */ \
+ OP(GenSamplersImmediate) /* 323 */ \
+ OP(GenTexturesImmediate) /* 324 */ \
+ OP(GenTransformFeedbacksImmediate) /* 325 */ \
+ OP(GetActiveAttrib) /* 326 */ \
+ OP(GetActiveUniform) /* 327 */ \
+ OP(GetAttachedShaders) /* 328 */ \
+ OP(GetAttribLocation) /* 329 */ \
+ OP(GetBooleanv) /* 330 */ \
+ OP(GetBufferParameteriv) /* 331 */ \
+ OP(GetError) /* 332 */ \
+ OP(GetFloatv) /* 333 */ \
+ OP(GetFramebufferAttachmentParameteriv) /* 334 */ \
+ OP(GetIntegerv) /* 335 */ \
+ OP(GetInternalformativ) /* 336 */ \
+ OP(GetProgramiv) /* 337 */ \
+ OP(GetProgramInfoLog) /* 338 */ \
+ OP(GetRenderbufferParameteriv) /* 339 */ \
+ OP(GetSamplerParameterfv) /* 340 */ \
+ OP(GetSamplerParameteriv) /* 341 */ \
+ OP(GetShaderiv) /* 342 */ \
+ OP(GetShaderInfoLog) /* 343 */ \
+ OP(GetShaderPrecisionFormat) /* 344 */ \
+ OP(GetShaderSource) /* 345 */ \
+ OP(GetString) /* 346 */ \
+ OP(GetTexParameterfv) /* 347 */ \
+ OP(GetTexParameteriv) /* 348 */ \
+ OP(GetUniformfv) /* 349 */ \
+ OP(GetUniformiv) /* 350 */ \
+ OP(GetUniformLocation) /* 351 */ \
+ OP(GetVertexAttribfv) /* 352 */ \
+ OP(GetVertexAttribiv) /* 353 */ \
+ OP(GetVertexAttribPointerv) /* 354 */ \
+ OP(Hint) /* 355 */ \
+ OP(InvalidateFramebufferImmediate) /* 356 */ \
+ OP(InvalidateSubFramebufferImmediate) /* 357 */ \
+ OP(IsBuffer) /* 358 */ \
+ OP(IsEnabled) /* 359 */ \
+ OP(IsFramebuffer) /* 360 */ \
+ OP(IsProgram) /* 361 */ \
+ OP(IsRenderbuffer) /* 362 */ \
+ OP(IsSampler) /* 363 */ \
+ OP(IsShader) /* 364 */ \
+ OP(IsTexture) /* 365 */ \
+ OP(IsTransformFeedback) /* 366 */ \
+ OP(LineWidth) /* 367 */ \
+ OP(LinkProgram) /* 368 */ \
+ OP(PauseTransformFeedback) /* 369 */ \
+ OP(PixelStorei) /* 370 */ \
+ OP(PolygonOffset) /* 371 */ \
+ OP(ReadBuffer) /* 372 */ \
+ OP(ReadPixels) /* 373 */ \
+ OP(ReleaseShaderCompiler) /* 374 */ \
+ OP(RenderbufferStorage) /* 375 */ \
+ OP(ResumeTransformFeedback) /* 376 */ \
+ OP(SampleCoverage) /* 377 */ \
+ OP(SamplerParameterf) /* 378 */ \
+ OP(SamplerParameterfvImmediate) /* 379 */ \
+ OP(SamplerParameteri) /* 380 */ \
+ OP(SamplerParameterivImmediate) /* 381 */ \
+ OP(Scissor) /* 382 */ \
+ OP(ShaderBinary) /* 383 */ \
+ OP(ShaderSourceBucket) /* 384 */ \
+ OP(StencilFunc) /* 385 */ \
+ OP(StencilFuncSeparate) /* 386 */ \
+ OP(StencilMask) /* 387 */ \
+ OP(StencilMaskSeparate) /* 388 */ \
+ OP(StencilOp) /* 389 */ \
+ OP(StencilOpSeparate) /* 390 */ \
+ OP(TexImage2D) /* 391 */ \
+ OP(TexImage3D) /* 392 */ \
+ OP(TexParameterf) /* 393 */ \
+ OP(TexParameterfvImmediate) /* 394 */ \
+ OP(TexParameteri) /* 395 */ \
+ OP(TexParameterivImmediate) /* 396 */ \
+ OP(TexStorage3D) /* 397 */ \
+ OP(TexSubImage2D) /* 398 */ \
+ OP(TexSubImage3D) /* 399 */ \
+ OP(Uniform1f) /* 400 */ \
+ OP(Uniform1fvImmediate) /* 401 */ \
+ OP(Uniform1i) /* 402 */ \
+ OP(Uniform1ivImmediate) /* 403 */ \
+ OP(Uniform1ui) /* 404 */ \
+ OP(Uniform1uivImmediate) /* 405 */ \
+ OP(Uniform2f) /* 406 */ \
+ OP(Uniform2fvImmediate) /* 407 */ \
+ OP(Uniform2i) /* 408 */ \
+ OP(Uniform2ivImmediate) /* 409 */ \
+ OP(Uniform2ui) /* 410 */ \
+ OP(Uniform2uivImmediate) /* 411 */ \
+ OP(Uniform3f) /* 412 */ \
+ OP(Uniform3fvImmediate) /* 413 */ \
+ OP(Uniform3i) /* 414 */ \
+ OP(Uniform3ivImmediate) /* 415 */ \
+ OP(Uniform3ui) /* 416 */ \
+ OP(Uniform3uivImmediate) /* 417 */ \
+ OP(Uniform4f) /* 418 */ \
+ OP(Uniform4fvImmediate) /* 419 */ \
+ OP(Uniform4i) /* 420 */ \
+ OP(Uniform4ivImmediate) /* 421 */ \
+ OP(Uniform4ui) /* 422 */ \
+ OP(Uniform4uivImmediate) /* 423 */ \
+ OP(UniformMatrix2fvImmediate) /* 424 */ \
+ OP(UniformMatrix2x3fvImmediate) /* 425 */ \
+ OP(UniformMatrix2x4fvImmediate) /* 426 */ \
+ OP(UniformMatrix3fvImmediate) /* 427 */ \
+ OP(UniformMatrix3x2fvImmediate) /* 428 */ \
+ OP(UniformMatrix3x4fvImmediate) /* 429 */ \
+ OP(UniformMatrix4fvImmediate) /* 430 */ \
+ OP(UniformMatrix4x2fvImmediate) /* 431 */ \
+ OP(UniformMatrix4x3fvImmediate) /* 432 */ \
+ OP(UseProgram) /* 433 */ \
+ OP(ValidateProgram) /* 434 */ \
+ OP(VertexAttrib1f) /* 435 */ \
+ OP(VertexAttrib1fvImmediate) /* 436 */ \
+ OP(VertexAttrib2f) /* 437 */ \
+ OP(VertexAttrib2fvImmediate) /* 438 */ \
+ OP(VertexAttrib3f) /* 439 */ \
+ OP(VertexAttrib3fvImmediate) /* 440 */ \
+ OP(VertexAttrib4f) /* 441 */ \
+ OP(VertexAttrib4fvImmediate) /* 442 */ \
+ OP(VertexAttribI4i) /* 443 */ \
+ OP(VertexAttribI4ivImmediate) /* 444 */ \
+ OP(VertexAttribI4ui) /* 445 */ \
+ OP(VertexAttribI4uivImmediate) /* 446 */ \
+ OP(VertexAttribIPointer) /* 447 */ \
+ OP(VertexAttribPointer) /* 448 */ \
+ OP(Viewport) /* 449 */ \
+ OP(BlitFramebufferCHROMIUM) /* 450 */ \
+ OP(RenderbufferStorageMultisampleCHROMIUM) /* 451 */ \
+ OP(RenderbufferStorageMultisampleEXT) /* 452 */ \
+ OP(FramebufferTexture2DMultisampleEXT) /* 453 */ \
+ OP(TexStorage2DEXT) /* 454 */ \
+ OP(GenQueriesEXTImmediate) /* 455 */ \
+ OP(DeleteQueriesEXTImmediate) /* 456 */ \
+ OP(BeginQueryEXT) /* 457 */ \
+ OP(BeginTransformFeedback) /* 458 */ \
+ OP(EndQueryEXT) /* 459 */ \
+ OP(EndTransformFeedback) /* 460 */ \
+ OP(InsertEventMarkerEXT) /* 461 */ \
+ OP(PushGroupMarkerEXT) /* 462 */ \
+ OP(PopGroupMarkerEXT) /* 463 */ \
+ OP(GenVertexArraysOESImmediate) /* 464 */ \
+ OP(DeleteVertexArraysOESImmediate) /* 465 */ \
+ OP(IsVertexArrayOES) /* 466 */ \
+ OP(BindVertexArrayOES) /* 467 */ \
+ OP(SwapBuffers) /* 468 */ \
+ OP(GetMaxValueInBufferCHROMIUM) /* 469 */ \
+ OP(EnableFeatureCHROMIUM) /* 470 */ \
+ OP(ResizeCHROMIUM) /* 471 */ \
+ OP(GetRequestableExtensionsCHROMIUM) /* 472 */ \
+ OP(RequestExtensionCHROMIUM) /* 473 */ \
+ OP(GetProgramInfoCHROMIUM) /* 474 */ \
+ OP(GetTranslatedShaderSourceANGLE) /* 475 */ \
+ OP(PostSubBufferCHROMIUM) /* 476 */ \
+ OP(TexImageIOSurface2DCHROMIUM) /* 477 */ \
+ OP(CopyTextureCHROMIUM) /* 478 */ \
+ OP(DrawArraysInstancedANGLE) /* 479 */ \
+ OP(DrawElementsInstancedANGLE) /* 480 */ \
+ OP(VertexAttribDivisorANGLE) /* 481 */ \
+ OP(GenMailboxCHROMIUM) /* 482 */ \
+ OP(ProduceTextureCHROMIUMImmediate) /* 483 */ \
+ OP(ProduceTextureDirectCHROMIUMImmediate) /* 484 */ \
+ OP(ConsumeTextureCHROMIUMImmediate) /* 485 */ \
+ OP(CreateAndConsumeTextureCHROMIUMImmediate) /* 486 */ \
+ OP(BindUniformLocationCHROMIUMBucket) /* 487 */ \
+ OP(GenValuebuffersCHROMIUMImmediate) /* 488 */ \
+ OP(DeleteValuebuffersCHROMIUMImmediate) /* 489 */ \
+ OP(IsValuebufferCHROMIUM) /* 490 */ \
+ OP(BindValuebufferCHROMIUM) /* 491 */ \
+ OP(SubscribeValueCHROMIUM) /* 492 */ \
+ OP(PopulateSubscribedValuesCHROMIUM) /* 493 */ \
+ OP(UniformValuebufferCHROMIUM) /* 494 */ \
+ OP(BindTexImage2DCHROMIUM) /* 495 */ \
+ OP(ReleaseTexImage2DCHROMIUM) /* 496 */ \
+ OP(TraceBeginCHROMIUM) /* 497 */ \
+ OP(TraceEndCHROMIUM) /* 498 */ \
+ OP(AsyncTexSubImage2DCHROMIUM) /* 499 */ \
+ OP(AsyncTexImage2DCHROMIUM) /* 500 */ \
+ OP(WaitAsyncTexImage2DCHROMIUM) /* 501 */ \
+ OP(WaitAllAsyncTexImage2DCHROMIUM) /* 502 */ \
+ OP(DiscardFramebufferEXTImmediate) /* 503 */ \
+ OP(LoseContextCHROMIUM) /* 504 */ \
+ OP(InsertSyncPointCHROMIUM) /* 505 */ \
+ OP(WaitSyncPointCHROMIUM) /* 506 */ \
+ OP(DrawBuffersEXTImmediate) /* 507 */ \
+ OP(DiscardBackbufferCHROMIUM) /* 508 */ \
+ OP(ScheduleOverlayPlaneCHROMIUM) /* 509 */ \
+ OP(SwapInterval) /* 510 */ \
+ OP(MatrixLoadfCHROMIUMImmediate) /* 511 */ \
+ OP(MatrixLoadIdentityCHROMIUM) /* 512 */ \
+ OP(BlendBarrierKHR) /* 513 */
enum CommandId {
kStartPoint = cmd::kLastCommonId, // All GLES2 commands start after this.
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index 1d31f70..6a483f6 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -822,6 +822,28 @@
return true;
}
+size_t GLES2Util::CalcClearBufferivDataCount(int buffer) {
+ switch (buffer) {
+ case GL_COLOR:
+ return 4;
+ case GL_STENCIL:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+size_t GLES2Util::CalcClearBufferfvDataCount(int buffer) {
+ switch (buffer) {
+ case GL_COLOR:
+ return 4;
+ case GL_DEPTH:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
namespace {
// WebGraphicsContext3DCommandBufferImpl configuration attributes. Those in
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.h b/gpu/command_buffer/common/gles2_cmd_utils.h
index 414e140..127c2be 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.h
+++ b/gpu/command_buffer/common/gles2_cmd_utils.h
@@ -184,6 +184,9 @@
int* element_index,
bool* getting_array);
+ static size_t CalcClearBufferivDataCount(int buffer);
+ static size_t CalcClearBufferfvDataCount(int buffer);
+
#include "../common/gles2_cmd_utils_autogen.h"
private:
diff --git a/gpu/command_buffer/common/gles2_cmd_utils_autogen.h b/gpu/command_buffer/common/gles2_cmd_utils_autogen.h
index e6a26fe..8820225 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_utils_autogen.h
@@ -17,6 +17,10 @@
static std::string GetStringBufferParameter(uint32_t value);
static std::string GetStringBufferTarget(uint32_t value);
static std::string GetStringBufferUsage(uint32_t value);
+static std::string GetStringBufferfi(uint32_t value);
+static std::string GetStringBufferfv(uint32_t value);
+static std::string GetStringBufferiv(uint32_t value);
+static std::string GetStringBufferuiv(uint32_t value);
static std::string GetStringCapability(uint32_t value);
static std::string GetStringCmpFunction(uint32_t value);
static std::string GetStringCompressedTextureFormat(uint32_t value);
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 3fafbcb..b28c5e5 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
@@ -4502,6 +4502,38 @@
arraysize(string_table), value);
}
+std::string GLES2Util::GetStringBufferfi(uint32_t value) {
+ static const EnumToString string_table[] = {
+ {GL_DEPTH_STENCIL, "GL_DEPTH_STENCIL"},
+ };
+ return GLES2Util::GetQualifiedEnumString(string_table,
+ arraysize(string_table), value);
+}
+
+std::string GLES2Util::GetStringBufferfv(uint32_t value) {
+ static const EnumToString string_table[] = {
+ {GL_COLOR, "GL_COLOR"}, {GL_DEPTH, "GL_DEPTH"},
+ };
+ return GLES2Util::GetQualifiedEnumString(string_table,
+ arraysize(string_table), value);
+}
+
+std::string GLES2Util::GetStringBufferiv(uint32_t value) {
+ static const EnumToString string_table[] = {
+ {GL_COLOR, "GL_COLOR"}, {GL_STENCIL, "GL_STENCIL"},
+ };
+ return GLES2Util::GetQualifiedEnumString(string_table,
+ arraysize(string_table), value);
+}
+
+std::string GLES2Util::GetStringBufferuiv(uint32_t value) {
+ static const EnumToString string_table[] = {
+ {GL_COLOR, "GL_COLOR"},
+ };
+ return GLES2Util::GetQualifiedEnumString(string_table,
+ arraysize(string_table), value);
+}
+
std::string GLES2Util::GetStringCapability(uint32_t value) {
static const EnumToString string_table[] = {
{GL_BLEND, "GL_BLEND"},
diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager_android.cc b/gpu/command_buffer/service/async_pixel_transfer_manager_android.cc
index eadc34f..5b86b87 100644
--- a/gpu/command_buffer/service/async_pixel_transfer_manager_android.cc
+++ b/gpu/command_buffer/service/async_pixel_transfer_manager_android.cc
@@ -4,12 +4,14 @@
#include "gpu/command_buffer/service/async_pixel_transfer_manager.h"
+#include "base/command_line.h"
#include "base/debug/trace_event.h"
#include "base/sys_info.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager_egl.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager_idle.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager_stub.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager_sync.h"
+#include "gpu/command_buffer/service/gpu_switches.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
@@ -75,6 +77,13 @@
AsyncPixelTransferManager* AsyncPixelTransferManager::Create(
gfx::GLContext* context) {
DCHECK(context->IsCurrent(NULL));
+ // Threaded mailbox uses EGLImage which conflicts with EGL uploader.
+ // The spec only allows one EGL image per sibling group, but currently the
+ // image handle cannot be shared between the threaded mailbox code and
+ // AsyncPixelTransferManagerEGL.
+ bool uses_threaded_mailboxes =
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableThreadedTextureMailboxes);
switch (gfx::GetGLImplementation()) {
case gfx::kGLImplementationEGLGLES2:
DCHECK(context);
@@ -84,6 +93,7 @@
context->HasExtension("EGL_KHR_image_base") &&
context->HasExtension("EGL_KHR_gl_texture_2D_image") &&
context->HasExtension("GL_OES_EGL_image") &&
+ !uses_threaded_mailboxes &&
AllowTransferThreadForGpu()) {
TRACE_EVENT0("gpu", "AsyncPixelTransferManager_CreateWithThread");
return new AsyncPixelTransferManagerEGL;
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index efd75dd..f56d47b 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -6427,12 +6427,17 @@
glBindTexture(
textarget,
texture_manager()->black_texture_id(uniform_info->type));
- LOCAL_RENDER_WARNING(
- std::string("texture bound to texture unit ") +
- base::IntToString(texture_unit_index) +
- " is not renderable. It maybe non-power-of-2 and have"
- " incompatible texture filtering or is not"
- " 'texture complete'");
+ if (!texture_ref) {
+ LOCAL_RENDER_WARNING(
+ std::string("there is no texture bound to the unit ") +
+ base::IntToString(texture_unit_index));
+ } else {
+ LOCAL_RENDER_WARNING(
+ std::string("texture bound to texture unit ") +
+ base::IntToString(texture_unit_index) +
+ " is not renderable. It maybe non-power-of-2 and have"
+ " incompatible texture filtering.");
+ }
continue;
}
@@ -9140,10 +9145,17 @@
Clip(x, width, size.width(), ©X, ©Width);
Clip(y, height, size.height(), ©Y, ©Height);
- if (!texture_manager()->ClearTextureLevel(this, texture_ref, target, level)) {
- LOCAL_SET_GL_ERROR(
- GL_OUT_OF_MEMORY, "glCopyTexSubImage2D", "dimensions too big");
- return;
+ if (xoffset != 0 || yoffset != 0 || width != size.width() ||
+ height != size.height()) {
+ if (!texture_manager()->ClearTextureLevel(this, texture_ref, target,
+ level)) {
+ LOCAL_SET_GL_ERROR(GL_OUT_OF_MEMORY, "glCopyTexSubImage2D",
+ "dimensions too big");
+ return;
+ }
+ } else {
+ // Write all pixels in below.
+ texture_manager()->SetLevelCleared(texture_ref, target, level, true);
}
if (copyX != x ||
@@ -9748,6 +9760,9 @@
TRACE_EVENT_SYNTHETIC_DELAY("gpu.PresentingFrame");
}
+ ScopedGPUTrace scoped_gpu_trace(gpu_tracer_.get(), kTraceDecoder,
+ "gpu_toplevel", "SwapBuffer");
+
bool is_tracing;
TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("gpu.debug"),
&is_tracing);
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
index 6764910..7766b0d 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
@@ -384,6 +384,99 @@
return error::kNoError;
}
+error::Error GLES2DecoderImpl::HandleClearBufferfi(uint32_t immediate_data_size,
+ const void* cmd_data) {
+ if (!unsafe_es3_apis_enabled())
+ return error::kUnknownCommand;
+ const gles2::cmds::ClearBufferfi& c =
+ *static_cast<const gles2::cmds::ClearBufferfi*>(cmd_data);
+ (void)c;
+ GLenum buffer = static_cast<GLenum>(c.buffer);
+ GLint drawbuffers = static_cast<GLint>(c.drawbuffers);
+ GLfloat depth = static_cast<GLfloat>(c.depth);
+ GLint stencil = static_cast<GLint>(c.stencil);
+ glClearBufferfi(buffer, drawbuffers, depth, stencil);
+ return error::kNoError;
+}
+
+error::Error GLES2DecoderImpl::HandleClearBufferfvImmediate(
+ uint32_t immediate_data_size,
+ const void* cmd_data) {
+ if (!unsafe_es3_apis_enabled())
+ return error::kUnknownCommand;
+ const gles2::cmds::ClearBufferfvImmediate& c =
+ *static_cast<const gles2::cmds::ClearBufferfvImmediate*>(cmd_data);
+ (void)c;
+ GLenum buffer = static_cast<GLenum>(c.buffer);
+ GLint drawbuffers = static_cast<GLint>(c.drawbuffers);
+ uint32_t data_size;
+ if (!ComputeDataSize(1, sizeof(GLfloat), 4, &data_size)) {
+ return error::kOutOfBounds;
+ }
+ if (data_size > immediate_data_size) {
+ return error::kOutOfBounds;
+ }
+ const GLfloat* value =
+ GetImmediateDataAs<const GLfloat*>(c, data_size, immediate_data_size);
+ if (value == NULL) {
+ return error::kOutOfBounds;
+ }
+ glClearBufferfv(buffer, drawbuffers, value);
+ return error::kNoError;
+}
+
+error::Error GLES2DecoderImpl::HandleClearBufferivImmediate(
+ uint32_t immediate_data_size,
+ const void* cmd_data) {
+ if (!unsafe_es3_apis_enabled())
+ return error::kUnknownCommand;
+ const gles2::cmds::ClearBufferivImmediate& c =
+ *static_cast<const gles2::cmds::ClearBufferivImmediate*>(cmd_data);
+ (void)c;
+ GLenum buffer = static_cast<GLenum>(c.buffer);
+ GLint drawbuffers = static_cast<GLint>(c.drawbuffers);
+ uint32_t data_size;
+ if (!ComputeDataSize(1, sizeof(GLint), 4, &data_size)) {
+ return error::kOutOfBounds;
+ }
+ if (data_size > immediate_data_size) {
+ return error::kOutOfBounds;
+ }
+ const GLint* value =
+ GetImmediateDataAs<const GLint*>(c, data_size, immediate_data_size);
+ if (value == NULL) {
+ return error::kOutOfBounds;
+ }
+ glClearBufferiv(buffer, drawbuffers, value);
+ return error::kNoError;
+}
+
+error::Error GLES2DecoderImpl::HandleClearBufferuivImmediate(
+ uint32_t immediate_data_size,
+ const void* cmd_data) {
+ if (!unsafe_es3_apis_enabled())
+ return error::kUnknownCommand;
+ const gles2::cmds::ClearBufferuivImmediate& c =
+ *static_cast<const gles2::cmds::ClearBufferuivImmediate*>(cmd_data);
+ (void)c;
+ GLenum buffer = static_cast<GLenum>(c.buffer);
+ GLint drawbuffers = static_cast<GLint>(c.drawbuffers);
+ uint32_t data_size;
+ if (!ComputeDataSize(1, sizeof(GLuint), 4, &data_size)) {
+ return error::kOutOfBounds;
+ }
+ if (data_size > immediate_data_size) {
+ return error::kOutOfBounds;
+ }
+ const GLuint* value =
+ GetImmediateDataAs<const GLuint*>(c, data_size, immediate_data_size);
+ if (value == NULL) {
+ return error::kOutOfBounds;
+ }
+ glClearBufferuiv(buffer, drawbuffers, value);
+ return error::kNoError;
+}
+
error::Error GLES2DecoderImpl::HandleClearColor(uint32_t immediate_data_size,
const void* cmd_data) {
const gles2::cmds::ClearColor& c =
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h
index d1208f8..7794274 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h
@@ -394,6 +394,72 @@
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}
+TEST_P(GLES2DecoderTest1, ClearBufferfiValidArgs) {
+ EXPECT_CALL(*gl_, ClearBufferfi(GL_COLOR, 2, 3, 4));
+ SpecializedSetup<cmds::ClearBufferfi, 0>(true);
+ cmds::ClearBufferfi cmd;
+ cmd.Init(GL_COLOR, 2, 3, 4);
+ decoder_->set_unsafe_es3_apis_enabled(true);
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ EXPECT_EQ(GL_NO_ERROR, GetGLError());
+ decoder_->set_unsafe_es3_apis_enabled(false);
+ EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd));
+}
+
+TEST_P(GLES2DecoderTest1, ClearBufferfvImmediateValidArgs) {
+ cmds::ClearBufferfvImmediate& cmd =
+ *GetImmediateAs<cmds::ClearBufferfvImmediate>();
+ SpecializedSetup<cmds::ClearBufferfvImmediate, 0>(true);
+ GLfloat temp[4] = {
+ 0,
+ };
+ cmd.Init(GL_COLOR, 2, &temp[0]);
+ EXPECT_CALL(*gl_,
+ ClearBufferfv(GL_COLOR, 2, reinterpret_cast<GLfloat*>(
+ ImmediateDataAddress(&cmd))));
+ decoder_->set_unsafe_es3_apis_enabled(true);
+ EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp)));
+ EXPECT_EQ(GL_NO_ERROR, GetGLError());
+ decoder_->set_unsafe_es3_apis_enabled(false);
+ EXPECT_EQ(error::kUnknownCommand, ExecuteImmediateCmd(cmd, sizeof(temp)));
+}
+
+TEST_P(GLES2DecoderTest1, ClearBufferivImmediateValidArgs) {
+ cmds::ClearBufferivImmediate& cmd =
+ *GetImmediateAs<cmds::ClearBufferivImmediate>();
+ SpecializedSetup<cmds::ClearBufferivImmediate, 0>(true);
+ GLint temp[4] = {
+ 0,
+ };
+ cmd.Init(GL_COLOR, 2, &temp[0]);
+ EXPECT_CALL(*gl_, ClearBufferiv(
+ GL_COLOR, 2,
+ reinterpret_cast<GLint*>(ImmediateDataAddress(&cmd))));
+ decoder_->set_unsafe_es3_apis_enabled(true);
+ EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp)));
+ EXPECT_EQ(GL_NO_ERROR, GetGLError());
+ decoder_->set_unsafe_es3_apis_enabled(false);
+ EXPECT_EQ(error::kUnknownCommand, ExecuteImmediateCmd(cmd, sizeof(temp)));
+}
+
+TEST_P(GLES2DecoderTest1, ClearBufferuivImmediateValidArgs) {
+ cmds::ClearBufferuivImmediate& cmd =
+ *GetImmediateAs<cmds::ClearBufferuivImmediate>();
+ SpecializedSetup<cmds::ClearBufferuivImmediate, 0>(true);
+ GLuint temp[4] = {
+ 0,
+ };
+ cmd.Init(GL_COLOR, 2, &temp[0]);
+ EXPECT_CALL(*gl_, ClearBufferuiv(
+ GL_COLOR, 2,
+ reinterpret_cast<GLuint*>(ImmediateDataAddress(&cmd))));
+ decoder_->set_unsafe_es3_apis_enabled(true);
+ EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp)));
+ EXPECT_EQ(GL_NO_ERROR, GetGLError());
+ decoder_->set_unsafe_es3_apis_enabled(false);
+ EXPECT_EQ(error::kUnknownCommand, ExecuteImmediateCmd(cmd, sizeof(temp)));
+}
+
TEST_P(GLES2DecoderTest1, ClearColorValidArgs) {
EXPECT_CALL(*gl_, ClearColor(1, 2, 3, 4));
SpecializedSetup<cmds::ClearColor, 0>(true);
@@ -1930,25 +1996,4 @@
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
EXPECT_EQ(0u, result->size);
}
-// TODO(gman): GetVertexAttribPointerv
-
-TEST_P(GLES2DecoderTest1, HintValidArgs) {
- EXPECT_CALL(*gl_, Hint(GL_GENERATE_MIPMAP_HINT, GL_FASTEST));
- SpecializedSetup<cmds::Hint, 0>(true);
- cmds::Hint cmd;
- cmd.Init(GL_GENERATE_MIPMAP_HINT, GL_FASTEST);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- EXPECT_EQ(GL_NO_ERROR, GetGLError());
-}
-
-TEST_P(GLES2DecoderTest1, HintInvalidArgs0_0) {
- EXPECT_CALL(*gl_, Hint(_, _)).Times(0);
- SpecializedSetup<cmds::Hint, 0>(false);
- cmds::Hint cmd;
- cmd.Init(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
-}
-// TODO(gman): InvalidateFramebufferImmediate
-// TODO(gman): InvalidateSubFramebufferImmediate
#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_1_AUTOGEN_H_
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
index 2e8f532..aa387be 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
@@ -12,6 +12,28 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_
#define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_
+// TODO(gman): GetVertexAttribPointerv
+
+TEST_P(GLES2DecoderTest2, HintValidArgs) {
+ EXPECT_CALL(*gl_, Hint(GL_GENERATE_MIPMAP_HINT, GL_FASTEST));
+ SpecializedSetup<cmds::Hint, 0>(true);
+ cmds::Hint cmd;
+ cmd.Init(GL_GENERATE_MIPMAP_HINT, GL_FASTEST);
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ EXPECT_EQ(GL_NO_ERROR, GetGLError());
+}
+
+TEST_P(GLES2DecoderTest2, HintInvalidArgs0_0) {
+ EXPECT_CALL(*gl_, Hint(_, _)).Times(0);
+ SpecializedSetup<cmds::Hint, 0>(false);
+ cmds::Hint cmd;
+ cmd.Init(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
+}
+// TODO(gman): InvalidateFramebufferImmediate
+// TODO(gman): InvalidateSubFramebufferImmediate
+
TEST_P(GLES2DecoderTest2, IsBufferValidArgs) {
SpecializedSetup<cmds::IsBuffer, 0>(true);
cmds::IsBuffer cmd;
@@ -1326,6 +1348,4 @@
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
}
-// TODO(gman): TexStorage2DEXT
-// TODO(gman): GenQueriesEXTImmediate
#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h
index 314a9b6..ba2f4c2 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h
@@ -12,6 +12,8 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_3_AUTOGEN_H_
#define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_3_AUTOGEN_H_
+// TODO(gman): TexStorage2DEXT
+// TODO(gman): GenQueriesEXTImmediate
// TODO(gman): DeleteQueriesEXTImmediate
// TODO(gman): BeginQueryEXT
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
index b0e8e8c..f0cadf1 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
@@ -1803,6 +1803,32 @@
CopyTexSubImage2D cmd;
cmd.Init(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 1, 1);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+
+ TextureManager* manager = group().texture_manager();
+ TextureRef* texture_ref = manager->GetTexture(client_texture_id_);
+ ASSERT_TRUE(texture_ref != NULL);
+ Texture* texture = texture_ref->texture();
+ EXPECT_TRUE(texture->SafeToRenderFrom());
+}
+
+TEST_P(GLES2DecoderTest, CopyTexSubImage2DClearsUnclearedBackBufferSizedTexture) {
+ DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
+ DoTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, kBackBufferWidth, kBackBufferHeight,
+ 0, GL_RGBA, GL_UNSIGNED_BYTE, 0, 0);
+
+ EXPECT_CALL(*gl_, CopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0,
+ kBackBufferWidth, kBackBufferHeight))
+ .Times(1)
+ .RetiresOnSaturation();
+ CopyTexSubImage2D cmd;
+ cmd.Init(GL_TEXTURE_2D, 0, 0, 0, 0, 0, kBackBufferWidth, kBackBufferHeight);
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+
+ TextureManager* manager = group().texture_manager();
+ TextureRef* texture_ref = manager->GetTexture(client_texture_id_);
+ ASSERT_TRUE(texture_ref != NULL);
+ Texture* texture = texture_ref->texture();
+ EXPECT_TRUE(texture->SafeToRenderFrom());
}
TEST_P(GLES2DecoderManualInitTest, CompressedImage2DMarksTextureAsCleared) {
diff --git a/gpu/command_buffer/service/gles2_cmd_validation_autogen.h b/gpu/command_buffer/service/gles2_cmd_validation_autogen.h
index 5692847..e163642 100644
--- a/gpu/command_buffer/service/gles2_cmd_validation_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_validation_autogen.h
@@ -17,6 +17,10 @@
ValueValidator<GLenum> buffer_parameter;
ValueValidator<GLenum> buffer_target;
ValueValidator<GLenum> buffer_usage;
+ValueValidator<GLenum> bufferfi;
+ValueValidator<GLenum> bufferfv;
+ValueValidator<GLenum> bufferiv;
+ValueValidator<GLenum> bufferuiv;
ValueValidator<GLenum> capability;
ValueValidator<GLenum> cmp_function;
ValueValidator<GLenum> compressed_texture_format;
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 d81b896..febce20 100644
--- a/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h
@@ -44,6 +44,24 @@
GL_DYNAMIC_DRAW,
};
+static const GLenum valid_bufferfi_table[] = {
+ GL_DEPTH_STENCIL,
+};
+
+static const GLenum valid_bufferfv_table[] = {
+ GL_COLOR,
+ GL_DEPTH,
+};
+
+static const GLenum valid_bufferiv_table[] = {
+ GL_COLOR,
+ GL_STENCIL,
+};
+
+static const GLenum valid_bufferuiv_table[] = {
+ GL_COLOR,
+};
+
static const GLenum valid_capability_table[] = {
GL_BLEND,
GL_CULL_FACE,
@@ -573,6 +591,10 @@
arraysize(valid_buffer_target_table)),
buffer_usage(valid_buffer_usage_table,
arraysize(valid_buffer_usage_table)),
+ bufferfi(valid_bufferfi_table, arraysize(valid_bufferfi_table)),
+ bufferfv(valid_bufferfv_table, arraysize(valid_bufferfv_table)),
+ bufferiv(valid_bufferiv_table, arraysize(valid_bufferiv_table)),
+ bufferuiv(valid_bufferuiv_table, arraysize(valid_bufferuiv_table)),
capability(valid_capability_table, arraysize(valid_capability_table)),
cmp_function(valid_cmp_function_table,
arraysize(valid_cmp_function_table)),
diff --git a/gpu/command_buffer/service/gpu_tracer.cc b/gpu/command_buffer/service/gpu_tracer.cc
index 2853e96c..364159b 100644
--- a/gpu/command_buffer/service/gpu_tracer.cc
+++ b/gpu/command_buffer/service/gpu_tracer.cc
@@ -76,19 +76,15 @@
}
void TraceOutputter::TraceServiceBegin(const std::string& category,
- const std::string& name,
- void* id) {
- TRACE_EVENT_COPY_ASYNC_BEGIN1(TRACE_DISABLED_BY_DEFAULT("gpu.service"),
- name.c_str(), this,
- "gl_category", category.c_str());
+ const std::string& name) {
+ TRACE_EVENT_COPY_BEGIN1(TRACE_DISABLED_BY_DEFAULT("gpu.service"),
+ name.c_str(), "gl_category", category.c_str());
}
void TraceOutputter::TraceServiceEnd(const std::string& category,
- const std::string& name,
- void* id) {
- TRACE_EVENT_COPY_ASYNC_END1(TRACE_DISABLED_BY_DEFAULT("gpu.service"),
- name.c_str(), this,
- "gl_category", category.c_str());
+ const std::string& name) {
+ TRACE_EVENT_COPY_END1(TRACE_DISABLED_BY_DEFAULT("gpu.service"),
+ name.c_str(), "gl_category", category.c_str());
}
GPUTrace::GPUTrace(scoped_refptr<Outputter> outputter,
@@ -132,7 +128,7 @@
void GPUTrace::Start(bool trace_service) {
if (trace_service) {
- outputter_->TraceServiceBegin(category_, name_, this);
+ outputter_->TraceServiceBegin(category_, name_);
}
switch (tracer_type_) {
@@ -174,7 +170,7 @@
}
if (tracing_service) {
- outputter_->TraceServiceEnd(category_, name_, this);
+ outputter_->TraceServiceEnd(category_, name_);
}
}
diff --git a/gpu/command_buffer/service/gpu_tracer.h b/gpu/command_buffer/service/gpu_tracer.h
index 64f13cc..594a98e 100644
--- a/gpu/command_buffer/service/gpu_tracer.h
+++ b/gpu/command_buffer/service/gpu_tracer.h
@@ -134,12 +134,10 @@
int64 end_time) = 0;
virtual void TraceServiceBegin(const std::string& category,
- const std::string& name,
- void* id) = 0;
+ const std::string& name) = 0;
virtual void TraceServiceEnd(const std::string& category,
- const std::string& name,
- void* id) = 0;
+ const std::string& name) = 0;
protected:
virtual ~Outputter() {}
@@ -155,12 +153,10 @@
int64 end_time) override;
void TraceServiceBegin(const std::string& category,
- const std::string& name,
- void* id) override;
+ const std::string& name) override;
void TraceServiceEnd(const std::string& category,
- const std::string& name,
- void* id) override;
+ const std::string& name) override;
protected:
friend class base::RefCounted<Outputter>;
@@ -213,6 +209,24 @@
DISALLOW_COPY_AND_ASSIGN(GPUTrace);
};
+class ScopedGPUTrace {
+ public:
+ ScopedGPUTrace(GPUTracer* gpu_tracer, GpuTracerSource source,
+ const std::string& category, const std::string& name)
+ : gpu_tracer_(gpu_tracer),
+ source_(source) {
+ gpu_tracer_->Begin(category, name, source_);
+ }
+
+ ~ScopedGPUTrace() {
+ gpu_tracer_->End(source_);
+ }
+
+ private:
+ GPUTracer* gpu_tracer_;
+ GpuTracerSource source_;
+};
+
} // namespace gles2
} // namespace gpu
diff --git a/gpu/command_buffer/service/gpu_tracer_unittest.cc b/gpu/command_buffer/service/gpu_tracer_unittest.cc
index ae4c970..1b55e78 100644
--- a/gpu/command_buffer/service/gpu_tracer_unittest.cc
+++ b/gpu/command_buffer/service/gpu_tracer_unittest.cc
@@ -50,13 +50,11 @@
void(const std::string& category, const std::string& name,
int64 start_time, int64 end_time));
- MOCK_METHOD3(TraceServiceBegin,
- void(const std::string& category, const std::string& name,
- void* id));
+ MOCK_METHOD2(TraceServiceBegin,
+ void(const std::string& category, const std::string& name));
- MOCK_METHOD3(TraceServiceEnd,
- void(const std::string& category, const std::string& name,
- void* id));
+ MOCK_METHOD2(TraceServiceEnd,
+ void(const std::string& category, const std::string& name));
protected:
~MockOutputter() {}
@@ -287,7 +285,7 @@
const std::string& category,
const std::string& name) {
EXPECT_CALL(*outputter,
- TraceServiceBegin(category, name, NotNull()));
+ TraceServiceBegin(category, name));
}
void ExpectOutputterEndMocks(MockOutputter* outputter,
@@ -296,7 +294,7 @@
int64 expect_end_time,
bool trace_device) {
EXPECT_CALL(*outputter,
- TraceServiceEnd(category, name, NotNull()));
+ TraceServiceEnd(category, name));
if (trace_device) {
EXPECT_CALL(*outputter,
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc
index c312345..c671073 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -437,7 +437,11 @@
return false;
}
- if (service_->UseVirtualizedGLContexts()) {
+ if (service_->UseVirtualizedGLContexts() ||
+ decoder_->GetContextGroup()
+ ->feature_info()
+ ->workarounds()
+ .use_virtualized_gl_contexts) {
context_ = gl_share_group_->GetSharedContext();
if (!context_.get()) {
context_ = gfx::GLContext::CreateGLContext(
diff --git a/gpu/command_buffer/service/mailbox_manager_sync.cc b/gpu/command_buffer/service/mailbox_manager_sync.cc
index 65376af..b12e9b4 100644
--- a/gpu/command_buffer/service/mailbox_manager_sync.cc
+++ b/gpu/command_buffer/service/mailbox_manager_sync.cc
@@ -31,11 +31,6 @@
if (texture->target() != GL_TEXTURE_2D || needs_mips || !texture->IsDefined())
return true;
- // Skip compositor resources/tile textures.
- // TODO: Remove this, see crbug.com/399226.
- if (texture->pool() == GL_TEXTURE_POOL_MANAGED_CHROMIUM)
- return true;
-
return false;
}
diff --git a/gpu/config/BUILD.gn b/gpu/config/BUILD.gn
index 82d5a1b..be7a444 100644
--- a/gpu/config/BUILD.gn
+++ b/gpu/config/BUILD.gn
@@ -30,6 +30,7 @@
"gpu_info_collector_linux.cc",
"gpu_info_collector_linux.h",
"gpu_info_collector_mac.mm",
+ "gpu_info_collector_ozone.cc",
"gpu_info_collector_win.cc",
"gpu_info_collector_x11.cc",
"gpu_info_collector.cc",
@@ -75,7 +76,7 @@
if (use_libpci) {
defines += [ "USE_LIBPCI=1" ]
}
- if (is_linux && use_libpci && use_x11) {
+ if (is_linux && use_libpci && (use_x11 || use_ozone)) {
deps += [ "//build/config/linux:libpci" ]
}
if (is_linux && use_x11) {
@@ -83,8 +84,14 @@
"//build/config/linux:x11",
"//build/config/linux:xext",
]
- deps += [ "//third_party/libXNVCtrl" ]
+ deps += [
+ "//third_party/libXNVCtrl",
+ "//ui/gfx/x",
+ ]
} else {
sources -= [ "gpu_info_collector_x11.cc" ]
}
+ if (!use_ozone) {
+ sources -= [ "gpu_info_collector_ozone.cc" ]
+ }
}
diff --git a/gpu/config/gpu_info_collector_ozone.cc b/gpu/config/gpu_info_collector_ozone.cc
new file mode 100644
index 0000000..d8fef20
--- /dev/null
+++ b/gpu/config/gpu_info_collector_ozone.cc
@@ -0,0 +1,15 @@
+// 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/logging.h"
+#include "gpu/config/gpu_info_collector_linux.h"
+
+namespace gpu {
+
+std::string CollectDriverVersionNVidia() {
+ NOTIMPLEMENTED();
+ return std::string();
+}
+
+} // namespace gpu
diff --git a/gpu/config/software_rendering_list_json.cc b/gpu/config/software_rendering_list_json.cc
index e1a8cb3..b822056 100644
--- a/gpu/config/software_rendering_list_json.cc
+++ b/gpu/config/software_rendering_list_json.cc
@@ -18,7 +18,7 @@
{
"name": "software rendering list",
// Please update the version number whenever you change this file.
- "version": "9.15",
+ "version": "9.16",
"entries": [
{
"id": 1,
@@ -508,25 +508,11 @@
},
{
"id": 48,
- "description": "Accelerated video decode is unavailable on Mac and Linux",
- "cr_bugs": [137247, 133828],
- "exceptions": [
- {
- "os": {
- "type": "chromeos"
- }
- },
- {
- "os": {
- "type": "win"
- }
- },
- {
- "os": {
- "type": "android"
- }
- }
- ],
+ "description": "Accelerated video decode is unavailable on Linux",
+ "cr_bugs": [137247],
+ "os": {
+ "type": "linux"
+ },
"features": [
"accelerated_video_decode"
]
diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp
index 7787884..752a960 100644
--- a/gpu/gpu.gyp
+++ b/gpu/gpu.gyp
@@ -673,5 +673,22 @@
},
],
}],
+ ['test_isolation_mode != "noop"', {
+ 'targets': [
+ {
+ 'target_name': 'gpu_unittests_run',
+ 'type': 'none',
+ 'dependencies': [
+ 'gpu_unittests',
+ ],
+ 'includes': [
+ '../build/isolate.gypi',
+ ],
+ 'sources': [
+ 'gpu_unittests.isolate',
+ ],
+ },
+ ],
+ }],
],
}
diff --git a/gpu/gpu_config.gypi b/gpu/gpu_config.gypi
index a012b08..98b19aa 100644
--- a/gpu/gpu_config.gypi
+++ b/gpu/gpu_config.gypi
@@ -31,6 +31,7 @@
'config/gpu_info_collector_linux.cc',
'config/gpu_info_collector_linux.h',
'config/gpu_info_collector_mac.mm',
+ 'config/gpu_info_collector_ozone.cc',
'config/gpu_info_collector_win.cc',
'config/gpu_info_collector_x11.cc',
'config/gpu_info_collector.cc',
@@ -64,7 +65,7 @@
'../third_party/amd/amd_videocard_info_win.cc',
],
}],
- ['OS=="linux" and use_libpci==1 and use_x11==1', {
+ ['OS=="linux" and use_libpci==1 and (use_x11==1 or use_ozone==1)', {
'dependencies': [
'../build/linux/system.gyp:libpci',
],
@@ -74,6 +75,7 @@
'../build/linux/system.gyp:x11',
'../build/linux/system.gyp:xext',
'../third_party/libXNVCtrl/libXNVCtrl.gyp:libXNVCtrl',
+ '../ui/gfx/x/gfx_x11.gyp:gfx_x11',
],
}],
],
diff --git a/gpu/gpu_unittests.isolate b/gpu/gpu_unittests.isolate
new file mode 100644
index 0000000..3380606
--- /dev/null
+++ b/gpu/gpu_unittests.isolate
@@ -0,0 +1,66 @@
+# 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.
+{
+ 'conditions': [
+ ['OS=="linux" or OS=="mac" or OS=="win"', {
+ 'variables': {
+ 'files': [
+ '../testing/test_env.py',
+ '<(PRODUCT_DIR)/gpu_unittests<(EXECUTABLE_SUFFIX)',
+ ],
+ },
+ }],
+ ['OS=="linux"', {
+ 'variables': {
+ 'command': [
+ '../testing/xvfb.py',
+ '<(PRODUCT_DIR)',
+ '<(PRODUCT_DIR)/gpu_unittests',
+ '--brave-new-test-launcher',
+ '--test-launcher-bot-mode',
+ '--asan=<(asan)',
+ '--lsan=<(lsan)',
+ ],
+ 'files': [
+ '../testing/xvfb.py',
+ '<(PRODUCT_DIR)/xdisplaycheck',
+ ],
+ },
+ }],
+ ['OS=="mac"', {
+ 'variables': {
+ 'command': [
+ '../testing/test_env.py',
+ '<(PRODUCT_DIR)/gpu_unittests',
+ '--brave-new-test-launcher',
+ '--test-launcher-bot-mode',
+ '--asan=<(asan)',
+ '--lsan=<(lsan)',
+ ],
+ },
+ }],
+ ['OS=="win"', {
+ 'variables': {
+ 'command': [
+ '../testing/test_env.py',
+ '<(PRODUCT_DIR)/gpu_unittests.exe',
+ '--brave-new-test-launcher',
+ '--test-launcher-bot-mode',
+ '--asan=<(asan)',
+ '--lsan=<(lsan)',
+ ],
+ },
+ }],
+ ['OS=="win" and (fastbuild==0 or fastbuild==1)', {
+ 'variables': {
+ 'files': [
+ '<(PRODUCT_DIR)/gpu_unittests.exe.pdb',
+ ],
+ },
+ }],
+ ],
+ 'includes': [
+ '../base/base.isolate',
+ ],
+}
diff --git a/mojo/common/BUILD.gn b/mojo/common/BUILD.gn
index 1cb5253..5a45242 100644
--- a/mojo/common/BUILD.gn
+++ b/mojo/common/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//mojo/public/tools/bindings/mojom.gni")
+import("//testing/test.gni")
# GYP version: mojo/mojo_base.gyp:mojo_common_lib
component("common") {
diff --git a/mojo/converters/surfaces/tests/BUILD.gn b/mojo/converters/surfaces/tests/BUILD.gn
index 982afde..87c2a9b 100644
--- a/mojo/converters/surfaces/tests/BUILD.gn
+++ b/mojo/converters/surfaces/tests/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//testing/test.gni")
+
# GYP version: mojo/mojo_converters.gypi:mojo_surfaces_lib_unittests
test("mojo_surfaces_lib_unittests") {
deps = [
diff --git a/mojo/dart/embedder/test/BUILD.gn b/mojo/dart/embedder/test/BUILD.gn
index 507f17c..c945ef7 100644
--- a/mojo/dart/embedder/test/BUILD.gn
+++ b/mojo/dart/embedder/test/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//mojo/public/tools/bindings/mojom.gni")
+import("//testing/test.gni")
action("generate_test_snapshot_bin") {
deps = [
diff --git a/mojo/edk/js/test/BUILD.gn b/mojo/edk/js/test/BUILD.gn
index badc3ad..326de6a 100644
--- a/mojo/edk/js/test/BUILD.gn
+++ b/mojo/edk/js/test/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//testing/test.gni")
+
test("js_unittests") {
deps = [
"../../js",
diff --git a/mojo/edk/system/BUILD.gn b/mojo/edk/system/BUILD.gn
index 2f8abdd..b31535e 100644
--- a/mojo/edk/system/BUILD.gn
+++ b/mojo/edk/system/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("../mojo_edk.gni")
+import("//testing/test.gni")
if (is_android) {
import("//build/config/android/config.gni")
@@ -198,12 +199,3 @@
"//testing/gtest",
]
}
-
-if (is_android) {
- unittest_apk("mojo_system_unittests_apk") {
- deps = [
- ":mojo_system_unittests",
- ]
- unittests_dep = ":mojo_system_unittests"
- }
-}
diff --git a/mojo/edk/test/BUILD.gn b/mojo/edk/test/BUILD.gn
index d05f6d4..b130440 100644
--- a/mojo/edk/test/BUILD.gn
+++ b/mojo/edk/test/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("../mojo_edk.gni")
+import("//testing/test.gni")
mojo_edk_source_set("test_support") {
testonly = true
diff --git a/mojo/services/network/udp_socket_unittest.cc b/mojo/services/network/udp_socket_unittest.cc
new file mode 100644
index 0000000..ae6f512
--- /dev/null
+++ b/mojo/services/network/udp_socket_unittest.cc
@@ -0,0 +1,458 @@
+// Copyright 2014 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/at_exit.h"
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "mojo/public/cpp/bindings/callback.h"
+#include "mojo/services/network/public/cpp/udp_socket_wrapper.h"
+#include "mojo/services/network/public/interfaces/network_service.mojom.h"
+#include "mojo/services/network/public/interfaces/udp_socket.mojom.h"
+#include "mojo/shell/shell_test_helper.h"
+#include "net/base/net_errors.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "url/gurl.h"
+
+namespace mojo {
+namespace service {
+namespace {
+
+NetAddressPtr GetLocalHostWithAnyPort() {
+ NetAddressPtr addr(NetAddress::New());
+ addr->family = NET_ADDRESS_FAMILY_IPV4;
+ addr->ipv4 = NetAddressIPv4::New();
+ addr->ipv4->port = 0;
+ addr->ipv4->addr.resize(4);
+ addr->ipv4->addr[0] = 127;
+ addr->ipv4->addr[1] = 0;
+ addr->ipv4->addr[2] = 0;
+ addr->ipv4->addr[3] = 1;
+
+ return addr.Pass();
+}
+
+Array<uint8_t> CreateTestMessage(uint8_t initial, size_t size) {
+ Array<uint8_t> array(size);
+ for (size_t i = 0; i < size; ++i)
+ array[i] = static_cast<uint8_t>((i + initial) % 256);
+ return array.Pass();
+}
+
+template <typename CallbackType>
+class TestCallbackBase {
+ public:
+ TestCallbackBase() : state_(nullptr), run_loop_(nullptr), ran_(false) {}
+
+ ~TestCallbackBase() {
+ state_->set_test_callback(nullptr);
+ }
+
+ CallbackType callback() const { return callback_; }
+
+ void WaitForResult() {
+ if (ran_)
+ return;
+
+ base::RunLoop run_loop;
+ run_loop_ = &run_loop;
+ run_loop.Run();
+ run_loop_ = nullptr;
+ }
+
+ protected:
+ struct StateBase : public CallbackType::Runnable {
+ StateBase() : test_callback_(nullptr) {}
+ virtual ~StateBase() {}
+
+ void set_test_callback(TestCallbackBase* test_callback) {
+ test_callback_ = test_callback;
+ }
+
+ protected:
+ void NotifyRun() const {
+ if (test_callback_) {
+ test_callback_->ran_ = true;
+ if (test_callback_->run_loop_)
+ test_callback_->run_loop_->Quit();
+ }
+ }
+
+ TestCallbackBase* test_callback_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(StateBase);
+ };
+
+ // Takes ownership of |state|, and guarantees that it lives at least as long
+ // as this object.
+ void Initialize(StateBase* state) {
+ state_ = state;
+ state_->set_test_callback(this);
+ callback_ = CallbackType(
+ static_cast<typename CallbackType::Runnable*>(state_));
+ }
+
+ private:
+ // The lifespan is managed by |callback_| (and its copies).
+ StateBase* state_;
+ CallbackType callback_;
+ base::RunLoop* run_loop_;
+ bool ran_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestCallbackBase);
+};
+
+class TestCallback : public TestCallbackBase<Callback<void(NetworkErrorPtr)>> {
+ public:
+ TestCallback() {
+ Initialize(new State());
+ }
+ ~TestCallback() {}
+
+ const NetworkErrorPtr& result() const { return result_; }
+
+ private:
+ struct State: public StateBase {
+ ~State() override {}
+
+ void Run(NetworkErrorPtr result) const override {
+ if (test_callback_) {
+ TestCallback* callback = static_cast<TestCallback*>(test_callback_);
+ callback->result_ = result.Pass();
+ }
+ NotifyRun();
+ }
+ };
+
+ NetworkErrorPtr result_;
+};
+
+class TestCallbackWithAddress
+ : public TestCallbackBase<Callback<void(NetworkErrorPtr, NetAddressPtr)>> {
+ public:
+ TestCallbackWithAddress() {
+ Initialize(new State());
+ }
+ ~TestCallbackWithAddress() {}
+
+ const NetworkErrorPtr& result() const { return result_; }
+ const NetAddressPtr& net_address() const { return net_address_; }
+
+ private:
+ struct State : public StateBase {
+ ~State() override {}
+
+ void Run(NetworkErrorPtr result, NetAddressPtr net_address) const override {
+ if (test_callback_) {
+ TestCallbackWithAddress* callback =
+ static_cast<TestCallbackWithAddress*>(test_callback_);
+ callback->result_ = result.Pass();
+ callback->net_address_ = net_address.Pass();
+ }
+ NotifyRun();
+ }
+ };
+
+ NetworkErrorPtr result_;
+ NetAddressPtr net_address_;
+};
+
+class TestCallbackWithUint32
+ : public TestCallbackBase<Callback<void(uint32_t)>> {
+ public:
+ TestCallbackWithUint32() : result_(0) {
+ Initialize(new State());
+ }
+ ~TestCallbackWithUint32() {}
+
+ uint32_t result() const { return result_; }
+
+ private:
+ struct State : public StateBase {
+ ~State() override {}
+
+ void Run(uint32_t result) const override {
+ if (test_callback_) {
+ TestCallbackWithUint32* callback =
+ static_cast<TestCallbackWithUint32*>(test_callback_);
+ callback->result_ = result;
+ }
+ NotifyRun();
+ }
+ };
+
+ uint32_t result_;
+};
+
+class TestReceiveCallback
+ : public TestCallbackBase<
+ Callback<void(NetworkErrorPtr, NetAddressPtr, Array<uint8_t>)>> {
+ public:
+ TestReceiveCallback() {
+ Initialize(new State());
+ }
+ ~TestReceiveCallback() {}
+
+ const NetworkErrorPtr& result() const { return result_; }
+ const NetAddressPtr& src_addr() const { return src_addr_; }
+ const Array<uint8_t>& data() const { return data_; }
+
+ private:
+ struct State : public StateBase {
+ ~State() override {}
+
+ void Run(NetworkErrorPtr result,
+ NetAddressPtr src_addr,
+ Array<uint8_t> data) const override {
+ if (test_callback_) {
+ TestReceiveCallback* callback =
+ static_cast<TestReceiveCallback*>(test_callback_);
+ callback->result_ = result.Pass();
+ callback->src_addr_ = src_addr.Pass();
+ callback->data_ = data.Pass();
+ }
+ NotifyRun();
+ }
+ };
+
+ NetworkErrorPtr result_;
+ NetAddressPtr src_addr_;
+ Array<uint8_t> data_;
+};
+
+class UDPSocketTest : public testing::Test {
+ public:
+ UDPSocketTest() {}
+ virtual ~UDPSocketTest() {}
+
+ virtual void SetUp() override {
+ test_helper_.Init();
+
+ test_helper_.application_manager()->ConnectToService(
+ GURL("mojo:network_service"), &network_service_);
+
+ network_service_->CreateUDPSocket(GetProxy(&udp_socket_));
+ udp_socket_.set_client(&udp_socket_client_);
+ }
+
+ protected:
+ struct ReceiveResult {
+ NetworkErrorPtr result;
+ NetAddressPtr addr;
+ Array<uint8_t> data;
+ };
+
+ class UDPSocketClientImpl : public UDPSocketClient {
+ public:
+
+ UDPSocketClientImpl() : run_loop_(nullptr), expected_receive_count_(0) {}
+
+ ~UDPSocketClientImpl() override {
+ while (!results_.empty()) {
+ delete results_.front();
+ results_.pop();
+ }
+ }
+
+ void OnReceived(NetworkErrorPtr result,
+ NetAddressPtr src_addr,
+ Array<uint8_t> data) override {
+ ReceiveResult* entry = new ReceiveResult();
+ entry->result = result.Pass();
+ entry->addr = src_addr.Pass();
+ entry->data = data.Pass();
+
+ results_.push(entry);
+
+ if (results_.size() == expected_receive_count_ && run_loop_) {
+ expected_receive_count_ = 0;
+ run_loop_->Quit();
+ }
+ }
+
+ base::RunLoop* run_loop_;
+ std::queue<ReceiveResult*> results_;
+ size_t expected_receive_count_;
+
+ DISALLOW_COPY_AND_ASSIGN(UDPSocketClientImpl);
+ };
+
+ std::queue<ReceiveResult*>* GetReceiveResults() {
+ return &udp_socket_client_.results_;
+ }
+
+ void WaitForReceiveResults(size_t count) {
+ if (GetReceiveResults()->size() == count)
+ return;
+
+ udp_socket_client_.expected_receive_count_ = count;
+ base::RunLoop run_loop;
+ udp_socket_client_.run_loop_ = &run_loop;
+ run_loop.Run();
+ udp_socket_client_.run_loop_ = nullptr;
+ }
+
+ base::ShadowingAtExitManager at_exit_;
+ shell::ShellTestHelper test_helper_;
+
+ NetworkServicePtr network_service_;
+ UDPSocketPtr udp_socket_;
+ UDPSocketClientImpl udp_socket_client_;
+
+ DISALLOW_COPY_AND_ASSIGN(UDPSocketTest);
+};
+
+} // namespace
+
+TEST_F(UDPSocketTest, Settings) {
+ TestCallback callback1;
+ udp_socket_->AllowAddressReuse(callback1.callback());
+ callback1.WaitForResult();
+ EXPECT_EQ(net::OK, callback1.result()->code);
+
+ // Should fail because the socket hasn't been bound.
+ TestCallback callback2;
+ udp_socket_->SetSendBufferSize(1024, callback2.callback());
+ callback2.WaitForResult();
+ EXPECT_NE(net::OK, callback2.result()->code);
+
+ // Should fail because the socket hasn't been bound.
+ TestCallback callback3;
+ udp_socket_->SetReceiveBufferSize(2048, callback3.callback());
+ callback3.WaitForResult();
+ EXPECT_NE(net::OK, callback3.result()->code);
+
+ TestCallbackWithAddress callback4;
+ udp_socket_->Bind(GetLocalHostWithAnyPort(), callback4.callback());
+ callback4.WaitForResult();
+ EXPECT_EQ(net::OK, callback4.result()->code);
+ EXPECT_NE(0u, callback4.net_address()->ipv4->port);
+
+ // Should fail because the socket has been bound.
+ TestCallback callback5;
+ udp_socket_->AllowAddressReuse(callback5.callback());
+ callback5.WaitForResult();
+ EXPECT_NE(net::OK, callback5.result()->code);
+
+ TestCallback callback6;
+ udp_socket_->SetSendBufferSize(1024, callback6.callback());
+ callback6.WaitForResult();
+ EXPECT_EQ(net::OK, callback6.result()->code);
+
+ TestCallback callback7;
+ udp_socket_->SetReceiveBufferSize(2048, callback7.callback());
+ callback7.WaitForResult();
+ EXPECT_EQ(net::OK, callback7.result()->code);
+
+ TestCallbackWithUint32 callback8;
+ udp_socket_->NegotiateMaxPendingSendRequests(0, callback8.callback());
+ callback8.WaitForResult();
+ EXPECT_GT(callback8.result(), 0u);
+
+ TestCallbackWithUint32 callback9;
+ udp_socket_->NegotiateMaxPendingSendRequests(16, callback9.callback());
+ callback9.WaitForResult();
+ EXPECT_GT(callback9.result(), 0u);
+}
+
+TEST_F(UDPSocketTest, TestReadWrite) {
+ TestCallbackWithAddress callback1;
+ udp_socket_->Bind(GetLocalHostWithAnyPort(), callback1.callback());
+ callback1.WaitForResult();
+ ASSERT_EQ(net::OK, callback1.result()->code);
+ ASSERT_NE(0u, callback1.net_address()->ipv4->port);
+
+ NetAddressPtr server_addr = callback1.net_address().Clone();
+
+ UDPSocketPtr client_socket;
+ network_service_->CreateUDPSocket(GetProxy(&client_socket));
+
+ TestCallbackWithAddress callback2;
+ client_socket->Bind(GetLocalHostWithAnyPort(), callback2.callback());
+ callback2.WaitForResult();
+ ASSERT_EQ(net::OK, callback2.result()->code);
+ ASSERT_NE(0u, callback2.net_address()->ipv4->port);
+
+ NetAddressPtr client_addr = callback2.net_address().Clone();
+
+ const size_t kDatagramCount = 6;
+ const size_t kDatagramSize = 255;
+ udp_socket_->ReceiveMore(kDatagramCount);
+
+ for (size_t i = 0; i < kDatagramCount; ++i) {
+ TestCallback callback;
+ client_socket->SendTo(
+ server_addr.Clone(),
+ CreateTestMessage(static_cast<uint8_t>(i), kDatagramSize),
+ callback.callback());
+ callback.WaitForResult();
+ EXPECT_EQ(255, callback.result()->code);
+ }
+
+ WaitForReceiveResults(kDatagramCount);
+ for (size_t i = 0; i < kDatagramCount; ++i) {
+ scoped_ptr<ReceiveResult> result(GetReceiveResults()->front());
+ GetReceiveResults()->pop();
+
+ EXPECT_EQ(static_cast<int>(kDatagramSize), result->result->code);
+ EXPECT_TRUE(result->addr.Equals(client_addr));
+ EXPECT_TRUE(result->data.Equals(
+ CreateTestMessage(static_cast<uint8_t>(i), kDatagramSize)));
+ }
+}
+
+TEST_F(UDPSocketTest, TestUDPSocketWrapper) {
+ UDPSocketWrapper udp_socket(udp_socket_.Pass(), 4, 4);
+
+ TestCallbackWithAddress callback1;
+ udp_socket.Bind(GetLocalHostWithAnyPort(), callback1.callback());
+ callback1.WaitForResult();
+ ASSERT_EQ(net::OK, callback1.result()->code);
+ ASSERT_NE(0u, callback1.net_address()->ipv4->port);
+
+ NetAddressPtr server_addr = callback1.net_address().Clone();
+
+ UDPSocketPtr raw_client_socket;
+ network_service_->CreateUDPSocket(GetProxy(&raw_client_socket));
+ UDPSocketWrapper client_socket(raw_client_socket.Pass(), 4, 4);
+
+ TestCallbackWithAddress callback2;
+ client_socket.Bind(GetLocalHostWithAnyPort(), callback2.callback());
+ callback2.WaitForResult();
+ ASSERT_EQ(net::OK, callback2.result()->code);
+ ASSERT_NE(0u, callback2.net_address()->ipv4->port);
+
+ NetAddressPtr client_addr = callback2.net_address().Clone();
+
+ const size_t kDatagramCount = 16;
+ const size_t kDatagramSize = 255;
+
+ for (size_t i = 1; i < kDatagramCount; ++i) {
+ scoped_ptr<TestCallback[]> send_callbacks(new TestCallback[i]);
+ scoped_ptr<TestReceiveCallback[]> receive_callbacks(
+ new TestReceiveCallback[i]);
+
+ for (size_t j = 0; j < i; ++j) {
+ client_socket.SendTo(
+ server_addr.Clone(),
+ CreateTestMessage(static_cast<uint8_t>(j), kDatagramSize),
+ send_callbacks[j].callback());
+
+ udp_socket.ReceiveFrom(receive_callbacks[j].callback());
+ }
+
+ receive_callbacks[i - 1].WaitForResult();
+
+ for (size_t j = 0; j < i; ++j) {
+ EXPECT_EQ(static_cast<int>(kDatagramSize),
+ receive_callbacks[j].result()->code);
+ EXPECT_TRUE(receive_callbacks[j].src_addr().Equals(client_addr));
+ EXPECT_TRUE(receive_callbacks[j].data().Equals(
+ CreateTestMessage(static_cast<uint8_t>(j), kDatagramSize)));
+ }
+ }
+}
+
+} // namespace service
+} // namespace mojo
diff --git a/mojo/services/network/upload_network_service.py b/mojo/services/network/upload_network_service.py
new file mode 100755
index 0000000..510494d
--- /dev/null
+++ b/mojo/services/network/upload_network_service.py
@@ -0,0 +1,73 @@
+#!/usr/bin/env python
+# Copyright 2014 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 argparse
+import imp
+import os
+import subprocess
+import sys
+import tempfile
+import time
+import zipfile
+
+root_path = os.path.realpath(
+ os.path.join(
+ os.path.dirname(
+ os.path.realpath(__file__)),
+ os.pardir,
+ os.pardir,
+ os.pardir))
+version = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=root_path)
+version = version.strip()
+
+if not sys.platform.startswith("linux"):
+ print "Only support linux for now"
+ sys.exit(1)
+
+platform = "linux-x64" # TODO: Parameterize
+binary_dest = "gs://mojo/network/" + version + "/" + platform + ".zip"
+
+find_depot_tools_path = os.path.join(root_path, "tools", "find_depot_tools.py")
+find_depot_tools = imp.load_source("find_depot_tools", find_depot_tools_path)
+
+depot_tools_path = find_depot_tools.add_depot_tools_to_path()
+gsutil_exe = os.path.join(depot_tools_path, "third_party", "gsutil", "gsutil")
+
+
+def gsutil_cp(source, dest, dry_run):
+ if dry_run:
+ print "gsutil cp %s %s" % (source, dest)
+ else:
+ subprocess.check_call([gsutil_exe, "cp", source, dest])
+
+
+def upload_binary(binary_path, dry_run):
+ absolute_binary_path = os.path.join(root_path, binary_path)
+ with tempfile.NamedTemporaryFile() as binary_zip_file:
+ with zipfile.ZipFile(binary_zip_file, 'w') as z:
+ with open(absolute_binary_path) as service_binary:
+ zipinfo = zipfile.ZipInfo("libnetwork_service.so")
+ zipinfo.external_attr = 0o777 << 16
+ zipinfo.compress_type = zipfile.ZIP_DEFLATED
+ zipinfo.date_time = time.gmtime(os.path.getmtime(absolute_binary_path))
+ z.writestr(zipinfo, service_binary.read())
+ gsutil_cp(binary_zip_file.name, binary_dest, dry_run)
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description="Upload network service binary to Google storage")
+ parser.add_argument("-n", "--dry-run", action="store_true", help="Dry run")
+ parser.add_argument(
+ "binary_path",
+ help="Path to network service binary relative to the repo root, e.g. " +
+ "out/Release/libnetwork_service.so")
+ args = parser.parse_args()
+ upload_binary(args.binary_path, args.dry_run)
+ print "Uploaded artifacts for %s %s" % (version, "linux-x64")
+ return 0
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/mojo/services/view_manager/public/cpp/tests/BUILD.gn b/mojo/services/view_manager/public/cpp/tests/BUILD.gn
index ec164ac..2cbcf43 100644
--- a/mojo/services/view_manager/public/cpp/tests/BUILD.gn
+++ b/mojo/services/view_manager/public/cpp/tests/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/ui.gni")
+import("//testing/test.gni")
test("mojo_view_manager_lib_unittests") {
sources = [
diff --git a/net/BUILD.gn b/net/BUILD.gn
index aa9f702..cc95c2b 100644
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -7,6 +7,7 @@
import("//build/config/ui.gni")
import("//build/module_args/v8.gni")
import("//url/config.gni")
+import("//testing/test.gni")
# TODO(cjhopman): //build/config/android/rules.gni also imports grit_rule.gni.
# Currently, that file can't be imported multiple times. Make this always
@@ -684,6 +685,8 @@
"test/url_request/url_request_mock_data_job.h",
"test/url_request/url_request_mock_http_job.cc",
"test/url_request/url_request_mock_http_job.h",
+ "test/url_request/url_request_slow_download_job.cc",
+ "test/url_request/url_request_slow_download_job.h",
"url_request/test_url_fetcher_factory.cc",
"url_request/test_url_fetcher_factory.h",
"url_request/test_url_request_interceptor.cc",
diff --git a/net/base/load_flags_list.h b/net/base/load_flags_list.h
index 2754326..7508287 100644
--- a/net/base/load_flags_list.h
+++ b/net/base/load_flags_list.h
@@ -101,23 +101,19 @@
// immediately.
LOAD_FLAG(IGNORE_LIMITS, 1 << 22)
-// Suppress login prompts for this request. Cached credentials or
-// default credentials may still be used for authentication.
-LOAD_FLAG(DO_NOT_PROMPT_FOR_LOGIN, 1 << 23)
-
// Indicates that the operation is somewhat likely to be due to an
// explicit user action. This can be used as a hint to treat the
// request with higher priority.
-LOAD_FLAG(MAYBE_USER_GESTURE, 1 << 24)
+LOAD_FLAG(MAYBE_USER_GESTURE, 1 << 23)
// Indicates that the username:password portion of the URL should not
// be honored, but that other forms of authority may be used.
-LOAD_FLAG(DO_NOT_USE_EMBEDDED_IDENTITY, 1 << 25)
+LOAD_FLAG(DO_NOT_USE_EMBEDDED_IDENTITY, 1 << 24)
// Send request directly to the origin if the effective proxy is the data
// reduction proxy.
// TODO(rcs): Remove this flag as soon as http://crbug.com/339237 is resolved.
-LOAD_FLAG(BYPASS_DATA_REDUCTION_PROXY, 1 << 26)
+LOAD_FLAG(BYPASS_DATA_REDUCTION_PROXY, 1 << 25)
// Indicates the the request is an asynchronous revalidation.
-LOAD_FLAG(ASYNC_REVALIDATION, 1 << 27)
+LOAD_FLAG(ASYNC_REVALIDATION, 1 << 26)
diff --git a/net/base/mime_sniffer.cc b/net/base/mime_sniffer.cc
index 61ef948..ad4212d 100644
--- a/net/base/mime_sniffer.cc
+++ b/net/base/mime_sniffer.cc
@@ -122,7 +122,8 @@
template <int MagicSize, int MaskSize>
class VerifySizes {
- COMPILE_ASSERT(MagicSize == MaskSize, sizes_must_be_equal);
+ static_assert(MagicSize == MaskSize, "sizes must be equal");
+
public:
enum { SIZES = MagicSize };
};
diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc
index cba37a4..d1b67d5 100644
--- a/net/base/mime_util.cc
+++ b/net/base/mime_util.cc
@@ -25,27 +25,6 @@
using std::string;
-namespace {
-
-struct MediaType {
- const char name[12];
- const char matcher[13];
-};
-
-static const MediaType kIanaMediaTypes[] = {
- { "application", "application/" },
- { "audio", "audio/" },
- { "example", "example/" },
- { "image", "image/" },
- { "message", "message/" },
- { "model", "model/" },
- { "multipart", "multipart/" },
- { "text", "text/" },
- { "video", "video/" },
-};
-
-} // namespace
-
namespace net {
// Singleton utility class for mime types.
@@ -1364,15 +1343,6 @@
g_mime_util.Get().RemoveProprietaryMediaTypesAndCodecsForTests();
}
-const std::string GetIANAMediaType(const std::string& mime_type) {
- for (size_t i = 0; i < arraysize(kIanaMediaTypes); ++i) {
- if (StartsWithASCII(mime_type, kIanaMediaTypes[i].matcher, true)) {
- return kIanaMediaTypes[i].name;
- }
- }
- return std::string();
-}
-
CertificateMimeType GetCertificateMimeTypeForMimeType(
const std::string& mime_type) {
// Don't create a map, there is only one entry in the table,
diff --git a/net/base/mime_util.h b/net/base/mime_util.h
index 24dca3d..f3901ba 100644
--- a/net/base/mime_util.h
+++ b/net/base/mime_util.h
@@ -140,12 +140,6 @@
// variations.
NET_EXPORT void RemoveProprietaryMediaTypesAndCodecsForTests();
-// Returns the IANA media type contained in |mime_type|, or an empty
-// string if |mime_type| does not specifify a known media type.
-// Supported media types are defined at:
-// http://www.iana.org/assignments/media-types/index.html
-NET_EXPORT const std::string GetIANAMediaType(const std::string& mime_type);
-
// A list of supported certificate-related mime types.
//
// A Java counterpart will be generated for this enum.
diff --git a/net/base/mime_util_unittest.cc b/net/base/mime_util_unittest.cc
index 5c31137..a3d9516 100644
--- a/net/base/mime_util_unittest.cc
+++ b/net/base/mime_util_unittest.cc
@@ -363,23 +363,6 @@
EXPECT_FALSE(IsValidTopLevelMimeType("x-"));
}
-TEST(MimeUtilTest, TestToIANAMediaType) {
- EXPECT_EQ("", GetIANAMediaType("texting/driving"));
- EXPECT_EQ("", GetIANAMediaType("ham/sandwich"));
- EXPECT_EQ("", GetIANAMediaType(std::string()));
- EXPECT_EQ("", GetIANAMediaType("/application/hamsandwich"));
-
- EXPECT_EQ("application", GetIANAMediaType("application/poodle-wrestler"));
- EXPECT_EQ("audio", GetIANAMediaType("audio/mpeg"));
- EXPECT_EQ("example", GetIANAMediaType("example/yomomma"));
- EXPECT_EQ("image", GetIANAMediaType("image/png"));
- EXPECT_EQ("message", GetIANAMediaType("message/sipfrag"));
- EXPECT_EQ("model", GetIANAMediaType("model/vrml"));
- EXPECT_EQ("multipart", GetIANAMediaType("multipart/mixed"));
- EXPECT_EQ("text", GetIANAMediaType("text/plain"));
- EXPECT_EQ("video", GetIANAMediaType("video/H261"));
-}
-
TEST(MimeUtilTest, TestGetExtensionsForMimeType) {
const struct {
const char* mime_type;
diff --git a/net/base/network_change_notifier.cc b/net/base/network_change_notifier.cc
index 05c72a1..34ec592 100644
--- a/net/base/network_change_notifier.cc
+++ b/net/base/network_change_notifier.cc
@@ -565,10 +565,9 @@
"CONNECTION_NONE",
"CONNECTION_BLUETOOTH"
};
- COMPILE_ASSERT(
- arraysize(kConnectionTypeNames) ==
- NetworkChangeNotifier::CONNECTION_LAST + 1,
- ConnectionType_name_count_mismatch);
+ static_assert(arraysize(kConnectionTypeNames) ==
+ NetworkChangeNotifier::CONNECTION_LAST + 1,
+ "ConnectionType name count should match");
if (type < CONNECTION_UNKNOWN || type > CONNECTION_LAST) {
NOTREACHED();
return "CONNECTION_INVALID";
diff --git a/net/base/prioritized_dispatcher_unittest.cc b/net/base/prioritized_dispatcher_unittest.cc
index 40c7425..44ffb57 100644
--- a/net/base/prioritized_dispatcher_unittest.cc
+++ b/net/base/prioritized_dispatcher_unittest.cc
@@ -19,12 +19,10 @@
// We rely on the priority enum values being sequential having starting at 0,
// and increasing for higher priorities.
-COMPILE_ASSERT(MINIMUM_PRIORITY == 0u &&
- MINIMUM_PRIORITY == IDLE &&
- IDLE < LOWEST &&
- LOWEST < HIGHEST &&
- HIGHEST <= MAXIMUM_PRIORITY,
- priority_indexes_incompatible);
+static_assert(MINIMUM_PRIORITY == 0u && MINIMUM_PRIORITY == IDLE &&
+ IDLE < LOWEST && LOWEST < HIGHEST &&
+ HIGHEST <= MAXIMUM_PRIORITY,
+ "priority indexes incompatible");
class PrioritizedDispatcherTest : public testing::Test {
public:
diff --git a/net/cert/crl_set_storage.cc b/net/cert/crl_set_storage.cc
index 2da4f92..f2332ab 100644
--- a/net/cert/crl_set_storage.cc
+++ b/net/cert/crl_set_storage.cc
@@ -295,7 +295,7 @@
// anything by doing this.
#if defined(__BYTE_ORDER)
// Linux check
- COMPILE_ASSERT(__BYTE_ORDER == __LITTLE_ENDIAN, assumes_little_endian);
+ static_assert(__BYTE_ORDER == __LITTLE_ENDIAN, "assumes little endian");
#elif defined(__BIG_ENDIAN__)
// Mac check
#error assumes little endian
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
index d318647..f689553 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -1890,8 +1890,8 @@
// Ideally, this would be asserted up where we define ChangeCauseMapping,
// but DeletionCause's visibility (or lack thereof) forces us to make
// this check here.
- COMPILE_ASSERT(arraysize(ChangeCauseMapping) == DELETE_COOKIE_LAST_ENTRY + 1,
- ChangeCauseMapping_size_not_eq_DeletionCause_enum_size);
+ static_assert(arraysize(ChangeCauseMapping) == DELETE_COOKIE_LAST_ENTRY + 1,
+ "ChangeCauseMapping size should match DeletionCause size");
// See InitializeHistograms() for details.
if (deletion_cause != DELETE_COOKIE_DONT_RECORD)
diff --git a/net/data/websocket/OWNERS b/net/data/websocket/OWNERS
index 7af5bc8..4e835c1 100644
--- a/net/data/websocket/OWNERS
+++ b/net/data/websocket/OWNERS
@@ -1,3 +1,3 @@
-bashi@chromium.org
-toyoshim@chromium.org
-yutak@chromium.org
+ricea@chromium.org
+tyoshino@chromium.org
+yhirano@chromium.org
diff --git a/net/data/websocket/echo-request-headers_wsh.py b/net/data/websocket/echo-request-headers_wsh.py
new file mode 100644
index 0000000..89aa28e
--- /dev/null
+++ b/net/data/websocket/echo-request-headers_wsh.py
@@ -0,0 +1,20 @@
+# Copyright (c) 2014 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.
+#
+# This handler serializes the received headers into a JSON string and sends it
+# back to the client. In |headers_in|, the keys are converted to lower-case,
+# while the original case is retained for the values.
+
+
+import json
+
+
+def web_socket_do_extra_handshake(request):
+ pass
+
+
+def web_socket_transfer_data(request):
+ request.ws_stream.send_message(json.dumps(dict(request.headers_in.items())))
+ # Wait for closing handshake
+ request.ws_stream.receive_message()
diff --git a/net/data/websocket/proxied_request_check.html b/net/data/websocket/proxied_request_check.html
new file mode 100644
index 0000000..9d6d64e
--- /dev/null
+++ b/net/data/websocket/proxied_request_check.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<head>
+<title>test proxied ws connection</title>
+</head>
+<script type="text/javascript">
+// Do connection test and check the headers arrive at the WebSocket.
+
+var protocol = location.protocol.replace('http', 'ws');
+var url = protocol + '//' + location.host + '/echo-request-headers';
+var ws = new WebSocket(url);
+
+ws.onmessage = function(evt)
+{
+ var headers = JSON.parse(evt.data);
+ for (var name in headers) {
+ // The keys in the serialized data are lower cased.
+ if (name.startsWith('proxy-')) {
+ document.title = 'FAIL';
+ return;
+ }
+ }
+
+ // Set document title to 'PASS'. The test observer catches this title changes
+ // to know the result.
+ document.title = 'PASS';
+}
+
+ws.onclose = function()
+{
+ document.title = 'FAIL';
+}
+</script>
diff --git a/net/disk_cache/blockfile/backend_impl.cc b/net/disk_cache/blockfile/backend_impl.cc
index 1998d33..bf76842 100644
--- a/net/disk_cache/blockfile/backend_impl.cc
+++ b/net/disk_cache/blockfile/backend_impl.cc
@@ -677,7 +677,8 @@
}
bool BackendImpl::SetMaxSize(int max_bytes) {
- COMPILE_ASSERT(sizeof(max_bytes) == sizeof(max_size_), unsupported_int_model);
+ static_assert(sizeof(max_bytes) == sizeof(max_size_),
+ "unsupported int model");
if (max_bytes < 0)
return false;
diff --git a/net/disk_cache/blockfile/backend_impl_v3.cc b/net/disk_cache/blockfile/backend_impl_v3.cc
index a1024b4..0b0e232 100644
--- a/net/disk_cache/blockfile/backend_impl_v3.cc
+++ b/net/disk_cache/blockfile/backend_impl_v3.cc
@@ -91,7 +91,8 @@
// ------------------------------------------------------------------------
bool BackendImplV3::SetMaxSize(int max_bytes) {
- COMPILE_ASSERT(sizeof(max_bytes) == sizeof(max_size_), unsupported_int_model);
+ static_assert(sizeof(max_bytes) == sizeof(max_size_),
+ "unsupported int model");
if (max_bytes < 0)
return false;
diff --git a/net/disk_cache/blockfile/block_files.cc b/net/disk_cache/blockfile/block_files.cc
index 58d25da..525141b 100644
--- a/net/disk_cache/blockfile/block_files.cc
+++ b/net/disk_cache/blockfile/block_files.cc
@@ -548,7 +548,7 @@
}
MappedFile* BlockFiles::FileForNewBlock(FileType block_type, int block_count) {
- COMPILE_ASSERT(RANKINGS == 1, invalid_file_type);
+ static_assert(RANKINGS == 1, "invalid file type");
MappedFile* file = block_files_[block_type - 1];
BlockHeader file_header(file);
diff --git a/net/disk_cache/blockfile/disk_format.h b/net/disk_cache/blockfile/disk_format.h
index 95ac58b..b2e666a 100644
--- a/net/disk_cache/blockfile/disk_format.h
+++ b/net/disk_cache/blockfile/disk_format.h
@@ -116,7 +116,7 @@
char key[256 - 24 * 4]; // null terminated
};
-COMPILE_ASSERT(sizeof(EntryStore) == 256, bad_EntyStore);
+static_assert(sizeof(EntryStore) == 256, "bad EntryStore");
const int kMaxInternalKeyLength = 4 * sizeof(EntryStore) -
offsetof(EntryStore, key) - 1;
@@ -146,7 +146,7 @@
};
#pragma pack(pop)
-COMPILE_ASSERT(sizeof(RankingsNode) == 36, bad_RankingsNode);
+static_assert(sizeof(RankingsNode) == 36, "bad RankingsNode");
} // namespace disk_cache
diff --git a/net/disk_cache/blockfile/disk_format_base.h b/net/disk_cache/blockfile/disk_format_base.h
index 9f4c16e..1c49a48 100644
--- a/net/disk_cache/blockfile/disk_format_base.h
+++ b/net/disk_cache/blockfile/disk_format_base.h
@@ -61,7 +61,7 @@
AllocBitmap allocation_map;
};
-COMPILE_ASSERT(sizeof(BlockFileHeader) == kBlockHeaderSize, bad_header);
+static_assert(sizeof(BlockFileHeader) == kBlockHeaderSize, "bad header");
// Sparse data support:
// We keep a two level hierarchy to enable sparse data for an entry: the first
@@ -124,8 +124,8 @@
// The number of blocks stored by a child entry.
const int kNumSparseBits = 1024;
-COMPILE_ASSERT(sizeof(SparseData) == sizeof(SparseHeader) + kNumSparseBits / 8,
- Invalid_SparseData_bitmap);
+static_assert(sizeof(SparseData) == sizeof(SparseHeader) + kNumSparseBits / 8,
+ "invalid SparseData bitmap");
} // namespace disk_cache
diff --git a/net/disk_cache/blockfile/disk_format_v3.h b/net/disk_cache/blockfile/disk_format_v3.h
index f5811cc..f16648b 100644
--- a/net/disk_cache/blockfile/disk_format_v3.h
+++ b/net/disk_cache/blockfile/disk_format_v3.h
@@ -97,7 +97,7 @@
IndexHeaderV3 header;
uint32 bitmap[kBaseBitmapBytes / 4]; // First page of the bitmap.
};
-COMPILE_ASSERT(sizeof(IndexBitmap) == 4096, bad_IndexHeader);
+static_assert(sizeof(IndexBitmap) == 4096, "bad IndexHeader");
// Possible states for a given entry.
enum EntryState {
@@ -109,7 +109,7 @@
ENTRY_FIXING, // Inconsistent state. The entry is being verified.
ENTRY_USED // The slot is in use (entry is present).
};
-COMPILE_ASSERT(ENTRY_USED <= 7, state_uses_3_bits);
+static_assert(ENTRY_USED <= 7, "state uses 3 bits");
enum EntryGroup {
ENTRY_NO_USE = 0, // The entry has not been reused.
@@ -118,7 +118,7 @@
ENTRY_RESERVED, // Reserved for future use.
ENTRY_EVICTED // The entry was deleted.
};
-COMPILE_ASSERT(ENTRY_USED <= 7, group_uses_3_bits);
+static_assert(ENTRY_USED <= 7, "group uses 3 bits");
#pragma pack(push, 1)
struct IndexCell {
@@ -183,7 +183,7 @@
uint64 first_part;
uint8 last_part;
};
-COMPILE_ASSERT(sizeof(IndexCell) == 9, bad_IndexCell);
+static_assert(sizeof(IndexCell) == 9, "bad IndexCell");
const int kCellsPerBucket = 4;
struct IndexBucket {
@@ -191,7 +191,7 @@
int32 next;
uint32 hash; // The high order byte is reserved (should be zero).
};
-COMPILE_ASSERT(sizeof(IndexBucket) == 44, bad_IndexBucket);
+static_assert(sizeof(IndexBucket) == 44, "bad IndexBucket");
const int kBytesPerCell = 44 / kCellsPerBucket;
// The main cache index. Backed by a file named index_tb1.
@@ -225,7 +225,7 @@
int32 pad[3];
uint32 self_hash;
};
-COMPILE_ASSERT(sizeof(EntryRecord) == 104, bad_EntryRecord);
+static_assert(sizeof(EntryRecord) == 104, "bad EntryRecord");
struct ShortEntryRecord {
uint32 hash;
@@ -239,7 +239,7 @@
uint32 long_hash[5];
uint32 self_hash;
};
-COMPILE_ASSERT(sizeof(ShortEntryRecord) == 48, bad_ShortEntryRecord);
+static_assert(sizeof(ShortEntryRecord) == 48, "bad ShortEntryRecord");
} // namespace disk_cache
diff --git a/net/disk_cache/blockfile/entry_impl.cc b/net/disk_cache/blockfile/entry_impl.cc
index 0a882de..76bf7c7 100644
--- a/net/disk_cache/blockfile/entry_impl.cc
+++ b/net/disk_cache/blockfile/entry_impl.cc
@@ -776,7 +776,7 @@
if (address.is_block_file())
offset = address.start_block() * address.BlockSize() + kBlockHeaderSize;
- COMPILE_ASSERT(kNumStreams == kKeyFileIndex, invalid_key_index);
+ static_assert(kNumStreams == kKeyFileIndex, "invalid key index");
File* key_file = const_cast<EntryImpl*>(this)->GetBackingFile(address,
kKeyFileIndex);
if (!key_file)
diff --git a/net/disk_cache/blockfile/entry_impl_v3.cc b/net/disk_cache/blockfile/entry_impl_v3.cc
index c8898e0..04e9ad9 100644
--- a/net/disk_cache/blockfile/entry_impl_v3.cc
+++ b/net/disk_cache/blockfile/entry_impl_v3.cc
@@ -489,7 +489,7 @@
if (address.is_block_file())
offset = address.start_block() * address.BlockSize() + kBlockHeaderSize;
- COMPILE_ASSERT(kNumStreams == kKeyFileIndex, invalid_key_index);
+ static_assert(kNumStreams == kKeyFileIndex, "invalid key index");
File* key_file = const_cast<EntryImpl*>(this)->GetBackingFile(address,
kKeyFileIndex);
if (!key_file)
diff --git a/net/disk_cache/blockfile/file_ios.cc b/net/disk_cache/blockfile/file_ios.cc
index ef0e2fa..3ffb5a5 100644
--- a/net/disk_cache/blockfile/file_ios.cc
+++ b/net/disk_cache/blockfile/file_ios.cc
@@ -47,7 +47,7 @@
void Write();
private:
- virtual ~FileBackgroundIO() {}
+ ~FileBackgroundIO() override {}
disk_cache::FileIOCallback* callback_;
@@ -64,7 +64,7 @@
class FileInFlightIO : public disk_cache::InFlightIO {
public:
FileInFlightIO() {}
- virtual ~FileInFlightIO() {}
+ ~FileInFlightIO() override {}
// These methods start an asynchronous operation. The arguments have the same
// semantics of the File asynchronous operations, with the exception that the
@@ -79,8 +79,8 @@
// |cancel| is true if the actual task posted to the thread is still
// queued (because we are inside WaitForPendingIO), and false if said task is
// the one performing the call.
- virtual void OnOperationComplete(disk_cache::BackgroundIO* operation,
- bool cancel) override;
+ void OnOperationComplete(disk_cache::BackgroundIO* operation,
+ bool cancel) override;
private:
DISALLOW_COPY_AND_ASSIGN(FileInFlightIO);
diff --git a/net/disk_cache/blockfile/file_win.cc b/net/disk_cache/blockfile/file_win.cc
index bf31312..ef823c6 100644
--- a/net/disk_cache/blockfile/file_win.cc
+++ b/net/disk_cache/blockfile/file_win.cc
@@ -26,7 +26,8 @@
disk_cache::FileIOCallback* callback_;
};
-COMPILE_ASSERT(!offsetof(MyOverlapped, context_), starts_with_overlapped);
+static_assert(offsetof(MyOverlapped, context_) == 0,
+ "should start with overlapped");
// Helper class to handle the IO completion notifications from the message loop.
class CompletionHandler : public base::MessageLoopForIO::IOHandler {
diff --git a/net/disk_cache/blockfile/stats.cc b/net/disk_cache/blockfile/stats.cc
index 70592e4..fae006d 100644
--- a/net/disk_cache/blockfile/stats.cc
+++ b/net/disk_cache/blockfile/stats.cc
@@ -24,7 +24,7 @@
int data_sizes[disk_cache::Stats::kDataSizesLength];
int64 counters[disk_cache::Stats::MAX_COUNTER];
};
-COMPILE_ASSERT(sizeof(OnDiskStats) < 512, needs_more_than_2_blocks);
+static_assert(sizeof(OnDiskStats) < 512, "needs more than 2 blocks");
// Returns the "floor" (as opposed to "ceiling") of log base 2 of number.
int LogBase2(int32 number) {
@@ -67,8 +67,8 @@
"Doom recent entries",
"unused"
};
-COMPILE_ASSERT(arraysize(kCounterNames) == disk_cache::Stats::MAX_COUNTER,
- update_the_names);
+static_assert(arraysize(kCounterNames) == disk_cache::Stats::MAX_COUNTER,
+ "update the names");
} // namespace
@@ -155,7 +155,7 @@
int Stats::StorageSize() {
// If we have more than 512 bytes of counters, change kDiskSignature so we
// don't overwrite something else (LoadStats must fail).
- COMPILE_ASSERT(sizeof(OnDiskStats) <= 256 * 2, use_more_blocks);
+ static_assert(sizeof(OnDiskStats) <= 256 * 2, "use more blocks");
return 256 * 2;
}
@@ -300,7 +300,7 @@
// From this point on, use a logarithmic scale.
int result = LogBase2(size) + 1;
- COMPILE_ASSERT(kDataSizesLength > 16, update_the_scale);
+ static_assert(kDataSizesLength > 16, "update the scale");
if (result >= kDataSizesLength)
result = kDataSizesLength - 1;
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc
index 03cc86b..228c654 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -670,7 +670,8 @@
ASSERT_TRUE(NULL != entry);
const int kReadBufferSize = 600;
const int kFinalReadSize = kBufferSize - kReadBufferSize;
- COMPILE_ASSERT(kFinalReadSize < kReadBufferSize, should_be_exactly_two_reads);
+ static_assert(kFinalReadSize < kReadBufferSize,
+ "should be exactly two reads");
scoped_refptr<net::IOBuffer> buffer2(new net::IOBuffer(kReadBufferSize));
for (int i = 0; i < kNumStreams; i++) {
memset(buffer2->data(), 0, kReadBufferSize);
diff --git a/net/disk_cache/memory/mem_backend_impl.cc b/net/disk_cache/memory/mem_backend_impl.cc
index cc33a00..8350963 100644
--- a/net/disk_cache/memory/mem_backend_impl.cc
+++ b/net/disk_cache/memory/mem_backend_impl.cc
@@ -76,7 +76,8 @@
}
bool MemBackendImpl::SetMaxSize(int max_bytes) {
- COMPILE_ASSERT(sizeof(max_bytes) == sizeof(max_size_), unsupported_int_model);
+ static_assert(sizeof(max_bytes) == sizeof(max_size_),
+ "unsupported int model");
if (max_bytes < 0)
return false;
diff --git a/net/disk_cache/simple/simple_entry_impl.cc b/net/disk_cache/simple/simple_entry_impl.cc
index a894aff..f8f1b85 100644
--- a/net/disk_cache/simple/simple_entry_impl.cc
+++ b/net/disk_cache/simple/simple_entry_impl.cc
@@ -185,14 +185,14 @@
net_log_(net::BoundNetLog::Make(
net_log, net::NetLog::SOURCE_DISK_CACHE_ENTRY)),
stream_0_data_(new net::GrowableIOBuffer()) {
- COMPILE_ASSERT(arraysize(data_size_) == arraysize(crc32s_end_offset_),
- arrays_should_be_same_size);
- COMPILE_ASSERT(arraysize(data_size_) == arraysize(crc32s_),
- arrays_should_be_same_size);
- COMPILE_ASSERT(arraysize(data_size_) == arraysize(have_written_),
- arrays_should_be_same_size);
- COMPILE_ASSERT(arraysize(data_size_) == arraysize(crc_check_state_),
- arrays_should_be_same_size);
+ static_assert(arraysize(data_size_) == arraysize(crc32s_end_offset_),
+ "arrays should be the same size");
+ static_assert(arraysize(data_size_) == arraysize(crc32s_),
+ "arrays should be the same size");
+ static_assert(arraysize(data_size_) == arraysize(have_written_),
+ "arrays should be the same size");
+ static_assert(arraysize(data_size_) == arraysize(crc_check_state_),
+ "arrays should be the same size");
MakeUninitialized();
net_log_.BeginEvent(net::NetLog::TYPE_SIMPLE_CACHE_ENTRY,
CreateNetLogSimpleEntryConstructionCallback(this));
diff --git a/net/disk_cache/simple/simple_index.h b/net/disk_cache/simple/simple_index.h
index 3829a35..099d7fd 100644
--- a/net/disk_cache/simple/simple_index.h
+++ b/net/disk_cache/simple/simple_index.h
@@ -69,7 +69,7 @@
uint32 last_used_time_seconds_since_epoch_;
int32 entry_size_; // Storage size in bytes.
};
-COMPILE_ASSERT(sizeof(EntryMetadata) == 8, metadata_size);
+static_assert(sizeof(EntryMetadata) == 8, "incorrect metadata size");
// This class is not Thread-safe.
class NET_EXPORT_PRIVATE SimpleIndex
diff --git a/net/disk_cache/simple/simple_test_util.h b/net/disk_cache/simple/simple_test_util.h
index 82eebbe..ec9b644 100644
--- a/net/disk_cache/simple/simple_test_util.h
+++ b/net/disk_cache/simple/simple_test_util.h
@@ -30,7 +30,7 @@
template <size_t Index>
const T& at() const {
- COMPILE_ASSERT(Index < size, array_out_of_bounds);
+ static_assert(Index < size, "array out of bounds");
return data_[Index];
}
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
index 6b79f9c..4f6888b 100644
--- a/net/dns/dns_config_service_posix.cc
+++ b/net/dns/dns_config_service_posix.cc
@@ -411,9 +411,9 @@
dns_config->nameservers.push_back(ipe);
}
#elif defined(OS_LINUX)
- COMPILE_ASSERT(arraysize(res.nsaddr_list) >= MAXNS &&
- arraysize(res._u._ext.nsaddrs) >= MAXNS,
- incompatible_libresolv_res_state);
+ static_assert(arraysize(res.nsaddr_list) >= MAXNS &&
+ arraysize(res._u._ext.nsaddrs) >= MAXNS,
+ "incompatible libresolv res_state");
DCHECK_LE(res.nscount, MAXNS);
// Initially, glibc stores IPv6 in |_ext.nsaddrs| and IPv4 in |nsaddr_list|.
// In res_send.c:res_nsend, it merges |nsaddr_list| into |nsaddrs|,
@@ -459,7 +459,14 @@
#if defined(RES_ROTATE)
dns_config->rotate = res.options & RES_ROTATE;
#endif
+#if defined(RES_USE_EDNS0)
dns_config->edns0 = res.options & RES_USE_EDNS0;
+#endif
+#if !defined(RES_USE_DNSSEC)
+ // Some versions of libresolv don't have support for the DO bit. In this
+ // case, we proceed without it.
+ static const int RES_USE_DNSSEC = 0;
+#endif
// The current implementation assumes these options are set. They normally
// cannot be overwritten by /etc/resolv.conf
diff --git a/net/dns/dns_session.cc b/net/dns/dns_session.cc
index 0b6292e..47dcefa 100644
--- a/net/dns/dns_session.cc
+++ b/net/dns/dns_session.cc
@@ -272,8 +272,8 @@
int attempt) {
DCHECK_LT(server_index, server_stats_.size());
- COMPILE_ASSERT(std::numeric_limits<base::HistogramBase::Count>::is_signed,
- histogram_base_count_assumed_to_be_signed);
+ static_assert(std::numeric_limits<base::HistogramBase::Count>::is_signed,
+ "histogram base count assumed to be signed");
// Use fixed percentile of observed samples.
const base::SampleVector& samples =
diff --git a/net/docs/bug-triage-suggested-workflow.txt b/net/docs/bug-triage-suggested-workflow.txt
index c54e912..f605c43 100644
--- a/net/docs/bug-triage-suggested-workflow.txt
+++ b/net/docs/bug-triage-suggested-workflow.txt
@@ -21,6 +21,10 @@
* If non-network causes also seem possible, attach those labels as well.
Investigating Cr-Internals-Network bugs:
+* It's recommended that while on triage duty, you subscribe to the
+ Cr-Internals-Network label. To do this, go to
+ https://code.google.com/p/chromium/issues/ and click on "Subscriptions".
+ Enter Cr-Internals-Network and click submit.
* Look through uncomfirmed and untriaged Cr-Internals-Network bugs, prioritizing
those updated within the last week:
https://code.google.com/p/chromium/issues/list?can=2&q=Cr%3DInternals-Network+-status%3AAssigned+-status%3AStarted+-status%3AAvailable+&sort=-modified
@@ -59,6 +63,9 @@
Can just grab the link from about:net-internals, as needed.
* Try to figure out what's going on, and which more specific network label is
most appropriate.
+* If it's a regression, browse through the git history of relevant files to try
+ and figure out when it regressed. CC authors / primary reviewers of any
+ strongly suspect CLs.
* If you are having trouble with an issue, particularly for help understanding
net-internals logs, email the public net-dev@chromium.org list for help
debugging. If it's a crasher, or for some other reason discussion needs to
@@ -85,7 +92,8 @@
Investigating crashers:
* Only investigate crashers that are still occurring, as identified by above
- section.
+ section. If a search on go/crash indicates a crasher is no longer
+ occurring, mark it as WontFix.
* Particularly for Windows, look for weird dlls associated with the crashes.
If there are some, it may be caused by malware. You can often figure out if
a dll is malware by a search, though it's harder to figure out if a dll is
@@ -103,14 +111,16 @@
Dealing with old bugs:
* For all network issues (Even those with owners, or a more specific labels):
- * If the issue has had the Needs-Feedback label for over two weeks, verify it
+ * If the issue has had the Needs-Feedback label for over a month, verify it
is waiting on feedback from the user. If not, remove the label.
Otherwise, go ahead and mark the issue WontFix due to lack of response and
suggest the user file a new bug if the issue is still present.
- Needs-feedback issues: https://code.google.com/p/chromium/issues/list?can=2&q=Cr=Internals-Network%20Needs=Feedback&sort=modified
- * If a bug is over 2 months old, and the underlying problem was never really
- understood, ask reporters if the issue is still present, and attach the
- Needs-Feedback label.
+ Old Needs-Feedback issues: https://code.google.com/p/chromium/issues/list?can=2&q=Cr%3AInternals-Network%20Needs=Feedback+modified-before%3Atoday-30&sort=-modified
+ * If a bug is over 2 months old, and the underlying problem was never
+ reproduced or really understood:
+ * If it's over a year old, go ahead and mark the issue as Archived.
+ * Otherwise, ask reporters if the issue is still present, and attach the
+ Needs-Feedback label.
* Old unconfirmed or untriaged Cr-Internals-Network issues can be investigated
just like newer ones. Crashers should generally be given higher priority,
since we can verify if they still occur, and then newer issues, as they're
diff --git a/net/http/http_auth.cc b/net/http/http_auth.cc
index 4c6d3e8..3525114 100644
--- a/net/http/http_auth.cc
+++ b/net/http/http_auth.cc
@@ -137,8 +137,8 @@
"spdyproxy",
"mock",
};
- COMPILE_ASSERT(arraysize(kSchemeNames) == AUTH_SCHEME_MAX,
- http_auth_scheme_names_incorrect_size);
+ static_assert(arraysize(kSchemeNames) == AUTH_SCHEME_MAX,
+ "http auth scheme names incorrect size");
if (scheme < AUTH_SCHEME_BASIC || scheme >= AUTH_SCHEME_MAX) {
NOTREACHED();
return "invalid_scheme";
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index a5275f7..0ca5683 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -338,9 +338,9 @@
total_received_bytes_(0),
websocket_handshake_stream_base_create_helper_(NULL),
weak_factory_(this) {
- COMPILE_ASSERT(HttpCache::Transaction::kNumValidationHeaders ==
- arraysize(kValidationHeaders),
- Invalid_number_of_validation_headers);
+ static_assert(HttpCache::Transaction::kNumValidationHeaders ==
+ arraysize(kValidationHeaders),
+ "invalid number of validation headers");
io_callback_ = base::Bind(&Transaction::OnIOComplete,
weak_factory_.GetWeakPtr());
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 97fc7db..8f33e20 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -570,6 +570,11 @@
return request_->url.SchemeIs("https");
}
+bool HttpNetworkTransaction::UsingHttpProxyWithoutTunnel() const {
+ return (proxy_info_.is_http() || proxy_info_.is_https()) &&
+ !(request_->url.SchemeIs("https") || request_->url.SchemeIsWSOrWSS());
+}
+
void HttpNetworkTransaction::DoCallback(int rv) {
DCHECK_NE(rv, ERR_IO_PENDING);
DCHECK(!callback_.is_null());
@@ -834,12 +839,13 @@
return rv;
}
-void HttpNetworkTransaction::BuildRequestHeaders(bool using_proxy) {
+void HttpNetworkTransaction::BuildRequestHeaders(
+ bool using_http_proxy_without_tunnel) {
request_headers_.SetHeader(HttpRequestHeaders::kHost,
GetHostAndOptionalPort(request_->url));
// For compat with HTTP/1.0 servers and proxies:
- if (using_proxy) {
+ if (using_http_proxy_without_tunnel) {
request_headers_.SetHeader(HttpRequestHeaders::kProxyConnection,
"keep-alive");
} else {
@@ -882,7 +888,8 @@
request_headers_.MergeFrom(request_->extra_headers);
- if (using_proxy && !before_proxy_headers_sent_callback_.is_null())
+ if (using_http_proxy_without_tunnel &&
+ !before_proxy_headers_sent_callback_.is_null())
before_proxy_headers_sent_callback_.Run(proxy_info_, &request_headers_);
response_.did_use_http_auth =
@@ -911,9 +918,8 @@
// This is constructed lazily (instead of within our Start method), so that
// we have proxy info available.
if (request_headers_.IsEmpty()) {
- bool using_proxy = (proxy_info_.is_http() || proxy_info_.is_https()) &&
- !is_https_request();
- BuildRequestHeaders(using_proxy);
+ bool using_http_proxy_without_tunnel = UsingHttpProxyWithoutTunnel();
+ BuildRequestHeaders(using_http_proxy_without_tunnel);
}
return OK;
@@ -1417,8 +1423,7 @@
}
bool HttpNetworkTransaction::ShouldApplyProxyAuth() const {
- return !is_https_request() &&
- (proxy_info_.is_https() || proxy_info_.is_http());
+ return UsingHttpProxyWithoutTunnel();
}
bool HttpNetworkTransaction::ShouldApplyServerAuth() const {
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h
index 229d397..2c4bd93 100644
--- a/net/http/http_network_transaction.h
+++ b/net/http/http_network_transaction.h
@@ -144,6 +144,10 @@
bool is_https_request() const;
+ // Returns true if the request is using an HTTP(S) proxy without being
+ // tunneled via the CONNECT method.
+ bool UsingHttpProxyWithoutTunnel() const;
+
void DoCallback(int result);
void OnIOComplete(int result);
@@ -176,7 +180,7 @@
int DoDrainBodyForAuthRestart();
int DoDrainBodyForAuthRestartComplete(int result);
- void BuildRequestHeaders(bool using_proxy);
+ void BuildRequestHeaders(bool using_http_proxy_without_tunnel);
// Writes a log message to help debugging in the field when we block a proxy
// response to a CONNECT request.
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index 136791e..a85e6ea 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -14,6 +14,7 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/json/json_writer.h"
+#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
@@ -27,6 +28,7 @@
#include "net/base/elements_upload_data_stream.h"
#include "net/base/load_timing_info.h"
#include "net/base/load_timing_info_test_util.h"
+#include "net/base/net_errors.h"
#include "net/base/net_log.h"
#include "net/base/net_log_unittest.h"
#include "net/base/request_priority.h"
@@ -41,12 +43,15 @@
#include "net/http/http_auth_handler_digest.h"
#include "net/http/http_auth_handler_mock.h"
#include "net/http/http_auth_handler_ntlm.h"
+#include "net/http/http_basic_state.h"
#include "net/http/http_basic_stream.h"
#include "net/http/http_network_session.h"
#include "net/http/http_network_session_peer.h"
+#include "net/http/http_request_headers.h"
#include "net/http/http_server_properties_impl.h"
#include "net/http/http_stream.h"
#include "net/http/http_stream_factory.h"
+#include "net/http/http_stream_parser.h"
#include "net/http/http_transaction_test_util.h"
#include "net/proxy/proxy_config_service_fixed.h"
#include "net/proxy/proxy_info.h"
@@ -210,6 +215,14 @@
EXPECT_TRUE(load_timing_info.receive_headers_end.is_null());
}
+void AddWebSocketHeaders(net::HttpRequestHeaders* headers) {
+ headers->SetHeader("Connection", "Upgrade");
+ headers->SetHeader("Upgrade", "websocket");
+ headers->SetHeader("Origin", "http://www.google.com");
+ headers->SetHeader("Sec-WebSocket-Version", "13");
+ headers->SetHeader("Sec-WebSocket-Key", "dGhlIHNhbXBsZSBub25jZQ==");
+}
+
} // namespace
namespace net {
@@ -564,19 +577,18 @@
template <>
CaptureGroupNameHttpProxySocketPool::CaptureGroupNameSocketPool(
- HostResolver* host_resolver,
+ HostResolver* /* host_resolver */,
CertVerifier* /* cert_verifier */)
- : HttpProxyClientSocketPool(0, 0, NULL, host_resolver, NULL, NULL, NULL) {
+ : HttpProxyClientSocketPool(0, 0, NULL, NULL, NULL, NULL) {
}
template <>
CaptureGroupNameSSLSocketPool::CaptureGroupNameSocketPool(
- HostResolver* host_resolver,
+ HostResolver* /* host_resolver */,
CertVerifier* cert_verifier)
: SSLClientSocketPool(0,
0,
NULL,
- host_resolver,
cert_verifier,
NULL,
NULL,
@@ -1842,8 +1854,8 @@
"HTTP/1.1 301 Moved Permanently",
};
- COMPILE_ASSERT(kNumUnreadBodies == arraysize(kStatusLines),
- forgot_to_update_kStatusLines);
+ static_assert(kNumUnreadBodies == arraysize(kStatusLines),
+ "forgot to update kStatusLines");
for (int i = 0; i < kNumUnreadBodies; ++i)
EXPECT_EQ(kStatusLines[i], response_lines[i]);
@@ -12471,6 +12483,118 @@
DISALLOW_COPY_AND_ASSIGN(FakeStreamFactory);
};
+// TODO(ricea): Maybe unify this with the one in
+// url_request_http_job_unittest.cc ?
+class FakeWebSocketBasicHandshakeStream : public WebSocketHandshakeStreamBase {
+ public:
+ FakeWebSocketBasicHandshakeStream(scoped_ptr<ClientSocketHandle> connection,
+ bool using_proxy)
+ : state_(connection.release(), using_proxy) {}
+
+ // Fake implementation of HttpStreamBase methods.
+ // This ends up being quite "real" because this object has to really send data
+ // on the mock socket. It might be easier to use the real implementation, but
+ // the fact that the WebSocket code is not compiled on iOS makes that
+ // difficult.
+ int InitializeStream(const HttpRequestInfo* request_info,
+ RequestPriority priority,
+ const BoundNetLog& net_log,
+ const CompletionCallback& callback) override {
+ state_.Initialize(request_info, priority, net_log, callback);
+ return OK;
+ }
+
+ int SendRequest(const HttpRequestHeaders& request_headers,
+ HttpResponseInfo* response,
+ const CompletionCallback& callback) override {
+ return parser()->SendRequest(state_.GenerateRequestLine(), request_headers,
+ response, callback);
+ }
+
+ int ReadResponseHeaders(const CompletionCallback& callback) override {
+ return parser()->ReadResponseHeaders(callback);
+ }
+
+ int ReadResponseBody(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
+ NOTREACHED();
+ return ERR_IO_PENDING;
+ }
+
+ void Close(bool not_reusable) override {
+ if (parser())
+ parser()->Close(true);
+ }
+
+ bool IsResponseBodyComplete() const override {
+ NOTREACHED();
+ return false;
+ }
+
+ bool CanFindEndOfResponse() const override {
+ return parser()->CanFindEndOfResponse();
+ }
+
+ bool IsConnectionReused() const override {
+ NOTREACHED();
+ return false;
+ }
+ void SetConnectionReused() override { NOTREACHED(); }
+
+ bool IsConnectionReusable() const override {
+ NOTREACHED();
+ return false;
+ }
+
+ int64 GetTotalReceivedBytes() const override {
+ NOTREACHED();
+ return 0;
+ }
+
+ bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override {
+ NOTREACHED();
+ return false;
+ }
+
+ void GetSSLInfo(SSLInfo* ssl_info) override { NOTREACHED(); }
+
+ void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {
+ NOTREACHED();
+ }
+
+ bool IsSpdyHttpStream() const override {
+ NOTREACHED();
+ return false;
+ }
+
+ void Drain(HttpNetworkSession* session) override { NOTREACHED(); }
+
+ void SetPriority(RequestPriority priority) override { NOTREACHED(); }
+
+ UploadProgress GetUploadProgress() const override {
+ NOTREACHED();
+ return UploadProgress();
+ }
+
+ HttpStream* RenewStreamForAuth() override {
+ NOTREACHED();
+ return nullptr;
+ }
+
+ // Fake implementation of WebSocketHandshakeStreamBase method(s)
+ scoped_ptr<WebSocketStream> Upgrade() override {
+ NOTREACHED();
+ return scoped_ptr<WebSocketStream>();
+ }
+
+ private:
+ HttpStreamParser* parser() const { return state_.parser(); }
+ HttpBasicState state_;
+
+ DISALLOW_COPY_AND_ASSIGN(FakeWebSocketBasicHandshakeStream);
+};
+
// TODO(yhirano): Split this class out into a net/websockets file, if it is
// worth doing.
class FakeWebSocketStreamCreateHelper :
@@ -12479,8 +12603,8 @@
WebSocketHandshakeStreamBase* CreateBasicStream(
scoped_ptr<ClientSocketHandle> connection,
bool using_proxy) override {
- NOTREACHED();
- return NULL;
+ return new FakeWebSocketBasicHandshakeStream(connection.Pass(),
+ using_proxy);
}
WebSocketHandshakeStreamBase* CreateSpdyStream(
@@ -13254,4 +13378,188 @@
EXPECT_TRUE(response == NULL);
}
+// Verify that proxy headers are not sent to the destination server when
+// establishing a tunnel for a secure WebSocket connection.
+TEST_P(HttpNetworkTransactionTest, ProxyHeadersNotSentOverWssTunnel) {
+ HttpRequestInfo request;
+ request.method = "GET";
+ request.url = GURL("wss://www.google.com/");
+ AddWebSocketHeaders(&request.extra_headers);
+
+ // Configure against proxy server "myproxy:70".
+ session_deps_.proxy_service.reset(
+ ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
+
+ scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+
+ // Since a proxy is configured, try to establish a tunnel.
+ MockWrite data_writes[] = {
+ MockWrite(
+ "CONNECT www.google.com:443 HTTP/1.1\r\n"
+ "Host: www.google.com\r\n"
+ "Proxy-Connection: keep-alive\r\n\r\n"),
+
+ // After calling trans->RestartWithAuth(), this is the request we should
+ // be issuing -- the final header line contains the credentials.
+ MockWrite(
+ "CONNECT www.google.com:443 HTTP/1.1\r\n"
+ "Host: www.google.com\r\n"
+ "Proxy-Connection: keep-alive\r\n"
+ "Proxy-Authorization: Basic Zm9vOmJhcg==\r\n\r\n"),
+
+ MockWrite(
+ "GET / HTTP/1.1\r\n"
+ "Host: www.google.com\r\n"
+ "Connection: Upgrade\r\n"
+ "Upgrade: websocket\r\n"
+ "Origin: http://www.google.com\r\n"
+ "Sec-WebSocket-Version: 13\r\n"
+ "Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\n\r\n"),
+ };
+
+ // The proxy responds to the connect with a 407, using a persistent
+ // connection.
+ MockRead data_reads[] = {
+ // No credentials.
+ MockRead("HTTP/1.1 407 Proxy Authentication Required\r\n"),
+ MockRead("Proxy-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
+ MockRead("Proxy-Connection: close\r\n\r\n"),
+
+ MockRead("HTTP/1.1 200 Connection Established\r\n\r\n"),
+
+ MockRead("HTTP/1.1 101 Switching Protocols\r\n"),
+ MockRead("Upgrade: websocket\r\n"),
+ MockRead("Connection: Upgrade\r\n"),
+ MockRead("Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r\n\r\n"),
+ };
+
+ StaticSocketDataProvider data(data_reads, arraysize(data_reads), data_writes,
+ arraysize(data_writes));
+ session_deps_.socket_factory->AddSocketDataProvider(&data);
+ SSLSocketDataProvider ssl(ASYNC, OK);
+ session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
+
+ scoped_ptr<HttpTransaction> trans(
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
+ FakeWebSocketStreamCreateHelper websocket_stream_create_helper;
+ trans->SetWebSocketHandshakeStreamCreateHelper(
+ &websocket_stream_create_helper);
+
+ {
+ TestCompletionCallback callback;
+
+ int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ EXPECT_EQ(ERR_IO_PENDING, rv);
+
+ rv = callback.WaitForResult();
+ EXPECT_EQ(OK, rv);
+ }
+
+ const HttpResponseInfo* response = trans->GetResponseInfo();
+ ASSERT_TRUE(response);
+ ASSERT_TRUE(response->headers.get());
+ EXPECT_EQ(407, response->headers->response_code());
+
+ {
+ TestCompletionCallback callback;
+
+ int rv = trans->RestartWithAuth(AuthCredentials(kFoo, kBar),
+ callback.callback());
+ EXPECT_EQ(ERR_IO_PENDING, rv);
+
+ rv = callback.WaitForResult();
+ EXPECT_EQ(OK, rv);
+ }
+
+ response = trans->GetResponseInfo();
+ ASSERT_TRUE(response);
+ ASSERT_TRUE(response->headers.get());
+
+ EXPECT_EQ(101, response->headers->response_code());
+
+ trans.reset();
+ session->CloseAllConnections();
+}
+
+// Verify that proxy headers are not sent to the destination server when
+// establishing a tunnel for an insecure WebSocket connection.
+// This requires the authentication info to be injected into the auth cache
+// due to crbug.com/395064
+// TODO(ricea): Change to use a 407 response once issue 395064 is fixed.
+TEST_P(HttpNetworkTransactionTest, ProxyHeadersNotSentOverWsTunnel) {
+ HttpRequestInfo request;
+ request.method = "GET";
+ request.url = GURL("ws://www.google.com/");
+ AddWebSocketHeaders(&request.extra_headers);
+
+ // Configure against proxy server "myproxy:70".
+ session_deps_.proxy_service.reset(
+ ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
+
+ scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
+
+ MockWrite data_writes[] = {
+ // Try to establish a tunnel for the WebSocket connection, with
+ // credentials. Because WebSockets have a separate set of socket pools,
+ // they cannot and will not use the same TCP/IP connection as the
+ // preflight HTTP request.
+ MockWrite(
+ "CONNECT www.google.com:80 HTTP/1.1\r\n"
+ "Host: www.google.com\r\n"
+ "Proxy-Connection: keep-alive\r\n"
+ "Proxy-Authorization: Basic Zm9vOmJhcg==\r\n\r\n"),
+
+ MockWrite(
+ "GET / HTTP/1.1\r\n"
+ "Host: www.google.com\r\n"
+ "Connection: Upgrade\r\n"
+ "Upgrade: websocket\r\n"
+ "Origin: http://www.google.com\r\n"
+ "Sec-WebSocket-Version: 13\r\n"
+ "Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\n\r\n"),
+ };
+
+ MockRead data_reads[] = {
+ // HTTP CONNECT with credentials.
+ MockRead("HTTP/1.1 200 Connection Established\r\n\r\n"),
+
+ // WebSocket connection established inside tunnel.
+ MockRead("HTTP/1.1 101 Switching Protocols\r\n"),
+ MockRead("Upgrade: websocket\r\n"),
+ MockRead("Connection: Upgrade\r\n"),
+ MockRead("Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\r\n\r\n"),
+ };
+
+ StaticSocketDataProvider data(data_reads, arraysize(data_reads), data_writes,
+ arraysize(data_writes));
+ session_deps_.socket_factory->AddSocketDataProvider(&data);
+
+ session->http_auth_cache()->Add(
+ GURL("http://myproxy:70/"), "MyRealm1", HttpAuth::AUTH_SCHEME_BASIC,
+ "Basic realm=MyRealm1", AuthCredentials(kFoo, kBar), "/");
+
+ scoped_ptr<HttpTransaction> trans(
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
+ FakeWebSocketStreamCreateHelper websocket_stream_create_helper;
+ trans->SetWebSocketHandshakeStreamCreateHelper(
+ &websocket_stream_create_helper);
+
+ TestCompletionCallback callback;
+
+ int rv = trans->Start(&request, callback.callback(), BoundNetLog());
+ EXPECT_EQ(ERR_IO_PENDING, rv);
+
+ rv = callback.WaitForResult();
+ EXPECT_EQ(OK, rv);
+
+ const HttpResponseInfo* response = trans->GetResponseInfo();
+ ASSERT_TRUE(response);
+ ASSERT_TRUE(response->headers.get());
+
+ EXPECT_EQ(101, response->headers->response_code());
+
+ trans.reset();
+ session->CloseAllConnections();
+}
+
} // namespace net
diff --git a/net/http/http_proxy_client_socket_pool.cc b/net/http/http_proxy_client_socket_pool.cc
index 6c421c5..9c8a531 100644
--- a/net/http/http_proxy_client_socket_pool.cc
+++ b/net/http/http_proxy_client_socket_pool.cc
@@ -395,11 +395,9 @@
HttpProxyConnectJobFactory::HttpProxyConnectJobFactory(
TransportClientSocketPool* transport_pool,
SSLClientSocketPool* ssl_pool,
- HostResolver* host_resolver,
NetLog* net_log)
: transport_pool_(transport_pool),
ssl_pool_(ssl_pool),
- host_resolver_(host_resolver),
net_log_(net_log) {
base::TimeDelta max_pool_timeout = base::TimeDelta();
@@ -443,7 +441,6 @@
int max_sockets,
int max_sockets_per_group,
ClientSocketPoolHistograms* histograms,
- HostResolver* host_resolver,
TransportClientSocketPool* transport_pool,
SSLClientSocketPool* ssl_pool,
NetLog* net_log)
@@ -454,7 +451,6 @@
ClientSocketPool::used_idle_socket_timeout(),
new HttpProxyConnectJobFactory(transport_pool,
ssl_pool,
- host_resolver,
net_log)) {
// We should always have a |transport_pool_| except in unit tests.
if (transport_pool_)
diff --git a/net/http/http_proxy_client_socket_pool.h b/net/http/http_proxy_client_socket_pool.h
index b42f628..f9cee7e 100644
--- a/net/http/http_proxy_client_socket_pool.h
+++ b/net/http/http_proxy_client_socket_pool.h
@@ -25,7 +25,6 @@
namespace net {
-class HostResolver;
class HttpAuthCache;
class HttpAuthHandlerFactory;
class ProxyDelegate;
@@ -187,14 +186,12 @@
public:
typedef HttpProxySocketParams SocketParams;
- HttpProxyClientSocketPool(
- int max_sockets,
- int max_sockets_per_group,
- ClientSocketPoolHistograms* histograms,
- HostResolver* host_resolver,
- TransportClientSocketPool* transport_pool,
- SSLClientSocketPool* ssl_pool,
- NetLog* net_log);
+ HttpProxyClientSocketPool(int max_sockets,
+ int max_sockets_per_group,
+ ClientSocketPoolHistograms* histograms,
+ TransportClientSocketPool* transport_pool,
+ SSLClientSocketPool* ssl_pool,
+ NetLog* net_log);
~HttpProxyClientSocketPool() override;
@@ -253,11 +250,9 @@
class HttpProxyConnectJobFactory : public PoolBase::ConnectJobFactory {
public:
- HttpProxyConnectJobFactory(
- TransportClientSocketPool* transport_pool,
- SSLClientSocketPool* ssl_pool,
- HostResolver* host_resolver,
- NetLog* net_log);
+ HttpProxyConnectJobFactory(TransportClientSocketPool* transport_pool,
+ SSLClientSocketPool* ssl_pool,
+ NetLog* net_log);
// ClientSocketPoolBase::ConnectJobFactory methods.
scoped_ptr<ConnectJob> NewConnectJob(
@@ -270,7 +265,6 @@
private:
TransportClientSocketPool* const transport_pool_;
SSLClientSocketPool* const ssl_pool_;
- HostResolver* const host_resolver_;
NetLog* net_log_;
base::TimeDelta timeout_;
diff --git a/net/http/http_proxy_client_socket_pool_unittest.cc b/net/http/http_proxy_client_socket_pool_unittest.cc
index cef53e9..62c50c0 100644
--- a/net/http/http_proxy_client_socket_pool_unittest.cc
+++ b/net/http/http_proxy_client_socket_pool_unittest.cc
@@ -166,7 +166,6 @@
ssl_socket_pool_(kMaxSockets,
kMaxSocketsPerGroup,
&ssl_histograms_,
- session_deps_.host_resolver.get(),
session_deps_.cert_verifier.get(),
NULL /* channel_id_store */,
NULL /* transport_security_state */,
@@ -186,7 +185,6 @@
pool_(kMaxSockets,
kMaxSocketsPerGroup,
&http_proxy_histograms_,
- NULL,
&transport_socket_pool_,
&ssl_socket_pool_,
NULL) {}
diff --git a/net/http/http_response_body_drainer_unittest.cc b/net/http/http_response_body_drainer_unittest.cc
index 371e9a7..8cce583 100644
--- a/net/http/http_response_body_drainer_unittest.cc
+++ b/net/http/http_response_body_drainer_unittest.cc
@@ -26,9 +26,9 @@
namespace {
const int kMagicChunkSize = 1024;
-COMPILE_ASSERT(
- (HttpResponseBodyDrainer::kDrainBodyBufferSize % kMagicChunkSize) == 0,
- chunk_size_needs_to_divide_evenly_into_buffer_size);
+static_assert((HttpResponseBodyDrainer::kDrainBodyBufferSize %
+ kMagicChunkSize) == 0,
+ "chunk size needs to divide evenly into buffer size");
class CloseResultWaiter {
public:
diff --git a/net/http/http_security_headers.cc b/net/http/http_security_headers.cc
index 8d0c146..aff4a30 100644
--- a/net/http/http_security_headers.cc
+++ b/net/http/http_security_headers.cc
@@ -14,7 +14,7 @@
namespace {
-COMPILE_ASSERT(kMaxHSTSAgeSecs <= kuint32max, kMaxHSTSAgeSecsTooLarge);
+static_assert(kMaxHSTSAgeSecs <= kuint32max, "kMaxHSTSAgeSecs too large");
// MaxAgeToInt converts a string representation of a "whole number" of
// seconds into a uint32. The string may contain an arbitrarily large number,
@@ -118,12 +118,15 @@
bool ParseAndAppendPin(const std::string& value,
HashValueTag tag,
HashValueVector* hashes) {
- std::string unquoted = HttpUtil::Unquote(value);
- std::string decoded;
+ // Pins are always quoted.
+ if (value.empty() || !HttpUtil::IsQuote(value[0]))
+ return false;
+ std::string unquoted = HttpUtil::Unquote(value);
if (unquoted.empty())
return false;
+ std::string decoded;
if (!base::Base64Decode(unquoted, &decoded))
return false;
@@ -323,21 +326,7 @@
*max_age = base::TimeDelta::FromSeconds(max_age_candidate);
*include_subdomains = include_subdomains_candidate;
- for (HashValueVector::const_iterator i = pins.begin();
- i != pins.end(); ++i) {
- bool found = false;
-
- for (HashValueVector::const_iterator j = hashes->begin();
- j != hashes->end(); ++j) {
- if (j->Equals(*i)) {
- found = true;
- break;
- }
- }
-
- if (!found)
- hashes->push_back(*i);
- }
+ hashes->swap(pins);
return true;
}
diff --git a/net/http/http_security_headers_unittest.cc b/net/http/http_security_headers_unittest.cc
index d09f6fd..234c5f0 100644
--- a/net/http/http_security_headers_unittest.cc
+++ b/net/http/http_security_headers_unittest.cc
@@ -26,21 +26,38 @@
return hash_value;
}
-std::string GetTestPin(uint8 label, HashValueTag tag) {
+std::string GetTestPinImpl(uint8 label, HashValueTag tag, bool quoted) {
HashValue hash_value = GetTestHashValue(label, tag);
std::string base64;
base::Base64Encode(base::StringPiece(
reinterpret_cast<char*>(hash_value.data()), hash_value.size()), &base64);
+ std::string ret;
switch (hash_value.tag) {
case HASH_VALUE_SHA1:
- return std::string("pin-sha1=\"") + base64 + "\"";
+ ret = "pin-sha1=";
+ break;
case HASH_VALUE_SHA256:
- return std::string("pin-sha256=\"") + base64 + "\"";
+ ret = "pin-sha256=";
+ break;
default:
NOTREACHED() << "Unknown HashValueTag " << hash_value.tag;
return std::string("ERROR");
}
+ if (quoted)
+ ret += '\"';
+ ret += base64;
+ if (quoted)
+ ret += '\"';
+ return ret;
+}
+
+std::string GetTestPin(uint8 label, HashValueTag tag) {
+ return GetTestPinImpl(label, tag, true);
+}
+
+std::string GetTestPinUnquoted(uint8 label, HashValueTag tag) {
+ return GetTestPinImpl(label, tag, false);
}
};
@@ -142,6 +159,7 @@
// The good pin must be in the chain, the backup pin must not be
std::string good_pin = GetTestPin(2, tag);
+ std::string good_pin_unquoted = GetTestPinUnquoted(2, tag);
std::string backup_pin = GetTestPin(4, tag);
EXPECT_FALSE(ParseHPKPHeader(std::string(), chain_hashes, &max_age,
@@ -213,6 +231,9 @@
&hashes));
EXPECT_FALSE(ParseHPKPHeader("max-age=34889.23", chain_hashes, &max_age,
&include_subdomains, &hashes));
+ EXPECT_FALSE(
+ ParseHPKPHeader("max-age=243; " + good_pin_unquoted + ";" + backup_pin,
+ chain_hashes, &max_age, &include_subdomains, &hashes));
// Check the out args were not updated by checking the default
// values for its predictable fields.
@@ -391,6 +412,7 @@
// The good pin must be in the chain, the backup pin must not be
std::string good_pin = GetTestPin(2, tag);
+ std::string good_pin2 = GetTestPin(3, tag);
std::string backup_pin = GetTestPin(4, tag);
EXPECT_TRUE(ParseHPKPHeader(
@@ -468,8 +490,7 @@
EXPECT_EQ(expect_max_age, max_age);
EXPECT_FALSE(include_subdomains);
- // Test that parsing the same header twice doesn't duplicate the recorded
- // hashes.
+ // Test that parsing a different header resets the hashes.
hashes.clear();
EXPECT_TRUE(ParseHPKPHeader(
" max-age=999; " +
@@ -477,9 +498,8 @@
chain_hashes, &max_age, &include_subdomains, &hashes));
EXPECT_EQ(2u, hashes.size());
EXPECT_TRUE(ParseHPKPHeader(
- " max-age=999; " +
- backup_pin + ";" + good_pin + "; ",
- chain_hashes, &max_age, &include_subdomains, &hashes));
+ " max-age=999; " + backup_pin + ";" + good_pin2 + "; ", chain_hashes,
+ &max_age, &include_subdomains, &hashes));
EXPECT_EQ(2u, hashes.size());
}
@@ -715,4 +735,41 @@
&failure_log));
}
+// Tests that seeing an invalid HPKP header leaves the existing one alone.
+TEST_F(HttpSecurityHeadersTest, IgnoreInvalidHeaders) {
+ TransportSecurityState state;
+
+ HashValue good_hash = GetTestHashValue(1, HASH_VALUE_SHA256);
+ std::string good_pin = GetTestPin(1, HASH_VALUE_SHA256);
+ std::string bad_pin = GetTestPin(2, HASH_VALUE_SHA256);
+ std::string backup_pin = GetTestPin(3, HASH_VALUE_SHA256);
+
+ SSLInfo ssl_info;
+ ssl_info.public_key_hashes.push_back(good_hash);
+
+ // Add a valid HPKP header.
+ EXPECT_TRUE(state.AddHPKPHeader(
+ "example.com", "max-age = 10000; " + good_pin + "; " + backup_pin,
+ ssl_info));
+
+ // Check the insertion was valid.
+ EXPECT_TRUE(state.HasPublicKeyPins("example.com"));
+ std::string failure_log;
+ bool is_issued_by_known_root = true;
+ EXPECT_TRUE(state.CheckPublicKeyPins("example.com", is_issued_by_known_root,
+ ssl_info.public_key_hashes,
+ &failure_log));
+
+ // Now assert an invalid one. This should fail.
+ EXPECT_FALSE(state.AddHPKPHeader(
+ "example.com", "max-age = 10000; " + bad_pin + "; " + backup_pin,
+ ssl_info));
+
+ // The old pins must still exist.
+ EXPECT_TRUE(state.HasPublicKeyPins("example.com"));
+ EXPECT_TRUE(state.CheckPublicKeyPins("example.com", is_issued_by_known_root,
+ ssl_info.public_key_hashes,
+ &failure_log));
+}
+
}; // namespace net
diff --git a/net/http/http_server_properties.cc b/net/http/http_server_properties.cc
index 514278c..6b5f226 100644
--- a/net/http/http_server_properties.cc
+++ b/net/http/http_server_properties.cc
@@ -27,9 +27,9 @@
"quic"
};
-COMPILE_ASSERT(
- arraysize(kAlternateProtocolStrings) == NUM_VALID_ALTERNATE_PROTOCOLS,
- kAlternateProtocolStringsSize_kNumValidAlternateProtocols_not_equal);
+static_assert(arraysize(kAlternateProtocolStrings) ==
+ NUM_VALID_ALTERNATE_PROTOCOLS,
+ "kAlternateProtocolStrings has incorrect size");
} // namespace
diff --git a/net/http/http_stream_factory_impl_unittest.cc b/net/http/http_stream_factory_impl_unittest.cc
index ff07a0e..ed4b496 100644
--- a/net/http/http_stream_factory_impl_unittest.cc
+++ b/net/http/http_stream_factory_impl_unittest.cc
@@ -389,26 +389,19 @@
template <>
CapturePreconnectsHttpProxySocketPool::CapturePreconnectsSocketPool(
- HostResolver* host_resolver,
+ HostResolver* /* host_resolver */,
CertVerifier* /* cert_verifier */)
- : HttpProxyClientSocketPool(0,
- 0,
- nullptr,
- host_resolver,
- nullptr,
- nullptr,
- nullptr),
+ : HttpProxyClientSocketPool(0, 0, nullptr, nullptr, nullptr, nullptr),
last_num_streams_(-1) {
}
template <>
CapturePreconnectsSSLSocketPool::CapturePreconnectsSocketPool(
- HostResolver* host_resolver,
+ HostResolver* /* host_resolver */,
CertVerifier* cert_verifier)
: SSLClientSocketPool(0,
0,
nullptr, // ssl_histograms
- host_resolver,
cert_verifier,
nullptr, // channel_id_store
nullptr, // transport_security_state
diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc
index a2d377e..a174e98 100644
--- a/net/http/transport_security_state.cc
+++ b/net/http/transport_security_state.cc
@@ -167,6 +167,50 @@
delegate_ = delegate;
}
+void TransportSecurityState::AddHSTSInternal(
+ const std::string& host,
+ TransportSecurityState::DomainState::UpgradeMode upgrade_mode,
+ const base::Time& expiry,
+ bool include_subdomains) {
+ DCHECK(CalledOnValidThread());
+
+ // Copy-and-modify the existing DomainState for this host (if any).
+ DomainState domain_state;
+ const std::string canonicalized_host = CanonicalizeHost(host);
+ const std::string hashed_host = HashHost(canonicalized_host);
+ DomainStateMap::const_iterator i = enabled_hosts_.find(hashed_host);
+ if (i != enabled_hosts_.end())
+ domain_state = i->second;
+
+ domain_state.sts.last_observed = base::Time::Now();
+ domain_state.sts.include_subdomains = include_subdomains;
+ domain_state.sts.expiry = expiry;
+ domain_state.sts.upgrade_mode = upgrade_mode;
+ EnableHost(host, domain_state);
+}
+
+void TransportSecurityState::AddHPKPInternal(const std::string& host,
+ const base::Time& last_observed,
+ const base::Time& expiry,
+ bool include_subdomains,
+ const HashValueVector& hashes) {
+ DCHECK(CalledOnValidThread());
+
+ // Copy-and-modify the existing DomainState for this host (if any).
+ DomainState domain_state;
+ const std::string canonicalized_host = CanonicalizeHost(host);
+ const std::string hashed_host = HashHost(canonicalized_host);
+ DomainStateMap::const_iterator i = enabled_hosts_.find(hashed_host);
+ if (i != enabled_hosts_.end())
+ domain_state = i->second;
+
+ domain_state.pkp.last_observed = last_observed;
+ domain_state.pkp.expiry = expiry;
+ domain_state.pkp.include_subdomains = include_subdomains;
+ domain_state.pkp.spki_hashes = hashes;
+ EnableHost(host, domain_state);
+}
+
void TransportSecurityState::EnableHost(const std::string& host,
const DomainState& state) {
DCHECK(CalledOnValidThread());
@@ -178,7 +222,8 @@
DomainState state_copy(state);
// No need to store this value since it is redundant. (|canonicalized_host|
// is the map key.)
- state_copy.domain.clear();
+ state_copy.sts.domain.clear();
+ state_copy.pkp.domain.clear();
enabled_hosts_[HashHost(canonicalized_host)] = state_copy;
DirtyNotify();
@@ -212,21 +257,24 @@
bool dirtied = false;
DomainStateMap::iterator i = enabled_hosts_.begin();
while (i != enabled_hosts_.end()) {
- if (i->second.sts.last_observed >= time &&
- i->second.pkp.last_observed >= time) {
+ // Clear STS and PKP state independently.
+ if (i->second.sts.last_observed >= time) {
+ dirtied = true;
+ i->second.sts.upgrade_mode = DomainState::MODE_DEFAULT;
+ }
+ if (i->second.pkp.last_observed >= time) {
+ dirtied = true;
+ i->second.pkp.spki_hashes.clear();
+ i->second.pkp.expiry = base::Time();
+ }
+
+ // If both are now invalid, drop the entry altogether.
+ if (!i->second.ShouldUpgradeToSSL() && !i->second.HasPublicKeyPins()) {
dirtied = true;
enabled_hosts_.erase(i++);
continue;
}
- if (i->second.sts.last_observed >= time) {
- dirtied = true;
- i->second.sts.upgrade_mode = DomainState::MODE_DEFAULT;
- } else if (i->second.pkp.last_observed >= time) {
- dirtied = true;
- i->second.pkp.spki_hashes.clear();
- i->second.pkp.expiry = base::Time();
- }
++i;
}
@@ -621,20 +669,21 @@
base::Time now = base::Time::Now();
base::TimeDelta max_age;
- TransportSecurityState::DomainState domain_state;
- GetDynamicDomainState(host, &domain_state);
- if (ParseHSTSHeader(value, &max_age, &domain_state.sts.include_subdomains)) {
- // Handle max-age == 0.
- if (max_age.InSeconds() == 0)
- domain_state.sts.upgrade_mode = DomainState::MODE_DEFAULT;
- else
- domain_state.sts.upgrade_mode = DomainState::MODE_FORCE_HTTPS;
- domain_state.sts.last_observed = now;
- domain_state.sts.expiry = now + max_age;
- EnableHost(host, domain_state);
- return true;
+ bool include_subdomains;
+ if (!ParseHSTSHeader(value, &max_age, &include_subdomains)) {
+ return false;
}
- return false;
+
+ // Handle max-age == 0.
+ DomainState::UpgradeMode upgrade_mode;
+ if (max_age.InSeconds() == 0) {
+ upgrade_mode = DomainState::MODE_DEFAULT;
+ } else {
+ upgrade_mode = DomainState::MODE_FORCE_HTTPS;
+ }
+
+ AddHSTSInternal(host, upgrade_mode, now + max_age, include_subdomains);
+ return true;
}
bool TransportSecurityState::AddHPKPHeader(const std::string& host,
@@ -644,67 +693,33 @@
base::Time now = base::Time::Now();
base::TimeDelta max_age;
- TransportSecurityState::DomainState domain_state;
- GetDynamicDomainState(host, &domain_state);
- if (ParseHPKPHeader(value,
- ssl_info.public_key_hashes,
- &max_age,
- &domain_state.pkp.include_subdomains,
- &domain_state.pkp.spki_hashes)) {
- // Handle max-age == 0.
- if (max_age.InSeconds() == 0)
- domain_state.pkp.spki_hashes.clear();
- domain_state.pkp.last_observed = now;
- domain_state.pkp.expiry = now + max_age;
- EnableHost(host, domain_state);
- return true;
+ bool include_subdomains;
+ HashValueVector spki_hashes;
+ if (!ParseHPKPHeader(value, ssl_info.public_key_hashes, &max_age,
+ &include_subdomains, &spki_hashes)) {
+ return false;
}
- return false;
-}
-
-bool TransportSecurityState::AddHSTS(const std::string& host,
- const base::Time& expiry,
- bool include_subdomains) {
- DCHECK(CalledOnValidThread());
-
- // Copy-and-modify the existing DomainState for this host (if any).
- TransportSecurityState::DomainState domain_state;
- const std::string canonicalized_host = CanonicalizeHost(host);
- const std::string hashed_host = HashHost(canonicalized_host);
- DomainStateMap::const_iterator i = enabled_hosts_.find(
- hashed_host);
- if (i != enabled_hosts_.end())
- domain_state = i->second;
-
- domain_state.sts.last_observed = base::Time::Now();
- domain_state.sts.include_subdomains = include_subdomains;
- domain_state.sts.expiry = expiry;
- domain_state.sts.upgrade_mode = DomainState::MODE_FORCE_HTTPS;
- EnableHost(host, domain_state);
+ // Handle max-age == 0.
+ if (max_age.InSeconds() == 0)
+ spki_hashes.clear();
+ AddHPKPInternal(host, now, now + max_age, include_subdomains, spki_hashes);
return true;
}
-bool TransportSecurityState::AddHPKP(const std::string& host,
+void TransportSecurityState::AddHSTS(const std::string& host,
+ const base::Time& expiry,
+ bool include_subdomains) {
+ DCHECK(CalledOnValidThread());
+ AddHSTSInternal(host, DomainState::MODE_FORCE_HTTPS, expiry,
+ include_subdomains);
+}
+
+void TransportSecurityState::AddHPKP(const std::string& host,
const base::Time& expiry,
bool include_subdomains,
const HashValueVector& hashes) {
DCHECK(CalledOnValidThread());
-
- // Copy-and-modify the existing DomainState for this host (if any).
- TransportSecurityState::DomainState domain_state;
- const std::string canonicalized_host = CanonicalizeHost(host);
- const std::string hashed_host = HashHost(canonicalized_host);
- DomainStateMap::const_iterator i = enabled_hosts_.find(
- hashed_host);
- if (i != enabled_hosts_.end())
- domain_state = i->second;
-
- domain_state.pkp.last_observed = base::Time::Now();
- domain_state.pkp.include_subdomains = include_subdomains;
- domain_state.pkp.expiry = expiry;
- domain_state.pkp.spki_hashes = hashes;
- EnableHost(host, domain_state);
- return true;
+ AddHPKPInternal(host, base::Time::Now(), expiry, include_subdomains, hashes);
}
// static
@@ -776,7 +791,8 @@
if (!DecodeHSTSPreload(host, &result))
return false;
- out->domain = host.substr(result.hostname_offset);
+ out->sts.domain = host.substr(result.hostname_offset);
+ out->pkp.domain = out->sts.domain;
out->sts.include_subdomains = result.sts_include_subdomains;
out->sts.last_observed = base::GetBuildTime();
out->sts.upgrade_mode =
@@ -824,6 +840,8 @@
base::Time current_time(base::Time::Now());
+ bool found_sts = false;
+ bool found_pkp = false;
for (size_t i = 0; canonicalized_host[i]; i += canonicalized_host[i] + 1) {
std::string host_sub_chunk(&canonicalized_host[i],
canonicalized_host.size() - i);
@@ -832,6 +850,7 @@
if (j == enabled_hosts_.end())
continue;
+ // If both halves of the entry are invalid, drop it.
if (current_time > j->second.sts.expiry &&
current_time > j->second.pkp.expiry) {
enabled_hosts_.erase(j);
@@ -839,21 +858,32 @@
continue;
}
- state = j->second;
- state.domain = DNSDomainToString(host_sub_chunk);
-
- // Succeed if we matched the domain exactly or if subdomain matches are
- // allowed.
- if (i == 0 || j->second.sts.include_subdomains ||
- j->second.pkp.include_subdomains) {
- *result = state;
- return true;
+ // If this is the most specific STS match, add it to the result.
+ if (!found_sts && (i == 0 || j->second.sts.include_subdomains) &&
+ current_time <= j->second.sts.expiry &&
+ j->second.ShouldUpgradeToSSL()) {
+ found_sts = true;
+ state.sts = j->second.sts;
+ state.sts.domain = DNSDomainToString(host_sub_chunk);
}
- return false;
+ // If this is the most specific PKP match, add it to the result.
+ if (!found_pkp && (i == 0 || j->second.pkp.include_subdomains) &&
+ current_time <= j->second.pkp.expiry && j->second.HasPublicKeyPins()) {
+ found_pkp = true;
+ state.pkp = j->second.pkp;
+ state.pkp.domain = DNSDomainToString(host_sub_chunk);
+ }
+
+ if (found_sts && found_pkp)
+ break;
}
- return false;
+ if (!found_sts && !found_pkp)
+ return false;
+
+ *result = state;
+ return true;
}
void TransportSecurityState::AddOrUpdateEnabledHosts(
@@ -879,12 +909,12 @@
if (hashes.empty()) {
failure_log->append(
"Rejecting empty public key chain for public-key-pinned domains: " +
- domain);
+ pkp.domain);
return false;
}
if (HashesIntersect(pkp.bad_spki_hashes, hashes)) {
- failure_log->append("Rejecting public key chain for domain " + domain +
+ failure_log->append("Rejecting public key chain for domain " + pkp.domain +
". Validated chain: " + HashesToBase64String(hashes) +
", matches one or more bad hashes: " +
HashesToBase64String(pkp.bad_spki_hashes));
@@ -899,7 +929,7 @@
return true;
}
- failure_log->append("Rejecting public key chain for domain " + domain +
+ failure_log->append("Rejecting public key chain for domain " + pkp.domain +
". Validated chain: " + HashesToBase64String(hashes) +
", expected: " + HashesToBase64String(pkp.spki_hashes));
return false;
@@ -910,6 +940,8 @@
}
bool TransportSecurityState::DomainState::ShouldSSLErrorsBeFatal() const {
+ // Both HSTS and HPKP cause fatal SSL errors, so enable this on the presense
+ // of either. (If neither is active, no DomainState will be returned.)
return true;
}
@@ -917,6 +949,12 @@
return pkp.spki_hashes.size() > 0 || pkp.bad_spki_hashes.size() > 0;
}
+TransportSecurityState::DomainState::STSState::STSState() {
+}
+
+TransportSecurityState::DomainState::STSState::~STSState() {
+}
+
TransportSecurityState::DomainState::PKPState::PKPState() {
}
diff --git a/net/http/transport_security_state.h b/net/http/transport_security_state.h
index f9e82c7..6a4615c 100644
--- a/net/http/transport_security_state.h
+++ b/net/http/transport_security_state.h
@@ -50,6 +50,10 @@
// A DomainState describes the transport security state (required upgrade
// to HTTPS, and/or any public key pins).
+ //
+ // TODO(davidben): STSState and PKPState are queried and processed
+ // independently (with the exception of ShouldSSLErrorsBeFatal triggering on
+ // both and on-disk storage). DomainState should be split into the two.
class NET_EXPORT DomainState {
public:
enum UpgradeMode {
@@ -62,6 +66,9 @@
~DomainState();
struct STSState {
+ STSState();
+ ~STSState();
+
// The absolute time (UTC) when the |upgrade_mode| (and other state) was
// observed.
base::Time last_observed;
@@ -74,6 +81,10 @@
// Are subdomains subject to this policy state?
bool include_subdomains;
+
+ // The domain which matched during a search for this DomainState entry.
+ // Updated by |GetDynamicDomainState| and |GetStaticDomainState|.
+ std::string domain;
};
struct PKPState {
@@ -97,6 +108,10 @@
// Are subdomains subject to this policy state?
bool include_subdomains;
+
+ // The domain which matched during a search for this DomainState entry.
+ // Updated by |GetDynamicDomainState| and |GetStaticDomainState|.
+ std::string domain;
};
// Takes a set of SubjectPublicKeyInfo |hashes| and returns true if:
@@ -133,12 +148,6 @@
STSState sts;
PKPState pkp;
-
- // The following members are not valid when stored in |enabled_hosts_|:
-
- // The domain which matched during a search for this DomainState entry.
- // Updated by |GetDynamicDomainState| and |GetStaticDomainState|.
- std::string domain;
};
class NET_EXPORT Iterator {
@@ -207,24 +216,21 @@
bool DeleteDynamicDataForHost(const std::string& host);
// Returns true and updates |*result| iff there is a static (built-in)
- // DomainState for |host|.
- //
- // If |host| matches both an exact entry and is a subdomain of another entry,
- // the exact match determines the return value.
- //
- // Note that this method is not const because it opportunistically removes
- // entries that have expired.
+ // DomainState for |host|. If multiple entries match |host|, the most specific
+ // match determines the return value.
bool GetStaticDomainState(const std::string& host, DomainState* result) const;
- // Returns true and updates |*result| iff there is a dynamic DomainState
- // (learned from HSTS or HPKP headers, or set by the user, or other means) for
- // |host|.
- //
- // If |host| matches both an exact entry and is a subdomain of another entry,
- // the exact match determines the return value.
+ // Returns true and updates |*result| iff |host| has HSTS or HPKP state (or
+ // both). The two are queried independently and combined into a single
+ // DomainState. If multiple HSTS (respectively, HPKP) entries match |host|,
+ // the most specific match determines the HSTS (respectively, HPKP) portion of
+ // the return value.
//
// Note that this method is not const because it opportunistically removes
// entries that have expired.
+ //
+ // TODO(davidben): STSState and PKPState should be queried independently at
+ // the API level too.
bool GetDynamicDomainState(const std::string& host, DomainState* result);
// Processes an HSTS header value from the host, adding entries to
@@ -239,13 +245,16 @@
// Adds explicitly-specified data as if it was processed from an
// HSTS header (used for net-internals and unit tests).
- bool AddHSTS(const std::string& host, const base::Time& expiry,
+ void AddHSTS(const std::string& host,
+ const base::Time& expiry,
bool include_subdomains);
// Adds explicitly-specified data as if it was processed from an
// HPKP header (used for net-internals and unit tests).
- bool AddHPKP(const std::string& host, const base::Time& expiry,
- bool include_subdomains, const HashValueVector& hashes);
+ void AddHPKP(const std::string& host,
+ const base::Time& expiry,
+ bool include_subdomains,
+ const HashValueVector& hashes);
// Returns true iff we have any static public key pins for the |host| and
// iff its set of required pins is the set we expect for Google
@@ -290,6 +299,19 @@
// changed.
void DirtyNotify();
+ // Adds HSTS state to |host|.
+ void AddHSTSInternal(const std::string& host,
+ DomainState::UpgradeMode upgrade_mode,
+ const base::Time& expiry,
+ bool include_subdomains);
+
+ // Adds HPKP state to |host|.
+ void AddHPKPInternal(const std::string& host,
+ const base::Time& last_observed,
+ const base::Time& expiry,
+ bool include_subdomains,
+ const HashValueVector& hashes);
+
// Enable TransportSecurity for |host|. |state| supercedes any previous
// state for the |host|, including static entries.
//
@@ -301,7 +323,9 @@
// the result.
static std::string CanonicalizeHost(const std::string& hostname);
- // The set of hosts that have enabled TransportSecurity.
+ // The set of hosts that have enabled TransportSecurity. |sts.domain| and
+ // |pkp.domain| will always be empty for a DomainState in this map; the domain
+ // comes from the map key instead.
DomainStateMap enabled_hosts_;
Delegate* delegate_;
diff --git a/net/http/transport_security_state_static.h b/net/http/transport_security_state_static.h
index 1557880..65ffd2c 100644
--- a/net/http/transport_security_state_static.h
+++ b/net/http/transport_security_state_static.h
@@ -677,9 +677,9 @@
// value has the MSB set then it represents a literal leaf value. Otherwise
// it's a pointer to the n'th element of the array.
static const uint8 kHSTSHuffmanTree[] = {
- 0xe9, 0xf2, 0x00, 0x80, 0x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3e, 0x53, 0xd7, 0x32,
+ 0x8c, 0x2a, 0xf1, 0xbb, 0x3c, 0xca, 0x5e, 0x0b, 0x49, 0xaf, 0x6d, 0x20,
+ 0x49, 0x27, 0x94, 0xba, 0xf1, 0xde, 0x39, 0x59, 0xd8, 0xfe, 0x97, 0x84,
+ 0xac, 0x53, 0x58, 0x6e, 0x78, 0xe3, 0x2b, 0x47, 0x6e, 0xe5, 0xf7, 0x3b,
+ 0x90, 0xb4, 0x1a, 0x48, 0x45, 0xe9, 0x45, 0xfa, 0xb4, 0x09, 0x3e, 0xd3,
+ 0xf6, 0xdd, 0x4a, 0x71, 0xe2, 0x55, 0x47, 0x54, 0x7d, 0xbe, 0x27, 0x76,
+ 0x9d, 0xa9, 0x21, 0xb0,
};
-static const unsigned kPreloadedHSTSBits = 114313;
+static const unsigned kPreloadedHSTSBits = 117726;
-static const unsigned kHSTSRootPosition = 113727;
+static const unsigned kHSTSRootPosition = 117138;
#endif // NET_HTTP_TRANSPORT_SECURITY_STATE_STATIC_H_
diff --git a/net/http/transport_security_state_static.json b/net/http/transport_security_state_static.json
index 7fceeaa..3145671 100644
--- a/net/http/transport_security_state_static.json
+++ b/net/http/transport_security_state_static.json
@@ -1728,7 +1728,53 @@
{ "name": "tonywebster.com", "include_subdomains": true, "mode": "force-https" },
{ "name": "tucuxi.org", "include_subdomains": true, "mode": "force-https" },
{ "name": "firebaseio.com", "include_subdomains": true, "mode": "force-https" },
- { "name": "firebaseio-demo.com", "include_subdomains": true, "mode": "force-https" }
+ { "name": "firebaseio-demo.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "adlershop.ch", "include_subdomains": true, "mode": "force-https" },
+ { "name": "ahwatukeefoothillsmontessori.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "authentication.io", "include_subdomains": true, "mode": "force-https" },
+ { "name": "brainfork.ml", "include_subdomains": true, "mode": "force-https" },
+ { "name": "brainvation.de", "include_subdomains": true, "mode": "force-https" },
+ { "name": "brossmanit.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "calomel.org", "include_subdomains": true, "mode": "force-https" },
+ { "name": "chm.vn", "include_subdomains": true, "mode": "force-https" },
+ { "name": "clan-ww.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "dixmag.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "dynaloop.net", "include_subdomains": true, "mode": "force-https" },
+ { "name": "eduroam.no", "include_subdomains": true, "mode": "force-https" },
+ { "name": "egit.co", "include_subdomains": true, "mode": "force-https" },
+ { "name": "friendlink.jp", "include_subdomains": true, "mode": "force-https" },
+ { "name": "gambitnash.co.uk", "include_subdomains": true, "mode": "force-https" },
+ { "name": "gavick.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "hachre.de", "include_subdomains": true, "mode": "force-https" },
+ { "name": "herocentral.de", "include_subdomains": true, "mode": "force-https" },
+ { "name": "hicoria.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "id-conf.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "ikkatsu-satei.jp", "include_subdomains": true, "mode": "force-https" },
+ { "name": "iridiumbrowser.de", "include_subdomains": true, "mode": "force-https" },
+ { "name": "jira.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "kirei.se", "include_subdomains": true, "mode": "force-https" },
+ { "name": "kuppingercole.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "maff.scot", "include_subdomains": true, "mode": "force-https" },
+ { "name": "mpreserver.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "mvno.io", "include_subdomains": true, "mode": "force-https" },
+ { "name": "namepros.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "neko.li", "include_subdomains": true, "mode": "force-https" },
+ { "name": "netera.se", "include_subdomains": true, "mode": "force-https" },
+ { "name": "nieselregen.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "pauladamsmith.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "pwd.ovh", "include_subdomains": true, "mode": "force-https" },
+ { "name": "ragingserenity.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "saintsrobotics.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "samuelkeeley.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "shellsec.pw", "include_subdomains": true, "mode": "force-https" },
+ { "name": "suzukikenichi.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "tbspace.de", "include_subdomains": true, "mode": "force-https" },
+ { "name": "the-sky-of-valkyries.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "thomastimepieces.com.au", "include_subdomains": true, "mode": "force-https" },
+ { "name": "uonstaffhub.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "whd-guide.de", "include_subdomains": true, "mode": "force-https" },
+ { "name": "whocalld.com", "include_subdomains": true, "mode": "force-https" },
+ { "name": "wootton95.com", "include_subdomains": true, "mode": "force-https" }
],
// |ReportUMAOnPinFailure| uses these to report which domain was associated
diff --git a/net/http/transport_security_state_unittest.cc b/net/http/transport_security_state_unittest.cc
index b9369fa..44fc2d6 100644
--- a/net/http/transport_security_state_unittest.cc
+++ b/net/http/transport_security_state_unittest.cc
@@ -55,42 +55,42 @@
state->enable_static_pins_ = true;
}
+ static HashValueVector GetSampleSPKIHashes() {
+ HashValueVector spki_hashes;
+ HashValue hash(HASH_VALUE_SHA1);
+ memset(hash.data(), 0, hash.size());
+ spki_hashes.push_back(hash);
+ return spki_hashes;
+ }
+
protected:
bool GetStaticDomainState(TransportSecurityState* state,
const std::string& host,
TransportSecurityState::DomainState* result) {
return state->GetStaticDomainState(host, result);
}
-
- void EnableHost(TransportSecurityState* state,
- const std::string& host,
- const TransportSecurityState::DomainState& domain_state) {
- return state->EnableHost(host, domain_state);
- }
};
TEST_F(TransportSecurityStateTest, SimpleMatches) {
TransportSecurityState state;
- TransportSecurityState::DomainState domain_state;
const base::Time current_time(base::Time::Now());
const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
- EXPECT_FALSE(state.GetDynamicDomainState("yahoo.com", &domain_state));
+ EXPECT_FALSE(state.ShouldUpgradeToSSL("yahoo.com"));
bool include_subdomains = false;
state.AddHSTS("yahoo.com", expiry, include_subdomains);
- EXPECT_TRUE(state.GetDynamicDomainState("yahoo.com", &domain_state));
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("yahoo.com"));
}
TEST_F(TransportSecurityStateTest, MatchesCase1) {
TransportSecurityState state;
- TransportSecurityState::DomainState domain_state;
const base::Time current_time(base::Time::Now());
const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
- EXPECT_FALSE(state.GetDynamicDomainState("yahoo.com", &domain_state));
+ EXPECT_FALSE(state.ShouldUpgradeToSSL("yahoo.com"));
bool include_subdomains = false;
state.AddHSTS("YAhoo.coM", expiry, include_subdomains);
- EXPECT_TRUE(state.GetDynamicDomainState("yahoo.com", &domain_state));
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("yahoo.com"));
}
TEST_F(TransportSecurityStateTest, Fuzz) {
@@ -117,80 +117,238 @@
TEST_F(TransportSecurityStateTest, MatchesCase2) {
TransportSecurityState state;
- TransportSecurityState::DomainState domain_state;
const base::Time current_time(base::Time::Now());
const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
- EXPECT_FALSE(state.GetDynamicDomainState("YAhoo.coM", &domain_state));
+ EXPECT_FALSE(state.ShouldUpgradeToSSL("YAhoo.coM"));
bool include_subdomains = false;
state.AddHSTS("yahoo.com", expiry, include_subdomains);
- EXPECT_TRUE(state.GetDynamicDomainState("YAhoo.coM", &domain_state));
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("YAhoo.coM"));
}
TEST_F(TransportSecurityStateTest, SubdomainMatches) {
TransportSecurityState state;
- TransportSecurityState::DomainState domain_state;
const base::Time current_time(base::Time::Now());
const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
- EXPECT_FALSE(state.GetDynamicDomainState("yahoo.com", &domain_state));
+ EXPECT_FALSE(state.ShouldUpgradeToSSL("yahoo.com"));
bool include_subdomains = true;
state.AddHSTS("yahoo.com", expiry, include_subdomains);
- EXPECT_TRUE(state.GetDynamicDomainState("yahoo.com", &domain_state));
- EXPECT_TRUE(state.GetDynamicDomainState("foo.yahoo.com", &domain_state));
- EXPECT_TRUE(state.GetDynamicDomainState("foo.bar.yahoo.com", &domain_state));
- EXPECT_TRUE(
- state.GetDynamicDomainState("foo.bar.baz.yahoo.com", &domain_state));
- EXPECT_FALSE(state.GetDynamicDomainState("com", &domain_state));
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("yahoo.com"));
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("foo.yahoo.com"));
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("foo.bar.yahoo.com"));
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("foo.bar.baz.yahoo.com"));
+ EXPECT_FALSE(state.ShouldUpgradeToSSL("com"));
+ EXPECT_FALSE(state.ShouldUpgradeToSSL("notyahoo.com"));
}
-TEST_F(TransportSecurityStateTest, InvalidDomains) {
+TEST_F(TransportSecurityStateTest, FatalSSLErrors) {
TransportSecurityState state;
- TransportSecurityState::DomainState domain_state;
const base::Time current_time(base::Time::Now());
const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
- EXPECT_FALSE(state.GetDynamicDomainState("yahoo.com", &domain_state));
- bool include_subdomains = true;
- state.AddHSTS("yahoo.com", expiry, include_subdomains);
- EXPECT_TRUE(state.GetDynamicDomainState("www-.foo.yahoo.com", &domain_state));
- EXPECT_TRUE(
- state.GetDynamicDomainState("2\x01.foo.yahoo.com", &domain_state));
+ state.AddHSTS("example1.com", expiry, false);
+ state.AddHPKP("example2.com", expiry, false, GetSampleSPKIHashes());
+
+ // The presense of either HSTS or HPKP is enough to make SSL errors fatal.
+ EXPECT_TRUE(state.ShouldSSLErrorsBeFatal("example1.com"));
+ EXPECT_TRUE(state.ShouldSSLErrorsBeFatal("example2.com"));
}
-TEST_F(TransportSecurityStateTest, DeleteAllDynamicDataSince) {
+// Tests that HPKP and HSTS state both expire. Also tests that expired entries
+// are pruned.
+TEST_F(TransportSecurityStateTest, Expiration) {
TransportSecurityState state;
- TransportSecurityState::DomainState domain_state;
const base::Time current_time(base::Time::Now());
const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
const base::Time older = current_time - base::TimeDelta::FromSeconds(1000);
- EXPECT_FALSE(state.GetDynamicDomainState("yahoo.com", &domain_state));
+ // Note: this test assumes that inserting an entry with an expiration time in
+ // the past works and is pruned on query.
+ state.AddHSTS("example1.com", older, false);
+ EXPECT_TRUE(TransportSecurityState::Iterator(state).HasNext());
+ EXPECT_FALSE(state.ShouldUpgradeToSSL("example1.com"));
+ // Querying |state| for a domain should flush out expired entries.
+ EXPECT_FALSE(TransportSecurityState::Iterator(state).HasNext());
+
+ state.AddHPKP("example1.com", older, false, GetSampleSPKIHashes());
+ EXPECT_TRUE(TransportSecurityState::Iterator(state).HasNext());
+ EXPECT_FALSE(state.HasPublicKeyPins("example1.com"));
+ // Querying |state| for a domain should flush out expired entries.
+ EXPECT_FALSE(TransportSecurityState::Iterator(state).HasNext());
+
+ state.AddHSTS("example1.com", older, false);
+ state.AddHPKP("example1.com", older, false, GetSampleSPKIHashes());
+ EXPECT_TRUE(TransportSecurityState::Iterator(state).HasNext());
+ EXPECT_FALSE(state.ShouldSSLErrorsBeFatal("example1.com"));
+ // Querying |state| for a domain should flush out expired entries.
+ EXPECT_FALSE(TransportSecurityState::Iterator(state).HasNext());
+
+ // Test that HSTS can outlive HPKP.
+ state.AddHSTS("example1.com", expiry, false);
+ state.AddHPKP("example1.com", older, false, GetSampleSPKIHashes());
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("example1.com"));
+ EXPECT_FALSE(state.HasPublicKeyPins("example1.com"));
+
+ // Test that HPKP can outlive HSTS.
+ state.AddHSTS("example2.com", older, false);
+ state.AddHPKP("example2.com", expiry, false, GetSampleSPKIHashes());
+ EXPECT_FALSE(state.ShouldUpgradeToSSL("example2.com"));
+ EXPECT_TRUE(state.HasPublicKeyPins("example2.com"));
+}
+
+TEST_F(TransportSecurityStateTest, InvalidDomains) {
+ TransportSecurityState state;
+ const base::Time current_time(base::Time::Now());
+ const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
+
+ EXPECT_FALSE(state.ShouldUpgradeToSSL("yahoo.com"));
+ bool include_subdomains = true;
+ state.AddHSTS("yahoo.com", expiry, include_subdomains);
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("www-.foo.yahoo.com"));
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("2\x01.foo.yahoo.com"));
+}
+
+// Tests that HPKP and HSTS state are queried independently for subdomain
+// matches.
+TEST_F(TransportSecurityStateTest, IndependentSubdomain) {
+ TransportSecurityState state;
+ const base::Time current_time(base::Time::Now());
+ const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
+
+ state.AddHSTS("example1.com", expiry, true);
+ state.AddHPKP("example1.com", expiry, false, GetSampleSPKIHashes());
+
+ state.AddHSTS("example2.com", expiry, false);
+ state.AddHPKP("example2.com", expiry, true, GetSampleSPKIHashes());
+
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("foo.example1.com"));
+ EXPECT_FALSE(state.HasPublicKeyPins("foo.example1.com"));
+ EXPECT_FALSE(state.ShouldUpgradeToSSL("foo.example2.com"));
+ EXPECT_TRUE(state.HasPublicKeyPins("foo.example2.com"));
+}
+
+// Tests that HPKP and HSTS state are inserted and overridden independently.
+TEST_F(TransportSecurityStateTest, IndependentInsertion) {
+ TransportSecurityState state;
+ const base::Time current_time(base::Time::Now());
+ const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
+
+ // Place an includeSubdomains HSTS entry below a normal HPKP entry.
+ state.AddHSTS("example1.com", expiry, true);
+ state.AddHPKP("foo.example1.com", expiry, false, GetSampleSPKIHashes());
+
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("foo.example1.com"));
+ EXPECT_TRUE(state.HasPublicKeyPins("foo.example1.com"));
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("example1.com"));
+ EXPECT_FALSE(state.HasPublicKeyPins("example1.com"));
+
+ // Drop the includeSubdomains from the HSTS entry.
+ state.AddHSTS("example1.com", expiry, false);
+
+ EXPECT_FALSE(state.ShouldUpgradeToSSL("foo.example1.com"));
+ EXPECT_TRUE(state.HasPublicKeyPins("foo.example1.com"));
+
+ // Place an includeSubdomains HPKP entry below a normal HSTS entry.
+ state.AddHSTS("foo.example2.com", expiry, false);
+ state.AddHPKP("example2.com", expiry, true, GetSampleSPKIHashes());
+
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("foo.example2.com"));
+ EXPECT_TRUE(state.HasPublicKeyPins("foo.example2.com"));
+
+ // Drop the includeSubdomains from the HSTS entry.
+ state.AddHPKP("example2.com", expiry, false, GetSampleSPKIHashes());
+
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("foo.example2.com"));
+ EXPECT_FALSE(state.HasPublicKeyPins("foo.example2.com"));
+}
+
+// Tests that GetDynamicDomainState appropriately stitches together the results
+// of HSTS and HPKP.
+TEST_F(TransportSecurityStateTest, DynamicDomainState) {
+ TransportSecurityState state;
+ const base::Time current_time(base::Time::Now());
+ const base::Time expiry1 = current_time + base::TimeDelta::FromSeconds(1000);
+ const base::Time expiry2 = current_time + base::TimeDelta::FromSeconds(2000);
+
+ state.AddHSTS("example.com", expiry1, true);
+ state.AddHPKP("foo.example.com", expiry2, false, GetSampleSPKIHashes());
+
+ TransportSecurityState::DomainState domain_state;
+ ASSERT_TRUE(state.GetDynamicDomainState("foo.example.com", &domain_state));
+ EXPECT_TRUE(domain_state.ShouldUpgradeToSSL());
+ EXPECT_TRUE(domain_state.HasPublicKeyPins());
+ EXPECT_TRUE(domain_state.sts.include_subdomains);
+ EXPECT_FALSE(domain_state.pkp.include_subdomains);
+ EXPECT_EQ(expiry1, domain_state.sts.expiry);
+ EXPECT_EQ(expiry2, domain_state.pkp.expiry);
+ EXPECT_EQ("example.com", domain_state.sts.domain);
+ EXPECT_EQ("foo.example.com", domain_state.pkp.domain);
+}
+
+// Tests that new pins always override previous pins. This should be true for
+// both pins at the same domain or includeSubdomains pins at a parent domain.
+TEST_F(TransportSecurityStateTest, NewPinsOverride) {
+ TransportSecurityState state;
+ TransportSecurityState::DomainState domain_state;
+ const base::Time current_time(base::Time::Now());
+ const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
+ HashValue hash1(HASH_VALUE_SHA1);
+ memset(hash1.data(), 0x01, hash1.size());
+ HashValue hash2(HASH_VALUE_SHA1);
+ memset(hash2.data(), 0x02, hash1.size());
+ HashValue hash3(HASH_VALUE_SHA1);
+ memset(hash3.data(), 0x03, hash1.size());
+
+ state.AddHPKP("example.com", expiry, true, HashValueVector(1, hash1));
+
+ ASSERT_TRUE(state.GetDynamicDomainState("foo.example.com", &domain_state));
+ ASSERT_EQ(1u, domain_state.pkp.spki_hashes.size());
+ EXPECT_TRUE(domain_state.pkp.spki_hashes[0].Equals(hash1));
+
+ state.AddHPKP("foo.example.com", expiry, false, HashValueVector(1, hash2));
+
+ ASSERT_TRUE(state.GetDynamicDomainState("foo.example.com", &domain_state));
+ ASSERT_EQ(1u, domain_state.pkp.spki_hashes.size());
+ EXPECT_TRUE(domain_state.pkp.spki_hashes[0].Equals(hash2));
+
+ state.AddHPKP("foo.example.com", expiry, false, HashValueVector(1, hash3));
+
+ ASSERT_TRUE(state.GetDynamicDomainState("foo.example.com", &domain_state));
+ ASSERT_EQ(1u, domain_state.pkp.spki_hashes.size());
+ EXPECT_TRUE(domain_state.pkp.spki_hashes[0].Equals(hash3));
+}
+
+TEST_F(TransportSecurityStateTest, DeleteAllDynamicDataSince) {
+ TransportSecurityState state;
+ const base::Time current_time(base::Time::Now());
+ const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
+ const base::Time older = current_time - base::TimeDelta::FromSeconds(1000);
+
+ EXPECT_FALSE(state.ShouldUpgradeToSSL("yahoo.com"));
bool include_subdomains = false;
state.AddHSTS("yahoo.com", expiry, include_subdomains);
state.DeleteAllDynamicDataSince(expiry);
- EXPECT_TRUE(state.GetDynamicDomainState("yahoo.com", &domain_state));
- EXPECT_EQ(TransportSecurityState::DomainState::MODE_FORCE_HTTPS,
- domain_state.sts.upgrade_mode);
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("yahoo.com"));
state.DeleteAllDynamicDataSince(older);
- EXPECT_TRUE(state.GetDynamicDomainState("yahoo.com", &domain_state));
- EXPECT_EQ(TransportSecurityState::DomainState::MODE_DEFAULT,
- domain_state.sts.upgrade_mode);
+ EXPECT_FALSE(state.ShouldUpgradeToSSL("yahoo.com"));
+
+ // |state| should be empty now.
+ EXPECT_FALSE(TransportSecurityState::Iterator(state).HasNext());
}
TEST_F(TransportSecurityStateTest, DeleteDynamicDataForHost) {
TransportSecurityState state;
- TransportSecurityState::DomainState domain_state;
const base::Time current_time(base::Time::Now());
const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
bool include_subdomains = false;
state.AddHSTS("yahoo.com", expiry, include_subdomains);
- EXPECT_TRUE(state.GetDynamicDomainState("yahoo.com", &domain_state));
- EXPECT_FALSE(state.GetDynamicDomainState("example.com", &domain_state));
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("yahoo.com"));
+ EXPECT_FALSE(state.ShouldUpgradeToSSL("example.com"));
EXPECT_TRUE(state.DeleteDynamicDataForHost("yahoo.com"));
- EXPECT_FALSE(state.GetDynamicDomainState("yahoo.com", &domain_state));
+ EXPECT_FALSE(state.ShouldUpgradeToSSL("yahoo.com"));
}
TEST_F(TransportSecurityStateTest, EnableStaticPins) {
@@ -243,10 +401,12 @@
// chrome://net-internals/#hsts UI. So test that.
EXPECT_TRUE(
state.GetStaticDomainState("market.android.com", &domain_state));
- EXPECT_EQ(domain_state.domain, "market.android.com");
+ EXPECT_EQ(domain_state.sts.domain, "market.android.com");
+ EXPECT_EQ(domain_state.pkp.domain, "market.android.com");
EXPECT_TRUE(state.GetStaticDomainState(
"sub.market.android.com", &domain_state));
- EXPECT_EQ(domain_state.domain, "market.android.com");
+ EXPECT_EQ(domain_state.sts.domain, "market.android.com");
+ EXPECT_EQ(domain_state.pkp.domain, "market.android.com");
}
static bool StaticShouldRedirect(const char* hostname) {
@@ -697,13 +857,11 @@
EXPECT_FALSE(StaticShouldRedirect("www.google.com"));
TransportSecurityState state;
- TransportSecurityState::DomainState domain_state;
const base::Time current_time(base::Time::Now());
const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
- domain_state.sts.expiry = expiry;
- EnableHost(&state, "www.google.com", domain_state);
+ state.AddHSTS("www.google.com", expiry, true);
- EXPECT_TRUE(state.GetDynamicDomainState("www.google.com", &domain_state));
+ EXPECT_TRUE(state.ShouldUpgradeToSSL("www.google.com"));
}
TEST_F(TransportSecurityStateTest, GooglePinnedProperties) {
diff --git a/net/net.gyp b/net/net.gyp
index c1338bf..834a4c6 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -876,6 +876,7 @@
'dependencies': [
'../base/base.gyp:base',
'../base/base.gyp:test_support_base',
+ '../crypto/crypto.gyp:crypto',
'../net/tools/tld_cleanup/tld_cleanup.gyp:tld_cleanup_util',
'../testing/gtest.gyp:gtest',
'../testing/gmock.gyp:gmock',
@@ -967,6 +968,8 @@
'test/url_request/url_request_mock_data_job.h',
'test/url_request/url_request_mock_http_job.cc',
'test/url_request/url_request_mock_http_job.h',
+ 'test/url_request/url_request_slow_download_job.cc',
+ 'test/url_request/url_request_slow_download_job.h',
'url_request/test_url_fetcher_factory.cc',
'url_request/test_url_fetcher_factory.h',
'url_request/test_url_request_interceptor.cc',
diff --git a/net/proxy/proxy_config_service_ios.h b/net/proxy/proxy_config_service_ios.h
index bf8f76b..c79a6b6 100644
--- a/net/proxy/proxy_config_service_ios.h
+++ b/net/proxy/proxy_config_service_ios.h
@@ -13,7 +13,7 @@
public:
// Constructs a ProxyConfigService that watches the iOS system proxy settings.
explicit ProxyConfigServiceIOS();
- virtual ~ProxyConfigServiceIOS();
+ ~ProxyConfigServiceIOS() override;
private:
DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceIOS);
diff --git a/net/proxy/proxy_config_source.cc b/net/proxy/proxy_config_source.cc
index f47c2f6..80e2735 100644
--- a/net/proxy/proxy_config_source.cc
+++ b/net/proxy/proxy_config_source.cc
@@ -22,8 +22,8 @@
"CUSTOM",
"TEST"
};
-COMPILE_ASSERT(arraysize(kSourceNames) == NUM_PROXY_CONFIG_SOURCES,
- source_names_incorrect_size);
+static_assert(arraysize(kSourceNames) == NUM_PROXY_CONFIG_SOURCES,
+ "kSourceNames has incorrect size");
} // namespace
diff --git a/net/proxy/proxy_info.h b/net/proxy/proxy_info.h
index e1c9389..8e78d9f 100644
--- a/net/proxy/proxy_info.h
+++ b/net/proxy/proxy_info.h
@@ -29,25 +29,40 @@
void Use(const ProxyInfo& proxy_info);
// Uses a direct connection.
+ //
+ // Note that this method resets this instance unlike Fallback(), etc. which
+ // only modify |proxy_list_|. For example, since |config_id_| is cleared, the
+ // ProxyService may recognize this instance as a new config after UseDirect()
+ // call.
void UseDirect();
// Uses a direct connection. did_bypass_proxy() will return true to indicate
// that the direct connection is the result of configured proxy bypass rules.
+ //
+ // See also the note for UseDirect().
void UseDirectWithBypassedProxy();
// Uses a specific proxy server, of the form:
// proxy-uri = [<scheme> "://"] <hostname> [":" <port>]
// This may optionally be a semi-colon delimited list of <proxy-uri>.
// It is OK to have LWS between entries.
+ //
+ // See also the note for UseDirect().
void UseNamedProxy(const std::string& proxy_uri_list);
// Sets the proxy list to a single entry, |proxy_server|.
+ //
+ // See also the note for UseDirect().
void UseProxyServer(const ProxyServer& proxy_server);
// Parses from the given PAC result.
+ //
+ // See also the note for UseDirect().
void UsePacString(const std::string& pac_string);
// Uses the proxies from the given list.
+ //
+ // See also the note for UseDirect().
void UseProxyList(const ProxyList& proxy_list);
// Uses the proxies from the given list, but does not otherwise reset the
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index f83806c..9d5a0b0 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -290,7 +290,7 @@
// Returns NetLog parameters on a successfuly proxy resolution.
base::Value* NetLogFinishedResolvingProxyCallback(
- ProxyInfo* result,
+ const ProxyInfo* result,
NetLog::LogLevel /* log_level */) {
base::DictionaryValue* dict = new base::DictionaryValue();
dict->SetString("pac_string", result->ToPacString());
diff --git a/net/quic/congestion_control/receive_algorithm_interface.cc b/net/quic/congestion_control/receive_algorithm_interface.cc
index 72164ef..a619dd5 100644
--- a/net/quic/congestion_control/receive_algorithm_interface.cc
+++ b/net/quic/congestion_control/receive_algorithm_interface.cc
@@ -9,13 +9,8 @@
namespace net {
// Factory for receive side congestion control algorithm.
-ReceiveAlgorithmInterface* ReceiveAlgorithmInterface::Create(
- CongestionFeedbackType type) {
- switch (type) {
- case kTCP:
- return new TcpReceiver();
- }
- return nullptr;
+ReceiveAlgorithmInterface* ReceiveAlgorithmInterface::Create() {
+ return new TcpReceiver();
}
} // namespace net
diff --git a/net/quic/congestion_control/receive_algorithm_interface.h b/net/quic/congestion_control/receive_algorithm_interface.h
index cd96b02..ef4fb60 100644
--- a/net/quic/congestion_control/receive_algorithm_interface.h
+++ b/net/quic/congestion_control/receive_algorithm_interface.h
@@ -17,15 +17,10 @@
class NET_EXPORT_PRIVATE ReceiveAlgorithmInterface {
public:
- static ReceiveAlgorithmInterface* Create(CongestionFeedbackType type);
+ static ReceiveAlgorithmInterface* Create();
virtual ~ReceiveAlgorithmInterface() {}
- // Returns false if no QuicCongestionFeedbackFrame block is needed.
- // Otherwise fills in feedback and return true.
- virtual bool GenerateCongestionFeedback(
- QuicCongestionFeedbackFrame* feedback) = 0;
-
// Should be called for each incoming packet.
// bytes: is the packet size in bytes including IP headers.
// sequence_number: is the unique sequence number from the QUIC packet header.
diff --git a/net/quic/congestion_control/tcp_receiver.cc b/net/quic/congestion_control/tcp_receiver.cc
index a8c5489..d29c711 100644
--- a/net/quic/congestion_control/tcp_receiver.cc
+++ b/net/quic/congestion_control/tcp_receiver.cc
@@ -15,13 +15,6 @@
: receive_window_(kReceiveWindowTCP) {
}
-bool TcpReceiver::GenerateCongestionFeedback(
- QuicCongestionFeedbackFrame* feedback) {
- feedback->type = kTCP;
- feedback->tcp.receive_window = receive_window_;
- return true;
-}
-
void TcpReceiver::RecordIncomingPacket(QuicByteCount bytes,
QuicPacketSequenceNumber sequence_number,
QuicTime timestamp) {
diff --git a/net/quic/congestion_control/tcp_receiver.h b/net/quic/congestion_control/tcp_receiver.h
index 7dae4f4..8c16584 100644
--- a/net/quic/congestion_control/tcp_receiver.h
+++ b/net/quic/congestion_control/tcp_receiver.h
@@ -23,10 +23,6 @@
// Size of the (currently fixed) receive window.
static const QuicByteCount kReceiveWindowTCP;
- // Start implementation of SendAlgorithmInterface.
- bool GenerateCongestionFeedback(
- QuicCongestionFeedbackFrame* feedback) override;
-
void RecordIncomingPacket(QuicByteCount bytes,
QuicPacketSequenceNumber sequence_number,
QuicTime timestamp) override;
diff --git a/net/quic/congestion_control/tcp_receiver_test.cc b/net/quic/congestion_control/tcp_receiver_test.cc
index 833631e..5ae1a00 100644
--- a/net/quic/congestion_control/tcp_receiver_test.cc
+++ b/net/quic/congestion_control/tcp_receiver_test.cc
@@ -18,16 +18,8 @@
};
TEST_F(QuicTcpReceiverTest, SimpleReceiver) {
- QuicCongestionFeedbackFrame feedback;
QuicTime timestamp(QuicTime::Zero());
receiver_->RecordIncomingPacket(1, 1, timestamp);
- ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback));
- EXPECT_EQ(kTCP, feedback.type);
- EXPECT_EQ(256000u, feedback.tcp.receive_window);
- receiver_->RecordIncomingPacket(1, 2, timestamp);
- ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback));
- EXPECT_EQ(kTCP, feedback.type);
- EXPECT_EQ(256000u, feedback.tcp.receive_window);
}
} // namespace test
diff --git a/net/quic/crypto/aes_128_gcm_12_decrypter_nss.cc b/net/quic/crypto/aes_128_gcm_12_decrypter_nss.cc
index d2cd728..c1dabed 100644
--- a/net/quic/crypto/aes_128_gcm_12_decrypter_nss.cc
+++ b/net/quic/crypto/aes_128_gcm_12_decrypter_nss.cc
@@ -210,9 +210,9 @@
Aes128Gcm12Decrypter::Aes128Gcm12Decrypter()
: AeadBaseDecrypter(CKM_AES_GCM, My_Decrypt, kKeySize, kAuthTagSize,
kNoncePrefixSize) {
- COMPILE_ASSERT(kKeySize <= kMaxKeySize, key_size_too_big);
- COMPILE_ASSERT(kNoncePrefixSize <= kMaxNoncePrefixSize,
- nonce_prefix_size_too_big);
+ static_assert(kKeySize <= kMaxKeySize, "key size too big");
+ static_assert(kNoncePrefixSize <= kMaxNoncePrefixSize,
+ "nonce prefix size too big");
ignore_result(g_gcm_support_checker.Get());
}
diff --git a/net/quic/crypto/aes_128_gcm_12_decrypter_openssl.cc b/net/quic/crypto/aes_128_gcm_12_decrypter_openssl.cc
index 109d2da..e030bba 100644
--- a/net/quic/crypto/aes_128_gcm_12_decrypter_openssl.cc
+++ b/net/quic/crypto/aes_128_gcm_12_decrypter_openssl.cc
@@ -18,9 +18,9 @@
Aes128Gcm12Decrypter::Aes128Gcm12Decrypter()
: AeadBaseDecrypter(EVP_aead_aes_128_gcm(), kKeySize, kAuthTagSize,
kNoncePrefixSize) {
- COMPILE_ASSERT(kKeySize <= kMaxKeySize, key_size_too_big);
- COMPILE_ASSERT(kNoncePrefixSize <= kMaxNoncePrefixSize,
- nonce_prefix_size_too_big);
+ static_assert(kKeySize <= kMaxKeySize, "key size too big");
+ static_assert(kNoncePrefixSize <= kMaxNoncePrefixSize,
+ "nonce prefix size too big");
}
Aes128Gcm12Decrypter::~Aes128Gcm12Decrypter() {}
diff --git a/net/quic/crypto/aes_128_gcm_12_encrypter_nss.cc b/net/quic/crypto/aes_128_gcm_12_encrypter_nss.cc
index 6214af5..5ca33bf 100644
--- a/net/quic/crypto/aes_128_gcm_12_encrypter_nss.cc
+++ b/net/quic/crypto/aes_128_gcm_12_encrypter_nss.cc
@@ -209,9 +209,9 @@
Aes128Gcm12Encrypter::Aes128Gcm12Encrypter()
: AeadBaseEncrypter(CKM_AES_GCM, My_Encrypt, kKeySize, kAuthTagSize,
kNoncePrefixSize) {
- COMPILE_ASSERT(kKeySize <= kMaxKeySize, key_size_too_big);
- COMPILE_ASSERT(kNoncePrefixSize <= kMaxNoncePrefixSize,
- nonce_prefix_size_too_big);
+ static_assert(kKeySize <= kMaxKeySize, "key size too big");
+ static_assert(kNoncePrefixSize <= kMaxNoncePrefixSize,
+ "nonce prefix size too big");
ignore_result(g_gcm_support_checker.Get());
}
diff --git a/net/quic/crypto/aes_128_gcm_12_encrypter_openssl.cc b/net/quic/crypto/aes_128_gcm_12_encrypter_openssl.cc
index 6489528..b87d0fc 100644
--- a/net/quic/crypto/aes_128_gcm_12_encrypter_openssl.cc
+++ b/net/quic/crypto/aes_128_gcm_12_encrypter_openssl.cc
@@ -18,9 +18,9 @@
Aes128Gcm12Encrypter::Aes128Gcm12Encrypter()
: AeadBaseEncrypter(EVP_aead_aes_128_gcm(), kKeySize, kAuthTagSize,
kNoncePrefixSize) {
- COMPILE_ASSERT(kKeySize <= kMaxKeySize, key_size_too_big);
- COMPILE_ASSERT(kNoncePrefixSize <= kMaxNoncePrefixSize,
- nonce_prefix_size_too_big);
+ static_assert(kKeySize <= kMaxKeySize, "key size too big");
+ static_assert(kNoncePrefixSize <= kMaxNoncePrefixSize,
+ "nonce prefix size too big");
}
Aes128Gcm12Encrypter::~Aes128Gcm12Encrypter() {}
diff --git a/net/quic/crypto/chacha20_poly1305_decrypter_nss.cc b/net/quic/crypto/chacha20_poly1305_decrypter_nss.cc
index fbeaaeb..0d8eff0 100644
--- a/net/quic/crypto/chacha20_poly1305_decrypter_nss.cc
+++ b/net/quic/crypto/chacha20_poly1305_decrypter_nss.cc
@@ -48,9 +48,9 @@
ChaCha20Poly1305Decrypter::ChaCha20Poly1305Decrypter()
: AeadBaseDecrypter(CKM_NSS_CHACHA20_POLY1305, PK11_Decrypt, kKeySize,
kAuthTagSize, kNoncePrefixSize) {
- COMPILE_ASSERT(kKeySize <= kMaxKeySize, key_size_too_big);
- COMPILE_ASSERT(kNoncePrefixSize <= kMaxNoncePrefixSize,
- nonce_prefix_size_too_big);
+ static_assert(kKeySize <= kMaxKeySize, "key size too big");
+ static_assert(kNoncePrefixSize <= kMaxNoncePrefixSize,
+ "nonce prefix size too big");
}
ChaCha20Poly1305Decrypter::~ChaCha20Poly1305Decrypter() {}
diff --git a/net/quic/crypto/chacha20_poly1305_decrypter_openssl.cc b/net/quic/crypto/chacha20_poly1305_decrypter_openssl.cc
index 7f0e24d..cbf96e9 100644
--- a/net/quic/crypto/chacha20_poly1305_decrypter_openssl.cc
+++ b/net/quic/crypto/chacha20_poly1305_decrypter_openssl.cc
@@ -18,9 +18,9 @@
ChaCha20Poly1305Decrypter::ChaCha20Poly1305Decrypter()
: AeadBaseDecrypter(EVP_aead_chacha20_poly1305(), kKeySize, kAuthTagSize,
kNoncePrefixSize) {
- COMPILE_ASSERT(kKeySize <= kMaxKeySize, key_size_too_big);
- COMPILE_ASSERT(kNoncePrefixSize <= kMaxNoncePrefixSize,
- nonce_prefix_size_too_big);
+ static_assert(kKeySize <= kMaxKeySize, "key size too big");
+ static_assert(kNoncePrefixSize <= kMaxNoncePrefixSize,
+ "nonce prefix size too big");
}
ChaCha20Poly1305Decrypter::~ChaCha20Poly1305Decrypter() {}
diff --git a/net/quic/crypto/chacha20_poly1305_encrypter_nss.cc b/net/quic/crypto/chacha20_poly1305_encrypter_nss.cc
index 40cd896..770088c 100644
--- a/net/quic/crypto/chacha20_poly1305_encrypter_nss.cc
+++ b/net/quic/crypto/chacha20_poly1305_encrypter_nss.cc
@@ -48,9 +48,9 @@
ChaCha20Poly1305Encrypter::ChaCha20Poly1305Encrypter()
: AeadBaseEncrypter(CKM_NSS_CHACHA20_POLY1305, PK11_Encrypt, kKeySize,
kAuthTagSize, kNoncePrefixSize) {
- COMPILE_ASSERT(kKeySize <= kMaxKeySize, key_size_too_big);
- COMPILE_ASSERT(kNoncePrefixSize <= kMaxNoncePrefixSize,
- nonce_prefix_size_too_big);
+ static_assert(kKeySize <= kMaxKeySize, "key size too big");
+ static_assert(kNoncePrefixSize <= kMaxNoncePrefixSize,
+ "nonce prefix size too big");
}
ChaCha20Poly1305Encrypter::~ChaCha20Poly1305Encrypter() {}
diff --git a/net/quic/crypto/chacha20_poly1305_encrypter_openssl.cc b/net/quic/crypto/chacha20_poly1305_encrypter_openssl.cc
index e256c2a..91e75d0 100644
--- a/net/quic/crypto/chacha20_poly1305_encrypter_openssl.cc
+++ b/net/quic/crypto/chacha20_poly1305_encrypter_openssl.cc
@@ -18,9 +18,9 @@
ChaCha20Poly1305Encrypter::ChaCha20Poly1305Encrypter()
: AeadBaseEncrypter(EVP_aead_chacha20_poly1305(), kKeySize, kAuthTagSize,
kNoncePrefixSize) {
- COMPILE_ASSERT(kKeySize <= kMaxKeySize, key_size_too_big);
- COMPILE_ASSERT(kNoncePrefixSize <= kMaxNoncePrefixSize,
- nonce_prefix_size_too_big);
+ static_assert(kKeySize <= kMaxKeySize, "key size too big");
+ static_assert(kNoncePrefixSize <= kMaxNoncePrefixSize,
+ "nonce prefix size too big");
}
ChaCha20Poly1305Encrypter::~ChaCha20Poly1305Encrypter() {}
diff --git a/net/quic/crypto/crypto_handshake.h b/net/quic/crypto/crypto_handshake.h
index bfd2f34..8b5e314 100644
--- a/net/quic/crypto/crypto_handshake.h
+++ b/net/quic/crypto/crypto_handshake.h
@@ -80,7 +80,7 @@
// These errors will be packed into an uint32 and we don't want to set the most
// significant bit, which may be misinterpreted as the sign bit.
-COMPILE_ASSERT(MAX_FAILURE_REASON <= 32, failure_reason_out_of_sync);
+static_assert(MAX_FAILURE_REASON <= 32, "failure reason out of sync");
// A CrypterPair contains the encrypter and decrypter for an encryption level.
struct NET_EXPORT_PRIVATE CrypterPair {
diff --git a/net/quic/crypto/crypto_handshake_message.cc b/net/quic/crypto/crypto_handshake_message.cc
index cc39286..73fc9cf 100644
--- a/net/quic/crypto/crypto_handshake_message.cc
+++ b/net/quic/crypto/crypto_handshake_message.cc
@@ -65,8 +65,8 @@
void CryptoHandshakeMessage::SetTaglist(QuicTag tag, ...) {
// Warning, if sizeof(QuicTag) > sizeof(int) then this function will break
// because the terminating 0 will only be promoted to int.
- COMPILE_ASSERT(sizeof(QuicTag) <= sizeof(int),
- crypto_tag_may_not_be_larger_than_int_or_varargs_will_break);
+ static_assert(sizeof(QuicTag) <= sizeof(int),
+ "crypto tag may not be larger than int or varargs will break");
vector<QuicTag> tags;
va_list ap;
diff --git a/net/quic/crypto/crypto_server_test.cc b/net/quic/crypto/crypto_server_test.cc
index 7ff7e9e..bd78850 100644
--- a/net/quic/crypto/crypto_server_test.cc
+++ b/net/quic/crypto/crypto_server_test.cc
@@ -42,36 +42,27 @@
QuicCryptoServerConfig* server_config_;
};
-// Run tests with combinations of
-// {FLAGS_use_early_return_when_verifying_chlo,
-// FLAGS_send_quic_crypto_reject_reason}.
+// Run tests with both parities of
+// FLAGS_use_early_return_when_verifying_chlo.
struct TestParams {
- TestParams(bool use_early_return_when_verifying_chlo,
- bool send_quic_crypto_reject_reason)
+ explicit TestParams(bool use_early_return_when_verifying_chlo)
: use_early_return_when_verifying_chlo(
- use_early_return_when_verifying_chlo),
- send_quic_crypto_reject_reason(send_quic_crypto_reject_reason) {
- }
+ use_early_return_when_verifying_chlo) {}
friend ostream& operator<<(ostream& os, const TestParams& p) {
os << "{ use_early_return_when_verifying_chlo: "
- << p.use_early_return_when_verifying_chlo
- << " send_quic_crypto_reject_reason: "
- << p.send_quic_crypto_reject_reason << " }";
+ << p.use_early_return_when_verifying_chlo << " }";
return os;
}
bool use_early_return_when_verifying_chlo;
- bool send_quic_crypto_reject_reason;
};
// Constructs various test permutations.
vector<TestParams> GetTestParams() {
vector<TestParams> params;
- params.push_back(TestParams(false, false));
- params.push_back(TestParams(false, true));
- params.push_back(TestParams(true, false));
- params.push_back(TestParams(true, true));
+ params.push_back(TestParams(false));
+ params.push_back(TestParams(true));
return params;
}
@@ -88,8 +79,6 @@
FLAGS_use_early_return_when_verifying_chlo =
GetParam().use_early_return_when_verifying_chlo;
- FLAGS_send_quic_crypto_reject_reason =
- GetParam().send_quic_crypto_reject_reason;
}
void SetUp() override {
@@ -273,13 +262,9 @@
size_t expected_count) {
const uint32* reject_reasons;
size_t num_reject_reasons;
- COMPILE_ASSERT(sizeof(QuicTag) == sizeof(uint32), header_out_of_sync);
+ static_assert(sizeof(QuicTag) == sizeof(uint32), "header out of sync");
QuicErrorCode error_code = out_.GetTaglist(kRREJ, &reject_reasons,
&num_reject_reasons);
- if (!FLAGS_send_quic_crypto_reject_reason) {
- ASSERT_EQ(QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND, error_code);
- return;
- }
ASSERT_EQ(QUIC_NO_ERROR, error_code);
if (FLAGS_use_early_return_when_verifying_chlo) {
@@ -310,9 +295,8 @@
scoped_ptr<CryptoHandshakeMessage> server_config_;
};
-// Run all CryptoServerTest with all combinations of
-// FLAGS_use_early_return_when_verifying_chlo and
-// FLAGS_send_quic_crypto_reject_reason.
+// Run all CryptoServerTest with both values of
+// FLAGS_use_early_return_when_verifying_chlo
INSTANTIATE_TEST_CASE_P(CryptoServerTests,
CryptoServerTest,
::testing::ValuesIn(GetTestParams()));
diff --git a/net/quic/crypto/curve25519_key_exchange.cc b/net/quic/crypto/curve25519_key_exchange.cc
index 88eb053..f3d39e7 100644
--- a/net/quic/crypto/curve25519_key_exchange.cc
+++ b/net/quic/crypto/curve25519_key_exchange.cc
@@ -25,11 +25,10 @@
// We don't want to #include the NaCl headers in the public header file, so
// we use literals for the sizes of private_key_ and public_key_. Here we
// assert that those values are equal to the values from the NaCl header.
- COMPILE_ASSERT(
- sizeof(ka->private_key_) == crypto::curve25519::kScalarBytes,
- header_out_of_sync);
- COMPILE_ASSERT(sizeof(ka->public_key_) == crypto::curve25519::kBytes,
- header_out_of_sync);
+ static_assert(sizeof(ka->private_key_) == crypto::curve25519::kScalarBytes,
+ "header out of sync");
+ static_assert(sizeof(ka->public_key_) == crypto::curve25519::kBytes,
+ "header out of sync");
if (private_key.size() != crypto::curve25519::kScalarBytes) {
return nullptr;
diff --git a/net/quic/crypto/quic_crypto_client_config.cc b/net/quic/crypto/quic_crypto_client_config.cc
index 268c8ee..9f7f0da 100644
--- a/net/quic/crypto/quic_crypto_client_config.cc
+++ b/net/quic/crypto/quic_crypto_client_config.cc
@@ -669,7 +669,7 @@
const uint32* reject_reasons;
size_t num_reject_reasons;
- COMPILE_ASSERT(sizeof(QuicTag) == sizeof(uint32), header_out_of_sync);
+ static_assert(sizeof(QuicTag) == sizeof(uint32), "header out of sync");
if (rej.GetTaglist(kRREJ, &reject_reasons,
&num_reject_reasons) == QUIC_NO_ERROR) {
uint32 packed_error = 0;
diff --git a/net/quic/crypto/quic_crypto_server_config.cc b/net/quic/crypto/quic_crypto_server_config.cc
index 4a5dc8a..7f6a3af 100644
--- a/net/quic/crypto/quic_crypto_server_config.cc
+++ b/net/quic/crypto/quic_crypto_server_config.cc
@@ -1102,11 +1102,9 @@
out->SetStringPiece(kServerNonceTag, NewServerNonce(rand, info.now));
}
- if (FLAGS_send_quic_crypto_reject_reason) {
- // Send client the reject reason for debugging purposes.
- DCHECK_LT(0u, info.reject_reasons.size());
- out->SetVector(kRREJ, info.reject_reasons);
- }
+ // Send client the reject reason for debugging purposes.
+ DCHECK_LT(0u, info.reject_reasons.size());
+ out->SetVector(kRREJ, info.reject_reasons);
// The client may have requested a certificate chain.
const QuicTag* their_proof_demands;
@@ -1175,8 +1173,8 @@
// token.
const size_t max_unverified_size =
client_hello.size() * kMultiplier - kREJOverheadBytes;
- COMPILE_ASSERT(kClientHelloMinimumSize * kMultiplier >= kREJOverheadBytes,
- overhead_calculation_may_underflow);
+ static_assert(kClientHelloMinimumSize * kMultiplier >= kREJOverheadBytes,
+ "overhead calculation may overflow");
if (info.valid_source_address_token ||
signature.size() + compressed.size() < max_unverified_size) {
out->SetStringPiece(kCertificateTag, compressed);
@@ -1251,7 +1249,8 @@
" Got " << orbit.size() << " want " << kOrbitSize;
return nullptr;
}
- COMPILE_ASSERT(sizeof(config->orbit) == kOrbitSize, orbit_incorrect_size);
+ static_assert(sizeof(config->orbit) == kOrbitSize,
+ "orbit has incorrect size");
memcpy(config->orbit, orbit.data(), sizeof(config->orbit));
{
@@ -1615,7 +1614,7 @@
const uint32 timestamp = static_cast<uint32>(now.ToUNIXSeconds());
uint8 server_nonce[kServerNoncePlaintextSize];
- COMPILE_ASSERT(sizeof(server_nonce) > sizeof(timestamp), nonce_too_small);
+ static_assert(sizeof(server_nonce) > sizeof(timestamp), "nonce too small");
server_nonce[0] = static_cast<uint8>(timestamp >> 24);
server_nonce[1] = static_cast<uint8>(timestamp >> 16);
server_nonce[2] = static_cast<uint8>(timestamp >> 8);
@@ -1652,8 +1651,8 @@
memcpy(server_nonce + 4, server_nonce_orbit_, sizeof(server_nonce_orbit_));
memcpy(server_nonce + 4 + sizeof(server_nonce_orbit_), plaintext.data() + 4,
20);
- COMPILE_ASSERT(4 + sizeof(server_nonce_orbit_) + 20 == sizeof(server_nonce),
- bad_nonce_buffer_length);
+ static_assert(4 + sizeof(server_nonce_orbit_) + 20 == sizeof(server_nonce),
+ "bad nonce buffer length");
InsertStatus nonce_error;
{
diff --git a/net/quic/crypto/quic_crypto_server_config.h b/net/quic/crypto/quic_crypto_server_config.h
index da8713a..13797d3 100644
--- a/net/quic/crypto/quic_crypto_server_config.h
+++ b/net/quic/crypto/quic_crypto_server_config.h
@@ -59,7 +59,7 @@
// Errors from EvaluateClientHello.
std::vector<uint32> reject_reasons;
- COMPILE_ASSERT(sizeof(QuicTag) == sizeof(uint32), header_out_of_sync);
+ static_assert(sizeof(QuicTag) == sizeof(uint32), "header out of sync");
};
namespace test {
diff --git a/net/quic/port_suggester.cc b/net/quic/port_suggester.cc
index 6b7940e..b1dfa48 100644
--- a/net/quic/port_suggester.cc
+++ b/net/quic/port_suggester.cc
@@ -16,7 +16,7 @@
base::SHA1HashBytes(
reinterpret_cast<const unsigned char*>(server.host().data()),
server.host().length(), hash_bytes);
- COMPILE_ASSERT(sizeof(seed_) < sizeof(hash_bytes), seed_larger_than_hash);
+ static_assert(sizeof(seed_) < sizeof(hash_bytes), "seed larger than hash");
memcpy(&seed_, hash_bytes, sizeof(seed_));
seed_ ^= seed ^ server.port();
}
diff --git a/net/quic/quic_ack_notifier.cc b/net/quic/quic_ack_notifier.cc
index 55e829f..1780985 100644
--- a/net/quic/quic_ack_notifier.cc
+++ b/net/quic/quic_ack_notifier.cc
@@ -27,8 +27,6 @@
QuicAckNotifier::QuicAckNotifier(DelegateInterface* delegate)
: delegate_(delegate),
- original_packet_count_(0),
- original_byte_count_(0),
retransmitted_packet_count_(0),
retransmitted_byte_count_(0) {
DCHECK(delegate);
@@ -42,8 +40,6 @@
int packet_payload_size) {
sequence_numbers_.insert(make_pair(sequence_number,
PacketInfo(packet_payload_size)));
- ++original_packet_count_;
- original_byte_count_ += packet_payload_size;
DVLOG(1) << "AckNotifier waiting for packet: " << sequence_number;
}
@@ -55,10 +51,9 @@
if (IsEmpty()) {
// We have seen all the sequence numbers we were waiting for, trigger
// callback notification.
- delegate_->OnAckNotification(
- original_packet_count_, original_byte_count_,
- retransmitted_packet_count_, retransmitted_byte_count_,
- delta_largest_observed);
+ delegate_->OnAckNotification(retransmitted_packet_count_,
+ retransmitted_byte_count_,
+ delta_largest_observed);
return true;
}
return false;
diff --git a/net/quic/quic_ack_notifier.h b/net/quic/quic_ack_notifier.h
index f19d0f8..f8d813e 100644
--- a/net/quic/quic_ack_notifier.h
+++ b/net/quic/quic_ack_notifier.h
@@ -17,21 +17,18 @@
// trigger a call to a provided Closure.
class NET_EXPORT_PRIVATE QuicAckNotifier {
public:
- class NET_EXPORT_PRIVATE DelegateInterface
- : public base::RefCounted<DelegateInterface> {
+ class NET_EXPORT_PRIVATE DelegateInterface
+ : public base::RefCounted<DelegateInterface> {
public:
DelegateInterface();
// Args:
- // num_original_packets - Number of packets in the original transmission.
- // num_original_bytes - Number of packets in the original transmission.
// num_retransmitted_packets - Number of packets that had to be
// retransmitted.
// num_retransmitted_bytes - Number of bytes that had to be retransmitted.
- virtual void OnAckNotification(int num_original_packets,
- int num_original_bytes,
- int num_retransmitted_packets,
+ virtual void OnAckNotification(int num_retransmitted_packets,
int num_retransmitted_bytes,
QuicTime::Delta delta_largest_observed) = 0;
+
protected:
friend class base::RefCounted<DelegateInterface>;
@@ -83,11 +80,6 @@
// delegate will not be called until this is empty.
base::hash_map<QuicPacketSequenceNumber, PacketInfo> sequence_numbers_;
- // Transmission and retransmission stats.
- // Number of packets in the original transmission.
- int original_packet_count_;
- // Number of packets in the original transmission.
- int original_byte_count_;
// Number of packets that had to be retransmitted.
int retransmitted_packet_count_;
// Number of bytes that had to be retransmitted.
diff --git a/net/quic/quic_ack_notifier_test.cc b/net/quic/quic_ack_notifier_test.cc
index fbc7e37..4e15b98 100644
--- a/net/quic/quic_ack_notifier_test.cc
+++ b/net/quic/quic_ack_notifier_test.cc
@@ -34,7 +34,7 @@
// Should trigger callback when we receive acks for all the registered seqnums.
TEST_F(QuicAckNotifierTest, TriggerCallback) {
- EXPECT_CALL(*delegate_, OnAckNotification(3, 123, 0, 0, zero_)).Times(1);
+ EXPECT_CALL(*delegate_, OnAckNotification(0, 0, zero_)).Times(1);
EXPECT_FALSE(notifier_->OnAck(26, zero_));
EXPECT_FALSE(notifier_->OnAck(99, zero_));
EXPECT_TRUE(notifier_->OnAck(1234, zero_));
@@ -43,7 +43,7 @@
// Should not trigger callback if we never provide all the seqnums.
TEST_F(QuicAckNotifierTest, DoesNotTrigger) {
// Should not trigger callback as not all packets have been seen.
- EXPECT_CALL(*delegate_, OnAckNotification(_, _, _, _, _)).Times(0);
+ EXPECT_CALL(*delegate_, OnAckNotification(_, _, _)).Times(0);
EXPECT_FALSE(notifier_->OnAck(26, zero_));
EXPECT_FALSE(notifier_->OnAck(99, zero_));
}
@@ -55,7 +55,7 @@
notifier_->UpdateSequenceNumber(99, 3000);
notifier_->UpdateSequenceNumber(1234, 3001);
- EXPECT_CALL(*delegate_, OnAckNotification(3, 123, 2, 20 + 3, _)).Times(1);
+ EXPECT_CALL(*delegate_, OnAckNotification(2, 20 + 3, _)).Times(1);
EXPECT_FALSE(notifier_->OnAck(26, zero_)); // original
EXPECT_FALSE(notifier_->OnAck(3000, zero_)); // updated
EXPECT_TRUE(notifier_->OnAck(3001, zero_)); // updated
@@ -67,9 +67,7 @@
const QuicTime::Delta second_delta = QuicTime::Delta::FromSeconds(33);
const QuicTime::Delta third_delta = QuicTime::Delta::FromSeconds(10);
- EXPECT_CALL(*delegate_,
- OnAckNotification(3, 123, 0, 0, third_delta))
- .Times(1);
+ EXPECT_CALL(*delegate_, OnAckNotification(0, 0, third_delta)).Times(1);
EXPECT_FALSE(notifier_->OnAck(26, first_delta));
EXPECT_FALSE(notifier_->OnAck(99, second_delta));
EXPECT_TRUE(notifier_->OnAck(1234, third_delta));
diff --git a/net/quic/quic_config.cc b/net/quic/quic_config.cc
index e83b8b8..9d0a7c9b 100644
--- a/net/quic/quic_config.cc
+++ b/net/quic/quic_config.cc
@@ -428,7 +428,7 @@
: max_time_before_crypto_handshake_(QuicTime::Delta::Zero()),
max_idle_time_before_crypto_handshake_(QuicTime::Delta::Zero()),
max_undecryptable_packets_(0),
- congestion_feedback_(kCGST, PRESENCE_REQUIRED),
+ congestion_feedback_(kCGST, PRESENCE_OPTIONAL),
connection_options_(kCOPT, PRESENCE_OPTIONAL),
idle_connection_state_lifetime_seconds_(kICSL, PRESENCE_REQUIRED),
silent_close_(kSCLS, PRESENCE_OPTIONAL),
@@ -443,16 +443,6 @@
QuicConfig::~QuicConfig() {}
-void QuicConfig::SetCongestionFeedback(
- const QuicTagVector& congestion_feedback,
- QuicTag default_congestion_feedback) {
- congestion_feedback_.set(congestion_feedback, default_congestion_feedback);
-}
-
-QuicTag QuicConfig::CongestionFeedback() const {
- return congestion_feedback_.GetTag();
-}
-
void QuicConfig::SetConnectionOptionsToSend(
const QuicTagVector& connection_options) {
connection_options_.SetSendValues(connection_options);
@@ -611,6 +601,10 @@
void QuicConfig::SetDefaults() {
QuicTagVector congestion_feedback;
+ // TODO(alyssar) stop sending this once QUIC_VERSION_23 is sunset.
+ // This field was required until version 22 was removed but by the time
+ // QUIC_VERSION_23 is sunset, no users of QUIC_VERSION_24 should be expecting
+ // it.
congestion_feedback.push_back(kQBIC);
congestion_feedback_.set(congestion_feedback, kQBIC);
idle_connection_state_lifetime_seconds_.set(kMaximumIdleTimeoutSecs,
diff --git a/net/quic/quic_config.h b/net/quic/quic_config.h
index b8d7dd1..83e0618 100644
--- a/net/quic/quic_config.h
+++ b/net/quic/quic_config.h
@@ -256,11 +256,6 @@
QuicConfig();
~QuicConfig();
- void SetCongestionFeedback(const QuicTagVector& congestion_feedback,
- QuicTag default_congestion_feedback);
-
- QuicTag CongestionFeedback() const;
-
void SetConnectionOptionsToSend(const QuicTagVector& connection_options);
bool HasReceivedConnectionOptions() const;
diff --git a/net/quic/quic_config_test.cc b/net/quic/quic_config_test.cc
index 8e2b34b..de22010 100644
--- a/net/quic/quic_config_test.cc
+++ b/net/quic/quic_config_test.cc
@@ -10,6 +10,7 @@
#include "net/quic/quic_protocol.h"
#include "net/quic/quic_time.h"
#include "net/quic/quic_utils.h"
+#include "net/quic/test_tools/quic_config_peer.h"
#include "net/quic/test_tools/quic_test_utils.h"
#include "net/test/gtest_util.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -69,7 +70,6 @@
QuicConfig client_config;
QuicTagVector cgst;
cgst.push_back(kQBIC);
- client_config.SetCongestionFeedback(cgst, kQBIC);
client_config.SetIdleConnectionStateLifetime(
QuicTime::Delta::FromSeconds(2 * kMaximumIdleTimeoutSecs),
QuicTime::Delta::FromSeconds(kMaximumIdleTimeoutSecs));
@@ -93,7 +93,6 @@
config_.ProcessPeerHello(msg, CLIENT, &error_details);
EXPECT_EQ(QUIC_NO_ERROR, error);
EXPECT_TRUE(config_.negotiated());
- EXPECT_EQ(kQBIC, config_.CongestionFeedback());
EXPECT_EQ(QuicTime::Delta::FromSeconds(kMaximumIdleTimeoutSecs),
config_.IdleConnectionStateLifetime());
EXPECT_EQ(kDefaultMaxStreamsPerConnection,
@@ -115,7 +114,6 @@
QuicConfig server_config;
QuicTagVector cgst;
cgst.push_back(kQBIC);
- server_config.SetCongestionFeedback(cgst, kQBIC);
server_config.SetIdleConnectionStateLifetime(
QuicTime::Delta::FromSeconds(kMaximumIdleTimeoutSecs / 2),
QuicTime::Delta::FromSeconds(kMaximumIdleTimeoutSecs / 2));
@@ -135,7 +133,6 @@
config_.ProcessPeerHello(msg, SERVER, &error_details);
EXPECT_EQ(QUIC_NO_ERROR, error);
EXPECT_TRUE(config_.negotiated());
- EXPECT_EQ(kQBIC, config_.CongestionFeedback());
EXPECT_EQ(QuicTime::Delta::FromSeconds(kMaximumIdleTimeoutSecs / 2),
config_.IdleConnectionStateLifetime());
EXPECT_EQ(kDefaultMaxStreamsPerConnection / 2,
@@ -196,9 +193,8 @@
TEST_F(QuicConfigTest, MissingValueInSHLO) {
CryptoHandshakeMessage msg;
- msg.SetValue(kICSL, 1);
msg.SetValue(kMSPC, 3);
- // Missing CGST. KATO is optional.
+ // Missing ICSL. KATO is optional.
string error_details;
const QuicErrorCode error =
config_.ProcessPeerHello(msg, SERVER, &error_details);
@@ -219,36 +215,6 @@
EXPECT_EQ(QUIC_INVALID_NEGOTIATED_VALUE, error);
}
-TEST_F(QuicConfigTest, MultipleNegotiatedValuesInVectorTag) {
- QuicConfig server_config;
- QuicTagVector cgst;
- cgst.push_back(kQBIC);
- cgst.push_back(kTBBR);
- server_config.SetCongestionFeedback(cgst, kQBIC);
-
- CryptoHandshakeMessage msg;
- server_config.ToHandshakeMessage(&msg);
- string error_details;
- const QuicErrorCode error =
- config_.ProcessPeerHello(msg, SERVER, &error_details);
- EXPECT_EQ(QUIC_INVALID_NEGOTIATED_VALUE, error);
-}
-
-TEST_F(QuicConfigTest, NoOverLapInCGST) {
- QuicConfig server_config;
- QuicTagVector cgst;
- cgst.push_back(kTBBR);
- server_config.SetCongestionFeedback(cgst, kTBBR);
-
- CryptoHandshakeMessage msg;
- string error_details;
- server_config.ToHandshakeMessage(&msg);
- const QuicErrorCode error =
- config_.ProcessPeerHello(msg, CLIENT, &error_details);
- DVLOG(1) << QuicUtils::ErrorToString(error);
- EXPECT_EQ(QUIC_CRYPTO_MESSAGE_PARAMETER_NO_OVERLAP, error);
-}
-
TEST_F(QuicConfigTest, InvalidFlowControlWindow) {
// QuicConfig should not accept an invalid flow control window to send to the
// peer: the receive window must be at least the default of 16 Kb.
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index 6f97b51..454a15b 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -27,6 +27,7 @@
#include "net/quic/quic_config.h"
#include "net/quic/quic_fec_group.h"
#include "net/quic/quic_flags.h"
+#include "net/quic/quic_packet_generator.h"
#include "net/quic/quic_utils.h"
using base::StringPiece;
@@ -161,6 +162,23 @@
DISALLOW_COPY_AND_ASSIGN(PingAlarm);
};
+// This alarm may be scheduled when an FEC protected packet is sent out.
+class FecAlarm : public QuicAlarm::Delegate {
+ public:
+ explicit FecAlarm(QuicPacketGenerator* packet_generator)
+ : packet_generator_(packet_generator) {}
+
+ QuicTime OnAlarm() override {
+ packet_generator_->OnFecTimeout();
+ return QuicTime::Zero();
+ }
+
+ private:
+ QuicPacketGenerator* packet_generator_;
+
+ DISALLOW_COPY_AND_ASSIGN(FecAlarm);
+};
+
} // namespace
QuicConnection::QueuedPacket::QueuedPacket(SerializedPacket packet,
@@ -226,6 +244,7 @@
timeout_alarm_(helper->CreateAlarm(new TimeoutAlarm(this))),
ping_alarm_(helper->CreateAlarm(new PingAlarm(this))),
packet_generator_(connection_id_, &framer_, random_generator_, this),
+ fec_alarm_(helper->CreateAlarm(new FecAlarm(&packet_generator_))),
idle_network_timeout_(QuicTime::Delta::Infinite()),
overall_connection_timeout_(QuicTime::Delta::Infinite()),
time_of_last_received_packet_(clock_->ApproximateNow()),
@@ -325,10 +344,20 @@
SendConnectionCloseWithDetails(framer->error(), framer->detailed_error());
}
+void QuicConnection::MaybeSetFecAlarm(
+ QuicPacketSequenceNumber sequence_number) {
+ if (fec_alarm_->IsSet()) {
+ return;
+ }
+ QuicTime::Delta timeout = packet_generator_.GetFecTimeout(sequence_number);
+ if (!timeout.IsInfinite()) {
+ fec_alarm_->Set(clock_->ApproximateNow().Add(timeout));
+ }
+}
+
void QuicConnection::OnPacket() {
DCHECK(last_stream_frames_.empty() &&
last_ack_frames_.empty() &&
- last_congestion_frames_.empty() &&
last_stop_waiting_frames_.empty() &&
last_rst_frames_.empty() &&
last_goaway_frames_.empty() &&
@@ -627,16 +656,6 @@
CloseFecGroupsBefore(stop_waiting.least_unacked + 1);
}
-bool QuicConnection::OnCongestionFeedbackFrame(
- const QuicCongestionFeedbackFrame& feedback) {
- DCHECK(connected_);
- if (debug_visitor_.get() != nullptr) {
- debug_visitor_->OnCongestionFeedbackFrame(feedback);
- }
- last_congestion_frames_.push_back(feedback);
- return connected_;
-}
-
bool QuicConnection::OnStopWaitingFrame(const QuicStopWaitingFrame& frame) {
DCHECK(connected_);
@@ -828,7 +847,6 @@
<< " packet " << last_header_.packet_sequence_number
<< " with " << last_stream_frames_.size()<< " stream frames "
<< last_ack_frames_.size() << " acks, "
- << last_congestion_frames_.size() << " congestions, "
<< last_stop_waiting_frames_.size() << " stop_waiting, "
<< last_rst_frames_.size() << " rsts, "
<< last_goaway_frames_.size() << " goaways, "
@@ -881,10 +899,6 @@
for (size_t i = 0; i < last_ack_frames_.size(); ++i) {
ProcessAckFrame(last_ack_frames_[i]);
}
- for (size_t i = 0; i < last_congestion_frames_.size(); ++i) {
- sent_packet_manager_.OnIncomingQuicCongestionFeedbackFrame(
- last_congestion_frames_[i], time_of_last_received_packet_);
- }
for (size_t i = 0; i < last_stop_waiting_frames_.size(); ++i) {
ProcessStopWaitingFrame(last_stop_waiting_frames_[i]);
}
@@ -928,7 +942,6 @@
void QuicConnection::ClearLastFrames() {
last_stream_frames_.clear();
last_ack_frames_.clear();
- last_congestion_frames_.clear();
last_stop_waiting_frames_.clear();
last_rst_frames_.clear();
last_goaway_frames_.clear();
@@ -964,10 +977,6 @@
return outgoing_ack;
}
-QuicCongestionFeedbackFrame* QuicConnection::CreateFeedbackFrame() {
- return new QuicCongestionFeedbackFrame(outgoing_congestion_feedback_);
-}
-
QuicStopWaitingFrame* QuicConnection::CreateStopWaitingFrame() {
QuicStopWaitingFrame stop_waiting;
UpdateStopWaiting(&stop_waiting);
@@ -1069,9 +1078,7 @@
QuicAckNotifier::DelegateInterface* delegate) {
if (!fin && data.Empty()) {
LOG(DFATAL) << "Attempt to send empty stream frame";
- if (FLAGS_quic_empty_data_no_fin_early_return) {
- return QuicConsumedData(0, false);
- }
+ return QuicConsumedData(0, false);
}
// Opportunistically bundle an ack with every outgoing packet.
@@ -1499,6 +1506,7 @@
time_of_last_sent_new_packet_ = packet_send_time;
}
SetPingAlarm();
+ MaybeSetFecAlarm(sequence_number);
DVLOG(1) << ENDPOINT << "time "
<< (FLAGS_quic_record_send_time_before_write ?
"we began writing " : "we finished writing ")
@@ -1593,6 +1601,14 @@
if (serialized_packet.retransmittable_frames) {
serialized_packet.retransmittable_frames->
set_encryption_level(encryption_level_);
+
+ if (FLAGS_quic_ack_notifier_informed_on_serialized) {
+ sent_packet_manager_.OnSerializedPacket(serialized_packet);
+ }
+ }
+ if (serialized_packet.packet->is_fec_packet() && fec_alarm_->IsSet()) {
+ // If an FEC packet is serialized with the FEC alarm set, cancel the alarm.
+ fec_alarm_->Cancel();
}
SendOrQueuePacket(QueuedPacket(serialized_packet, encryption_level_));
}
@@ -1656,19 +1672,8 @@
ack_alarm_->Cancel();
stop_waiting_count_ = 0;
num_packets_received_since_last_ack_sent_ = 0;
- bool send_feedback = false;
- // Deprecating the Congestion Feedback Frame after QUIC_VERSION_22.
- if (version() <= QUIC_VERSION_22) {
- if (received_packet_manager_.GenerateCongestionFeedback(
- &outgoing_congestion_feedback_)) {
- DVLOG(1) << ENDPOINT << "Sending feedback: "
- << outgoing_congestion_feedback_;
- send_feedback = true;
- }
- }
-
- packet_generator_.SetShouldSendAck(send_feedback, true);
+ packet_generator_.SetShouldSendAck(true);
}
void QuicConnection::OnRetransmissionTimeout() {
@@ -1892,6 +1897,7 @@
// connection is closed.
ack_alarm_->Cancel();
ping_alarm_->Cancel();
+ fec_alarm_->Cancel();
resume_writes_alarm_->Cancel();
retransmission_alarm_->Cancel();
send_alarm_->Cancel();
diff --git a/net/quic/quic_connection.h b/net/quic/quic_connection.h
index 0ffc3e8..8afd79d 100644
--- a/net/quic/quic_connection.h
+++ b/net/quic/quic_connection.h
@@ -162,10 +162,6 @@
// Called when a AckFrame has been parsed.
virtual void OnAckFrame(const QuicAckFrame& frame) {}
- // Called when a CongestionFeedbackFrame has been parsed.
- virtual void OnCongestionFeedbackFrame(
- const QuicCongestionFeedbackFrame& frame) {}
-
// Called when a StopWaitingFrame has been parsed.
virtual void OnStopWaitingFrame(const QuicStopWaitingFrame& frame) {}
@@ -360,8 +356,6 @@
void OnFecProtectedPayload(base::StringPiece payload) override;
bool OnStreamFrame(const QuicStreamFrame& frame) override;
bool OnAckFrame(const QuicAckFrame& frame) override;
- bool OnCongestionFeedbackFrame(
- const QuicCongestionFeedbackFrame& frame) override;
bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override;
bool OnPingFrame(const QuicPingFrame& frame) override;
bool OnRstStreamFrame(const QuicRstStreamFrame& frame) override;
@@ -377,7 +371,6 @@
HasRetransmittableData retransmittable,
IsHandshake handshake) override;
QuicAckFrame* CreateAckFrame() override;
- QuicCongestionFeedbackFrame* CreateFeedbackFrame() override;
QuicStopWaitingFrame* CreateStopWaitingFrame() override;
void OnSerializedPacket(const SerializedPacket& packet) override;
@@ -451,6 +444,10 @@
// remaining unacked packets.
void OnRetransmissionTimeout();
+ // Called when a data packet is sent. Starts an alarm if the data sent in
+ // |sequence_number| was FEC protected.
+ void MaybeSetFecAlarm(QuicPacketSequenceNumber sequence_number);
+
// Retransmits all unacked packets with retransmittable frames if
// |retransmission_type| is ALL_UNACKED_PACKETS, otherwise retransmits only
// initially encrypted packets. Used when the negotiated protocol version is
@@ -707,7 +704,6 @@
QuicPacketHeader last_header_;
std::vector<QuicStreamFrame> last_stream_frames_;
std::vector<QuicAckFrame> last_ack_frames_;
- std::vector<QuicCongestionFeedbackFrame> last_congestion_frames_;
std::vector<QuicStopWaitingFrame> last_stop_waiting_frames_;
std::vector<QuicRstStreamFrame> last_rst_frames_;
std::vector<QuicGoAwayFrame> last_goaway_frames_;
@@ -716,8 +712,6 @@
std::vector<QuicPingFrame> last_ping_frames_;
std::vector<QuicConnectionCloseFrame> last_close_frames_;
- QuicCongestionFeedbackFrame outgoing_congestion_feedback_;
-
// Track some peer state so we can do less bookkeeping
// Largest sequence sent by the peer which had an ack frame (latest ack info).
QuicPacketSequenceNumber largest_seen_packet_with_ack_;
@@ -781,6 +775,9 @@
scoped_ptr<QuicConnectionDebugVisitor> debug_visitor_;
QuicPacketGenerator packet_generator_;
+ // An alarm that fires when an FEC packet should be sent.
+ scoped_ptr<QuicAlarm> fec_alarm_;
+
// Network idle time before we kill of this connection.
QuicTime::Delta idle_network_timeout_;
// Overall connection timeout.
diff --git a/net/quic/quic_connection_logger.cc b/net/quic/quic_connection_logger.cc
index 4a12521..8b4e8b9 100644
--- a/net/quic/quic_connection_logger.cc
+++ b/net/quic/quic_connection_logger.cc
@@ -143,21 +143,6 @@
return dict;
}
-base::Value* NetLogQuicCongestionFeedbackFrameCallback(
- const QuicCongestionFeedbackFrame* frame,
- NetLog::LogLevel /* log_level */) {
- base::DictionaryValue* dict = new base::DictionaryValue();
- switch (frame->type) {
- case kTCP:
- dict->SetString("type", "TCP");
- dict->SetInteger("receive_window",
- static_cast<int>(frame->tcp.receive_window));
- break;
- }
-
- return dict;
-}
-
base::Value* NetLogQuicRstStreamFrameCallback(
const QuicRstStreamFrame* frame,
NetLog::LogLevel /* log_level */) {
@@ -428,12 +413,6 @@
}
break;
}
- case CONGESTION_FEEDBACK_FRAME:
- net_log_.AddEvent(
- NetLog::TYPE_QUIC_SESSION_CONGESTION_FEEDBACK_FRAME_SENT,
- base::Bind(&NetLogQuicCongestionFeedbackFrameCallback,
- frame.congestion_feedback_frame));
- break;
case RST_STREAM_FRAME:
UMA_HISTOGRAM_SPARSE_SLOWLY("Net.QuicSession.RstStreamErrorCodeClient",
frame.rst_stream_frame->error_code);
@@ -633,13 +612,6 @@
*missing_packets.rbegin();
}
-void QuicConnectionLogger::OnCongestionFeedbackFrame(
- const QuicCongestionFeedbackFrame& frame) {
- net_log_.AddEvent(
- NetLog::TYPE_QUIC_SESSION_CONGESTION_FEEDBACK_FRAME_RECEIVED,
- base::Bind(&NetLogQuicCongestionFeedbackFrameCallback, &frame));
-}
-
void QuicConnectionLogger::OnStopWaitingFrame(
const QuicStopWaitingFrame& frame) {
net_log_.AddEvent(
diff --git a/net/quic/quic_connection_logger.h b/net/quic/quic_connection_logger.h
index fdd813a..09e3c46 100644
--- a/net/quic/quic_connection_logger.h
+++ b/net/quic/quic_connection_logger.h
@@ -51,8 +51,6 @@
void OnPacketHeader(const QuicPacketHeader& header) override;
void OnStreamFrame(const QuicStreamFrame& frame) override;
void OnAckFrame(const QuicAckFrame& frame) override;
- void OnCongestionFeedbackFrame(
- const QuicCongestionFeedbackFrame& frame) override;
void OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override;
void OnRstStreamFrame(const QuicRstStreamFrame& frame) override;
void OnConnectionCloseFrame(const QuicConnectionCloseFrame& frame) override;
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
index dbb2921..7622f04 100644
--- a/net/quic/quic_connection_test.cc
+++ b/net/quic/quic_connection_test.cc
@@ -24,6 +24,7 @@
#include "net/quic/test_tools/quic_connection_peer.h"
#include "net/quic/test_tools/quic_framer_peer.h"
#include "net/quic/test_tools/quic_packet_creator_peer.h"
+#include "net/quic/test_tools/quic_packet_generator_peer.h"
#include "net/quic/test_tools/quic_sent_packet_manager_peer.h"
#include "net/quic/test_tools/quic_test_utils.h"
#include "net/quic/test_tools/simple_quic_framer.h"
@@ -65,25 +66,12 @@
class TestReceiveAlgorithm : public ReceiveAlgorithmInterface {
public:
- explicit TestReceiveAlgorithm(QuicCongestionFeedbackFrame* feedback)
- : feedback_(feedback) {
- }
-
- bool GenerateCongestionFeedback(
- QuicCongestionFeedbackFrame* congestion_feedback) override {
- if (feedback_ == nullptr) {
- return false;
- }
- *congestion_feedback = *feedback_;
- return true;
- }
+ TestReceiveAlgorithm() {}
MOCK_METHOD3(RecordIncomingPacket,
void(QuicByteCount, QuicPacketSequenceNumber, QuicTime));
private:
- QuicCongestionFeedbackFrame* feedback_;
-
DISALLOW_COPY_AND_ASSIGN(TestReceiveAlgorithm);
};
@@ -334,10 +322,6 @@
return framer_.ack_frames();
}
- const vector<QuicCongestionFeedbackFrame>& feedback_frames() const {
- return framer_.feedback_frames();
- }
-
const vector<QuicStopWaitingFrame>& stop_waiting_frames() const {
return framer_.stop_waiting_frames();
}
@@ -564,6 +548,11 @@
QuicConnectionPeer::GetPingAlarm(this));
}
+ TestConnectionHelper::TestAlarm* GetFecAlarm() {
+ return reinterpret_cast<TestConnectionHelper::TestAlarm*>(
+ QuicConnectionPeer::GetFecAlarm(this));
+ }
+
TestConnectionHelper::TestAlarm* GetResumeWritesAlarm() {
return reinterpret_cast<TestConnectionHelper::TestAlarm*>(
QuicConnectionPeer::GetResumeWritesAlarm(this));
@@ -630,11 +619,19 @@
peer_creator_(connection_id_, &framer_, &random_generator_),
send_algorithm_(new StrictMock<MockSendAlgorithm>),
loss_algorithm_(new MockLossAlgorithm()),
+ receive_algorithm_(new TestReceiveAlgorithm),
helper_(new TestConnectionHelper(&clock_, &random_generator_)),
writer_(new TestPacketWriter(version(), &clock_)),
factory_(writer_.get()),
- connection_(connection_id_, IPEndPoint(), helper_.get(),
- factory_, false, version()),
+ connection_(connection_id_,
+ IPEndPoint(),
+ helper_.get(),
+ factory_,
+ false,
+ version()),
+ creator_(QuicConnectionPeer::GetPacketCreator(&connection_)),
+ generator_(QuicConnectionPeer::GetPacketGenerator(&connection_)),
+ manager_(QuicConnectionPeer::GetSentPacketManager(&connection_)),
frame1_(1, false, 0, MakeIOVector(data1)),
frame2_(1, false, 3, MakeIOVector(data2)),
sequence_number_length_(PACKET_6BYTE_SEQUENCE_NUMBER),
@@ -643,8 +640,7 @@
connection_.SetSendAlgorithm(send_algorithm_);
connection_.SetLossAlgorithm(loss_algorithm_);
framer_.set_received_entropy_calculator(&entropy_calculator_);
- // Simplify tests by not sending feedback unless specifically configured.
- SetFeedback(nullptr);
+ connection_.SetReceiveAlgorithm(receive_algorithm_);
EXPECT_CALL(
*send_algorithm_, TimeUntilSend(_, _, _)).WillRepeatedly(Return(
QuicTime::Delta::Zero()));
@@ -834,8 +830,7 @@
.WillOnce(DoAll(SaveArg<3>(&packet_size), Return(true)));
connection_.SendStreamDataWithString(id, data, offset, fin, nullptr);
if (last_packet != nullptr) {
- *last_packet =
- QuicConnectionPeer::GetPacketCreator(&connection_)->sequence_number();
+ *last_packet = creator_->sequence_number();
}
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _))
.Times(AnyNumber());
@@ -932,11 +927,6 @@
return packet;
}
- void SetFeedback(QuicCongestionFeedbackFrame* feedback) {
- receive_algorithm_ = new TestReceiveAlgorithm(feedback);
- connection_.SetReceiveAlgorithm(receive_algorithm_);
- }
-
QuicTime::Delta DefaultRetransmissionTime() {
return QuicTime::Delta::FromMilliseconds(kDefaultRetransmissionTimeMs);
}
@@ -1024,6 +1014,9 @@
scoped_ptr<TestPacketWriter> writer_;
NiceMock<MockPacketWriterFactory> factory_;
TestConnection connection_;
+ QuicPacketCreator* creator_;
+ QuicPacketGenerator* generator_;
+ QuicSentPacketManager* manager_;
StrictMock<MockConnectionVisitor> visitor_;
QuicPacketHeader header_;
@@ -1174,10 +1167,8 @@
EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _));
ProcessAckPacket(&frame);
- const QuicSentPacketManager& sent_packet_manager =
- connection_.sent_packet_manager();
// A truncated ack will not have the true largest observed.
- EXPECT_GT(num_packets, sent_packet_manager.largest_observed());
+ EXPECT_GT(num_packets, manager_->largest_observed());
AckPacket(192, &frame);
@@ -1187,7 +1178,7 @@
.WillOnce(Return(SequenceNumberSet()));
EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _));
ProcessAckPacket(&frame);
- EXPECT_EQ(num_packets, sent_packet_manager.largest_observed());
+ EXPECT_EQ(num_packets, manager_->largest_observed());
}
TEST_P(QuicConnectionTest, AckReceiptCausesAckSendBadEntropy) {
@@ -1415,12 +1406,10 @@
TEST_P(QuicConnectionTest, SendingDifferentSequenceNumberLengthsBandwidth) {
QuicPacketSequenceNumber last_packet;
- QuicPacketCreator* creator =
- QuicConnectionPeer::GetPacketCreator(&connection_);
SendStreamDataToPeer(1, "foo", 0, !kFin, &last_packet);
EXPECT_EQ(1u, last_packet);
EXPECT_EQ(PACKET_1BYTE_SEQUENCE_NUMBER,
- creator->next_sequence_number_length());
+ creator_->next_sequence_number_length());
EXPECT_EQ(PACKET_1BYTE_SEQUENCE_NUMBER,
writer_->header().public_header.sequence_number_length);
@@ -1430,7 +1419,7 @@
SendStreamDataToPeer(1, "bar", 3, !kFin, &last_packet);
EXPECT_EQ(2u, last_packet);
EXPECT_EQ(PACKET_2BYTE_SEQUENCE_NUMBER,
- creator->next_sequence_number_length());
+ creator_->next_sequence_number_length());
// The 1 packet lag is due to the sequence number length being recalculated in
// QuicConnection after a packet is sent.
EXPECT_EQ(PACKET_1BYTE_SEQUENCE_NUMBER,
@@ -1442,7 +1431,7 @@
SendStreamDataToPeer(1, "foo", 6, !kFin, &last_packet);
EXPECT_EQ(3u, last_packet);
EXPECT_EQ(PACKET_4BYTE_SEQUENCE_NUMBER,
- creator->next_sequence_number_length());
+ creator_->next_sequence_number_length());
EXPECT_EQ(PACKET_2BYTE_SEQUENCE_NUMBER,
writer_->header().public_header.sequence_number_length);
@@ -1452,7 +1441,7 @@
SendStreamDataToPeer(1, "bar", 9, !kFin, &last_packet);
EXPECT_EQ(4u, last_packet);
EXPECT_EQ(PACKET_4BYTE_SEQUENCE_NUMBER,
- creator->next_sequence_number_length());
+ creator_->next_sequence_number_length());
EXPECT_EQ(PACKET_4BYTE_SEQUENCE_NUMBER,
writer_->header().public_header.sequence_number_length);
@@ -1462,7 +1451,7 @@
SendStreamDataToPeer(1, "foo", 12, !kFin, &last_packet);
EXPECT_EQ(5u, last_packet);
EXPECT_EQ(PACKET_6BYTE_SEQUENCE_NUMBER,
- creator->next_sequence_number_length());
+ creator_->next_sequence_number_length());
EXPECT_EQ(PACKET_4BYTE_SEQUENCE_NUMBER,
writer_->header().public_header.sequence_number_length);
}
@@ -1472,44 +1461,42 @@
TEST_P(QuicConnectionTest,
DISABLED_SendingDifferentSequenceNumberLengthsUnackedDelta) {
QuicPacketSequenceNumber last_packet;
- QuicPacketCreator* creator =
- QuicConnectionPeer::GetPacketCreator(&connection_);
SendStreamDataToPeer(1, "foo", 0, !kFin, &last_packet);
EXPECT_EQ(1u, last_packet);
EXPECT_EQ(PACKET_1BYTE_SEQUENCE_NUMBER,
- creator->next_sequence_number_length());
+ creator_->next_sequence_number_length());
EXPECT_EQ(PACKET_1BYTE_SEQUENCE_NUMBER,
writer_->header().public_header.sequence_number_length);
- creator->set_sequence_number(100);
+ creator_->set_sequence_number(100);
SendStreamDataToPeer(1, "bar", 3, !kFin, &last_packet);
EXPECT_EQ(PACKET_2BYTE_SEQUENCE_NUMBER,
- creator->next_sequence_number_length());
+ creator_->next_sequence_number_length());
EXPECT_EQ(PACKET_1BYTE_SEQUENCE_NUMBER,
writer_->header().public_header.sequence_number_length);
- creator->set_sequence_number(100 * 256);
+ creator_->set_sequence_number(100 * 256);
SendStreamDataToPeer(1, "foo", 6, !kFin, &last_packet);
EXPECT_EQ(PACKET_4BYTE_SEQUENCE_NUMBER,
- creator->next_sequence_number_length());
+ creator_->next_sequence_number_length());
EXPECT_EQ(PACKET_2BYTE_SEQUENCE_NUMBER,
writer_->header().public_header.sequence_number_length);
- creator->set_sequence_number(100 * 256 * 256);
+ creator_->set_sequence_number(100 * 256 * 256);
SendStreamDataToPeer(1, "bar", 9, !kFin, &last_packet);
EXPECT_EQ(PACKET_4BYTE_SEQUENCE_NUMBER,
- creator->next_sequence_number_length());
+ creator_->next_sequence_number_length());
EXPECT_EQ(PACKET_4BYTE_SEQUENCE_NUMBER,
writer_->header().public_header.sequence_number_length);
- creator->set_sequence_number(100 * 256 * 256 * 256);
+ creator_->set_sequence_number(100 * 256 * 256 * 256);
SendStreamDataToPeer(1, "foo", 12, !kFin, &last_packet);
EXPECT_EQ(PACKET_6BYTE_SEQUENCE_NUMBER,
- creator->next_sequence_number_length());
+ creator_->next_sequence_number_length());
EXPECT_EQ(PACKET_4BYTE_SEQUENCE_NUMBER,
writer_->header().public_header.sequence_number_length);
}
@@ -1635,8 +1622,6 @@
TEST_P(QuicConnectionTest, FECSending) {
// All packets carry version info till version is negotiated.
- QuicPacketCreator* creator =
- QuicConnectionPeer::GetPacketCreator(&connection_);
size_t payload_length;
// GetPacketLengthForOneStream() assumes a stream offset of 0 in determining
// packet length. The size of the offset field in a stream frame is 0 for
@@ -1647,7 +1632,7 @@
connection_.version(), kIncludeVersion,
PACKET_8BYTE_CONNECTION_ID, PACKET_1BYTE_SEQUENCE_NUMBER,
IN_FEC_GROUP, &payload_length);
- creator->set_max_packet_length(length);
+ creator_->set_max_packet_length(length);
// Send 4 protected data packets, which should also trigger 1 FEC packet.
EXPECT_CALL(*send_algorithm_,
@@ -1656,96 +1641,171 @@
const string payload(payload_length * 4 + 2, 'a');
connection_.SendStreamDataWithStringWithFec(1, payload, 0, !kFin, nullptr);
// Expect the FEC group to be closed after SendStreamDataWithString.
- EXPECT_FALSE(creator->IsFecGroupOpen());
- EXPECT_FALSE(creator->IsFecProtected());
+ EXPECT_FALSE(creator_->IsFecGroupOpen());
+ EXPECT_FALSE(creator_->IsFecProtected());
}
TEST_P(QuicConnectionTest, FECQueueing) {
// All packets carry version info till version is negotiated.
size_t payload_length;
- QuicPacketCreator* creator =
- QuicConnectionPeer::GetPacketCreator(&connection_);
size_t length = GetPacketLengthForOneStream(
connection_.version(), kIncludeVersion,
PACKET_8BYTE_CONNECTION_ID, PACKET_1BYTE_SEQUENCE_NUMBER,
IN_FEC_GROUP, &payload_length);
- creator->set_max_packet_length(length);
- EXPECT_TRUE(creator->IsFecEnabled());
+ creator_->set_max_packet_length(length);
+ EXPECT_TRUE(creator_->IsFecEnabled());
EXPECT_EQ(0u, connection_.NumQueuedPackets());
BlockOnNextWrite();
const string payload(payload_length, 'a');
connection_.SendStreamDataWithStringWithFec(1, payload, 0, !kFin, nullptr);
- EXPECT_FALSE(creator->IsFecGroupOpen());
- EXPECT_FALSE(creator->IsFecProtected());
+ EXPECT_FALSE(creator_->IsFecGroupOpen());
+ EXPECT_FALSE(creator_->IsFecProtected());
// Expect the first data packet and the fec packet to be queued.
EXPECT_EQ(2u, connection_.NumQueuedPackets());
}
-TEST_P(QuicConnectionTest, RemoveFECFromInflightOnRetransmissionTimeout) {
- EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
- EXPECT_TRUE(QuicConnectionPeer::GetPacketCreator(
- &connection_)->IsFecEnabled());
- QuicSentPacketManager* manager =
- QuicConnectionPeer::GetSentPacketManager(&connection_);
- EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(manager));
+TEST_P(QuicConnectionTest, FECAlarmStoppedWhenFECPacketSent) {
+ EXPECT_TRUE(creator_->IsFecEnabled());
+ EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
+ EXPECT_FALSE(connection_.GetFecAlarm()->IsSet());
- // 1 Data and 1 FEC packet.
+ creator_->set_max_packets_per_fec_group(2);
+
+ // 1 Data packet. FEC alarm should be set.
+ EXPECT_CALL(*send_algorithm_,
+ OnPacketSent(_, _, 1u, _, HAS_RETRANSMITTABLE_DATA)).Times(1);
+ connection_.SendStreamDataWithStringWithFec(3, "foo", 0, true, nullptr);
+ EXPECT_TRUE(connection_.GetFecAlarm()->IsSet());
+
+ // Second data packet triggers FEC packet out. FEC alarm should not be set.
EXPECT_CALL(*send_algorithm_,
OnPacketSent(_, _, _, _, HAS_RETRANSMITTABLE_DATA)).Times(2);
- connection_.SendStreamDataWithStringWithFec(3, "foo", 0, !kFin, nullptr);
- size_t data_and_fec = QuicSentPacketManagerPeer::GetBytesInFlight(manager);
- EXPECT_LT(0u, data_and_fec);
+ connection_.SendStreamDataWithStringWithFec(5, "foo", 0, true, nullptr);
+ EXPECT_TRUE(writer_->header().fec_flag);
+ EXPECT_FALSE(connection_.GetFecAlarm()->IsSet());
+}
+TEST_P(QuicConnectionTest, FECAlarmStoppedOnConnectionClose) {
+ EXPECT_TRUE(creator_->IsFecEnabled());
+ EXPECT_FALSE(connection_.GetFecAlarm()->IsSet());
+ creator_->set_max_packets_per_fec_group(100);
+
+ // 1 Data packet. FEC alarm should be set.
+ EXPECT_CALL(*send_algorithm_,
+ OnPacketSent(_, _, 1u, _, HAS_RETRANSMITTABLE_DATA)).Times(1);
+ connection_.SendStreamDataWithStringWithFec(3, "foo", 0, kFin, nullptr);
+ EXPECT_TRUE(connection_.GetFecAlarm()->IsSet());
+
+ EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_NO_ERROR, false));
+ // Closing connection should stop the FEC alarm.
+ connection_.CloseConnection(QUIC_NO_ERROR, /*from_peer=*/false);
+ EXPECT_FALSE(connection_.GetFecAlarm()->IsSet());
+}
+
+TEST_P(QuicConnectionTest, RemoveFECFromInflightOnRetransmissionTimeout) {
+ EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
+ EXPECT_TRUE(creator_->IsFecEnabled());
+ EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
+ EXPECT_FALSE(connection_.GetFecAlarm()->IsSet());
+
+ // 1 Data packet. FEC alarm should be set.
+ EXPECT_CALL(*send_algorithm_,
+ OnPacketSent(_, _, 1u, _, HAS_RETRANSMITTABLE_DATA)).Times(1);
+ connection_.SendStreamDataWithStringWithFec(3, "foo", 0, !kFin, nullptr);
+ EXPECT_TRUE(connection_.GetFecAlarm()->IsSet());
+ size_t protected_packet =
+ QuicSentPacketManagerPeer::GetBytesInFlight(manager_);
+
+ // Force FEC timeout to send FEC packet out.
+ EXPECT_CALL(*send_algorithm_,
+ OnPacketSent(_, _, 2u, _, HAS_RETRANSMITTABLE_DATA)).Times(1);
+ connection_.GetFecAlarm()->Fire();
+ EXPECT_TRUE(writer_->header().fec_flag);
+
+ size_t fec_packet = protected_packet;
+ EXPECT_EQ(protected_packet + fec_packet,
+ QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
clock_.AdvanceTime(DefaultRetransmissionTime());
- // On RTO, both data and FEC packets are removed from inflight,
- // and retransmission of the data (but not FEC) gets added into the inflight.
+ // On RTO, both data and FEC packets are removed from inflight, only the data
+ // packet is retransmitted, and this retransmission (but not FEC) gets added
+ // back into the inflight.
EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1);
connection_.GetRetransmissionAlarm()->Fire();
- size_t data_only = QuicSentPacketManagerPeer::GetBytesInFlight(manager);
- EXPECT_LT(0u, data_only);
- EXPECT_GE(data_and_fec, 2 * data_only);
+ // The retransmission of packet 1 will be 3 bytes smaller than packet 1, since
+ // the first transmission will have 1 byte for FEC group number and 2 bytes of
+ // stream frame size, which are absent in the retransmission.
+ size_t retransmitted_packet = protected_packet - 3;
+ if (FLAGS_quic_use_new_rto) {
+ EXPECT_EQ(protected_packet + retransmitted_packet,
+ QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
+ } else {
+ EXPECT_EQ(retransmitted_packet,
+ QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
+ }
+ EXPECT_FALSE(connection_.GetFecAlarm()->IsSet());
// Receive ack for the retransmission. No data should be outstanding.
QuicAckFrame ack = InitAckFrame(3);
NackPacket(1, &ack);
NackPacket(2, &ack);
SequenceNumberSet lost_packets;
+ if (FLAGS_quic_use_new_rto) {
+ lost_packets.insert(1);
+ }
EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
.WillOnce(Return(lost_packets));
EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _));
ProcessAckPacket(&ack);
- EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(manager));
// Ensure the alarm is not set since all packets have been acked or abandoned.
EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet());
- EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(manager));
+ EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
}
TEST_P(QuicConnectionTest, RemoveFECFromInflightOnLossRetransmission) {
- EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
- EXPECT_TRUE(QuicConnectionPeer::GetPacketCreator(
- &connection_)->IsFecEnabled());
- QuicSentPacketManager* manager =
- QuicConnectionPeer::GetSentPacketManager(&connection_);
+ EXPECT_TRUE(creator_->IsFecEnabled());
+ EXPECT_FALSE(connection_.GetFecAlarm()->IsSet());
- // 1 Data packet and 1 FEC packet, followed by more data to trigger NACKs.
+ // 1 FEC-protected data packet. FEC alarm should be set.
EXPECT_CALL(*send_algorithm_,
- OnPacketSent(_, _, _, _, HAS_RETRANSMITTABLE_DATA)).Times(6);
- connection_.SendStreamDataWithStringWithFec(3, "foo", 0, !kFin, nullptr);
- connection_.SendStreamDataWithString(3, "foo", 3, !kFin, nullptr);
- connection_.SendStreamDataWithString(3, "foo", 6, !kFin, nullptr);
- connection_.SendStreamDataWithString(3, "foo", 9, !kFin, nullptr);
- connection_.SendStreamDataWithString(3, "foo", 12, !kFin, nullptr);
- size_t multiple_data_and_fec =
- QuicSentPacketManagerPeer::GetBytesInFlight(manager);
- EXPECT_LT(0u, multiple_data_and_fec);
+ OnPacketSent(_, _, _, _, HAS_RETRANSMITTABLE_DATA)).Times(1);
+ connection_.SendStreamDataWithStringWithFec(3, "foo", 0, kFin, nullptr);
+ EXPECT_TRUE(connection_.GetFecAlarm()->IsSet());
+ size_t protected_packet =
+ QuicSentPacketManagerPeer::GetBytesInFlight(manager_);
- // Ack data packets, and NACK 1 data packet and FEC packet. Triggers
- // NACK-based loss detection of data and FEC packet, but only data is
+ // Force FEC timeout to send FEC packet out.
+ EXPECT_CALL(*send_algorithm_,
+ OnPacketSent(_, _, _, _, HAS_RETRANSMITTABLE_DATA)).Times(1);
+ connection_.GetFecAlarm()->Fire();
+ EXPECT_TRUE(writer_->header().fec_flag);
+ size_t fec_packet = protected_packet;
+ EXPECT_EQ(protected_packet + fec_packet,
+ QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
+
+ // Send more data to trigger NACKs. Note that all data starts at stream offset
+ // 0 to ensure the same packet size, for ease of testing.
+ EXPECT_CALL(*send_algorithm_,
+ OnPacketSent(_, _, _, _, HAS_RETRANSMITTABLE_DATA)).Times(4);
+ connection_.SendStreamDataWithString(5, "foo", 0, kFin, nullptr);
+ connection_.SendStreamDataWithString(7, "foo", 0, kFin, nullptr);
+ connection_.SendStreamDataWithString(9, "foo", 0, kFin, nullptr);
+ connection_.SendStreamDataWithString(11, "foo", 0, kFin, nullptr);
+
+ // An unprotected packet will be 3 bytes smaller than an FEC-protected packet,
+ // since the protected packet will have 1 byte for FEC group number and
+ // 2 bytes of stream frame size, which are absent in the unprotected packet.
+ size_t unprotected_packet = protected_packet - 3;
+ EXPECT_EQ(protected_packet + fec_packet + 4 * unprotected_packet,
+ QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
+ EXPECT_FALSE(connection_.GetFecAlarm()->IsSet());
+
+ // Ack data packets, and NACK FEC packet and one data packet. Triggers
+ // NACK-based loss detection of both packets, but only data packet is
// retransmitted and considered oustanding.
QuicAckFrame ack = InitAckFrame(6);
NackPacket(2, &ack);
@@ -1758,10 +1818,13 @@
EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _));
EXPECT_CALL(*send_algorithm_,
OnPacketSent(_, _, _, _, HAS_RETRANSMITTABLE_DATA)).Times(1);
+ EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
ProcessAckPacket(&ack);
- size_t data_only = QuicSentPacketManagerPeer::GetBytesInFlight(manager);
- EXPECT_GT(multiple_data_and_fec, data_only);
- EXPECT_LT(0u, data_only);
+ // On receiving this ack from the server, the client will no longer send
+ // version number in subsequent packets, including in this retransmission.
+ size_t unprotected_packet_no_version = unprotected_packet - 4;
+ EXPECT_EQ(unprotected_packet_no_version,
+ QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
// Receive ack for the retransmission. No data should be outstanding.
QuicAckFrame ack2 = InitAckFrame(7);
@@ -1772,43 +1835,163 @@
.WillOnce(Return(lost_packets2));
EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _));
ProcessAckPacket(&ack2);
- EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(manager));
+ EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
+}
+
+TEST_P(QuicConnectionTest, FECRemainsInflightOnTLPOfEarlierData) {
+ // This test checks if TLP is sent correctly when a data and an FEC packet
+ // are outstanding. TLP should be sent for the data packet when the
+ // retransmission alarm fires.
+ // Turn on TLP for this test.
+ QuicSentPacketManagerPeer::SetMaxTailLossProbes(manager_, 1);
+ EXPECT_TRUE(creator_->IsFecEnabled());
+ EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
+ EXPECT_FALSE(connection_.GetFecAlarm()->IsSet());
+
+ // 1 Data packet. FEC alarm should be set.
+ EXPECT_CALL(*send_algorithm_,
+ OnPacketSent(_, _, 1u, _, HAS_RETRANSMITTABLE_DATA)).Times(1);
+ connection_.SendStreamDataWithStringWithFec(3, "foo", 0, kFin, nullptr);
+ EXPECT_TRUE(connection_.GetFecAlarm()->IsSet());
+ size_t protected_packet =
+ QuicSentPacketManagerPeer::GetBytesInFlight(manager_);
+ EXPECT_LT(0u, protected_packet);
+
+ // Force FEC timeout to send FEC packet out.
+ EXPECT_CALL(*send_algorithm_,
+ OnPacketSent(_, _, 2u, _, HAS_RETRANSMITTABLE_DATA)).Times(1);
+ connection_.GetFecAlarm()->Fire();
+ EXPECT_TRUE(writer_->header().fec_flag);
+ size_t fec_packet = protected_packet;
+ EXPECT_EQ(protected_packet + fec_packet,
+ QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
+
+ // TLP alarm should be set.
+ QuicTime retransmission_time =
+ connection_.GetRetransmissionAlarm()->deadline();
+ EXPECT_NE(QuicTime::Zero(), retransmission_time);
+ // Simulate the retransmission alarm firing and sending a TLP, so send
+ // algorithm's OnRetransmissionTimeout is not called.
+ clock_.AdvanceTime(retransmission_time.Subtract(clock_.Now()));
+ EXPECT_CALL(*send_algorithm_,
+ OnPacketSent(_, _, 3u, _, HAS_RETRANSMITTABLE_DATA)).Times(1);
+ connection_.GetRetransmissionAlarm()->Fire();
+ // The TLP retransmission of packet 1 will be 3 bytes smaller than packet 1,
+ // since packet 1 will have 1 byte for FEC group number and 2 bytes of stream
+ // frame size, which are absent in the the TLP retransmission.
+ size_t tlp_packet = protected_packet - 3;
+ EXPECT_EQ(protected_packet + fec_packet + tlp_packet,
+ QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
+}
+
+TEST_P(QuicConnectionTest, FECRemainsInflightOnTLPOfLaterData) {
+ // Tests if TLP is sent correctly when data packet 1 and an FEC packet are
+ // sent followed by data packet 2, and data packet 1 is acked. TLP should be
+ // sent for data packet 2 when the retransmission alarm fires. Turn on TLP for
+ // this test.
+ QuicSentPacketManagerPeer::SetMaxTailLossProbes(manager_, 1);
+ EXPECT_TRUE(creator_->IsFecEnabled());
+ EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
+ EXPECT_FALSE(connection_.GetFecAlarm()->IsSet());
+
+ // 1 Data packet. FEC alarm should be set.
+ EXPECT_CALL(*send_algorithm_,
+ OnPacketSent(_, _, 1u, _, HAS_RETRANSMITTABLE_DATA)).Times(1);
+ connection_.SendStreamDataWithStringWithFec(3, "foo", 0, kFin, nullptr);
+ EXPECT_TRUE(connection_.GetFecAlarm()->IsSet());
+ size_t protected_packet =
+ QuicSentPacketManagerPeer::GetBytesInFlight(manager_);
+ EXPECT_LT(0u, protected_packet);
+
+ // Force FEC timeout to send FEC packet out.
+ EXPECT_CALL(*send_algorithm_,
+ OnPacketSent(_, _, 2u, _, HAS_RETRANSMITTABLE_DATA)).Times(1);
+ connection_.GetFecAlarm()->Fire();
+ EXPECT_TRUE(writer_->header().fec_flag);
+ // Protected data packet and FEC packet oustanding.
+ size_t fec_packet = protected_packet;
+ EXPECT_EQ(protected_packet + fec_packet,
+ QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
+
+ // Send 1 unprotected data packet. No FEC alarm should be set.
+ EXPECT_CALL(*send_algorithm_,
+ OnPacketSent(_, _, 3u, _, HAS_RETRANSMITTABLE_DATA)).Times(1);
+ connection_.SendStreamDataWithString(5, "foo", 0, kFin, nullptr);
+ EXPECT_FALSE(connection_.GetFecAlarm()->IsSet());
+ // Protected data packet, FEC packet, and unprotected data packet oustanding.
+ // An unprotected packet will be 3 bytes smaller than an FEC-protected packet,
+ // since the protected packet will have 1 byte for FEC group number and
+ // 2 bytes of stream frame size, which are absent in the unprotected packet.
+ size_t unprotected_packet = protected_packet - 3;
+ EXPECT_EQ(protected_packet + fec_packet + unprotected_packet,
+ QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
+
+ // Receive ack for first data packet. FEC and second data packet are still
+ // outstanding.
+ QuicAckFrame ack = InitAckFrame(1);
+ EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _));
+ EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
+ ProcessAckPacket(&ack);
+ // FEC packet and unprotected data packet oustanding.
+ EXPECT_EQ(fec_packet + unprotected_packet,
+ QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
+
+ // TLP alarm should be set.
+ QuicTime retransmission_time =
+ connection_.GetRetransmissionAlarm()->deadline();
+ EXPECT_NE(QuicTime::Zero(), retransmission_time);
+ // Simulate the retransmission alarm firing and sending a TLP, so send
+ // algorithm's OnRetransmissionTimeout is not called.
+ clock_.AdvanceTime(retransmission_time.Subtract(clock_.Now()));
+ EXPECT_CALL(*send_algorithm_,
+ OnPacketSent(_, _, 4u, _, HAS_RETRANSMITTABLE_DATA)).Times(1);
+ connection_.GetRetransmissionAlarm()->Fire();
+
+ // Having received an ack from the server, the client will no longer send
+ // version number in subsequent packets, including in this retransmission.
+ size_t tlp_packet_no_version = unprotected_packet - 4;
+ EXPECT_EQ(fec_packet + unprotected_packet + tlp_packet_no_version,
+ QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
}
TEST_P(QuicConnectionTest, NoTLPForFECPacket) {
// Turn on TLP for this test.
- QuicSentPacketManagerPeer::SetMaxTailLossProbes(
- QuicConnectionPeer::GetSentPacketManager(&connection_), 1);
-
+ QuicSentPacketManagerPeer::SetMaxTailLossProbes(manager_, 1);
+ EXPECT_TRUE(creator_->IsFecEnabled());
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
- EXPECT_TRUE(QuicConnectionPeer::GetPacketCreator(
- &connection_)->IsFecEnabled());
- QuicSentPacketManager* manager =
- QuicConnectionPeer::GetSentPacketManager(&connection_);
- // 1 Data packet and 1 FEC packet.
+ // Send 1 FEC-protected data packet. FEC alarm should be set.
EXPECT_CALL(*send_algorithm_,
- OnPacketSent(_, _, _, _, HAS_RETRANSMITTABLE_DATA)).Times(2);
+ OnPacketSent(_, _, _, _, HAS_RETRANSMITTABLE_DATA)).Times(1);
connection_.SendStreamDataWithStringWithFec(3, "foo", 0, !kFin, nullptr);
+ EXPECT_TRUE(connection_.GetFecAlarm()->IsSet());
+ // Force FEC timeout to send FEC packet out.
+ EXPECT_CALL(*send_algorithm_,
+ OnPacketSent(_, _, _, _, HAS_RETRANSMITTABLE_DATA)).Times(1);
+ connection_.GetFecAlarm()->Fire();
+ EXPECT_TRUE(writer_->header().fec_flag);
// Ack data packet, but not FEC packet.
QuicAckFrame ack = InitAckFrame(1);
EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _));
ProcessAckPacket(&ack);
- // No TLP alarm for FEC, so when retransmission alarm fires, it is an RTO.
+ // No TLP alarm for FEC, but retransmission alarm should be set for an RTO.
+ EXPECT_LT(0u, QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
EXPECT_TRUE(connection_.GetRetransmissionAlarm()->IsSet());
- EXPECT_LT(0u, QuicSentPacketManagerPeer::GetBytesInFlight(manager));
QuicTime rto_time = connection_.GetRetransmissionAlarm()->deadline();
EXPECT_NE(QuicTime::Zero(), rto_time);
// Simulate the retransmission alarm firing. FEC packet is no longer
// outstanding.
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(false));
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(false));
+ }
clock_.AdvanceTime(rto_time.Subtract(clock_.Now()));
connection_.GetRetransmissionAlarm()->Fire();
+
EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet());
- EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(manager));
+ EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(manager_));
}
TEST_P(QuicConnectionTest, FramePacking) {
@@ -1887,13 +2070,12 @@
}
TEST_P(QuicConnectionTest, FramePackingFEC) {
- EXPECT_TRUE(QuicConnectionPeer::GetPacketCreator(
- &connection_)->IsFecEnabled());
+ EXPECT_TRUE(creator_->IsFecEnabled());
CongestionBlockWrites();
// Queue an ack and two stream frames. Ack gets flushed when FEC is turned on
- // for sending protected data; two stream frames are packing in 1 packet.
+ // for sending protected data; two stream frames are packed in 1 packet.
EXPECT_CALL(visitor_, OnCanWrite()).WillOnce(DoAll(
IgnoreResult(InvokeWithoutArgs(
&connection_, &TestConnection::SendStreamData3WithFec)),
@@ -1901,7 +2083,7 @@
&connection_, &TestConnection::SendStreamData5WithFec))));
connection_.SendAck();
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(3);
+ EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2);
CongestionUnblockWrites();
connection_.GetSendAlarm()->Fire();
EXPECT_EQ(0u, connection_.NumQueuedPackets());
@@ -1909,7 +2091,10 @@
// Parse the last packet and ensure it's in an fec group.
EXPECT_EQ(2u, writer_->header().fec_group);
- EXPECT_EQ(0u, writer_->frame_count());
+ EXPECT_EQ(2u, writer_->frame_count());
+
+ // FEC alarm should be set.
+ EXPECT_TRUE(connection_.GetFecAlarm()->IsSet());
}
TEST_P(QuicConnectionTest, FramePackingAckResponse) {
@@ -2129,21 +2314,27 @@
connection_.SendStreamDataWithString(3, "foo", i * 3, !kFin, nullptr);
}
- // Block the congestion window and ensure they're queued.
+ // Block the writer and ensure they're queued.
BlockOnNextWrite();
clock_.AdvanceTime(DefaultRetransmissionTime());
// Only one packet should be retransmitted.
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ }
connection_.GetRetransmissionAlarm()->Fire();
EXPECT_TRUE(connection_.HasQueuedData());
- // Unblock the congestion window.
+ // Unblock the writer.
writer_->SetWritable();
clock_.AdvanceTime(QuicTime::Delta::FromMicroseconds(
2 * DefaultRetransmissionTime().ToMicroseconds()));
// Retransmit already retransmitted packets event though the sequence number
// greater than the largest observed.
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(10);
+ if (FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2);
+ } else {
+ EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(10);
+ }
connection_.GetRetransmissionAlarm()->Fire();
connection_.OnCanWrite();
}
@@ -2168,7 +2359,9 @@
BlockOnNextWrite();
writer_->set_is_write_blocked_data_buffered(true);
// Simulate the retransmission alarm firing.
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(_));
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(_));
+ }
clock_.AdvanceTime(DefaultRetransmissionTime());
connection_.GetRetransmissionAlarm()->Fire();
@@ -2176,7 +2369,9 @@
// rare circumstances with write blocked sockets.
QuicAckFrame ack = InitAckFrame(1);
EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _));
- EXPECT_CALL(*send_algorithm_, RevertRetransmissionTimeout());
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, RevertRetransmissionTimeout());
+ }
ProcessAckPacket(&ack);
writer_->SetWritable();
@@ -2431,8 +2626,7 @@
}
TEST_P(QuicConnectionTest, TLP) {
- QuicSentPacketManagerPeer::SetMaxTailLossProbes(
- QuicConnectionPeer::GetSentPacketManager(&connection_), 1);
+ QuicSentPacketManagerPeer::SetMaxTailLossProbes(manager_, 1);
SendStreamDataToPeer(3, "foo", 0, !kFin, nullptr);
EXPECT_EQ(1u, stop_waiting()->least_unacked);
@@ -2462,7 +2656,9 @@
connection_.GetRetransmissionAlarm()->deadline());
// Simulate the retransmission alarm firing.
clock_.AdvanceTime(DefaultRetransmissionTime());
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ }
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, 2u, _, _));
connection_.GetRetransmissionAlarm()->Fire();
EXPECT_EQ(2u, writer_->header().packet_sequence_number);
@@ -2490,7 +2686,9 @@
connection_.GetRetransmissionAlarm()->deadline());
{
InSequence s;
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ }
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, 3, _, _));
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, 4, _, _));
}
@@ -2544,7 +2742,9 @@
// Simulate the retransmission alarm firing and the socket blocking.
BlockOnNextWrite();
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ }
clock_.AdvanceTime(DefaultRetransmissionTime());
connection_.GetRetransmissionAlarm()->Fire();
@@ -2706,7 +2906,9 @@
EXPECT_NE(first_packet_size, second_packet_size);
// Advance the clock by huge time to make sure packets will be retransmitted.
clock_.AdvanceTime(QuicTime::Delta::FromSeconds(10));
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ }
{
InSequence s;
EXPECT_CALL(*send_algorithm_,
@@ -2718,7 +2920,9 @@
// Advance again and expect the packets to be sent again in the same order.
clock_.AdvanceTime(QuicTime::Delta::FromSeconds(20));
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ }
{
InSequence s;
EXPECT_CALL(*send_algorithm_,
@@ -2729,58 +2933,6 @@
connection_.GetRetransmissionAlarm()->Fire();
}
-TEST_P(QuicConnectionTest, RetransmissionCountCalculation) {
- EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
- QuicPacketSequenceNumber original_sequence_number;
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _))
- .WillOnce(DoAll(SaveArg<2>(&original_sequence_number), Return(true)));
- connection_.SendStreamDataWithString(3, "foo", 0, !kFin, nullptr);
-
- EXPECT_TRUE(QuicConnectionPeer::IsSavedForRetransmission(
- &connection_, original_sequence_number));
- EXPECT_FALSE(QuicConnectionPeer::IsRetransmission(
- &connection_, original_sequence_number));
- // Force retransmission due to RTO.
- clock_.AdvanceTime(QuicTime::Delta::FromSeconds(10));
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
- QuicPacketSequenceNumber rto_sequence_number;
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _))
- .WillOnce(DoAll(SaveArg<2>(&rto_sequence_number), Return(true)));
- connection_.GetRetransmissionAlarm()->Fire();
- EXPECT_FALSE(QuicConnectionPeer::IsSavedForRetransmission(
- &connection_, original_sequence_number));
- ASSERT_TRUE(QuicConnectionPeer::IsSavedForRetransmission(
- &connection_, rto_sequence_number));
- EXPECT_TRUE(QuicConnectionPeer::IsRetransmission(
- &connection_, rto_sequence_number));
- // Once by explicit nack.
- SequenceNumberSet lost_packets;
- lost_packets.insert(rto_sequence_number);
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
- .WillOnce(Return(lost_packets));
- EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _));
- QuicPacketSequenceNumber nack_sequence_number = 0;
- // Ack packets might generate some other packets, which are not
- // retransmissions. (More ack packets).
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _))
- .Times(AnyNumber());
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _))
- .WillOnce(DoAll(SaveArg<2>(&nack_sequence_number), Return(true)));
- QuicAckFrame ack = InitAckFrame(rto_sequence_number);
- // Nack the retransmitted packet.
- NackPacket(original_sequence_number, &ack);
- NackPacket(rto_sequence_number, &ack);
- ProcessAckPacket(&ack);
-
- ASSERT_NE(0u, nack_sequence_number);
- EXPECT_FALSE(QuicConnectionPeer::IsSavedForRetransmission(
- &connection_, rto_sequence_number));
- ASSERT_TRUE(QuicConnectionPeer::IsSavedForRetransmission(
- &connection_, nack_sequence_number));
- EXPECT_TRUE(QuicConnectionPeer::IsRetransmission(
- &connection_, nack_sequence_number));
-}
-
TEST_P(QuicConnectionTest, SetRTOAfterWritingToSocket) {
BlockOnNextWrite();
connection_.SendStreamDataWithString(1, "foo", 0, !kFin, nullptr);
@@ -2819,7 +2971,9 @@
// Ensure the second packet gets retransmitted when it finally fires.
EXPECT_TRUE(retransmission_alarm->IsSet());
EXPECT_LT(retransmission_alarm->deadline(), clock_.ApproximateNow());
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ }
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _));
// Manually cancel the alarm to simulate a real test.
connection_.GetRetransmissionAlarm()->Fire();
@@ -2860,47 +3014,6 @@
ASSERT_EQ(0u, connection_.NumFecGroups());
}
-TEST_P(QuicConnectionTest, NoQuicCongestionFeedbackFrame) {
- SendAckPacketToPeer();
- EXPECT_TRUE(writer_->feedback_frames().empty());
-}
-
-TEST_P(QuicConnectionTest, WithQuicCongestionFeedbackFrame) {
- QuicCongestionFeedbackFrame info;
- info.type = kTCP;
- info.tcp.receive_window = 0x4030;
-
- // After QUIC_VERSION_22, do not send TCP Congestion Feedback Frames anymore.
- if (version() > QUIC_VERSION_22) {
- SendAckPacketToPeer();
- ASSERT_TRUE(writer_->feedback_frames().empty());
- } else {
- // Only SetFeedback in this case because SetFeedback will create a receive
- // algorithm which is how the received_packet_manager checks if it should be
- // creating TCP Congestion Feedback Frames.
- SetFeedback(&info);
- SendAckPacketToPeer();
- ASSERT_FALSE(writer_->feedback_frames().empty());
- ASSERT_EQ(kTCP, writer_->feedback_frames()[0].type);
- }
-}
-
-TEST_P(QuicConnectionTest, UpdateQuicCongestionFeedbackFrame) {
- SendAckPacketToPeer();
- EXPECT_CALL(*receive_algorithm_, RecordIncomingPacket(_, _, _));
- EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
- ProcessPacket(1);
-}
-
-TEST_P(QuicConnectionTest, DontUpdateQuicCongestionFeedbackFrameForRevived) {
- EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
- SendAckPacketToPeer();
- // Process an FEC packet, and revive the missing data packet
- // but only contact the receive_algorithm once.
- EXPECT_CALL(*receive_algorithm_, RecordIncomingPacket(_, _, _));
- ProcessFecPacket(2, 1, true, !kEntropyFlag, nullptr);
-}
-
TEST_P(QuicConnectionTest, InitialTimeout) {
EXPECT_TRUE(connection_.connected());
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(AnyNumber());
@@ -2926,6 +3039,7 @@
EXPECT_FALSE(connection_.GetAckAlarm()->IsSet());
EXPECT_FALSE(connection_.GetPingAlarm()->IsSet());
+ EXPECT_FALSE(connection_.GetFecAlarm()->IsSet());
EXPECT_FALSE(connection_.GetResumeWritesAlarm()->IsSet());
EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet());
EXPECT_FALSE(connection_.GetSendAlarm()->IsSet());
@@ -2968,6 +3082,7 @@
EXPECT_FALSE(connection_.GetAckAlarm()->IsSet());
EXPECT_FALSE(connection_.GetPingAlarm()->IsSet());
+ EXPECT_FALSE(connection_.GetFecAlarm()->IsSet());
EXPECT_FALSE(connection_.GetResumeWritesAlarm()->IsSet());
EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet());
EXPECT_FALSE(connection_.GetSendAlarm()->IsSet());
@@ -3139,8 +3254,7 @@
connection_.version(), kIncludeVersion,
PACKET_8BYTE_CONNECTION_ID, PACKET_1BYTE_SEQUENCE_NUMBER,
NOT_IN_FEC_GROUP, &payload_length);
- QuicConnectionPeer::GetPacketCreator(&connection_)->set_max_packet_length(
- length);
+ creator_->set_max_packet_length(length);
// Queue the first packet.
EXPECT_CALL(*send_algorithm_,
@@ -3164,8 +3278,7 @@
connection_.version(), kIncludeVersion,
PACKET_8BYTE_CONNECTION_ID, PACKET_1BYTE_SEQUENCE_NUMBER,
NOT_IN_FEC_GROUP, &payload_length);
- QuicConnectionPeer::GetPacketCreator(&connection_)->set_max_packet_length(
- length);
+ creator_->set_max_packet_length(length);
// Queue the first packet.
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(7);
@@ -3738,8 +3851,7 @@
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
connection_.ProcessUdpPacket(IPEndPoint(), IPEndPoint(), *encrypted);
- ASSERT_FALSE(QuicPacketCreatorPeer::SendVersionInPacket(
- QuicConnectionPeer::GetPacketCreator(&connection_)));
+ ASSERT_FALSE(QuicPacketCreatorPeer::SendVersionInPacket(creator_));
}
TEST_P(QuicConnectionTest, BadVersionNegotiation) {
@@ -3797,7 +3909,9 @@
EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _));
EXPECT_CALL(visitor_, OnCanWrite()).Times(2);
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
- EXPECT_CALL(*send_algorithm_, RevertRetransmissionTimeout());
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, RevertRetransmissionTimeout());
+ }
ProcessAckPacket(&nack_three);
EXPECT_CALL(*send_algorithm_, BandwidthEstimate()).WillOnce(
@@ -3952,7 +4066,7 @@
// Create a delegate which we expect to be called.
scoped_refptr<MockAckNotifierDelegate> delegate(new MockAckNotifierDelegate);
- EXPECT_CALL(*delegate.get(), OnAckNotification(_, _, _, _, _)).Times(1);
+ EXPECT_CALL(*delegate.get(), OnAckNotification(_, _, _)).Times(1);
// Send some data, which will register the delegate to be notified.
connection_.SendStreamDataWithString(1, "foo", 0, !kFin, delegate.get());
@@ -3968,7 +4082,7 @@
// Create a delegate which we don't expect to be called.
scoped_refptr<MockAckNotifierDelegate> delegate(new MockAckNotifierDelegate);
- EXPECT_CALL(*delegate.get(), OnAckNotification(_, _, _, _, _)).Times(0);
+ EXPECT_CALL(*delegate.get(), OnAckNotification(_, _, _)).Times(0);
// Send some data, which will register the delegate to be notified. This will
// not be ACKed and so the delegate should never be called.
@@ -3995,7 +4109,7 @@
// Create a delegate which we expect to be called.
scoped_refptr<MockAckNotifierDelegate> delegate(new MockAckNotifierDelegate);
- EXPECT_CALL(*delegate.get(), OnAckNotification(_, _, _, _, _)).Times(1);
+ EXPECT_CALL(*delegate.get(), OnAckNotification(_, _, _)).Times(1);
// Send four packets, and register to be notified on ACK of packet 2.
connection_.SendStreamDataWithString(3, "foo", 0, !kFin, nullptr);
@@ -4043,7 +4157,9 @@
connection_.GetRetransmissionAlarm()->deadline());
// Simulate the retransmission alarm firing.
clock_.AdvanceTime(DefaultRetransmissionTime());
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ }
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, 2u, _, _));
connection_.GetRetransmissionAlarm()->Fire();
EXPECT_EQ(2u, writer_->header().packet_sequence_number);
@@ -4052,8 +4168,10 @@
// Ack the original packet, which will revert the RTO.
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
- EXPECT_CALL(*delegate.get(), OnAckNotification(1, _, 1, _, _));
- EXPECT_CALL(*send_algorithm_, RevertRetransmissionTimeout());
+ EXPECT_CALL(*delegate.get(), OnAckNotification(1, _, _));
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, RevertRetransmissionTimeout());
+ }
EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _));
QuicAckFrame ack_frame = InitAckFrame(1);
ProcessAckPacket(&ack_frame);
@@ -4094,7 +4212,7 @@
// Now we get an ACK for packet 2, which was previously nacked.
SequenceNumberSet no_lost_packets;
- EXPECT_CALL(*delegate.get(), OnAckNotification(1, _, 1, _, _));
+ EXPECT_CALL(*delegate.get(), OnAckNotification(1, _, _));
EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
.WillOnce(Return(no_lost_packets));
QuicAckFrame second_ack_frame = InitAckFrame(4);
@@ -4115,7 +4233,7 @@
// Create a delegate which we expect to be called.
scoped_refptr<MockAckNotifierDelegate> delegate(
new MockAckNotifierDelegate);
- EXPECT_CALL(*delegate.get(), OnAckNotification(_, _, _, _, _)).Times(1);
+ EXPECT_CALL(*delegate.get(), OnAckNotification(_, _, _)).Times(1);
// Send some data, which will register the delegate to be notified.
connection_.SendStreamDataWithString(1, "foo", 0, !kFin, delegate.get());
@@ -4138,7 +4256,7 @@
// Create a delegate which we expect to be called.
scoped_refptr<MockAckNotifierDelegate> delegate(new MockAckNotifierDelegate);
- EXPECT_CALL(*delegate.get(), OnAckNotification(_, _, _, _, _)).Times(1);
+ EXPECT_CALL(*delegate.get(), OnAckNotification(_, _, _)).Times(1);
// Expect ACKs for 1 packet.
EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _));
@@ -4175,32 +4293,25 @@
}
TEST_P(QuicConnectionTest, NetworkChangeVisitorCwndCallbackChangesFecState) {
- QuicPacketCreator* creator =
- QuicConnectionPeer::GetPacketCreator(&connection_);
- size_t max_packets_per_fec_group = creator->max_packets_per_fec_group();
+ size_t max_packets_per_fec_group = creator_->max_packets_per_fec_group();
QuicSentPacketManager::NetworkChangeVisitor* visitor =
- QuicSentPacketManagerPeer::GetNetworkChangeVisitor(
- QuicConnectionPeer::GetSentPacketManager(&connection_));
+ QuicSentPacketManagerPeer::GetNetworkChangeVisitor(manager_);
EXPECT_TRUE(visitor);
// Increase FEC group size by increasing congestion window to a large number.
EXPECT_CALL(*send_algorithm_, GetCongestionWindow()).WillRepeatedly(
Return(1000 * kDefaultTCPMSS));
visitor->OnCongestionWindowChange();
- EXPECT_LT(max_packets_per_fec_group, creator->max_packets_per_fec_group());
+ EXPECT_LT(max_packets_per_fec_group, creator_->max_packets_per_fec_group());
}
TEST_P(QuicConnectionTest, NetworkChangeVisitorConfigCallbackChangesFecState) {
- QuicSentPacketManager* sent_packet_manager =
- QuicConnectionPeer::GetSentPacketManager(&connection_);
QuicSentPacketManager::NetworkChangeVisitor* visitor =
- QuicSentPacketManagerPeer::GetNetworkChangeVisitor(sent_packet_manager);
+ QuicSentPacketManagerPeer::GetNetworkChangeVisitor(manager_);
EXPECT_TRUE(visitor);
-
- QuicPacketGenerator* generator =
- QuicConnectionPeer::GetPacketGenerator(&connection_);
- EXPECT_EQ(QuicTime::Delta::Zero(), generator->fec_timeout());
+ EXPECT_EQ(QuicTime::Delta::Zero(),
+ QuicPacketGeneratorPeer::GetFecTimeout(generator_));
// Verify that sending a config with a new initial rtt changes fec timeout.
// Create and process a config with a non-zero initial RTT.
@@ -4208,28 +4319,25 @@
QuicConfig config;
config.SetInitialRoundTripTimeUsToSend(300000);
connection_.SetFromConfig(config);
- EXPECT_LT(QuicTime::Delta::Zero(), generator->fec_timeout());
+ EXPECT_LT(QuicTime::Delta::Zero(),
+ QuicPacketGeneratorPeer::GetFecTimeout(generator_));
}
TEST_P(QuicConnectionTest, NetworkChangeVisitorRttCallbackChangesFecState) {
// Verify that sending a config with a new initial rtt changes fec timeout.
- QuicSentPacketManager* sent_packet_manager =
- QuicConnectionPeer::GetSentPacketManager(&connection_);
QuicSentPacketManager::NetworkChangeVisitor* visitor =
- QuicSentPacketManagerPeer::GetNetworkChangeVisitor(sent_packet_manager);
+ QuicSentPacketManagerPeer::GetNetworkChangeVisitor(manager_);
EXPECT_TRUE(visitor);
-
- QuicPacketGenerator* generator =
- QuicConnectionPeer::GetPacketGenerator(&connection_);
- EXPECT_EQ(QuicTime::Delta::Zero(), generator->fec_timeout());
+ EXPECT_EQ(QuicTime::Delta::Zero(),
+ QuicPacketGeneratorPeer::GetFecTimeout(generator_));
// Increase FEC timeout by increasing RTT.
- RttStats* rtt_stats =
- QuicSentPacketManagerPeer::GetRttStats(sent_packet_manager);
+ RttStats* rtt_stats = QuicSentPacketManagerPeer::GetRttStats(manager_);
rtt_stats->UpdateRtt(QuicTime::Delta::FromMilliseconds(300),
QuicTime::Delta::Zero(), QuicTime::Zero());
visitor->OnRttChange();
- EXPECT_LT(QuicTime::Delta::Zero(), generator->fec_timeout());
+ EXPECT_LT(QuicTime::Delta::Zero(),
+ QuicPacketGeneratorPeer::GetFecTimeout(generator_));
}
class MockQuicConnectionDebugVisitor
@@ -4263,9 +4371,6 @@
MOCK_METHOD1(OnAckFrame,
void(const QuicAckFrame& frame));
- MOCK_METHOD1(OnCongestionFeedbackFrame,
- void(const QuicCongestionFeedbackFrame&));
-
MOCK_METHOD1(OnStopWaitingFrame,
void(const QuicStopWaitingFrame&));
@@ -4328,7 +4433,6 @@
}
TEST_P(QuicConnectionTest, NoDataNoFin) {
- ValueRestore<bool> old_flag(&FLAGS_quic_empty_data_no_fin_early_return, true);
// Make sure that a call to SendStreamWithData, with no data and no FIN, does
// not result in a QuicAckNotifier being used-after-free (fail under ASAN).
// Regression test for b/18594622
diff --git a/net/quic/quic_crypto_client_stream.cc b/net/quic/quic_crypto_client_stream.cc
index 3310f73..fec38b5 100644
--- a/net/quic/quic_crypto_client_stream.cc
+++ b/net/quic/quic_crypto_client_stream.cc
@@ -439,7 +439,9 @@
if (!verify_ok_) {
next_state_ = STATE_NONE;
- client_session()->OnProofVerifyDetailsAvailable(*verify_details_);
+ if (verify_details_) {
+ client_session()->OnProofVerifyDetailsAvailable(*verify_details_);
+ }
UMA_HISTOGRAM_BOOLEAN("Net.QuicVerifyProofFailed.HandshakeConfirmed",
handshake_confirmed());
CloseConnectionWithDetails(
diff --git a/net/quic/quic_crypto_client_stream_test.cc b/net/quic/quic_crypto_client_stream_test.cc
index efb5214..a39ab4f 100644
--- a/net/quic/quic_crypto_client_stream_test.cc
+++ b/net/quic/quic_crypto_client_stream_test.cc
@@ -95,7 +95,6 @@
CompleteCryptoHandshake();
const QuicConfig* config = session_->config();
- EXPECT_EQ(kQBIC, config->CongestionFeedback());
EXPECT_EQ(kMaximumIdleTimeoutSecs,
config->IdleConnectionStateLifetime().ToSeconds());
EXPECT_EQ(kDefaultMaxStreamsPerConnection,
diff --git a/net/quic/quic_crypto_server_stream.cc b/net/quic/quic_crypto_server_stream.cc
index 63070cd..3ec65b0 100644
--- a/net/quic/quic_crypto_server_stream.cc
+++ b/net/quic/quic_crypto_server_stream.cc
@@ -19,8 +19,6 @@
namespace net {
void ServerHelloNotifier::OnAckNotification(
- int num_original_packets,
- int num_original_bytes,
int num_retransmitted_packets,
int num_retransmitted_bytes,
QuicTime::Delta delta_largest_observed) {
@@ -130,13 +128,9 @@
// We want to be notified when the SHLO is ACKed so that we can disable
// HANDSHAKE_MODE in the sent packet manager.
- if (session()->connection()->version() <= QUIC_VERSION_21) {
- SendHandshakeMessage(reply);
- } else {
- scoped_refptr<ServerHelloNotifier> server_hello_notifier(
- new ServerHelloNotifier(this));
- SendHandshakeMessage(reply, server_hello_notifier.get());
- }
+ scoped_refptr<ServerHelloNotifier> server_hello_notifier(
+ new ServerHelloNotifier(this));
+ SendHandshakeMessage(reply, server_hello_notifier.get());
session()->connection()->SetEncrypter(
ENCRYPTION_FORWARD_SECURE,
@@ -152,8 +146,7 @@
void QuicCryptoServerStream::SendServerConfigUpdate(
const CachedNetworkParameters* cached_network_params) {
- if (session()->connection()->version() <= QUIC_VERSION_21 ||
- !handshake_confirmed_) {
+ if (!handshake_confirmed_) {
return;
}
diff --git a/net/quic/quic_crypto_server_stream.h b/net/quic/quic_crypto_server_stream.h
index ece2da2..9e3a89e 100644
--- a/net/quic/quic_crypto_server_stream.h
+++ b/net/quic/quic_crypto_server_stream.h
@@ -34,9 +34,7 @@
: server_stream_(stream) {}
// QuicAckNotifier::DelegateInterface implementation
- void OnAckNotification(int num_original_packets,
- int num_original_bytes,
- int num_retransmitted_packets,
+ void OnAckNotification(int num_retransmitted_packets,
int num_retransmitted_bytes,
QuicTime::Delta delta_largest_observed) override;
diff --git a/net/quic/quic_data_stream.cc b/net/quic/quic_data_stream.cc
index aac58f9..aa24d0c 100644
--- a/net/quic/quic_data_stream.cc
+++ b/net/quic/quic_data_stream.cc
@@ -48,7 +48,7 @@
bool fin,
QuicAckNotifier::DelegateInterface* ack_notifier_delegate) {
size_t bytes_written = session()->WriteHeaders(
- id(), header_block, fin, ack_notifier_delegate);
+ id(), header_block, fin, priority_, ack_notifier_delegate);
if (fin) {
// TODO(rch): Add test to ensure fin_sent_ is set whenever a fin is sent.
set_fin_sent(true);
diff --git a/net/quic/quic_dispatcher.cc b/net/quic/quic_dispatcher.cc
index 6350d63..ee2c0c6 100644
--- a/net/quic/quic_dispatcher.cc
+++ b/net/quic/quic_dispatcher.cc
@@ -98,11 +98,6 @@
DCHECK(false);
return false;
}
- bool OnCongestionFeedbackFrame(
- const QuicCongestionFeedbackFrame& /*frame*/) override {
- DCHECK(false);
- return false;
- }
bool OnStopWaitingFrame(const QuicStopWaitingFrame& /*frame*/) override {
DCHECK(false);
return false;
diff --git a/net/quic/quic_flags.cc b/net/quic/quic_flags.cc
index a244943..8eb6ec1 100644
--- a/net/quic/quic_flags.cc
+++ b/net/quic/quic_flags.cc
@@ -13,9 +13,6 @@
// CHLO.
bool FLAGS_use_early_return_when_verifying_chlo = true;
-// If true, QUIC crypto reject message will include the reasons for rejection.
-bool FLAGS_send_quic_crypto_reject_reason = false;
-
// If true, QUIC connections will support FEC protection of data while sending
// packets, to reduce latency of data delivery to the application. The client
// must also request FEC protection for the server to use FEC.
@@ -50,18 +47,10 @@
// If true, use std::cbrt instead of custom cube root.
bool FLAGS_quic_use_std_cbrt = true;
-// If true, the QUIC packet generator will not attempt to queue multiple ACK
-// frames.
-bool FLAGS_quic_disallow_multiple_pending_ack_frames = true;
-
// If true, then the source address tokens generated for QUIC connects will
// store multiple addresses.
bool FLAGS_quic_use_multiple_address_in_source_tokens = false;
-// If true, an attempt to send an empty data string with no FIN will return
-// early, and not create a frame.
-bool FLAGS_quic_empty_data_no_fin_early_return = true;
-
// If true, if min RTT and/or SRTT have not yet been set then initial RTT is
// used to initialize them in a call to QuicConnection::GetStats.
bool FLAGS_quic_use_initial_rtt_for_stats = true;
@@ -72,3 +61,29 @@
// If true, attach QuicAckNotifiers to packets rather than individual stream
// frames.
bool FLAGS_quic_attach_ack_notifiers_to_packets = true;
+
+// If true, the AckNotifierManager is informed about new packets as soon as they
+// are serialized.
+bool FLAGS_quic_ack_notifier_informed_on_serialized = true;
+
+// If true, QUIC will use the new RTO that waits until an ack arrives to adjust
+// the congestion window.
+bool FLAGS_quic_use_new_rto = true;
+
+// Time period for which a given connection_id should live in the time-wait
+// state.
+int64 FLAGS_quic_time_wait_list_seconds = 5;
+
+// Currently, this number is quite conservative. The max QPS limit for an
+// individual server silo is currently set to 1000 qps, though the actual max
+// that we see in the wild is closer to 450 qps. Regardless, this means that the
+// longest time-wait list we should see is 5 seconds * 1000 qps = 5000. If we
+// allow for an order of magnitude leeway, we have 50000.
+//
+// Maximum number of connections on the time-wait list. A negative value implies
+// no configured limit.
+int64 FLAGS_quic_time_wait_list_max_connections = 50000;
+
+// If true, limit the number of connections on the quic time-wait list using a
+// flag.
+bool FLAGS_quic_limit_time_wait_list_size = true;
diff --git a/net/quic/quic_flags.h b/net/quic/quic_flags.h
index 614f667..58f0408 100644
--- a/net/quic/quic_flags.h
+++ b/net/quic/quic_flags.h
@@ -5,12 +5,12 @@
#ifndef NET_QUIC_QUIC_FLAGS_H_
#define NET_QUIC_QUIC_FLAGS_H_
+#include "base/basictypes.h"
#include "net/base/net_export.h"
NET_EXPORT_PRIVATE extern bool FLAGS_quic_allow_oversized_packets_for_test;
NET_EXPORT_PRIVATE extern bool FLAGS_quic_use_time_loss_detection;
NET_EXPORT_PRIVATE extern bool FLAGS_use_early_return_when_verifying_chlo;
-NET_EXPORT_PRIVATE extern bool FLAGS_send_quic_crypto_reject_reason;
NET_EXPORT_PRIVATE extern bool FLAGS_enable_quic_fec;
NET_EXPORT_PRIVATE extern bool FLAGS_quic_use_bbr_congestion_control;
NET_EXPORT_PRIVATE extern bool FLAGS_quic_allow_bbr;
@@ -21,11 +21,14 @@
NET_EXPORT_PRIVATE extern bool FLAGS_quic_enable_pacing;
NET_EXPORT_PRIVATE extern bool FLAGS_quic_allow_silent_close;
NET_EXPORT_PRIVATE extern bool FLAGS_quic_use_std_cbrt;
-NET_EXPORT_PRIVATE extern bool FLAGS_quic_disallow_multiple_pending_ack_frames;
NET_EXPORT_PRIVATE extern bool FLAGS_quic_use_multiple_address_in_source_tokens;
-NET_EXPORT_PRIVATE extern bool FLAGS_quic_empty_data_no_fin_early_return;
NET_EXPORT_PRIVATE extern bool FLAGS_quic_use_initial_rtt_for_stats;
NET_EXPORT_PRIVATE extern bool FLAGS_quic_rto_uses_last_sent;
NET_EXPORT_PRIVATE extern bool FLAGS_quic_attach_ack_notifiers_to_packets;
+NET_EXPORT_PRIVATE extern bool FLAGS_quic_ack_notifier_informed_on_serialized;
+NET_EXPORT_PRIVATE extern bool FLAGS_quic_use_new_rto;
+NET_EXPORT_PRIVATE extern int64 FLAGS_quic_time_wait_list_seconds;
+NET_EXPORT_PRIVATE extern int64 FLAGS_quic_time_wait_list_max_connections;
+NET_EXPORT_PRIVATE extern bool FLAGS_quic_limit_time_wait_list_size;
#endif // NET_QUIC_QUIC_FLAGS_H_
diff --git a/net/quic/quic_framer.cc b/net/quic/quic_framer.cc
index b0b3afc..5cde3c2 100644
--- a/net/quic/quic_framer.cc
+++ b/net/quic/quic_framer.cc
@@ -62,7 +62,6 @@
// all in the Frame Type byte. Currently defined Special Frame Types are:
// Stream : 0b 1xxxxxxx
// Ack : 0b 01xxxxxx
-// CongestionFeedback : 0b 001xxxxx
//
// Semantics of the flag bits above (the x bits) depends on the frame type.
@@ -71,7 +70,6 @@
const uint8 kQuicFrameTypeSpecialMask = 0xE0; // 0b 11100000
const uint8 kQuicFrameTypeStreamMask = 0x80;
const uint8 kQuicFrameTypeAckMask = 0x40;
-const uint8 kQuicFrameTypeCongestionFeedbackMask = 0x20;
// Stream frame relative shifts and masks for interpreting the stream flags.
// StreamID may be 1, 2, 3, or 4 bytes.
@@ -359,13 +357,6 @@
return kNoPacket;
}
break;
- case CONGESTION_FEEDBACK_FRAME:
- if (!AppendCongestionFeedbackFrame(
- *frame.congestion_feedback_frame, &writer)) {
- LOG(DFATAL) << "AppendCongestionFeedbackFrame failed";
- return kNoPacket;
- }
- break;
case STOP_WAITING_FRAME:
if (!AppendStopWaitingFrame(
header, *frame.stop_waiting_frame, &writer)) {
@@ -1124,24 +1115,6 @@
continue;
}
- // Congestion Feedback Frame
- if (frame_type & kQuicFrameTypeCongestionFeedbackMask) {
- if (quic_version_ > QUIC_VERSION_22) {
- set_detailed_error("Congestion Feedback Frame has been deprecated.");
- DLOG(WARNING) << "Congestion Feedback Frame has been deprecated.";
- }
- QuicCongestionFeedbackFrame frame;
- if (!ProcessCongestionFeedbackFrame(&frame)) {
- return RaiseError(QUIC_INVALID_CONGESTION_FEEDBACK_DATA);
- }
- if (!visitor_->OnCongestionFeedbackFrame(frame)) {
- DVLOG(1) << "Visitor asked to stop further processing.";
- // Returning true since there was no parsing error.
- return true;
- }
- continue;
- }
-
// This was a special frame type that did not match any
// of the known ones. Error.
set_detailed_error("Illegal frame type.");
@@ -1406,7 +1379,7 @@
}
bool QuicFramer::ProcessTimestampsInAckFrame(QuicAckFrame* ack_frame) {
- if (version() > QUIC_VERSION_22 && !ack_frame->is_truncated) {
+ if (!ack_frame->is_truncated) {
uint8 num_received_packets;
if (!reader_->ReadBytes(&num_received_packets, 1)) {
set_detailed_error("Unable to read num received packets.");
@@ -1483,38 +1456,6 @@
return true;
}
-bool QuicFramer::ProcessCongestionFeedbackFrame(
- QuicCongestionFeedbackFrame* frame) {
- uint8 feedback_type;
- if (!reader_->ReadBytes(&feedback_type, 1)) {
- set_detailed_error("Unable to read congestion feedback type.");
- return false;
- }
- frame->type =
- static_cast<CongestionFeedbackType>(feedback_type);
-
- switch (frame->type) {
- case kTCP: {
- CongestionFeedbackMessageTCP* tcp = &frame->tcp;
- uint16 receive_window = 0;
- if (!reader_->ReadUInt16(&receive_window)) {
- set_detailed_error("Unable to read receive window.");
- return false;
- }
- // Simple bit packing, don't send the 4 least significant bits.
- tcp->receive_window = static_cast<QuicByteCount>(receive_window) << 4;
- break;
- }
- default:
- set_detailed_error("Illegal congestion feedback type.");
- DLOG(WARNING) << "Illegal congestion feedback type: "
- << frame->type;
- return RaiseError(QUIC_INVALID_FRAME_DATA);
- }
-
- return true;
-}
-
bool QuicFramer::ProcessRstStreamFrame(QuicRstStreamFrame* frame) {
if (!reader_->ReadUInt32(&frame->stream_id)) {
set_detailed_error("Unable to read stream_id.");
@@ -1789,8 +1730,7 @@
// In version 23, if the ack will be truncated due to too many nack ranges,
// then do not include the number of timestamps (1 byte).
- if (version() > QUIC_VERSION_22 &&
- ack_info.nack_ranges.size() <= kMaxNackRanges) {
+ if (ack_info.nack_ranges.size() <= kMaxNackRanges) {
// 1 byte for the number of timestamps.
ack_size += 1;
if (ack.received_packet_times.size() > 0) {
@@ -1822,23 +1762,6 @@
case ACK_FRAME: {
return GetAckFrameSize(*frame.ack_frame, sequence_number_length);
}
- case CONGESTION_FEEDBACK_FRAME: {
- size_t len = kQuicFrameTypeSize;
- const QuicCongestionFeedbackFrame& congestion_feedback =
- *frame.congestion_feedback_frame;
- len += 1; // Congestion feedback type.
-
- switch (congestion_feedback.type) {
- case kTCP:
- len += 2; // Receive window.
- break;
- default:
- set_detailed_error("Illegal feedback type.");
- DVLOG(1) << "Illegal feedback type: " << congestion_feedback.type;
- break;
- }
- return len;
- }
case STOP_WAITING_FRAME:
return GetStopWaitingFrameSize(sequence_number_length);
case PING_FRAME:
@@ -1900,11 +1823,6 @@
}
case ACK_FRAME:
return true;
- case CONGESTION_FEEDBACK_FRAME: {
- // TODO(ianswett): Use extra 5 bits in the congestion feedback framing.
- type_byte = kQuicFrameTypeCongestionFeedbackMask;
- break;
- }
default:
type_byte = static_cast<uint8>(frame.type);
break;
@@ -2064,7 +1982,7 @@
}
// Timestamp goes at the end of the required fields.
- if (version() > QUIC_VERSION_22 && !truncated) {
+ if (!truncated) {
if (!AppendTimestampToAckFrame(frame, writer)) {
return false;
}
@@ -2123,31 +2041,6 @@
return true;
}
-bool QuicFramer::AppendCongestionFeedbackFrame(
- const QuicCongestionFeedbackFrame& frame,
- QuicDataWriter* writer) {
- if (!writer->WriteBytes(&frame.type, 1)) {
- return false;
- }
-
- switch (frame.type) {
- case kTCP: {
- const CongestionFeedbackMessageTCP& tcp = frame.tcp;
- DCHECK_LE(tcp.receive_window, 1u << 20);
- // Simple bit packing, don't send the 4 least significant bits.
- uint16 receive_window = static_cast<uint16>(tcp.receive_window >> 4);
- if (!writer->WriteUInt16(receive_window)) {
- return false;
- }
- break;
- }
- default:
- return false;
- }
-
- return true;
-}
-
bool QuicFramer::AppendTimestampToAckFrame(const QuicAckFrame& frame,
QuicDataWriter* writer) {
DCHECK_GE(version(), QUIC_VERSION_23);
diff --git a/net/quic/quic_framer.h b/net/quic/quic_framer.h
index 4cc51f1..0504d3d 100644
--- a/net/quic/quic_framer.h
+++ b/net/quic/quic_framer.h
@@ -121,10 +121,6 @@
// the framer will stop parsing the current packet.
virtual bool OnAckFrame(const QuicAckFrame& frame) = 0;
- // Called when a CongestionFeedbackFrame has been parsed.
- virtual bool OnCongestionFeedbackFrame(
- const QuicCongestionFeedbackFrame& frame) = 0;
-
// Called when a StopWaitingFrame has been parsed.
virtual bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) = 0;
@@ -414,8 +410,6 @@
bool ProcessTimestampsInAckFrame(QuicAckFrame* frame);
bool ProcessStopWaitingFrame(const QuicPacketHeader& public_header,
QuicStopWaitingFrame* stop_waiting);
- bool ProcessCongestionFeedbackFrame(
- QuicCongestionFeedbackFrame* congestion_feedback);
bool ProcessRstStreamFrame(QuicRstStreamFrame* frame);
bool ProcessConnectionCloseFrame(QuicConnectionCloseFrame* frame);
bool ProcessGoAwayFrame(QuicGoAwayFrame* frame);
@@ -468,8 +462,6 @@
bool AppendAckFrameAndTypeByte(const QuicPacketHeader& header,
const QuicAckFrame& frame,
QuicDataWriter* builder);
- bool AppendCongestionFeedbackFrame(const QuicCongestionFeedbackFrame& frame,
- QuicDataWriter* builder);
bool AppendTimestampToAckFrame(const QuicAckFrame& frame,
QuicDataWriter* builder);
bool AppendStopWaitingFrame(const QuicPacketHeader& header,
diff --git a/net/quic/quic_framer_test.cc b/net/quic/quic_framer_test.cc
index b2dc6eb..bb852a0 100644
--- a/net/quic/quic_framer_test.cc
+++ b/net/quic/quic_framer_test.cc
@@ -181,7 +181,6 @@
~TestQuicVisitor() override {
STLDeleteElements(&stream_frames_);
STLDeleteElements(&ack_frames_);
- STLDeleteElements(&congestion_feedback_frames_);
STLDeleteElements(&stop_waiting_frames_);
STLDeleteElements(&ping_frames_);
STLDeleteElements(&fec_data_);
@@ -246,14 +245,6 @@
return true;
}
- bool OnCongestionFeedbackFrame(
- const QuicCongestionFeedbackFrame& frame) override {
- ++frame_count_;
- congestion_feedback_frames_.push_back(
- new QuicCongestionFeedbackFrame(frame));
- return true;
- }
-
bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override {
++frame_count_;
stop_waiting_frames_.push_back(new QuicStopWaitingFrame(frame));
@@ -315,7 +306,6 @@
scoped_ptr<QuicVersionNegotiationPacket> version_negotiation_packet_;
vector<QuicStreamFrame*> stream_frames_;
vector<QuicAckFrame*> ack_frames_;
- vector<QuicCongestionFeedbackFrame*> congestion_feedback_frames_;
vector<QuicStopWaitingFrame*> stop_waiting_frames_;
vector<QuicPingFrame*> ping_frames_;
vector<QuicFecData*> fec_data_;
@@ -594,16 +584,26 @@
TEST_P(QuicFramerTest, LargePacket) {
unsigned char packet[kMaxPacketSize + 1] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xBC, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags
- 0x00,
+ // public flags (8 byte connection_id)
+ 0x3C,
+ // connection_id
+ 0x10,
+ 0x32,
+ 0x54,
+ 0x76,
+ 0x98,
+ 0xBA,
+ 0xDC,
+ 0xFE,
+ // packet sequence number
+ 0xBC,
+ 0x9A,
+ 0x78,
+ 0x56,
+ 0x34,
+ 0x12,
+ // private flags
+ 0x00,
};
memset(packet + GetPacketHeaderSize(
@@ -1654,145 +1654,44 @@
CheckStreamFrameData("hello world!", visitor_.stream_frames_[0]);
}
-TEST_P(QuicFramerTest, AckFramev22) {
- if (version_ > QUIC_VERSION_22) {
- return;
- }
- unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xA8, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
-
- // frame type (ack frame)
- // (has nacks, not truncated, 6 byte largest observed, 1 byte delta)
- 0x6C,
- // entropy hash of all received packets.
- 0xBA,
- // largest observed packet sequence number
- 0xBF, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // Zero delta time.
- 0x0, 0x0,
- // num missing packets
- 0x01,
- // missing packet delta
- 0x01,
- // 0 more missing packets in range.
- 0x00,
- // Number of revived packets.
- 0x00,
- };
-
- QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false);
- EXPECT_TRUE(framer_.ProcessPacket(encrypted));
-
- EXPECT_EQ(QUIC_NO_ERROR, framer_.error());
- ASSERT_TRUE(visitor_.header_.get());
- EXPECT_TRUE(CheckDecryption(encrypted, !kIncludeVersion));
-
- EXPECT_EQ(0u, visitor_.stream_frames_.size());
- ASSERT_EQ(1u, visitor_.ack_frames_.size());
- const QuicAckFrame& frame = *visitor_.ack_frames_[0];
- EXPECT_EQ(0xBA, frame.entropy_hash);
- EXPECT_EQ(GG_UINT64_C(0x0123456789ABF), frame.largest_observed);
- ASSERT_EQ(1u, frame.missing_packets.size());
- SequenceNumberSet::const_iterator missing_iter =
- frame.missing_packets.begin();
- EXPECT_EQ(GG_UINT64_C(0x0123456789ABE), *missing_iter);
-
- const size_t kReceivedEntropyOffset = kQuicFrameTypeSize;
- const size_t kLargestObservedOffset = kReceivedEntropyOffset +
- kQuicEntropyHashSize;
- const size_t kMissingDeltaTimeOffset = kLargestObservedOffset +
- PACKET_6BYTE_SEQUENCE_NUMBER;
- const size_t kNumMissingPacketOffset = kMissingDeltaTimeOffset +
- kQuicDeltaTimeLargestObservedSize;
- const size_t kMissingPacketsOffset = kNumMissingPacketOffset +
- kNumberOfNackRangesSize;
- const size_t kMissingPacketsRange = kMissingPacketsOffset +
- PACKET_1BYTE_SEQUENCE_NUMBER;
- const size_t kRevivedPacketsLength = kMissingPacketsRange +
- PACKET_1BYTE_SEQUENCE_NUMBER;
- // Now test framing boundaries.
- const size_t ack_frame_size = kRevivedPacketsLength +
- PACKET_1BYTE_SEQUENCE_NUMBER;
- for (size_t i = kQuicFrameTypeSize; i < ack_frame_size; ++i) {
- string expected_error;
- if (i < kLargestObservedOffset) {
- expected_error = "Unable to read entropy hash for received packets.";
- } else if (i < kMissingDeltaTimeOffset) {
- expected_error = "Unable to read largest observed.";
- } else if (i < kNumMissingPacketOffset) {
- expected_error = "Unable to read delta time largest observed.";
- } else if (i < kMissingPacketsOffset) {
- expected_error = "Unable to read num missing packet ranges.";
- } else if (i < kMissingPacketsRange) {
- expected_error = "Unable to read missing sequence number delta.";
- } else if (i < kRevivedPacketsLength) {
- expected_error = "Unable to read missing sequence number range.";
- } else {
- expected_error = "Unable to read num revived packets.";
- }
- CheckProcessingFails(
- packet,
- i + GetPacketHeaderSize(PACKET_8BYTE_CONNECTION_ID, !kIncludeVersion,
- PACKET_6BYTE_SEQUENCE_NUMBER, NOT_IN_FEC_GROUP),
- expected_error, QUIC_INVALID_ACK_DATA);
- }
-}
-
-
TEST_P(QuicFramerTest, AckFrameTwoTimestamp) {
- if (version_ <= QUIC_VERSION_22) {
- return;
- }
unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xA8, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
+ // public flags (8 byte connection_id)
+ 0x3C,
+ // connection_id
+ 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
+ // packet sequence number
+ 0xA8, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // private flags (entropy)
+ 0x01,
- // frame type (ack frame)
- // (has nacks, not truncated, 6 byte largest observed, 1 byte delta)
- 0x6C,
- // entropy hash of all received packets.
- 0xBA,
- // largest observed packet sequence number
- 0xBF, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // Zero delta time.
- 0x0, 0x0,
- // Number of timestamps.
- 0x02,
- // Delta from largest observed.
- 0x01,
- // Delta time.
- 0x10, 0x32, 0x54, 0x76,
- // Delta from largest observed.
- 0x02,
- // Delta time.
- 0x10, 0x32,
- // num missing packets
- 0x01,
- // missing packet delta
- 0x01,
- // 0 more missing packets in range.
- 0x00,
- // Number of revived packets.
- 0x00,
+ // frame type (ack frame)
+ // (has nacks, not truncated, 6 byte largest observed, 1 byte delta)
+ 0x6C,
+ // entropy hash of all received packets.
+ 0xBA,
+ // largest observed packet sequence number
+ 0xBF, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // Zero delta time.
+ 0x00, 0x00,
+ // Number of timestamps.
+ 0x02,
+ // Delta from largest observed.
+ 0x01,
+ // Delta time.
+ 0x10, 0x32, 0x54, 0x76,
+ // Delta from largest observed.
+ 0x02,
+ // Delta time.
+ 0x10, 0x32,
+ // num missing packets
+ 0x01,
+ // missing packet delta
+ 0x01,
+ // 0 more missing packets in range.
+ 0x00,
+ // Number of revived packets.
+ 0x00,
};
QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false);
@@ -1877,45 +1776,39 @@
TEST_P(QuicFramerTest, AckFrameOneTimestamp) {
- if (version_ <= QUIC_VERSION_22) {
- return;
- }
unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xA8, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
+ // public flags (8 byte connection_id)
+ 0x3C,
+ // connection_id
+ 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
+ // packet sequence number
+ 0xA8, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // private flags (entropy)
+ 0x01,
- // frame type (ack frame)
- // (has nacks, not truncated, 6 byte largest observed, 1 byte delta)
- 0x6C,
- // entropy hash of all received packets.
- 0xBA,
- // largest observed packet sequence number
- 0xBF, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // Zero delta time.
- 0x0, 0x0,
- // Number of timestamps.
- 0x01,
- // Delta from largest observed.
- 0x01,
- // Delta time.
- 0x10, 0x32, 0x54, 0x76,
- // num missing packets
- 0x01,
- // missing packet delta
- 0x01,
- // 0 more missing packets in range.
- 0x00,
- // Number of revived packets.
- 0x00,
+ // frame type (ack frame)
+ // (has nacks, not truncated, 6 byte largest observed, 1 byte delta)
+ 0x6C,
+ // entropy hash of all received packets.
+ 0xBA,
+ // largest observed packet sequence number
+ 0xBF, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // Zero delta time.
+ 0x00, 0x00,
+ // Number of timestamps.
+ 0x01,
+ // Delta from largest observed.
+ 0x01,
+ // Delta time.
+ 0x10, 0x32, 0x54, 0x76,
+ // num missing packets
+ 0x01,
+ // missing packet delta
+ 0x01,
+ // 0 more missing packets in range.
+ 0x00,
+ // Number of revived packets.
+ 0x00,
};
QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false);
@@ -1990,41 +1883,35 @@
TEST_P(QuicFramerTest, AckFrame) {
- if (version_ <= QUIC_VERSION_22) {
- return;
- }
unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xA8, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
+ // public flags (8 byte connection_id)
+ 0x3C,
+ // connection_id
+ 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
+ // packet sequence number
+ 0xA8, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // private flags (entropy)
+ 0x01,
- // frame type (ack frame)
- // (has nacks, not truncated, 6 byte largest observed, 1 byte delta)
- 0x6C,
- // entropy hash of all received packets.
- 0xBA,
- // largest observed packet sequence number
- 0xBF, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // Zero delta time.
- 0x0, 0x0,
- // Number of timestamps.
- 0x00,
- // num missing packets
- 0x01,
- // missing packet delta
- 0x01,
- // 0 more missing packets in range.
- 0x00,
- // Number of revived packets.
- 0x00,
+ // frame type (ack frame)
+ // (has nacks, not truncated, 6 byte largest observed, 1 byte delta)
+ 0x6C,
+ // entropy hash of all received packets.
+ 0xBA,
+ // largest observed packet sequence number
+ 0xBF, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // Zero delta time.
+ 0x00, 0x00,
+ // Number of timestamps.
+ 0x00,
+ // num missing packets
+ 0x01,
+ // missing packet delta
+ 0x01,
+ // 0 more missing packets in range.
+ 0x00,
+ // Number of revived packets.
+ 0x00,
};
QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false);
@@ -2090,46 +1977,39 @@
}
TEST_P(QuicFramerTest, AckFrameRevivedPackets) {
- if (version_ <= QUIC_VERSION_22) {
- return;
- }
unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xA8, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
+ // public flags (8 byte connection_id)
+ 0x3C,
+ // connection_id
+ 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
+ // packet sequence number
+ 0xA8, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // private flags (entropy)
+ 0x01,
- // frame type (ack frame)
- // (has nacks, not truncated, 6 byte largest observed, 1 byte delta)
- 0x6C,
- // entropy hash of all received packets.
- 0xBA,
- // largest observed packet sequence number
- 0xBF, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // Zero delta time.
- 0x0, 0x0,
- // num received packets.
- 0x00,
- // num missing packets
- 0x01,
- // missing packet delta
- 0x01,
- // 0 more missing packets in range.
- 0x00,
- // Number of revived packets.
- 0x01,
- // Revived packet sequence number.
- 0xBE, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // Number of revived packets.
- 0x00,
+ // frame type (ack frame)
+ // (has nacks, not truncated, 6 byte largest observed, 1 byte delta)
+ 0x6C,
+ // entropy hash of all received packets.
+ 0xBA,
+ // largest observed packet sequence number
+ 0xBF, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // Zero delta time.
+ 0x00, 0x00,
+ // num received packets.
+ 0x00,
+ // num missing packets
+ 0x01,
+ // missing packet delta
+ 0x01,
+ // 0 more missing packets in range.
+ 0x00,
+ // Number of revived packets.
+ 0x01,
+ // Revived packet sequence number.
+ 0xBE, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // Number of revived packets.
+ 0x00,
};
QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false);
@@ -2200,192 +2080,28 @@
}
}
-TEST_P(QuicFramerTest, AckFrameRevivedPacketsv22) {
- if (version_ > QUIC_VERSION_22) {
- return;
- }
- unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xA8, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
-
- // frame type (ack frame)
- // (has nacks, not truncated, 6 byte largest observed, 1 byte delta)
- 0x6C,
- // entropy hash of all received packets.
- 0xBA,
- // largest observed packet sequence number
- 0xBF, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // Zero delta time.
- 0x0, 0x0,
- // num missing packets
- 0x01,
- // missing packet delta
- 0x01,
- // 0 more missing packets in range.
- 0x00,
- // Number of revived packets.
- 0x01,
- // Revived packet sequence number.
- 0xBE, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // Number of revived packets.
- 0x00,
- };
-
- QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false);
- EXPECT_TRUE(framer_.ProcessPacket(encrypted));
-
- EXPECT_EQ(QUIC_NO_ERROR, framer_.error());
- ASSERT_TRUE(visitor_.header_.get());
- EXPECT_TRUE(CheckDecryption(encrypted, !kIncludeVersion));
-
- EXPECT_EQ(0u, visitor_.stream_frames_.size());
- ASSERT_EQ(1u, visitor_.ack_frames_.size());
- const QuicAckFrame& frame = *visitor_.ack_frames_[0];
- EXPECT_EQ(0xBA, frame.entropy_hash);
- EXPECT_EQ(GG_UINT64_C(0x0123456789ABF), frame.largest_observed);
- ASSERT_EQ(1u, frame.missing_packets.size());
- SequenceNumberSet::const_iterator missing_iter =
- frame.missing_packets.begin();
- EXPECT_EQ(GG_UINT64_C(0x0123456789ABE), *missing_iter);
-
- const size_t kReceivedEntropyOffset = kQuicFrameTypeSize;
- const size_t kLargestObservedOffset = kReceivedEntropyOffset +
- kQuicEntropyHashSize;
- const size_t kMissingDeltaTimeOffset = kLargestObservedOffset +
- PACKET_6BYTE_SEQUENCE_NUMBER;
- const size_t kNumMissingPacketOffset = kMissingDeltaTimeOffset +
- kQuicDeltaTimeLargestObservedSize;
- const size_t kMissingPacketsOffset = kNumMissingPacketOffset +
- kNumberOfNackRangesSize;
- const size_t kMissingPacketsRange = kMissingPacketsOffset +
- PACKET_1BYTE_SEQUENCE_NUMBER;
- const size_t kRevivedPacketsLength = kMissingPacketsRange +
- PACKET_1BYTE_SEQUENCE_NUMBER;
- const size_t kRevivedPacketSequenceNumberLength = kRevivedPacketsLength +
- PACKET_1BYTE_SEQUENCE_NUMBER;
- // Now test framing boundaries.
- const size_t ack_frame_size = kRevivedPacketSequenceNumberLength +
- PACKET_6BYTE_SEQUENCE_NUMBER;
- for (size_t i = kQuicFrameTypeSize; i < ack_frame_size; ++i) {
- string expected_error;
- if (i < kReceivedEntropyOffset) {
- expected_error = "Unable to read least unacked delta.";
- } else if (i < kLargestObservedOffset) {
- expected_error = "Unable to read entropy hash for received packets.";
- } else if (i < kMissingDeltaTimeOffset) {
- expected_error = "Unable to read largest observed.";
- } else if (i < kNumMissingPacketOffset) {
- expected_error = "Unable to read delta time largest observed.";
- } else if (i < kMissingPacketsOffset) {
- expected_error = "Unable to read num missing packet ranges.";
- } else if (i < kMissingPacketsRange) {
- expected_error = "Unable to read missing sequence number delta.";
- } else if (i < kRevivedPacketsLength) {
- expected_error = "Unable to read missing sequence number range.";
- } else if (i < kRevivedPacketSequenceNumberLength) {
- expected_error = "Unable to read num revived packets.";
- } else {
- expected_error = "Unable to read revived packet.";
- }
- CheckProcessingFails(
- packet,
- i + GetPacketHeaderSize(PACKET_8BYTE_CONNECTION_ID, !kIncludeVersion,
- PACKET_6BYTE_SEQUENCE_NUMBER, NOT_IN_FEC_GROUP),
- expected_error, QUIC_INVALID_ACK_DATA);
- }
-}
-
-TEST_P(QuicFramerTest, AckFrameNoNacksv22) {
- if (version_ > QUIC_VERSION_22) {
- return;
- }
- unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xA8, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
-
- // frame type (ack frame)
- // (no nacks, not truncated, 6 byte largest observed, 1 byte delta)
- 0x4C,
- // entropy hash of all received packets.
- 0xBA,
- // largest observed packet sequence number
- 0xBF, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // Zero delta time.
- 0x0, 0x0,
- };
-
- QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false);
- EXPECT_TRUE(framer_.ProcessPacket(encrypted));
-
- EXPECT_EQ(QUIC_NO_ERROR, framer_.error());
- ASSERT_TRUE(visitor_.header_.get());
- EXPECT_TRUE(CheckDecryption(encrypted, !kIncludeVersion));
-
- EXPECT_EQ(0u, visitor_.stream_frames_.size());
- ASSERT_EQ(1u, visitor_.ack_frames_.size());
- QuicAckFrame* frame = visitor_.ack_frames_[0];
- EXPECT_EQ(0xBA, frame->entropy_hash);
- EXPECT_EQ(GG_UINT64_C(0x0123456789ABF), frame->largest_observed);
- ASSERT_EQ(0u, frame->missing_packets.size());
-
- // Verify that the packet re-serializes identically.
- QuicFrames frames;
- frames.push_back(QuicFrame(frame));
- scoped_ptr<QuicPacket> data(BuildDataPacket(*visitor_.header_, frames));
- ASSERT_TRUE(data != nullptr);
-
- test::CompareCharArraysWithHexError("constructed packet",
- data->data(), data->length(),
- AsChars(packet), arraysize(packet));
-}
-
TEST_P(QuicFramerTest, AckFrameNoNacks) {
- if (version_ <= QUIC_VERSION_22) {
- return;
- }
unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xA8, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
+ // public flags (8 byte connection_id)
+ 0x3C,
+ // connection_id
+ 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
+ // packet sequence number
+ 0xA8, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // private flags (entropy)
+ 0x01,
- // frame type (ack frame)
- // (no nacks, not truncated, 6 byte largest observed, 1 byte delta)
- 0x4C,
- // entropy hash of all received packets.
- 0xBA,
- // largest observed packet sequence number
- 0xBF, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // Zero delta time.
- 0x0, 0x0,
- // Number of received packets.
- 0x00,
+ // frame type (ack frame)
+ // (no nacks, not truncated, 6 byte largest observed, 1 byte delta)
+ 0x4C,
+ // entropy hash of all received packets.
+ 0xBA,
+ // largest observed packet sequence number
+ 0xBF, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // Zero delta time.
+ 0x00, 0x00,
+ // Number of received packets.
+ 0x00,
};
QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false);
@@ -2408,125 +2124,47 @@
scoped_ptr<QuicPacket> data(BuildDataPacket(*visitor_.header_, frames));
ASSERT_TRUE(data != nullptr);
- test::CompareCharArraysWithHexError("constructed packet",
- data->data(), data->length(),
- AsChars(packet), arraysize(packet));
-}
-
-TEST_P(QuicFramerTest, AckFrame500Nacksv22) {
- if (version_ > QUIC_VERSION_22) {
- return;
- }
- unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xA8, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
-
- // frame type (ack frame)
- // (has nacks, not truncated, 6 byte largest observed, 1 byte delta)
- 0x6C,
- // entropy hash of all received packets.
- 0xBA,
- // largest observed packet sequence number
- 0xBF, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // Zero delta time.
- 0x0, 0x0,
- // num missing packet ranges
- 0x02,
- // missing packet delta
- 0x01,
- // 243 more missing packets in range.
- // The ranges are listed in this order so the re-constructed packet matches.
- 0xF3,
- // No gap between ranges
- 0x00,
- // 255 more missing packets in range.
- 0xFF,
- // No revived packets.
- 0x00,
- };
-
- QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false);
- EXPECT_TRUE(framer_.ProcessPacket(encrypted));
-
- EXPECT_EQ(QUIC_NO_ERROR, framer_.error());
- ASSERT_TRUE(visitor_.header_.get());
- EXPECT_TRUE(CheckDecryption(encrypted, !kIncludeVersion));
-
- EXPECT_EQ(0u, visitor_.stream_frames_.size());
- ASSERT_EQ(1u, visitor_.ack_frames_.size());
- QuicAckFrame* frame = visitor_.ack_frames_[0];
- EXPECT_EQ(0xBA, frame->entropy_hash);
- EXPECT_EQ(GG_UINT64_C(0x0123456789ABF), frame->largest_observed);
- EXPECT_EQ(0u, frame->revived_packets.size());
- ASSERT_EQ(500u, frame->missing_packets.size());
- SequenceNumberSet::const_iterator first_missing_iter =
- frame->missing_packets.begin();
- EXPECT_EQ(GG_UINT64_C(0x0123456789ABE) - 499, *first_missing_iter);
- SequenceNumberSet::const_reverse_iterator last_missing_iter =
- frame->missing_packets.rbegin();
- EXPECT_EQ(GG_UINT64_C(0x0123456789ABE), *last_missing_iter);
-
- // Verify that the packet re-serializes identically.
- QuicFrames frames;
- frames.push_back(QuicFrame(frame));
- scoped_ptr<QuicPacket> data(BuildDataPacket(*visitor_.header_, frames));
- ASSERT_TRUE(data != nullptr);
-
- test::CompareCharArraysWithHexError("constructed packet",
- data->data(), data->length(),
- AsChars(packet), arraysize(packet));
+ test::CompareCharArraysWithHexError("constructed packet", data->data(),
+ data->length(), AsChars(packet),
+ arraysize(packet));
}
TEST_P(QuicFramerTest, AckFrame500Nacks) {
- if (version_ <= QUIC_VERSION_22) {
- return;
- }
unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xA8, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
+ // public flags (8 byte connection_id)
+ 0x3C,
+ // connection_id
+ 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
+ // packet sequence number
+ 0xA8, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // private flags (entropy)
+ 0x01,
- // frame type (ack frame)
- // (has nacks, not truncated, 6 byte largest observed, 1 byte delta)
- 0x6C,
- // entropy hash of all received packets.
- 0xBA,
- // largest observed packet sequence number
- 0xBF, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // Zero delta time.
- 0x0, 0x0,
- // No received packets.
- 0x00,
- // num missing packet ranges
- 0x02,
- // missing packet delta
- 0x01,
- // 243 more missing packets in range.
- // The ranges are listed in this order so the re-constructed packet matches.
- 0xF3,
- // No gap between ranges
- 0x00,
- // 255 more missing packets in range.
- 0xFF,
- // No revived packets.
- 0x00,
+ // frame type (ack frame)
+ // (has nacks, not truncated, 6 byte largest observed, 1 byte delta)
+ 0x6C,
+ // entropy hash of all received packets.
+ 0xBA,
+ // largest observed packet sequence number
+ 0xBF, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // Zero delta time.
+ 0x00, 0x00,
+ // No received packets.
+ 0x00,
+ // num missing packet ranges
+ 0x02,
+ // missing packet delta
+ 0x01,
+ // 243 more missing packets in range.
+ // The ranges are listed in this order so the re-constructed packet
+ // matches.
+ 0xF3,
+ // No gap between ranges
+ 0x00,
+ // 255 more missing packets in range.
+ 0xFF,
+ // No revived packets.
+ 0x00,
};
QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false);
@@ -2561,82 +2199,6 @@
AsChars(packet), arraysize(packet));
}
-TEST_P(QuicFramerTest, CongestionFeedbackFrameTCP) {
- unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xBC, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags
- 0x00,
-
- // frame type (congestion feedback frame)
- 0x20,
- // congestion feedback type (tcp)
- 0x00,
- // ack_frame.feedback.tcp.receive_window
- 0x03, 0x04,
- };
-
- QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false);
- EXPECT_TRUE(framer_.ProcessPacket(encrypted));
-
- EXPECT_EQ(QUIC_NO_ERROR, framer_.error());
- ASSERT_TRUE(visitor_.header_.get());
- EXPECT_TRUE(CheckDecryption(encrypted, !kIncludeVersion));
-
- EXPECT_EQ(0u, visitor_.stream_frames_.size());
- ASSERT_EQ(1u, visitor_.congestion_feedback_frames_.size());
- const QuicCongestionFeedbackFrame& frame =
- *visitor_.congestion_feedback_frames_[0];
- ASSERT_EQ(kTCP, frame.type);
- EXPECT_EQ(0x4030u, frame.tcp.receive_window);
-
- // Now test framing boundaries.
- for (size_t i = kQuicFrameTypeSize; i < 4; ++i) {
- string expected_error;
- if (i < 2) {
- expected_error = "Unable to read congestion feedback type.";
- } else if (i < 4) {
- expected_error = "Unable to read receive window.";
- }
- CheckProcessingFails(
- packet,
- i + GetPacketHeaderSize(PACKET_8BYTE_CONNECTION_ID, !kIncludeVersion,
- PACKET_6BYTE_SEQUENCE_NUMBER, NOT_IN_FEC_GROUP),
- expected_error, QUIC_INVALID_CONGESTION_FEEDBACK_DATA);
- }
-}
-
-TEST_P(QuicFramerTest, CongestionFeedbackFrameInvalidFeedback) {
- unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xBC, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags
- 0x00,
-
- // frame type (congestion feedback frame)
- 0x20,
- // congestion feedback type (invalid)
- 0x03,
- };
-
- QuicEncryptedPacket encrypted(AsChars(packet), arraysize(packet), false);
- EXPECT_FALSE(framer_.ProcessPacket(encrypted));
- EXPECT_TRUE(CheckDecryption(encrypted, !kIncludeVersion));
- EXPECT_EQ(QUIC_INVALID_CONGESTION_FEEDBACK_DATA, framer_.error());
-}
-
TEST_P(QuicFramerTest, StopWaitingFrame) {
unsigned char packet[] = {
// public flags (8 byte connection_id)
@@ -3500,31 +3062,26 @@
QuicFrames frames;
frames.push_back(QuicFrame(&stream_frame));
unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xBC, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy, is_in_fec_group)
- 0x03,
- // FEC group
- 0x00,
- // frame type (stream frame with fin and data length field)
- 0xFF,
- // stream id
- 0x04, 0x03, 0x02, 0x01,
- // offset
- 0x54, 0x76, 0x10, 0x32,
- 0xDC, 0xFE, 0x98, 0xBA,
- // data length (since packet is in an FEC group)
- 0x0C, 0x00,
- // data
- 'h', 'e', 'l', 'l',
- 'o', ' ', 'w', 'o',
- 'r', 'l', 'd', '!',
+ // public flags (8 byte connection_id)
+ 0x3C,
+ // connection_id
+ 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
+ // packet sequence number
+ 0xBC, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // private flags (entropy, is_in_fec_group)
+ 0x03,
+ // FEC group
+ 0x00,
+ // frame type (stream frame with fin and data length field)
+ 0xFF,
+ // stream id
+ 0x04, 0x03, 0x02, 0x01,
+ // offset
+ 0x54, 0x76, 0x10, 0x32, 0xDC, 0xFE, 0x98, 0xBA,
+ // data length (since packet is in an FEC group)
+ 0x0C, 0x00,
+ // data
+ 'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd', '!',
};
scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
@@ -3555,30 +3112,61 @@
frames.push_back(QuicFrame(&stream_frame));
unsigned char packet[] = {
- // public flags (version, 8 byte connection_id)
- 0x3D,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // version tag
- 'Q', '0', GetQuicVersionDigitTens(), GetQuicVersionDigitOnes(),
- // packet sequence number
- 0xBC, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
+ // public flags (version, 8 byte connection_id)
+ 0x3D,
+ // connection_id
+ 0x10,
+ 0x32,
+ 0x54,
+ 0x76,
+ 0x98,
+ 0xBA,
+ 0xDC,
+ 0xFE,
+ // version tag
+ 'Q',
+ '0',
+ GetQuicVersionDigitTens(),
+ GetQuicVersionDigitOnes(),
+ // packet sequence number
+ 0xBC,
+ 0x9A,
+ 0x78,
+ 0x56,
+ 0x34,
+ 0x12,
+ // private flags (entropy)
+ 0x01,
- // frame type (stream frame with fin and no length)
- 0xDF,
- // stream id
- 0x04, 0x03, 0x02, 0x01,
- // offset
- 0x54, 0x76, 0x10, 0x32,
- 0xDC, 0xFE, 0x98, 0xBA,
- // data
- 'h', 'e', 'l', 'l',
- 'o', ' ', 'w', 'o',
- 'r', 'l', 'd', '!',
+ // frame type (stream frame with fin and no length)
+ 0xDF,
+ // stream id
+ 0x04,
+ 0x03,
+ 0x02,
+ 0x01,
+ // offset
+ 0x54,
+ 0x76,
+ 0x10,
+ 0x32,
+ 0xDC,
+ 0xFE,
+ 0x98,
+ 0xBA,
+ // data
+ 'h',
+ 'e',
+ 'l',
+ 'l',
+ 'o',
+ ' ',
+ 'w',
+ 'o',
+ 'r',
+ 'l',
+ 'd',
+ '!',
};
QuicFramerPeer::SetIsServer(&framer_, false);
@@ -3597,13 +3185,22 @@
header.version_flag = true;
unsigned char packet[] = {
- // public flags (version, 8 byte connection_id)
- 0x0D,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // version tag
- 'Q', '0', GetQuicVersionDigitTens(), GetQuicVersionDigitOnes(),
+ // public flags (version, 8 byte connection_id)
+ 0x0D,
+ // connection_id
+ 0x10,
+ 0x32,
+ 0x54,
+ 0x76,
+ 0x98,
+ 0xBA,
+ 0xDC,
+ 0xFE,
+ // version tag
+ 'Q',
+ '0',
+ GetQuicVersionDigitTens(),
+ GetQuicVersionDigitOnes(),
};
QuicVersionVector versions;
@@ -3611,78 +3208,12 @@
scoped_ptr<QuicEncryptedPacket> data(
framer_.BuildVersionNegotiationPacket(header, versions));
- test::CompareCharArraysWithHexError("constructed packet",
- data->data(), data->length(),
- AsChars(packet), arraysize(packet));
-}
-
-TEST_P(QuicFramerTest, BuildAckFramePacketv22) {
- if (version_ > QUIC_VERSION_22) {
- return;
- }
- QuicPacketHeader header;
- header.public_header.connection_id = GG_UINT64_C(0xFEDCBA9876543210);
- header.public_header.reset_flag = false;
- header.public_header.version_flag = false;
- header.fec_flag = false;
- header.entropy_flag = true;
- header.packet_sequence_number = GG_UINT64_C(0x770123456789AA8);
- header.fec_group = 0;
-
- QuicAckFrame ack_frame;
- ack_frame.entropy_hash = 0x43;
- ack_frame.largest_observed = GG_UINT64_C(0x770123456789ABF);
- ack_frame.delta_time_largest_observed = QuicTime::Delta::Zero();
- ack_frame.missing_packets.insert(
- GG_UINT64_C(0x770123456789ABE));
-
- QuicFrames frames;
- frames.push_back(QuicFrame(&ack_frame));
-
- unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xA8, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
-
- // frame type (ack frame)
- // (has nacks, not truncated, 6 byte largest observed, 1 byte delta)
- 0x6C,
- // entropy hash of all received packets.
- 0x43,
- // largest observed packet sequence number
- 0xBF, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // Zero delta time.
- 0x0, 0x0,
- // num missing packet ranges
- 0x01,
- // missing packet delta
- 0x01,
- // 0 more missing packets in range.
- 0x00,
- // 0 revived packets.
- 0x00,
- };
-
- scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
- ASSERT_TRUE(data != nullptr);
-
- test::CompareCharArraysWithHexError("constructed packet",
- data->data(), data->length(),
- AsChars(packet), arraysize(packet));
+ test::CompareCharArraysWithHexError("constructed packet", data->data(),
+ data->length(), AsChars(packet),
+ arraysize(packet));
}
TEST_P(QuicFramerTest, BuildAckFramePacket) {
- if (version_ <= QUIC_VERSION_22) {
- return;
- }
QuicPacketHeader header;
header.public_header.connection_id = GG_UINT64_C(0xFEDCBA9876543210);
header.public_header.reset_flag = false;
@@ -3696,44 +3227,40 @@
ack_frame.entropy_hash = 0x43;
ack_frame.largest_observed = GG_UINT64_C(0x770123456789ABF);
ack_frame.delta_time_largest_observed = QuicTime::Delta::Zero();
- ack_frame.missing_packets.insert(
- GG_UINT64_C(0x770123456789ABE));
+ ack_frame.missing_packets.insert(GG_UINT64_C(0x770123456789ABE));
QuicFrames frames;
frames.push_back(QuicFrame(&ack_frame));
unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xA8, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
+ // public flags (8 byte connection_id)
+ 0x3C,
+ // connection_id
+ 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
+ // packet sequence number
+ 0xA8, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // private flags (entropy)
+ 0x01,
- // frame type (ack frame)
- // (has nacks, not truncated, 6 byte largest observed, 1 byte delta)
- 0x6C,
- // entropy hash of all received packets.
- 0x43,
- // largest observed packet sequence number
- 0xBF, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // Zero delta time.
- 0x0, 0x0,
- // num received packets.
- 0x00,
- // num missing packet ranges
- 0x01,
- // missing packet delta
- 0x01,
- // 0 more missing packets in range.
- 0x00,
- // 0 revived packets.
- 0x00,
+ // frame type (ack frame)
+ // (has nacks, not truncated, 6 byte largest observed, 1 byte delta)
+ 0x6C,
+ // entropy hash of all received packets.
+ 0x43,
+ // largest observed packet sequence number
+ 0xBF, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // Zero delta time.
+ 0x00, 0x00,
+ // num received packets.
+ 0x00,
+ // num missing packet ranges
+ 0x01,
+ // missing packet delta
+ 0x01,
+ // 0 more missing packets in range.
+ 0x00,
+ // 0 revived packets.
+ 0x00,
};
scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
@@ -3747,125 +3274,7 @@
// TODO(jri): Add test for tuncated packets in which the original ack frame had
// revived packets. (In both the large and small packet cases below).
-TEST_P(QuicFramerTest, BuildTruncatedAckFrameLargePacketv22) {
- if (version_ > QUIC_VERSION_22) {
- return;
- }
- QuicPacketHeader header;
- header.public_header.connection_id = GG_UINT64_C(0xFEDCBA9876543210);
- header.public_header.reset_flag = false;
- header.public_header.version_flag = false;
- header.fec_flag = false;
- header.entropy_flag = true;
- header.packet_sequence_number = GG_UINT64_C(0x770123456789AA8);
- header.fec_group = 0;
-
- QuicAckFrame ack_frame;
- // This entropy hash is different from what shows up in the packet below,
- // since entropy is recomputed by the framer on ack truncation (by
- // TestEntropyCalculator for this test.)
- ack_frame.entropy_hash = 0x43;
- ack_frame.largest_observed = 2 * 300;
- ack_frame.delta_time_largest_observed = QuicTime::Delta::Zero();
- for (size_t i = 1; i < 2 * 300; i += 2) {
- ack_frame.missing_packets.insert(i);
- }
-
- QuicFrames frames;
- frames.push_back(QuicFrame(&ack_frame));
-
- unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xA8, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
-
- // frame type (ack frame)
- // (has nacks, is truncated, 2 byte largest observed, 1 byte delta)
- 0x74,
- // entropy hash of all received packets, set to 1 by TestEntropyCalculator
- // since ack is truncated.
- 0x01,
- // 2-byte largest observed packet sequence number.
- // Expected to be 510 (0x1FE), since only 255 nack ranges can fit.
- 0xFE, 0x01,
- // Zero delta time.
- 0x0, 0x0,
- // num missing packet ranges (limited to 255 by size of this field).
- 0xFF,
- // {missing packet delta, further missing packets in range}
- // 6 nack ranges x 42 + 3 nack ranges
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-
- // 0 revived packets.
- 0x00,
- };
-
- scoped_ptr<QuicPacket> data(
- framer_.BuildDataPacket(header, frames, kMaxPacketSize).packet);
- ASSERT_TRUE(data != nullptr);
-
- test::CompareCharArraysWithHexError("constructed packet",
- data->data(), data->length(),
- AsChars(packet), arraysize(packet));
-}
-
TEST_P(QuicFramerTest, BuildTruncatedAckFrameLargePacket) {
- if (version_ <= QUIC_VERSION_22) {
- return;
- }
QuicPacketHeader header;
header.public_header.connection_id = GG_UINT64_C(0xFEDCBA9876543210);
header.public_header.reset_flag = false;
@@ -3890,82 +3299,80 @@
frames.push_back(QuicFrame(&ack_frame));
unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xA8, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
+ // public flags (8 byte connection_id)
+ 0x3C,
+ // connection_id
+ 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
+ // packet sequence number
+ 0xA8, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // private flags (entropy)
+ 0x01,
- // frame type (ack frame)
- // (has nacks, is truncated, 2 byte largest observed, 1 byte delta)
- 0x74,
- // entropy hash of all received packets, set to 1 by TestEntropyCalculator
- // since ack is truncated.
- 0x01,
- // 2-byte largest observed packet sequence number.
- // Expected to be 510 (0x1FE), since only 255 nack ranges can fit.
- 0xFE, 0x01,
- // Zero delta time.
- 0x0, 0x0,
- // num missing packet ranges (limited to 255 by size of this field).
- 0xFF,
- // {missing packet delta, further missing packets in range}
- // 6 nack ranges x 42 + 3 nack ranges
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ // frame type (ack frame)
+ // (has nacks, is truncated, 2 byte largest observed, 1 byte delta)
+ 0x74,
+ // entropy hash of all received packets, set to 1 by TestEntropyCalculator
+ // since ack is truncated.
+ 0x01,
+ // 2-byte largest observed packet sequence number.
+ // Expected to be 510 (0x1FE), since only 255 nack ranges can fit.
+ 0xFE, 0x01,
+ // Zero delta time.
+ 0x00, 0x00,
+ // num missing packet ranges (limited to 255 by size of this field).
+ 0xFF,
+ // {missing packet delta, further missing packets in range}
+ // 6 nack ranges x 42 + 3 nack ranges
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- // 0 revived packets.
- 0x00,
+ // 0 revived packets.
+ 0x00,
};
scoped_ptr<QuicPacket> data(
@@ -3977,80 +3384,7 @@
AsChars(packet), arraysize(packet));
}
-
-TEST_P(QuicFramerTest, BuildTruncatedAckFrameSmallPacketv22) {
- if (version_ > QUIC_VERSION_22) {
- return;
- }
- QuicPacketHeader header;
- header.public_header.connection_id = GG_UINT64_C(0xFEDCBA9876543210);
- header.public_header.reset_flag = false;
- header.public_header.version_flag = false;
- header.fec_flag = false;
- header.entropy_flag = true;
- header.packet_sequence_number = GG_UINT64_C(0x770123456789AA8);
- header.fec_group = 0;
-
- QuicAckFrame ack_frame;
- // This entropy hash is different from what shows up in the packet below,
- // since entropy is recomputed by the framer on ack truncation (by
- // TestEntropyCalculator for this test.)
- ack_frame.entropy_hash = 0x43;
- ack_frame.largest_observed = 2 * 300;
- ack_frame.delta_time_largest_observed = QuicTime::Delta::Zero();
- for (size_t i = 1; i < 2 * 300; i += 2) {
- ack_frame.missing_packets.insert(i);
- }
-
- QuicFrames frames;
- frames.push_back(QuicFrame(&ack_frame));
-
- unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xA8, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
-
- // frame type (ack frame)
- // (has nacks, is truncated, 2 byte largest observed, 1 byte delta)
- 0x74,
- // entropy hash of all received packets, set to 1 by TestEntropyCalculator
- // since ack is truncated.
- 0x01,
- // 2-byte largest observed packet sequence number.
- // Expected to be 12 (0x0C), since only 6 nack ranges can fit.
- 0x0C, 0x00,
- // Zero delta time.
- 0x0, 0x0,
- // num missing packet ranges (limited to 6 by packet size of 37).
- 0x06,
- // {missing packet delta, further missing packets in range}
- // 6 nack ranges
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- // 0 revived packets.
- 0x00,
- };
-
- scoped_ptr<QuicPacket> data(
- framer_.BuildDataPacket(header, frames, 37u).packet);
- ASSERT_TRUE(data != nullptr);
- // Expect 1 byte unused since at least 2 bytes are needed to fit more nacks.
- EXPECT_EQ(36u, data->length());
- test::CompareCharArraysWithHexError("constructed packet",
- data->data(), data->length(),
- AsChars(packet), arraysize(packet));
-}
-
TEST_P(QuicFramerTest, BuildTruncatedAckFrameSmallPacket) {
- if (version_ <= QUIC_VERSION_22) {
- return;
- }
QuicPacketHeader header;
header.public_header.connection_id = GG_UINT64_C(0xFEDCBA9876543210);
header.public_header.reset_flag = false;
@@ -4075,35 +3409,33 @@
frames.push_back(QuicFrame(&ack_frame));
unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xA8, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags (entropy)
- 0x01,
+ // public flags (8 byte connection_id)
+ 0x3C,
+ // connection_id
+ 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
+ // packet sequence number
+ 0xA8, 0x9A, 0x78, 0x56, 0x34, 0x12,
+ // private flags (entropy)
+ 0x01,
- // frame type (ack frame)
- // (has nacks, is truncated, 2 byte largest observed, 1 byte delta)
- 0x74,
- // entropy hash of all received packets, set to 1 by TestEntropyCalculator
- // since ack is truncated.
- 0x01,
- // 2-byte largest observed packet sequence number.
- // Expected to be 12 (0x0C), since only 6 nack ranges can fit.
- 0x0C, 0x00,
- // Zero delta time.
- 0x0, 0x0,
- // num missing packet ranges (limited to 6 by packet size of 37).
- 0x06,
- // {missing packet delta, further missing packets in range}
- // 6 nack ranges
- 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- // 0 revived packets.
- 0x00,
+ // frame type (ack frame)
+ // (has nacks, is truncated, 2 byte largest observed, 1 byte delta)
+ 0x74,
+ // entropy hash of all received packets, set to 1 by TestEntropyCalculator
+ // since ack is truncated.
+ 0x01,
+ // 2-byte largest observed packet sequence number.
+ // Expected to be 12 (0x0C), since only 6 nack ranges can fit.
+ 0x0C, 0x00,
+ // Zero delta time.
+ 0x00, 0x00,
+ // num missing packet ranges (limited to 6 by packet size of 37).
+ 0x06,
+ // {missing packet delta, further missing packets in range}
+ // 6 nack ranges
+ 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ // 0 revived packets.
+ 0x00,
};
scoped_ptr<QuicPacket> data(
@@ -4116,51 +3448,6 @@
AsChars(packet), arraysize(packet));
}
-TEST_P(QuicFramerTest, BuildCongestionFeedbackFramePacketTCP) {
- QuicPacketHeader header;
- header.public_header.connection_id = GG_UINT64_C(0xFEDCBA9876543210);
- header.public_header.reset_flag = false;
- header.public_header.version_flag = false;
- header.fec_flag = false;
- header.entropy_flag = false;
- header.packet_sequence_number = GG_UINT64_C(0x123456789ABC);
- header.fec_group = 0;
-
- QuicCongestionFeedbackFrame congestion_feedback_frame;
- congestion_feedback_frame.type = kTCP;
- congestion_feedback_frame.tcp.receive_window = 0x4030;
-
- QuicFrames frames;
- frames.push_back(QuicFrame(&congestion_feedback_frame));
-
- unsigned char packet[] = {
- // public flags (8 byte connection_id)
- 0x3C,
- // connection_id
- 0x10, 0x32, 0x54, 0x76,
- 0x98, 0xBA, 0xDC, 0xFE,
- // packet sequence number
- 0xBC, 0x9A, 0x78, 0x56,
- 0x34, 0x12,
- // private flags
- 0x00,
-
- // frame type (congestion feedback frame)
- 0x20,
- // congestion feedback type (TCP)
- 0x00,
- // TCP receive window
- 0x03, 0x04,
- };
-
- scoped_ptr<QuicPacket> data(BuildDataPacket(header, frames));
- ASSERT_TRUE(data != nullptr);
-
- test::CompareCharArraysWithHexError("constructed packet",
- data->data(), data->length(),
- AsChars(packet), arraysize(packet));
-}
-
TEST_P(QuicFramerTest, BuildStopWaitingPacket) {
QuicPacketHeader header;
header.public_header.connection_id = GG_UINT64_C(0xFEDCBA9876543210);
@@ -4207,30 +3494,6 @@
AsChars(packet), arraysize(packet));
}
-TEST_P(QuicFramerTest, BuildCongestionFeedbackFramePacketInvalidFeedback) {
- QuicPacketHeader header;
- header.public_header.connection_id = GG_UINT64_C(0xFEDCBA9876543210);
- header.public_header.reset_flag = false;
- header.public_header.version_flag = false;
- header.fec_flag = false;
- header.entropy_flag = false;
- header.packet_sequence_number = GG_UINT64_C(0x123456789ABC);
- header.fec_group = 0;
-
- QuicCongestionFeedbackFrame congestion_feedback_frame;
- congestion_feedback_frame.type =
- static_cast<CongestionFeedbackType>(kTCP + 1);
-
- QuicFrames frames;
- frames.push_back(QuicFrame(&congestion_feedback_frame));
-
- scoped_ptr<QuicPacket> data;
- EXPECT_DFATAL(
- data.reset(BuildDataPacket(header, frames)),
- "AppendCongestionFeedbackFrame failed");
- ASSERT_TRUE(data == nullptr);
-}
-
TEST_P(QuicFramerTest, BuildRstFramePacketQuic) {
QuicPacketHeader header;
header.public_header.connection_id = GG_UINT64_C(0xFEDCBA9876543210);
@@ -4768,54 +4031,7 @@
EXPECT_EQ(509u, *last_missing_iter);
}
-TEST_P(QuicFramerTest, AckTruncationSmallPacketv22) {
- if (version_ > QUIC_VERSION_22) {
- return;
- }
- QuicPacketHeader header;
- header.public_header.connection_id = GG_UINT64_C(0xFEDCBA9876543210);
- header.public_header.reset_flag = false;
- header.public_header.version_flag = false;
- header.fec_flag = false;
- header.entropy_flag = false;
- header.packet_sequence_number = GG_UINT64_C(0x123456789ABC);
- header.fec_group = 0;
-
- // Create a packet with just the ack.
- QuicAckFrame ack_frame = MakeAckFrameWithNackRanges(300, 0u);
- QuicFrame frame;
- frame.type = ACK_FRAME;
- frame.ack_frame = &ack_frame;
- QuicFrames frames;
- frames.push_back(frame);
-
- // Build an ack packet with truncation due to limit in number of nack ranges.
- scoped_ptr<QuicPacket> raw_ack_packet(
- framer_.BuildDataPacket(header, frames, 500).packet);
- ASSERT_TRUE(raw_ack_packet != nullptr);
- scoped_ptr<QuicEncryptedPacket> ack_packet(
- framer_.EncryptPacket(ENCRYPTION_NONE, header.packet_sequence_number,
- *raw_ack_packet));
- // Now make sure we can turn our ack packet back into an ack frame.
- ASSERT_TRUE(framer_.ProcessPacket(*ack_packet));
- ASSERT_EQ(1u, visitor_.ack_frames_.size());
- QuicAckFrame& processed_ack_frame = *visitor_.ack_frames_[0];
- EXPECT_TRUE(processed_ack_frame.is_truncated);
- EXPECT_EQ(476u, processed_ack_frame.largest_observed);
- ASSERT_EQ(238u, processed_ack_frame.missing_packets.size());
- SequenceNumberSet::const_iterator missing_iter =
- processed_ack_frame.missing_packets.begin();
- EXPECT_EQ(1u, *missing_iter);
- SequenceNumberSet::const_reverse_iterator last_missing_iter =
- processed_ack_frame.missing_packets.rbegin();
- EXPECT_EQ(475u, *last_missing_iter);
-}
-
-
TEST_P(QuicFramerTest, AckTruncationSmallPacket) {
- if (version_ <= QUIC_VERSION_22) {
- return;
- }
QuicPacketHeader header;
header.public_header.connection_id = GG_UINT64_C(0xFEDCBA9876543210);
header.public_header.reset_flag = false;
diff --git a/net/quic/quic_headers_stream.cc b/net/quic/quic_headers_stream.cc
index 369a348..b40142d 100644
--- a/net/quic/quic_headers_stream.cc
+++ b/net/quic/quic_headers_stream.cc
@@ -25,7 +25,8 @@
: public SpdyFramerVisitorInterface,
public SpdyFramerDebugVisitorInterface {
public:
- explicit SpdyFramerVisitor(QuicHeadersStream* stream) : stream_(stream) {}
+ SpdyFramerVisitor(SpdyMajorVersion spdy_version, QuicHeadersStream* stream)
+ : spdy_version_(spdy_version), stream_(stream) {}
// SpdyFramerVisitorInterface implementation
void OnSynStream(SpdyStreamId stream_id,
@@ -33,6 +34,11 @@
SpdyPriority priority,
bool fin,
bool unidirectional) override {
+ if (spdy_version_ != SPDY3) {
+ CloseConnection("SPDY SYN_STREAM frame received.");
+ return;
+ }
+
if (!stream_->IsConnected()) {
return;
}
@@ -51,6 +57,11 @@
}
void OnSynReply(SpdyStreamId stream_id, bool fin) override {
+ if (spdy_version_ != SPDY3) {
+ CloseConnection("SPDY SYN_REPLY frame received.");
+ return;
+ }
+
if (!stream_->IsConnected()) {
return;
}
@@ -124,7 +135,18 @@
SpdyPriority priority,
bool fin,
bool end) override {
- CloseConnection("SPDY HEADERS frame received.");
+ if (spdy_version_ == SPDY3) {
+ CloseConnection("SPDY HEADERS frame received.");
+ return;
+ }
+ if (!stream_->IsConnected()) {
+ return;
+ }
+ if (has_priority) {
+ stream_->OnSynStream(stream_id, priority, fin);
+ } else {
+ stream_->OnSynReply(stream_id, fin);
+ }
}
void OnWindowUpdate(SpdyStreamId stream_id,
@@ -140,7 +162,10 @@
}
void OnContinuation(SpdyStreamId stream_id, bool end) override {
- CloseConnection("SPDY CONTINUATION frame received.");
+ if (spdy_version_ == SPDY3) {
+ LOG(DFATAL) << "CONTINUATION frame received from a SPDY/3 framer";
+ CloseConnection("SPDY CONTINUATION frame received.");
+ }
}
bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
@@ -171,6 +196,7 @@
}
private:
+ SpdyMajorVersion spdy_version_;
QuicHeadersStream* stream_;
DISALLOW_COPY_AND_ASSIGN(SpdyFramerVisitor);
@@ -180,11 +206,8 @@
: ReliableQuicStream(kHeadersStreamId, session),
stream_id_(kInvalidStreamId),
fin_(false),
- frame_len_(0),
- spdy_framer_(SPDY3),
- spdy_framer_visitor_(new SpdyFramerVisitor(this)) {
- spdy_framer_.set_visitor(spdy_framer_visitor_.get());
- spdy_framer_.set_debug_visitor(spdy_framer_visitor_.get());
+ frame_len_(0) {
+ InitializeFramer(session->connection()->version());
// The headers stream is exempt from connection level flow control.
DisableConnectionFlowControlForThisStream();
}
@@ -195,18 +218,31 @@
QuicStreamId stream_id,
const SpdyHeaderBlock& headers,
bool fin,
+ QuicPriority priority,
QuicAckNotifier::DelegateInterface* ack_notifier_delegate) {
scoped_ptr<SpdySerializedFrame> frame;
- if (session()->is_server()) {
- SpdySynReplyIR syn_reply(stream_id);
- syn_reply.set_name_value_block(headers);
- syn_reply.set_fin(fin);
- frame.reset(spdy_framer_.SerializeFrame(syn_reply));
+ if (spdy_framer_->protocol_version() == SPDY3) {
+ if (session()->is_server()) {
+ SpdySynReplyIR syn_reply(stream_id);
+ syn_reply.set_name_value_block(headers);
+ syn_reply.set_fin(fin);
+ frame.reset(spdy_framer_->SerializeFrame(syn_reply));
+ } else {
+ SpdySynStreamIR syn_stream(stream_id);
+ syn_stream.set_name_value_block(headers);
+ syn_stream.set_fin(fin);
+ syn_stream.set_priority(priority);
+ frame.reset(spdy_framer_->SerializeFrame(syn_stream));
+ }
} else {
- SpdySynStreamIR syn_stream(stream_id);
- syn_stream.set_name_value_block(headers);
- syn_stream.set_fin(fin);
- frame.reset(spdy_framer_.SerializeFrame(syn_stream));
+ SpdyHeadersIR headers_frame(stream_id);
+ headers_frame.set_name_value_block(headers);
+ headers_frame.set_fin(fin);
+ if (!session()->is_server()) {
+ headers_frame.set_has_priority(true);
+ headers_frame.set_priority(priority);
+ }
+ frame.reset(spdy_framer_->SerializeFrame(headers_frame));
}
WriteOrBufferData(StringPiece(frame->data(), frame->size()), false,
ack_notifier_delegate);
@@ -215,11 +251,27 @@
uint32 QuicHeadersStream::ProcessRawData(const char* data,
uint32 data_len) {
- return spdy_framer_.ProcessInput(data, data_len);
+ return spdy_framer_->ProcessInput(data, data_len);
}
QuicPriority QuicHeadersStream::EffectivePriority() const { return 0; }
+void QuicHeadersStream::OnSuccessfulVersionNegotiation(QuicVersion version) {
+ InitializeFramer(version);
+}
+
+void QuicHeadersStream::InitializeFramer(QuicVersion version) {
+ SpdyMajorVersion spdy_version = version > QUIC_VERSION_23 ? SPDY4 : SPDY3;
+ if (spdy_framer_.get() != nullptr &&
+ spdy_framer_->protocol_version() == spdy_version) {
+ return;
+ }
+ spdy_framer_.reset(new SpdyFramer(spdy_version));
+ spdy_framer_visitor_.reset(new SpdyFramerVisitor(spdy_version, this));
+ spdy_framer_->set_visitor(spdy_framer_visitor_.get());
+ spdy_framer_->set_debug_visitor(spdy_framer_visitor_.get());
+}
+
void QuicHeadersStream::OnSynStream(SpdyStreamId stream_id,
SpdyPriority priority,
bool fin) {
@@ -265,9 +317,13 @@
}
void QuicHeadersStream::OnCompressedFrameSize(size_t frame_len) {
- DCHECK_EQ(kInvalidStreamId, stream_id_);
- DCHECK_EQ(0u, frame_len_);
- frame_len_ = frame_len;
+ if (spdy_framer_->protocol_version() == SPDY3) {
+ // SPDY/3 headers always fit into a single frame, so the previous headers
+ // should be completely processed when a new frame is received.
+ DCHECK_EQ(kInvalidStreamId, stream_id_);
+ DCHECK_EQ(0u, frame_len_);
+ }
+ frame_len_ += frame_len;
}
bool QuicHeadersStream::IsConnected() {
diff --git a/net/quic/quic_headers_stream.h b/net/quic/quic_headers_stream.h
index 95066b6..1a17731 100644
--- a/net/quic/quic_headers_stream.h
+++ b/net/quic/quic_headers_stream.h
@@ -31,15 +31,20 @@
QuicStreamId stream_id,
const SpdyHeaderBlock& headers,
bool fin,
+ QuicPriority priority,
QuicAckNotifier::DelegateInterface* ack_notifier_delegate);
// ReliableQuicStream implementation
uint32 ProcessRawData(const char* data, uint32 data_len) override;
QuicPriority EffectivePriority() const override;
+ void OnSuccessfulVersionNegotiation(QuicVersion version);
+
private:
class SpdyFramerVisitor;
+ void InitializeFramer(QuicVersion version);
+
// The following methods are called by the SimpleVisitor.
// Called when a SYN_STREAM frame has been received.
@@ -71,7 +76,7 @@
bool fin_;
size_t frame_len_;
- SpdyFramer spdy_framer_;
+ scoped_ptr<SpdyFramer> spdy_framer_;
scoped_ptr<SpdyFramerVisitor> spdy_framer_visitor_;
DISALLOW_COPY_AND_ASSIGN(QuicHeadersStream);
diff --git a/net/quic/quic_headers_stream_test.cc b/net/quic/quic_headers_stream_test.cc
index 89c87f2..9d684ac 100644
--- a/net/quic/quic_headers_stream_test.cc
+++ b/net/quic/quic_headers_stream_test.cc
@@ -14,7 +14,9 @@
#include "testing/gtest/include/gtest/gtest.h"
using base::StringPiece;
+using std::ostream;
using std::string;
+using std::vector;
using testing::Invoke;
using testing::StrictMock;
using testing::WithArgs;
@@ -72,26 +74,47 @@
MOCK_METHOD2(OnUnknownFrame, bool(SpdyStreamId stream_id, int frame_type));
};
-class QuicHeadersStreamTest : public ::testing::TestWithParam<bool> {
- public:
- static QuicVersionVector GetVersions() {
- QuicVersionVector versions;
- versions.push_back(QuicVersionMax());
- return versions;
+// Run all tests with each version, and client or server
+struct TestParams {
+ TestParams(QuicVersion version, bool is_server)
+ : version(version), is_server(is_server) {}
+
+ friend ostream& operator<<(ostream& os, const TestParams& p) {
+ os << "{ version: " << QuicVersionToString(p.version);
+ os << ", is_server: " << p.is_server << " }";
+ return os;
}
+ QuicVersion version;
+ bool is_server;
+};
+
+// Constructs various test permutations.
+vector<TestParams> GetTestParams() {
+ vector<TestParams> params;
+ QuicVersionVector all_supported_versions = QuicSupportedVersions();
+ for (const QuicVersion version : all_supported_versions) {
+ params.push_back(TestParams(version, false));
+ params.push_back(TestParams(version, true));
+ }
+ return params;
+}
+
+class QuicHeadersStreamTest : public ::testing::TestWithParam<TestParams> {
+ public:
QuicHeadersStreamTest()
- : connection_(new StrictMock<MockConnection>(is_server(), GetVersions())),
+ : connection_(new StrictMock<MockConnection>(is_server(), GetVersion())),
session_(connection_),
headers_stream_(QuicSessionPeer::GetHeadersStream(&session_)),
body_("hello world"),
- framer_(SPDY3) {
+ framer_(version() > QUIC_VERSION_23 ? SPDY4 : SPDY3) {
headers_[":version"] = "HTTP/1.1";
headers_[":status"] = "200 Ok";
headers_["content-length"] = "11";
framer_.set_visitor(&visitor_);
- EXPECT_EQ(QuicVersionMax(), session_.connection()->version());
+ EXPECT_EQ(version(), session_.connection()->version());
EXPECT_TRUE(headers_stream_ != nullptr);
+ VLOG(1) << GetParam();
}
QuicConsumedData SaveIov(const IOVector& data) {
@@ -130,15 +153,25 @@
// Write the headers and capture the outgoing data
EXPECT_CALL(session_, WritevData(kHeadersStreamId, _, _, false, _, nullptr))
.WillOnce(WithArgs<1>(Invoke(this, &QuicHeadersStreamTest::SaveIov)));
- headers_stream_->WriteHeaders(stream_id, headers_, fin, nullptr);
+ headers_stream_->WriteHeaders(stream_id, headers_, fin, priority, nullptr);
// Parse the outgoing data and check that it matches was was written.
if (type == SYN_STREAM) {
- EXPECT_CALL(visitor_, OnSynStream(stream_id, kNoAssociatedStream, 0,
- // priority,
- fin, kNotUnidirectional));
+ if (version() > QUIC_VERSION_23) {
+ EXPECT_CALL(visitor_, OnHeaders(stream_id, kHasPriority, priority, fin,
+ kFrameComplete));
+ } else {
+ EXPECT_CALL(visitor_,
+ OnSynStream(stream_id, kNoAssociatedStream,
+ /*priority=*/0, fin, kNotUnidirectional));
+ }
} else {
- EXPECT_CALL(visitor_, OnSynReply(stream_id, fin));
+ if (version() > QUIC_VERSION_23) {
+ EXPECT_CALL(visitor_, OnHeaders(stream_id, !kHasPriority,
+ /*priority=*/0, fin, kFrameComplete));
+ } else {
+ EXPECT_CALL(visitor_, OnSynReply(stream_id, fin));
+ }
}
EXPECT_CALL(visitor_, OnControlFrameHeaderData(stream_id, _, _))
.WillRepeatedly(WithArgs<1, 2>(
@@ -147,7 +180,8 @@
EXPECT_CALL(visitor_, OnStreamFrameData(stream_id, nullptr, 0, true));
}
framer_.ProcessInput(saved_data_.data(), saved_data_.length());
- EXPECT_FALSE(framer_.HasError()) << framer_.error_code();
+ EXPECT_FALSE(framer_.HasError())
+ << SpdyFramer::ErrorCodeToString(framer_.error_code());
CheckHeaders();
saved_data_.clear();
@@ -163,14 +197,22 @@
saved_header_data_.clear();
}
- bool is_server() {
- return GetParam();
+ bool is_server() { return GetParam().is_server; }
+
+ QuicVersion version() { return GetParam().version; }
+
+ QuicVersionVector GetVersion() {
+ QuicVersionVector versions;
+ versions.push_back(version());
+ return versions;
}
void CloseConnection() {
QuicConnectionPeer::CloseConnection(connection_);
}
+ static const bool kFrameComplete = true;
+ static const bool kHasPriority = true;
static const bool kNotUnidirectional = false;
static const bool kNoAssociatedStream = false;
@@ -185,7 +227,9 @@
StrictMock<MockVisitor> visitor_;
};
-INSTANTIATE_TEST_CASE_P(Tests, QuicHeadersStreamTest, testing::Bool());
+INSTANTIATE_TEST_CASE_P(Tests,
+ QuicHeadersStreamTest,
+ ::testing::ValuesIn(GetTestParams()));
TEST_P(QuicHeadersStreamTest, StreamId) {
EXPECT_EQ(3u, headers_stream_->id());
@@ -204,7 +248,8 @@
WriteHeadersAndExpectSynReply(stream_id, fin);
} else {
for (QuicPriority priority = 0; priority < 7; ++priority) {
- WriteHeadersAndExpectSynStream(stream_id, fin, priority);
+ // TODO(rch): implement priorities correctly.
+ WriteHeadersAndExpectSynStream(stream_id, fin, 0);
}
}
}
@@ -220,16 +265,31 @@
// Replace with "WriteHeadersAndSaveData"
scoped_ptr<SpdySerializedFrame> frame;
if (is_server()) {
- SpdySynStreamIR syn_stream(stream_id);
- syn_stream.set_name_value_block(headers_);
- syn_stream.set_fin(fin);
- frame.reset(framer_.SerializeSynStream(syn_stream));
+ if (version() > QUIC_VERSION_23) {
+ SpdyHeadersIR headers_frame(stream_id);
+ headers_frame.set_name_value_block(headers_);
+ headers_frame.set_fin(fin);
+ headers_frame.set_has_priority(true);
+ frame.reset(framer_.SerializeFrame(headers_frame));
+ } else {
+ SpdySynStreamIR syn_stream(stream_id);
+ syn_stream.set_name_value_block(headers_);
+ syn_stream.set_fin(fin);
+ frame.reset(framer_.SerializeSynStream(syn_stream));
+ }
EXPECT_CALL(session_, OnStreamHeadersPriority(stream_id, 0));
} else {
- SpdySynReplyIR syn_reply(stream_id);
- syn_reply.set_name_value_block(headers_);
- syn_reply.set_fin(fin);
- frame.reset(framer_.SerializeSynReply(syn_reply));
+ if (version() > QUIC_VERSION_23) {
+ SpdyHeadersIR headers_frame(stream_id);
+ headers_frame.set_name_value_block(headers_);
+ headers_frame.set_fin(fin);
+ frame.reset(framer_.SerializeFrame(headers_frame));
+ } else {
+ SpdySynReplyIR syn_reply(stream_id);
+ syn_reply.set_name_value_block(headers_);
+ syn_reply.set_fin(fin);
+ frame.reset(framer_.SerializeSynReply(syn_reply));
+ }
}
EXPECT_CALL(session_, OnStreamHeaders(stream_id, _))
.WillRepeatedly(WithArgs<1>(
@@ -238,7 +298,59 @@
EXPECT_CALL(session_,
OnStreamHeadersComplete(stream_id, fin, frame->size()));
headers_stream_->ProcessRawData(frame->data(), frame->size());
+ CheckHeaders();
+ }
+ }
+ }
+}
+TEST_P(QuicHeadersStreamTest, ProcessLargeRawData) {
+ // We want to create a frame that is more than the SPDY Framer's max control
+ // frame size, which is 16K, but less than the HPACK decoders max decode
+ // buffer size, which is 32K.
+ headers_["key0"] = string(1 << 13, '.');
+ headers_["key1"] = string(1 << 13, '.');
+ headers_["key2"] = string(1 << 13, '.');
+ for (QuicStreamId stream_id = kClientDataStreamId1;
+ stream_id < kClientDataStreamId3; stream_id += 2) {
+ for (int count = 0; count < 2; ++count) {
+ bool fin = (count == 0);
+ for (QuicPriority priority = 0; priority < 7; ++priority) {
+ // Replace with "WriteHeadersAndSaveData"
+ scoped_ptr<SpdySerializedFrame> frame;
+ if (is_server()) {
+ if (version() > QUIC_VERSION_23) {
+ SpdyHeadersIR headers_frame(stream_id);
+ headers_frame.set_name_value_block(headers_);
+ headers_frame.set_fin(fin);
+ headers_frame.set_has_priority(true);
+ frame.reset(framer_.SerializeFrame(headers_frame));
+ } else {
+ SpdySynStreamIR syn_stream(stream_id);
+ syn_stream.set_name_value_block(headers_);
+ syn_stream.set_fin(fin);
+ frame.reset(framer_.SerializeSynStream(syn_stream));
+ }
+ EXPECT_CALL(session_, OnStreamHeadersPriority(stream_id, 0));
+ } else {
+ if (version() > QUIC_VERSION_23) {
+ SpdyHeadersIR headers_frame(stream_id);
+ headers_frame.set_name_value_block(headers_);
+ headers_frame.set_fin(fin);
+ frame.reset(framer_.SerializeFrame(headers_frame));
+ } else {
+ SpdySynReplyIR syn_reply(stream_id);
+ syn_reply.set_name_value_block(headers_);
+ syn_reply.set_fin(fin);
+ frame.reset(framer_.SerializeSynReply(syn_reply));
+ }
+ }
+ EXPECT_CALL(session_, OnStreamHeaders(stream_id, _))
+ .WillRepeatedly(WithArgs<1>(Invoke(
+ this, &QuicHeadersStreamTest::SaveHeaderDataStringPiece)));
+ EXPECT_CALL(session_,
+ OnStreamHeadersComplete(stream_id, fin, frame->size()));
+ headers_stream_->ProcessRawData(frame->data(), frame->size());
CheckHeaders();
}
}
@@ -247,10 +359,9 @@
TEST_P(QuicHeadersStreamTest, ProcessBadData) {
const char kBadData[] = "blah blah blah";
- EXPECT_CALL(*connection_,
- SendConnectionCloseWithDetails(
- QUIC_INVALID_HEADERS_STREAM_DATA,
- "SPDY framing error: SPDY_INVALID_DATA_FRAME_FLAGS"));
+ EXPECT_CALL(*connection_, SendConnectionCloseWithDetails(
+ QUIC_INVALID_HEADERS_STREAM_DATA, _))
+ .Times(::testing::AnyNumber());
headers_stream_->ProcessRawData(kBadData, strlen(kBadData));
}
@@ -279,7 +390,11 @@
TEST_P(QuicHeadersStreamTest, ProcessSpdySettingsFrame) {
SpdySettingsIR data;
- data.AddSetting(SETTINGS_UPLOAD_BANDWIDTH, true, true, 0);
+ if (version() > QUIC_VERSION_23) {
+ data.AddSetting(SETTINGS_HEADER_TABLE_SIZE, true, true, 0);
+ } else {
+ data.AddSetting(SETTINGS_UPLOAD_BANDWIDTH, true, true, 0);
+ }
scoped_ptr<SpdySerializedFrame> frame(framer_.SerializeFrame(data));
EXPECT_CALL(*connection_,
SendConnectionCloseWithDetails(
@@ -313,6 +428,12 @@
}
TEST_P(QuicHeadersStreamTest, ProcessSpdyHeadersFrame) {
+ if (version() > QUIC_VERSION_23) {
+ // HEADERS frames are an error when using SPDY/3, but
+ // when using SPDY/4 they're the "normal" way of sending headers
+ // so we test their handling in the ProcessRawData test.
+ return;
+ }
SpdyHeadersIR data(1);
scoped_ptr<SpdySerializedFrame> frame(framer_.SerializeFrame(data));
EXPECT_CALL(*connection_,
diff --git a/net/quic/quic_http_stream_test.cc b/net/quic/quic_http_stream_test.cc
index a172c24..a22bb74 100644
--- a/net/quic/quic_http_stream_test.cc
+++ b/net/quic/quic_http_stream_test.cc
@@ -82,11 +82,6 @@
class TestReceiveAlgorithm : public ReceiveAlgorithmInterface {
public:
- virtual bool GenerateCongestionFeedback(
- QuicCongestionFeedbackFrame* /*congestion_feedback*/) {
- return false;
- }
-
MOCK_METHOD3(RecordIncomingPacket,
void(QuicByteCount, QuicPacketSequenceNumber, QuicTime));
};
@@ -265,15 +260,19 @@
bool fin,
QuicStreamOffset offset,
base::StringPiece data) {
- return maker_.MakeDataPacket(
- sequence_number, stream_id_, should_include_version, fin, offset, data);
+ return maker_.MakeDataPacket(sequence_number, stream_id_,
+ should_include_version, fin, offset, data);
}
scoped_ptr<QuicEncryptedPacket> ConstructRequestHeadersPacket(
QuicPacketSequenceNumber sequence_number,
- bool fin) {
- return maker_.MakeRequestHeadersPacket(
- sequence_number, stream_id_, kIncludeVersion, fin, request_headers_);
+ bool fin,
+ RequestPriority request_priority) {
+ QuicPriority priority =
+ ConvertRequestPriorityToQuicPriority(request_priority);
+ return maker_.MakeRequestHeadersPacket(sequence_number, stream_id_,
+ kIncludeVersion, fin, priority,
+ request_headers_);
}
scoped_ptr<QuicEncryptedPacket> ConstructResponseHeadersPacket(
@@ -361,7 +360,7 @@
TEST_P(QuicHttpStreamTest, GetRequest) {
SetRequest("GET", "/", DEFAULT_PRIORITY);
- AddWrite(ConstructRequestHeadersPacket(1, kFin));
+ AddWrite(ConstructRequestHeadersPacket(1, kFin, DEFAULT_PRIORITY));
Initialize();
request_.method = "GET";
@@ -400,7 +399,7 @@
// Regression test for http://crbug.com/288128
TEST_P(QuicHttpStreamTest, GetRequestLargeResponse) {
SetRequest("GET", "/", DEFAULT_PRIORITY);
- AddWrite(ConstructRequestHeadersPacket(1, kFin));
+ AddWrite(ConstructRequestHeadersPacket(1, kFin, DEFAULT_PRIORITY));
Initialize();
request_.method = "GET";
@@ -463,7 +462,7 @@
// Regression test for http://crbug.com/409871
TEST_P(QuicHttpStreamTest, SessionClosedBeforeReadResponseHeaders) {
SetRequest("GET", "/", DEFAULT_PRIORITY);
- AddWrite(ConstructRequestHeadersPacket(1, kFin));
+ AddWrite(ConstructRequestHeadersPacket(1, kFin, DEFAULT_PRIORITY));
Initialize();
request_.method = "GET";
@@ -482,7 +481,7 @@
TEST_P(QuicHttpStreamTest, SendPostRequest) {
SetRequest("POST", "/", DEFAULT_PRIORITY);
- AddWrite(ConstructRequestHeadersPacket(1, !kFin));
+ AddWrite(ConstructRequestHeadersPacket(1, !kFin, DEFAULT_PRIORITY));
AddWrite(ConstructDataPacket(2, kIncludeVersion, kFin, 0, kUploadData));
AddWrite(ConstructAckPacket(3, 3, 1));
@@ -530,7 +529,7 @@
TEST_P(QuicHttpStreamTest, SendChunkedPostRequest) {
SetRequest("POST", "/", DEFAULT_PRIORITY);
size_t chunk_size = strlen(kUploadData);
- AddWrite(ConstructRequestHeadersPacket(1, !kFin));
+ AddWrite(ConstructRequestHeadersPacket(1, !kFin, DEFAULT_PRIORITY));
AddWrite(ConstructDataPacket(2, kIncludeVersion, !kFin, 0, kUploadData));
AddWrite(ConstructDataPacket(3, kIncludeVersion, kFin, chunk_size,
kUploadData));
@@ -583,7 +582,7 @@
TEST_P(QuicHttpStreamTest, SendChunkedPostRequestWithFinalEmptyDataPacket) {
SetRequest("POST", "/", DEFAULT_PRIORITY);
size_t chunk_size = strlen(kUploadData);
- AddWrite(ConstructRequestHeadersPacket(1, !kFin));
+ AddWrite(ConstructRequestHeadersPacket(1, !kFin, DEFAULT_PRIORITY));
AddWrite(ConstructDataPacket(2, kIncludeVersion, !kFin, 0, kUploadData));
AddWrite(ConstructDataPacket(3, kIncludeVersion, kFin, chunk_size, ""));
AddWrite(ConstructAckPacket(4, 3, 1));
@@ -633,7 +632,7 @@
TEST_P(QuicHttpStreamTest, SendChunkedPostRequestWithOneEmptyDataPacket) {
SetRequest("POST", "/", DEFAULT_PRIORITY);
- AddWrite(ConstructRequestHeadersPacket(1, !kFin));
+ AddWrite(ConstructRequestHeadersPacket(1, !kFin, DEFAULT_PRIORITY));
AddWrite(ConstructDataPacket(2, kIncludeVersion, kFin, 0, ""));
AddWrite(ConstructAckPacket(3, 3, 1));
Initialize();
@@ -681,7 +680,7 @@
TEST_P(QuicHttpStreamTest, DestroyedEarly) {
SetRequest("GET", "/", DEFAULT_PRIORITY);
- AddWrite(ConstructRequestHeadersPacket(1, kFin));
+ AddWrite(ConstructRequestHeadersPacket(1, kFin, DEFAULT_PRIORITY));
AddWrite(ConstructAckAndRstStreamPacket(2));
use_closing_stream_ = true;
Initialize();
@@ -709,7 +708,7 @@
TEST_P(QuicHttpStreamTest, Priority) {
SetRequest("GET", "/", MEDIUM);
- AddWrite(ConstructRequestHeadersPacket(1, kFin));
+ AddWrite(ConstructRequestHeadersPacket(1, kFin, MEDIUM));
AddWrite(ConstructAckAndRstStreamPacket(2));
use_closing_stream_ = true;
Initialize();
diff --git a/net/quic/quic_network_transaction_unittest.cc b/net/quic/quic_network_transaction_unittest.cc
index ab926d5..5219d1e 100644
--- a/net/quic/quic_network_transaction_unittest.cc
+++ b/net/quic/quic_network_transaction_unittest.cc
@@ -173,8 +173,11 @@
bool should_include_version,
bool fin,
const SpdyHeaderBlock& headers) {
- return maker_.MakeRequestHeadersPacket(
- sequence_number, stream_id, should_include_version, fin, headers);
+ QuicPriority priority =
+ ConvertRequestPriorityToQuicPriority(DEFAULT_PRIORITY);
+ return maker_.MakeRequestHeadersPacket(sequence_number, stream_id,
+ should_include_version, fin,
+ priority, headers);
}
scoped_ptr<QuicEncryptedPacket> ConstructResponseHeadersPacket(
diff --git a/net/quic/quic_packet_creator.cc b/net/quic/quic_packet_creator.cc
index 40cad74..c9f1d24 100644
--- a/net/quic/quic_packet_creator.cc
+++ b/net/quic/quic_packet_creator.cc
@@ -445,7 +445,6 @@
bool QuicPacketCreator::ShouldRetransmit(const QuicFrame& frame) {
switch (frame.type) {
case ACK_FRAME:
- case CONGESTION_FEEDBACK_FRAME:
case PADDING_FRAME:
case STOP_WAITING_FRAME:
return false;
diff --git a/net/quic/quic_packet_creator.h b/net/quic/quic_packet_creator.h
index 35b5b75..5ff6582 100644
--- a/net/quic/quic_packet_creator.h
+++ b/net/quic/quic_packet_creator.h
@@ -107,6 +107,7 @@
// Returns true if there are retransmittable frames pending to be serialized.
bool HasPendingRetransmittableFrames() const;
+ // TODO(jri): Remove this method.
// Returns whether FEC protection is currently enabled. Note: Enabled does not
// mean that an FEC group is currently active; i.e., IsFecProtected() may
// still return false.
@@ -222,6 +223,11 @@
// To turn off FEC protection, use StopFecProtectingPackets().
void set_max_packets_per_fec_group(size_t max_packets_per_fec_group);
+ // Returns the currently open FEC group's number. If there isn't an open FEC
+ // group, returns the last closed FEC group number. Returns 0 when FEC is
+ // disabled or no FEC group has been created yet.
+ QuicFecGroupNumber fec_group_number() { return fec_group_number_; }
+
private:
friend class test::QuicPacketCreatorPeer;
diff --git a/net/quic/quic_packet_creator_test.cc b/net/quic/quic_packet_creator_test.cc
index 6be3c83..241c42b 100644
--- a/net/quic/quic_packet_creator_test.cc
+++ b/net/quic/quic_packet_creator_test.cc
@@ -915,12 +915,6 @@
EXPECT_TRUE(creator_.AddSavedFrame(QuicFrame(&ack_frame)));
EXPECT_TRUE(creator_.HasPendingFrames());
- QuicCongestionFeedbackFrame congestion_feedback;
- congestion_feedback.type = kTCP;
- congestion_feedback.tcp.receive_window = 0x4030;
- EXPECT_TRUE(creator_.AddSavedFrame(QuicFrame(&congestion_feedback)));
- EXPECT_TRUE(creator_.HasPendingFrames());
-
QuicFrame frame;
size_t consumed = creator_.CreateStreamFrame(
1u, MakeIOVector("test"), 0u, false, &frame);
diff --git a/net/quic/quic_packet_generator.cc b/net/quic/quic_packet_generator.cc
index a7f0af0..22bf530 100644
--- a/net/quic/quic_packet_generator.cc
+++ b/net/quic/quic_packet_generator.cc
@@ -18,15 +18,19 @@
namespace {
// We want to put some space between a protected packet and the FEC packet to
-// avoid losing them both within the same loss episode. On the other hand,
-// we expect to be able to recover from any loss in about an RTT.
-// We resolve this tradeoff by sending an FEC packet atmost half an RTT,
-// or equivalently, half the max number of in-flight packets, the first
-// protected packet. Since we don't want to delay an FEC packet past half an
-// RTT, we set the max FEC group size to be half the current congestion window.
+// avoid losing them both within the same loss episode. On the other hand, we
+// expect to be able to recover from any loss in about an RTT. We resolve this
+// tradeoff by sending an FEC packet atmost half an RTT, or equivalently, half
+// the max number of in-flight packets, the first protected packet. Since we
+// don't want to delay an FEC packet past half an RTT, we set the max FEC group
+// size to be half the current congestion window.
const float kMaxPacketsInFlightMultiplierForFecGroupSize = 0.5;
const float kRttMultiplierForFecTimeout = 0.5;
+// Minimum timeout for FEC alarm, set to half the minimum Tail Loss Probe
+// timeout of 10ms.
+const int64 kMinFecTimeoutMs = 5u;
+
} // namespace
class QuicAckNotifier;
@@ -42,7 +46,6 @@
fec_timeout_(QuicTime::Delta::Zero()),
should_fec_protect_(false),
should_send_ack_(false),
- should_send_feedback_(false),
should_send_stop_waiting_(false) {
}
@@ -59,9 +62,6 @@
case ACK_FRAME:
delete it->ack_frame;
break;
- case CONGESTION_FEEDBACK_FRAME:
- delete it->congestion_feedback_frame;
- break;
case RST_STREAM_FRAME:
delete it->rst_stream_frame;
break;
@@ -100,27 +100,18 @@
fec_timeout_ = rtt.Multiply(kRttMultiplierForFecTimeout);
}
-void QuicPacketGenerator::SetShouldSendAck(bool also_send_feedback,
- bool also_send_stop_waiting) {
- if (FLAGS_quic_disallow_multiple_pending_ack_frames) {
- if (pending_ack_frame_ != nullptr) {
- // Ack already queued, nothing to do.
- return;
- }
+void QuicPacketGenerator::SetShouldSendAck(bool also_send_stop_waiting) {
+ if (pending_ack_frame_ != nullptr) {
+ // Ack already queued, nothing to do.
+ return;
+ }
- if (also_send_feedback && pending_feedback_frame_ != nullptr) {
- LOG(DFATAL) << "Should only ever be one pending feedback frame.";
- return;
- }
-
- if (also_send_stop_waiting && pending_stop_waiting_frame_ != nullptr) {
- LOG(DFATAL) << "Should only ever be one pending stop waiting frame.";
- return;
- }
+ if (also_send_stop_waiting && pending_stop_waiting_frame_ != nullptr) {
+ LOG(DFATAL) << "Should only ever be one pending stop waiting frame.";
+ return;
}
should_send_ack_ = true;
- should_send_feedback_ = also_send_feedback;
should_send_stop_waiting_ = also_send_stop_waiting;
SendQueuedFrames(false);
}
@@ -142,11 +133,11 @@
bool fin,
FecProtection fec_protection,
QuicAckNotifier::DelegateInterface* delegate) {
- IsHandshake handshake = id == kCryptoStreamId ? IS_HANDSHAKE : NOT_HANDSHAKE;
+ bool has_handshake = id == kCryptoStreamId;
// To make reasoning about crypto frames easier, we don't combine them with
// other retransmittable frames in a single packet.
- const bool flush = handshake == IS_HANDSHAKE &&
- packet_creator_.HasPendingRetransmittableFrames();
+ const bool flush =
+ has_handshake && packet_creator_.HasPendingRetransmittableFrames();
SendQueuedFrames(flush);
size_t total_bytes_consumed = 0;
@@ -169,14 +160,15 @@
IOVector data = data_to_write;
size_t data_size = data.TotalBufferSize();
- if (FLAGS_quic_empty_data_no_fin_early_return && !fin && (data_size == 0)) {
+ if (!fin && (data_size == 0)) {
LOG(DFATAL) << "Attempt to consume empty data without FIN.";
return QuicConsumedData(0, false);
}
int frames_created = 0;
- while (delegate_->ShouldGeneratePacket(NOT_RETRANSMISSION,
- HAS_RETRANSMITTABLE_DATA, handshake)) {
+ while (delegate_->ShouldGeneratePacket(
+ NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA,
+ has_handshake ? IS_HANDSHAKE : NOT_HANDSHAKE)) {
QuicFrame frame;
size_t bytes_consumed = packet_creator_.CreateStreamFrame(
id, data, offset + total_bytes_consumed, fin, &frame);
@@ -229,16 +221,13 @@
}
// Don't allow the handshake to be bundled with other retransmittable frames.
- if (handshake == IS_HANDSHAKE) {
+ if (has_handshake) {
SendQueuedFrames(true);
}
// Try to close FEC group since we've either run out of data to send or we're
// blocked. If not in batch mode, force close the group.
- // TODO(jri): This method should be called with flush=false here
- // once the timer-based FEC sending is done, to separate FEC sending from
- // the end of batch operations.
- MaybeSendFecPacketAndCloseGroup(!InBatchMode());
+ MaybeSendFecPacketAndCloseGroup(/*flush=*/false);
DCHECK(InBatchMode() || !packet_creator_.HasPendingFrames());
return QuicConsumedData(total_bytes_consumed, fin_consumed);
@@ -247,8 +236,9 @@
bool QuicPacketGenerator::CanSendWithNextPendingFrameAddition() const {
DCHECK(HasPendingFrames());
HasRetransmittableData retransmittable =
- (should_send_ack_ || should_send_feedback_ || should_send_stop_waiting_)
- ? NO_RETRANSMITTABLE_DATA : HAS_RETRANSMITTABLE_DATA;
+ (should_send_ack_ || should_send_stop_waiting_)
+ ? NO_RETRANSMITTABLE_DATA
+ : HAS_RETRANSMITTABLE_DATA;
if (retransmittable == HAS_RETRANSMITTABLE_DATA) {
DCHECK(!queued_control_frames_.empty()); // These are retransmittable.
}
@@ -265,15 +255,10 @@
SerializeAndSendPacket();
}
}
-
- if (!InBatchMode() || flush) {
- if (packet_creator_.HasPendingFrames()) {
- SerializeAndSendPacket();
- }
- // Ensure the FEC group is closed at the end of this method unless other
- // writes are pending.
- MaybeSendFecPacketAndCloseGroup(true);
+ if (packet_creator_.HasPendingFrames() && (flush || !InBatchMode())) {
+ SerializeAndSendPacket();
}
+ MaybeSendFecPacketAndCloseGroup(flush);
}
void QuicPacketGenerator::MaybeStartFecProtection() {
@@ -299,9 +284,7 @@
}
void QuicPacketGenerator::MaybeSendFecPacketAndCloseGroup(bool force) {
- if (!packet_creator_.IsFecProtected() ||
- packet_creator_.HasPendingFrames() ||
- !packet_creator_.ShouldSendFec(force)) {
+ if (!ShouldSendFecPacket(force)) {
return;
}
// TODO(jri): SerializeFec can return a NULL packet, and this should
@@ -319,6 +302,36 @@
}
}
+bool QuicPacketGenerator::ShouldSendFecPacket(bool force) {
+ return packet_creator_.IsFecProtected() &&
+ !packet_creator_.HasPendingFrames() &&
+ packet_creator_.ShouldSendFec(force);
+}
+
+void QuicPacketGenerator::OnFecTimeout() {
+ DCHECK(!InBatchMode());
+ if (!ShouldSendFecPacket(true)) {
+ LOG(DFATAL) << "No FEC packet to send on FEC timeout.";
+ return;
+ }
+ // Flush out any pending frames in the generator and the creator, and then
+ // send out FEC packet.
+ SendQueuedFrames(true);
+ MaybeSendFecPacketAndCloseGroup(/*flush=*/true);
+}
+
+QuicTime::Delta QuicPacketGenerator::GetFecTimeout(
+ QuicPacketSequenceNumber sequence_number) {
+ // Do not set up FEC alarm for |sequence_number| it is not the first packet in
+ // the current group.
+ if (packet_creator_.IsFecGroupOpen() &&
+ (sequence_number == packet_creator_.fec_group_number())) {
+ return QuicTime::Delta::Max(
+ fec_timeout_, QuicTime::Delta::FromMilliseconds(kMinFecTimeoutMs));
+ }
+ return QuicTime::Delta::Infinite();
+}
+
bool QuicPacketGenerator::InBatchMode() {
return batch_mode_;
}
@@ -341,8 +354,8 @@
}
bool QuicPacketGenerator::HasPendingFrames() const {
- return should_send_ack_ || should_send_feedback_ ||
- should_send_stop_waiting_ || !queued_control_frames_.empty();
+ return should_send_ack_ || should_send_stop_waiting_ ||
+ !queued_control_frames_.empty();
}
bool QuicPacketGenerator::AddNextPendingFrame() {
@@ -355,15 +368,6 @@
return !should_send_ack_;
}
- if (should_send_feedback_) {
- pending_feedback_frame_.reset(delegate_->CreateFeedbackFrame());
- // If we can't this add the frame now, then we still need to do so later.
- should_send_feedback_ = !AddFrame(QuicFrame(pending_feedback_frame_.get()));
- // Return success if we have cleared out this flag (i.e., added the frame).
- // If we still need to send, then the frame is full, and we have failed.
- return !should_send_feedback_;
- }
-
if (should_send_stop_waiting_) {
pending_stop_waiting_frame_.reset(delegate_->CreateStopWaitingFrame());
// If we can't this add the frame now, then we still need to do so later.
@@ -403,14 +407,11 @@
}
delegate_->OnSerializedPacket(serialized_packet);
- MaybeSendFecPacketAndCloseGroup(false);
+ MaybeSendFecPacketAndCloseGroup(/*flush=*/false);
// The packet has now been serialized, safe to delete pending frames.
- if (FLAGS_quic_disallow_multiple_pending_ack_frames) {
- pending_ack_frame_.reset();
- pending_feedback_frame_.reset();
- pending_stop_waiting_frame_.reset();
- }
+ pending_ack_frame_.reset();
+ pending_stop_waiting_frame_.reset();
}
void QuicPacketGenerator::StopSendingVersion() {
diff --git a/net/quic/quic_packet_generator.h b/net/quic/quic_packet_generator.h
index 24dc97c..a86a746 100644
--- a/net/quic/quic_packet_generator.h
+++ b/net/quic/quic_packet_generator.h
@@ -74,7 +74,6 @@
HasRetransmittableData retransmittable,
IsHandshake handshake) = 0;
virtual QuicAckFrame* CreateAckFrame() = 0;
- virtual QuicCongestionFeedbackFrame* CreateFeedbackFrame() = 0;
virtual QuicStopWaitingFrame* CreateStopWaitingFrame() = 0;
// Takes ownership of |packet.packet| and |packet.retransmittable_frames|.
virtual void OnSerializedPacket(const SerializedPacket& packet) = 0;
@@ -105,14 +104,12 @@
// Called by the connection when the RTT may have changed.
void OnRttChange(QuicTime::Delta rtt);
- // Indicates that an ACK frame should be sent. If |also_send_feedback| is
- // true, then it also indicates a CONGESTION_FEEDBACK frame should be sent.
+ // Indicates that an ACK frame should be sent.
// If |also_send_stop_waiting| is true, then it also indicates that a
// STOP_WAITING frame should be sent as well.
- // The contents of the frame(s) will be generated via a call to the delegates
- // CreateAckFrame() and CreateFeedbackFrame() when the packet is serialized.
- void SetShouldSendAck(bool also_send_feedback,
- bool also_send_stop_waiting);
+ // The contents of the frame(s) will be generated via a call to the delegate
+ // CreateAckFrame() when the packet is serialized.
+ void SetShouldSendAck(bool also_send_stop_waiting);
// Indicates that a STOP_WAITING frame should be sent.
void SetShouldSendStopWaiting();
@@ -171,6 +168,16 @@
// Set the minimum number of bytes for the connection id length;
void SetConnectionIdLength(uint32 length);
+ // Called when the FEC alarm fires.
+ void OnFecTimeout();
+
+ // Called after sending |sequence_number| to determine whether an FEC alarm
+ // should be set for sending out an FEC packet. Returns a positive and finite
+ // timeout if an FEC alarm should be set, and infinite if no alarm should be
+ // set. OnFecTimeout should be called to send the FEC packet when the alarm
+ // fires.
+ QuicTime::Delta GetFecTimeout(QuicPacketSequenceNumber sequence_number);
+
// Sets the encryption level that will be applied to new packets.
void set_encryption_level(EncryptionLevel level);
@@ -186,8 +193,6 @@
debug_delegate_ = debug_delegate;
}
- QuicTime::Delta fec_timeout() { return fec_timeout_; }
-
private:
friend class test::QuicPacketGeneratorPeer;
@@ -205,15 +210,18 @@
// off FEC protection in the creator if it's off in the generator.
void MaybeSendFecPacketAndCloseGroup(bool force);
+ // Returns true if an FEC packet should be generated based on |force| and
+ // current state of the generator and the creator.
+ bool ShouldSendFecPacket(bool force);
+
void SendQueuedFrames(bool flush);
- // Test to see if we have pending ack, feedback, or control frames.
+ // Test to see if we have pending ack, or control frames.
bool HasPendingFrames() const;
// Test to see if the addition of a pending frame (which might be
// retransmittable) would still allow the resulting packet to be sent now.
bool CanSendWithNextPendingFrameAddition() const;
- // Add exactly one pending frame, preferring ack over feedback over control
- // frames.
+ // Add exactly one pending frame, preferring ack frames over control frames.
bool AddNextPendingFrame();
bool AddFrame(const QuicFrame& frame);
@@ -229,7 +237,8 @@
// True if batch mode is currently enabled.
bool batch_mode_;
- // Timeout used for FEC alarm. Can be set to zero.
+ // Timeout used for FEC alarm. Can be set to zero initially or if the SRTT has
+ // not yet been set.
QuicTime::Delta fec_timeout_;
// True if FEC protection is on. The creator may have an open FEC group even
@@ -238,14 +247,12 @@
// Flags to indicate the need for just-in-time construction of a frame.
bool should_send_ack_;
- bool should_send_feedback_;
bool should_send_stop_waiting_;
- // If we put a non-retransmittable frame (namley ack or feedback frame) in
- // this packet, then we have to hold a reference to it until we flush (and
- // serialize it). Retransmittable frames are referenced elsewhere so that they
+ // If we put a non-retransmittable frame (ack frame) in this packet, then we
+ // have to hold a reference to it until we flush (and serialize it).
+ // Retransmittable frames are referenced elsewhere so that they
// can later be (optionally) retransmitted.
scoped_ptr<QuicAckFrame> pending_ack_frame_;
- scoped_ptr<QuicCongestionFeedbackFrame> pending_feedback_frame_;
scoped_ptr<QuicStopWaitingFrame> pending_stop_waiting_frame_;
// Stores notifiers that should be attached to the next serialized packet.
diff --git a/net/quic/quic_packet_generator_test.cc b/net/quic/quic_packet_generator_test.cc
index f7a7d72..1ab7ca5 100644
--- a/net/quic/quic_packet_generator_test.cc
+++ b/net/quic/quic_packet_generator_test.cc
@@ -32,6 +32,8 @@
namespace test {
namespace {
+const int64 kMinFecTimeoutMs = 5u;
+
class MockDelegate : public QuicPacketGenerator::DelegateInterface {
public:
MockDelegate() {}
@@ -42,7 +44,6 @@
HasRetransmittableData retransmittable,
IsHandshake handshake));
MOCK_METHOD0(CreateAckFrame, QuicAckFrame*());
- MOCK_METHOD0(CreateFeedbackFrame, QuicCongestionFeedbackFrame*());
MOCK_METHOD0(CreateStopWaitingFrame, QuicStopWaitingFrame*());
MOCK_METHOD1(OnSerializedPacket, void(const SerializedPacket& packet));
MOCK_METHOD2(CloseConnection, void(QuicErrorCode, bool));
@@ -63,7 +64,7 @@
.WillRepeatedly(Return(false));
}
- // Use this when only ack and feedback frames should be allowed to be written.
+ // Use this when only ack frames should be allowed to be written.
void SetCanWriteOnlyNonRetransmittable() {
EXPECT_CALL(*this, ShouldGeneratePacket(NOT_RETRANSMISSION, _, _))
.WillRepeatedly(Return(false));
@@ -77,13 +78,12 @@
};
// Simple struct for describing the contents of a packet.
-// Useful in conjunction with a SimpleQuicFrame for validating
-// that a packet contains the expected frames.
+// Useful in conjunction with a SimpleQuicFrame for validating that a packet
+// contains the expected frames.
struct PacketContents {
PacketContents()
: num_ack_frames(0),
num_connection_close_frames(0),
- num_feedback_frames(0),
num_goaway_frames(0),
num_rst_stream_frames(0),
num_stop_waiting_frames(0),
@@ -93,7 +93,6 @@
size_t num_ack_frames;
size_t num_connection_close_frames;
- size_t num_feedback_frames;
size_t num_goaway_frames;
size_t num_rst_stream_frames;
size_t num_stop_waiting_frames;
@@ -116,7 +115,8 @@
packet4_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr),
packet5_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr),
packet6_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr),
- packet7_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr) {}
+ packet7_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr),
+ packet8_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr) {}
~QuicPacketGeneratorTest() override {
delete packet_.packet;
@@ -133,6 +133,8 @@
delete packet6_.retransmittable_frames;
delete packet7_.packet;
delete packet7_.retransmittable_frames;
+ delete packet8_.packet;
+ delete packet8_.retransmittable_frames;
}
QuicAckFrame* CreateAckFrame() {
@@ -140,13 +142,6 @@
return new QuicAckFrame(MakeAckFrame(0));
}
- QuicCongestionFeedbackFrame* CreateFeedbackFrame() {
- QuicCongestionFeedbackFrame* frame = new QuicCongestionFeedbackFrame;
- frame->type = kTCP;
- frame->tcp.receive_window = 0x4030;
- return frame;
- }
-
QuicStopWaitingFrame* CreateStopWaitingFrame() {
QuicStopWaitingFrame* frame = new QuicStopWaitingFrame();
frame->entropy_hash = 0;
@@ -167,8 +162,9 @@
size_t num_retransmittable_frames = contents.num_connection_close_frames +
contents.num_goaway_frames + contents.num_rst_stream_frames +
contents.num_stream_frames;
- size_t num_frames = contents.num_feedback_frames + contents.num_ack_frames +
- contents.num_stop_waiting_frames + num_retransmittable_frames;
+ size_t num_frames = contents.num_ack_frames +
+ contents.num_stop_waiting_frames +
+ num_retransmittable_frames;
if (num_retransmittable_frames == 0) {
ASSERT_TRUE(packet.retransmittable_frames == nullptr);
@@ -184,8 +180,6 @@
EXPECT_EQ(contents.num_ack_frames, simple_framer_.ack_frames().size());
EXPECT_EQ(contents.num_connection_close_frames,
simple_framer_.connection_close_frames().size());
- EXPECT_EQ(contents.num_feedback_frames,
- simple_framer_.feedback_frames().size());
EXPECT_EQ(contents.num_goaway_frames,
simple_framer_.goaway_frames().size());
EXPECT_EQ(contents.num_rst_stream_frames,
@@ -236,6 +230,7 @@
SerializedPacket packet5_;
SerializedPacket packet6_;
SerializedPacket packet7_;
+ SerializedPacket packet8_;
private:
scoped_ptr<char[]> data_array_;
@@ -250,7 +245,7 @@
TEST_F(QuicPacketGeneratorTest, ShouldSendAck_NotWritable) {
delegate_.SetCanNotWrite();
- generator_.SetShouldSendAck(false, false);
+ generator_.SetShouldSendAck(false);
EXPECT_TRUE(generator_.HasQueuedFrames());
}
@@ -264,7 +259,7 @@
EXPECT_CALL(delegate_, CreateAckFrame()).WillOnce(Return(CreateAckFrame()));
EXPECT_CALL(debug_delegate, OnFrameAddedToPacket(_)).Times(1);
- generator_.SetShouldSendAck(false, false);
+ generator_.SetShouldSendAck(false);
EXPECT_TRUE(generator_.HasQueuedFrames());
}
@@ -274,7 +269,7 @@
EXPECT_CALL(delegate_, CreateAckFrame()).WillOnce(Return(CreateAckFrame()));
EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(SaveArg<0>(&packet_));
- generator_.SetShouldSendAck(false, false);
+ generator_.SetShouldSendAck(false);
EXPECT_FALSE(generator_.HasQueuedFrames());
PacketContents contents;
@@ -282,45 +277,7 @@
CheckPacketContains(contents, packet_);
}
-TEST_F(QuicPacketGeneratorTest,
- ShouldSendAckWithFeedback_WritableAndShouldNotFlush) {
- delegate_.SetCanWriteOnlyNonRetransmittable();
- generator_.StartBatchOperations();
-
- EXPECT_CALL(delegate_, CreateAckFrame()).WillOnce(Return(CreateAckFrame()));
- EXPECT_CALL(delegate_, CreateFeedbackFrame()).WillOnce(
- Return(CreateFeedbackFrame()));
-
- generator_.SetShouldSendAck(true, false);
- EXPECT_TRUE(generator_.HasQueuedFrames());
-}
-
-TEST_F(QuicPacketGeneratorTest,
- ShouldSendAckWithFeedback_WritableAndShouldFlush) {
- delegate_.SetCanWriteOnlyNonRetransmittable();
-
- EXPECT_CALL(delegate_, CreateAckFrame()).WillOnce(Return(CreateAckFrame()));
- EXPECT_CALL(delegate_, CreateFeedbackFrame()).WillOnce(
- Return(CreateFeedbackFrame()));
- EXPECT_CALL(delegate_, CreateStopWaitingFrame()).WillOnce(
- Return(CreateStopWaitingFrame()));
-
- EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(SaveArg<0>(&packet_));
-
- generator_.SetShouldSendAck(true, true);
- EXPECT_FALSE(generator_.HasQueuedFrames());
-
- PacketContents contents;
- contents.num_ack_frames = 1;
- contents.num_feedback_frames = 1;
- contents.num_stop_waiting_frames = 1;
- CheckPacketContains(contents, packet_);
-}
-
TEST_F(QuicPacketGeneratorTest, ShouldSendAck_MultipleCalls) {
- ValueRestore<bool> old_flag(&FLAGS_quic_disallow_multiple_pending_ack_frames,
- true);
-
// Make sure that calling SetShouldSendAck multiple times does not result in a
// crash. Previously this would result in multiple QuicFrames queued in the
// packet generator, with all but the last with internal pointers to freed
@@ -336,8 +293,8 @@
.WillOnce(SaveArg<0>(&packet_));
generator_.StartBatchOperations();
- generator_.SetShouldSendAck(false, false);
- generator_.SetShouldSendAck(false, false);
+ generator_.SetShouldSendAck(false);
+ generator_.SetShouldSendAck(false);
generator_.FinishBatchOperations();
}
@@ -431,7 +388,6 @@
}
TEST_F(QuicPacketGeneratorTest, ConsumeData_EmptyData) {
- ValueRestore<bool> old_flag(&FLAGS_quic_empty_data_no_fin_early_return, true);
EXPECT_DFATAL(generator_.ConsumeData(kHeadersStreamId, MakeIOVector(""), 0,
false, MAY_FEC_PROTECT, nullptr),
"Attempt to consume empty data without FIN.");
@@ -473,7 +429,7 @@
CheckPacketContains(contents, packet_);
}
-TEST_F(QuicPacketGeneratorTest, ConsumeDataFEC) {
+TEST_F(QuicPacketGeneratorTest, ConsumeDataSendsFecOnMaxGroupSize) {
delegate_.SetCanWriteAnything();
// Send FEC every two packets.
@@ -489,12 +445,10 @@
SaveArg<0>(&packet3_));
EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(
SaveArg<0>(&packet4_));
- EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(
- SaveArg<0>(&packet5_));
}
- // Send enough data to create 3 packets: two full and one partial. Send
- // with MUST_FEC_PROTECT flag.
+ // Send enough data to create 3 packets: two full and one partial. Send with
+ // MUST_FEC_PROTECT flag.
size_t data_len = 2 * kDefaultMaxPacketSize + 100;
QuicConsumedData consumed = generator_.ConsumeData(
3, CreateData(data_len), 0, true, MUST_FEC_PROTECT, nullptr);
@@ -505,38 +459,169 @@
CheckPacketHasSingleStreamFrame(packet_);
CheckPacketHasSingleStreamFrame(packet2_);
CheckPacketIsFec(packet3_, 1);
-
CheckPacketHasSingleStreamFrame(packet4_);
- CheckPacketIsFec(packet5_, 4);
+ EXPECT_TRUE(creator_->IsFecProtected());
+
+ // The FEC packet under construction will be sent when one more packet is sent
+ // (since FEC group size is 2), or when OnFecTimeout is called. Send more data
+ // with MAY_FEC_PROTECT. This packet should also be protected, and FEC packet
+ // is sent since FEC group size is reached.
+ {
+ InSequence dummy;
+ EXPECT_CALL(delegate_, OnSerializedPacket(_))
+ .WillOnce(SaveArg<0>(&packet5_));
+ EXPECT_CALL(delegate_, OnSerializedPacket(_))
+ .WillOnce(SaveArg<0>(&packet6_));
+ }
+ consumed = generator_.ConsumeData(5, CreateData(1u), 0, true, MAY_FEC_PROTECT,
+ nullptr);
+ EXPECT_EQ(1u, consumed.bytes_consumed);
+ CheckPacketHasSingleStreamFrame(packet5_);
+ CheckPacketIsFec(packet6_, 4);
+ EXPECT_FALSE(creator_->IsFecProtected());
}
-TEST_F(QuicPacketGeneratorTest, ConsumeDataSendsFecAtEnd) {
+TEST_F(QuicPacketGeneratorTest, ConsumeDataSendsFecOnTimeout) {
delegate_.SetCanWriteAnything();
+ creator_->set_max_packets_per_fec_group(1000);
- // Enable FEC.
+ // Send data with MUST_FEC_PROTECT flag. No FEC packet is emitted, but the
+ // creator FEC protects all data.
+ EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(SaveArg<0>(&packet_));
+ QuicConsumedData consumed = generator_.ConsumeData(3, CreateData(1u), 0, true,
+ MUST_FEC_PROTECT, nullptr);
+ EXPECT_EQ(1u, consumed.bytes_consumed);
+ EXPECT_TRUE(consumed.fin_consumed);
+ CheckPacketHasSingleStreamFrame(packet_);
+ EXPECT_TRUE(creator_->IsFecProtected());
+
+ // Send more data with MAY_FEC_PROTECT. This packet should also be protected,
+ // and FEC packet is not yet sent.
+ EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(SaveArg<0>(&packet2_));
+ consumed = generator_.ConsumeData(5, CreateData(1u), 0, true, MAY_FEC_PROTECT,
+ nullptr);
+ EXPECT_EQ(1u, consumed.bytes_consumed);
+ CheckPacketHasSingleStreamFrame(packet2_);
+ EXPECT_TRUE(creator_->IsFecProtected());
+
+ // Calling OnFecTimeout should cause the FEC packet to be emitted.
+ EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(SaveArg<0>(&packet3_));
+ generator_.OnFecTimeout();
+ CheckPacketIsFec(packet3_, 1);
+ EXPECT_FALSE(creator_->IsFecProtected());
+
+ // Subsequent data is protected under the next FEC group. Send enough data to
+ // create 2 more packets: one full and one partial.
+ {
+ InSequence dummy;
+ EXPECT_CALL(delegate_, OnSerializedPacket(_))
+ .WillOnce(SaveArg<0>(&packet4_));
+ EXPECT_CALL(delegate_, OnSerializedPacket(_))
+ .WillOnce(SaveArg<0>(&packet5_));
+ }
+ size_t data_len = kDefaultMaxPacketSize + 1;
+ consumed = generator_.ConsumeData(7, CreateData(data_len), 0, true,
+ MUST_FEC_PROTECT, nullptr);
+ EXPECT_EQ(data_len, consumed.bytes_consumed);
+ EXPECT_TRUE(consumed.fin_consumed);
+ CheckPacketHasSingleStreamFrame(packet4_);
+ CheckPacketHasSingleStreamFrame(packet5_);
+ EXPECT_TRUE(creator_->IsFecProtected());
+
+ // Calling OnFecTimeout should cause the FEC packet to be emitted.
+ EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(SaveArg<0>(&packet6_));
+ generator_.OnFecTimeout();
+ CheckPacketIsFec(packet6_, 4);
+ EXPECT_FALSE(creator_->IsFecProtected());
+}
+
+TEST_F(QuicPacketGeneratorTest, GetFecTimeoutFiniteOnlyOnFirstPacketInGroup) {
+ delegate_.SetCanWriteAnything();
creator_->set_max_packets_per_fec_group(6);
+
+ // Send enough data to create 2 packets: one full and one partial. Send with
+ // MUST_FEC_PROTECT flag. No FEC packet is emitted yet, but the creator FEC
+ // protects all data.
{
InSequence dummy;
EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(
SaveArg<0>(&packet_));
EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(
SaveArg<0>(&packet2_));
- EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(
- SaveArg<0>(&packet3_));
}
-
- // Send enough data to create 2 packets: one full and one partial. Send
- // with MUST_FEC_PROTECT flag.
size_t data_len = 1 * kDefaultMaxPacketSize + 100;
QuicConsumedData consumed = generator_.ConsumeData(
3, CreateData(data_len), 0, true, MUST_FEC_PROTECT, nullptr);
EXPECT_EQ(data_len, consumed.bytes_consumed);
EXPECT_TRUE(consumed.fin_consumed);
EXPECT_FALSE(generator_.HasQueuedFrames());
-
CheckPacketHasSingleStreamFrame(packet_);
CheckPacketHasSingleStreamFrame(packet2_);
- CheckPacketIsFec(packet3_, 1);
+ EXPECT_TRUE(creator_->IsFecProtected());
+
+ // GetFecTimeout returns finite timeout only for first packet in group.
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(kMinFecTimeoutMs),
+ generator_.GetFecTimeout(/*sequence_number=*/1u));
+ EXPECT_EQ(QuicTime::Delta::Infinite(),
+ generator_.GetFecTimeout(/*sequence_number=*/2u));
+
+ // Send more data with MAY_FEC_PROTECT. This packet should also be protected,
+ // and FEC packet is not yet sent.
+ EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(SaveArg<0>(&packet3_));
+ consumed = generator_.ConsumeData(5, CreateData(1u), 0, true, MAY_FEC_PROTECT,
+ nullptr);
+ CheckPacketHasSingleStreamFrame(packet3_);
+ EXPECT_TRUE(creator_->IsFecProtected());
+
+ // GetFecTimeout returns finite timeout only for first packet in group.
+ EXPECT_EQ(QuicTime::Delta::Infinite(),
+ generator_.GetFecTimeout(/*sequence_number=*/3u));
+
+ // Calling OnFecTimeout should cause the FEC packet to be emitted.
+ EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(SaveArg<0>(&packet4_));
+ generator_.OnFecTimeout();
+ CheckPacketIsFec(packet4_, /*fec_group=*/1u);
+ EXPECT_FALSE(creator_->IsFecProtected());
+
+ // Subsequent data is protected under the next FEC group. Send enough data to
+ // create 2 more packets: one full and one partial.
+ {
+ InSequence dummy;
+ EXPECT_CALL(delegate_, OnSerializedPacket(_))
+ .WillOnce(SaveArg<0>(&packet5_));
+ EXPECT_CALL(delegate_, OnSerializedPacket(_))
+ .WillOnce(SaveArg<0>(&packet6_));
+ }
+ data_len = kDefaultMaxPacketSize + 1u;
+ consumed = generator_.ConsumeData(7, CreateData(data_len), 0, true,
+ MUST_FEC_PROTECT, nullptr);
+ EXPECT_EQ(data_len, consumed.bytes_consumed);
+ EXPECT_TRUE(consumed.fin_consumed);
+ CheckPacketHasSingleStreamFrame(packet5_);
+ CheckPacketHasSingleStreamFrame(packet6_);
+ EXPECT_TRUE(creator_->IsFecProtected());
+
+ // GetFecTimeout returns finite timeout for first packet in the new group.
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(kMinFecTimeoutMs),
+ generator_.GetFecTimeout(/*sequence_number=*/5u));
+ EXPECT_EQ(QuicTime::Delta::Infinite(),
+ generator_.GetFecTimeout(/*sequence_number=*/6u));
+
+ // Calling OnFecTimeout should cause the FEC packet to be emitted.
+ EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(SaveArg<0>(&packet7_));
+ generator_.OnFecTimeout();
+ CheckPacketIsFec(packet7_, /*fec_group=*/5u);
+ EXPECT_FALSE(creator_->IsFecProtected());
+
+ // Send more data with MAY_FEC_PROTECT. No FEC protection, so GetFecTimeout
+ // returns infinite.
+ EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(SaveArg<0>(&packet8_));
+ consumed = generator_.ConsumeData(9, CreateData(1u), 0, true, MAY_FEC_PROTECT,
+ nullptr);
+ CheckPacketHasSingleStreamFrame(packet8_);
+ EXPECT_FALSE(creator_->IsFecProtected());
+ EXPECT_EQ(QuicTime::Delta::Infinite(),
+ generator_.GetFecTimeout(/*sequence_number=*/8u));
}
TEST_F(QuicPacketGeneratorTest, ConsumeData_FramesPreviouslyQueued) {
@@ -544,8 +629,7 @@
// but not enough for a stream frame of 0 offset and one with non-zero offset.
size_t length =
NullEncrypter().GetCiphertextSize(0) +
- GetPacketHeaderSize(creator_->connection_id_length(),
- true,
+ GetPacketHeaderSize(creator_->connection_id_length(), true,
creator_->next_sequence_number_length(),
NOT_IN_FEC_GROUP) +
// Add an extra 3 bytes for the payload and 1 byte so BytesFree is larger
@@ -586,10 +670,42 @@
CheckPacketContains(contents, packet2_);
}
+TEST_F(QuicPacketGeneratorTest, NoFecPacketSentWhenBatchEnds) {
+ delegate_.SetCanWriteAnything();
+ creator_->set_max_packets_per_fec_group(6);
+
+ generator_.StartBatchOperations();
+
+ generator_.ConsumeData(3, MakeIOVector("foo"), 2, true, MUST_FEC_PROTECT,
+ nullptr);
+ QuicConsumedData consumed = generator_.ConsumeData(
+ 5, MakeIOVector("quux"), 7, false, MUST_FEC_PROTECT, nullptr);
+ EXPECT_EQ(4u, consumed.bytes_consumed);
+ EXPECT_FALSE(consumed.fin_consumed);
+ EXPECT_TRUE(generator_.HasQueuedFrames());
+
+ // Now both frames will be flushed out, but FEC packet is not yet sent.
+ EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(SaveArg<0>(&packet_));
+ generator_.FinishBatchOperations();
+ EXPECT_FALSE(generator_.HasQueuedFrames());
+
+ PacketContents contents;
+ contents.num_stream_frames = 2u;
+ contents.fec_group = 1u;
+ CheckPacketContains(contents, packet_);
+
+ // Forcing FEC timeout causes FEC packet to be emitted.
+ EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(SaveArg<0>(&packet2_));
+ generator_.OnFecTimeout();
+ CheckPacketIsFec(packet2_, /*fec_group=*/1u);
+}
+
TEST_F(QuicPacketGeneratorTest, FecTimeoutOnRttChange) {
- EXPECT_EQ(QuicTime::Delta::Zero(), generator_.fec_timeout());
+ EXPECT_EQ(QuicTime::Delta::Zero(),
+ QuicPacketGeneratorPeer::GetFecTimeout(&generator_));
generator_.OnRttChange(QuicTime::Delta::FromMilliseconds(300));
- EXPECT_EQ(QuicTime::Delta::FromMilliseconds(150), generator_.fec_timeout());
+ EXPECT_EQ(QuicTime::Delta::FromMilliseconds(150),
+ QuicPacketGeneratorPeer::GetFecTimeout(&generator_));
}
TEST_F(QuicPacketGeneratorTest, FecGroupSizeOnCongestionWindowChange) {
@@ -613,15 +729,13 @@
TEST_F(QuicPacketGeneratorTest, FecGroupSizeChangeWithOpenGroup) {
delegate_.SetCanWriteAnything();
- // TODO(jri): This starting of batch mode should not be required when
- // FEC sending is separated from batching operations.
generator_.StartBatchOperations();
creator_->set_max_packets_per_fec_group(50);
EXPECT_EQ(50u, creator_->max_packets_per_fec_group());
EXPECT_FALSE(creator_->IsFecGroupOpen());
- // Send enough data to create 4 packets with MUST_FEC_PROTECT flag.
- // 3 packets are sent, one is queued in the creator.
+ // Send enough data to create 4 packets with MUST_FEC_PROTECT flag. 3 packets
+ // are sent, one is queued in the creator.
{
InSequence dummy;
EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(
@@ -641,8 +755,8 @@
generator_.OnCongestionWindowChange(2);
EXPECT_EQ(2u, creator_->max_packets_per_fec_group());
- // Send enough data to trigger one unprotected data packet,
- // causing the FEC packet to also be sent.
+ // Send enough data to trigger one unprotected data packet, causing the FEC
+ // packet to also be sent.
{
InSequence dummy;
EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(
@@ -687,8 +801,6 @@
SaveArg<0>(&packet4_));
EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(
SaveArg<0>(&packet5_));
- EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(
- SaveArg<0>(&packet6_));
}
// Send enough data to create 3 packets with MUST_FEC_PROTECT flag.
size_t data_len = 2 * kDefaultMaxPacketSize + 100;
@@ -697,12 +809,16 @@
EXPECT_EQ(data_len, consumed.bytes_consumed);
EXPECT_FALSE(generator_.HasQueuedFrames());
- // Verify that two FEC packets were sent.
+ // Verify that packets sent were 3 data and 1 FEC.
CheckPacketHasSingleStreamFrame(packet2_);
CheckPacketHasSingleStreamFrame(packet3_);
CheckPacketIsFec(packet4_, /*fec_group=*/2u);
CheckPacketHasSingleStreamFrame(packet5_);
- CheckPacketIsFec(packet6_, /*fec_group=*/5u); // Sent at the end of stream.
+
+ // Calling OnFecTimeout should emit the pending FEC packet.
+ EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(SaveArg<0>(&packet6_));
+ generator_.OnFecTimeout();
+ CheckPacketIsFec(packet6_, /*fec_group=*/5u);
// Send one unprotected data packet.
EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(
@@ -750,14 +866,12 @@
// Queue control frames in generator.
delegate_.SetCanNotWrite();
- generator_.SetShouldSendAck(true, true);
+ generator_.SetShouldSendAck(true);
delegate_.SetCanWriteAnything();
generator_.StartBatchOperations();
// Set up frames to write into the creator when control frames are written.
EXPECT_CALL(delegate_, CreateAckFrame()).WillOnce(Return(CreateAckFrame()));
- EXPECT_CALL(delegate_, CreateFeedbackFrame()).WillOnce(
- Return(CreateFeedbackFrame()));
EXPECT_CALL(delegate_, CreateStopWaitingFrame()).WillOnce(
Return(CreateStopWaitingFrame()));
@@ -774,7 +888,6 @@
EXPECT_EQ(1u, consumed.bytes_consumed);
PacketContents contents;
contents.num_ack_frames = 1;
- contents.num_feedback_frames = 1;
contents.num_stop_waiting_frames = 1;
CheckPacketContains(contents, packet_);
@@ -820,14 +933,11 @@
creator_->set_max_packets_per_fec_group(2);
EXPECT_FALSE(creator_->IsFecProtected());
- generator_.StartBatchOperations();
// Send first packet, FEC protected.
EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(SaveArg<0>(&packet_));
- // Write enough data to cause a packet to be emitted.
- size_t data_len = kDefaultMaxPacketSize;
- QuicConsumedData consumed = generator_.ConsumeData(
- 5, CreateData(data_len), 0, true, MUST_FEC_PROTECT, nullptr);
- EXPECT_EQ(data_len, consumed.bytes_consumed);
+ QuicConsumedData consumed = generator_.ConsumeData(5, CreateData(1u), 0, true,
+ MUST_FEC_PROTECT, nullptr);
+ EXPECT_EQ(1u, consumed.bytes_consumed);
PacketContents contents;
contents.num_stream_frames = 1u;
contents.fec_group = 1u;
@@ -836,7 +946,7 @@
// FEC should still be on in creator.
EXPECT_TRUE(creator_->IsFecProtected());
- // Send enough unprotected data to cause second packet to be sent, which gets
+ // Send unprotected data to cause second packet to be sent, which gets
// protected because it happens to fall within an open FEC group. Data packet
// will be followed by FEC packet.
{
@@ -846,10 +956,10 @@
EXPECT_CALL(delegate_, OnSerializedPacket(_)).WillOnce(
SaveArg<0>(&packet3_));
}
- consumed = generator_.ConsumeData(5, CreateData(data_len), 0, true,
- MAY_FEC_PROTECT, nullptr);
- EXPECT_EQ(data_len, consumed.bytes_consumed);
- contents.num_stream_frames = 2u;
+ consumed = generator_.ConsumeData(5, CreateData(1u), 0, true, MAY_FEC_PROTECT,
+ nullptr);
+ EXPECT_EQ(1u, consumed.bytes_consumed);
+ contents.num_stream_frames = 1u;
CheckPacketContains(contents, packet2_);
CheckPacketIsFec(packet3_, /*fec_group=*/1u);
@@ -907,7 +1017,7 @@
TEST_F(QuicPacketGeneratorTest, NotWritableThenBatchOperations) {
delegate_.SetCanNotWrite();
- generator_.SetShouldSendAck(true, false);
+ generator_.SetShouldSendAck(false);
generator_.AddControlFrame(QuicFrame(CreateRstStreamFrame()));
EXPECT_TRUE(generator_.HasQueuedFrames());
@@ -915,11 +1025,8 @@
generator_.StartBatchOperations();
- // When the first write operation is invoked, the ack and feedback
- // frames will be returned.
+ // When the first write operation is invoked, the ack frame will be returned.
EXPECT_CALL(delegate_, CreateAckFrame()).WillOnce(Return(CreateAckFrame()));
- EXPECT_CALL(delegate_, CreateFeedbackFrame()).WillOnce(
- Return(CreateFeedbackFrame()));
// Send some data and a control frame
generator_.ConsumeData(3, MakeIOVector("quux"), 7, false, MAY_FEC_PROTECT,
@@ -934,7 +1041,6 @@
PacketContents contents;
contents.num_ack_frames = 1;
contents.num_goaway_frames = 1;
- contents.num_feedback_frames = 1;
contents.num_rst_stream_frames = 1;
contents.num_stream_frames = 1;
CheckPacketContains(contents, packet_);
@@ -943,7 +1049,7 @@
TEST_F(QuicPacketGeneratorTest, NotWritableThenBatchOperations2) {
delegate_.SetCanNotWrite();
- generator_.SetShouldSendAck(true, false);
+ generator_.SetShouldSendAck(false);
generator_.AddControlFrame(QuicFrame(CreateRstStreamFrame()));
EXPECT_TRUE(generator_.HasQueuedFrames());
@@ -951,11 +1057,8 @@
generator_.StartBatchOperations();
- // When the first write operation is invoked, the ack and feedback
- // frames will be returned.
+ // When the first write operation is invoked, the ack frame will be returned.
EXPECT_CALL(delegate_, CreateAckFrame()).WillOnce(Return(CreateAckFrame()));
- EXPECT_CALL(delegate_, CreateFeedbackFrame()).WillOnce(
- Return(CreateFeedbackFrame()));
{
InSequence dummy;
@@ -980,7 +1083,6 @@
// The first packet should have the queued data and part of the stream data.
PacketContents contents;
contents.num_ack_frames = 1;
- contents.num_feedback_frames = 1;
contents.num_rst_stream_frames = 1;
contents.num_stream_frames = 1;
CheckPacketContains(contents, packet_);
diff --git a/net/quic/quic_protocol.cc b/net/quic/quic_protocol.cc
index 1d5a312..56dfa97 100644
--- a/net/quic/quic_protocol.cc
+++ b/net/quic/quic_protocol.cc
@@ -158,12 +158,10 @@
QuicTag QuicVersionToQuicTag(const QuicVersion version) {
switch (version) {
- case QUIC_VERSION_21:
- return MakeQuicTag('Q', '0', '2', '1');
- case QUIC_VERSION_22:
- return MakeQuicTag('Q', '0', '2', '2');
case QUIC_VERSION_23:
return MakeQuicTag('Q', '0', '2', '3');
+ case QUIC_VERSION_24:
+ return MakeQuicTag('Q', '0', '2', '4');
default:
// This shold be an ERROR because we should never attempt to convert an
// invalid QuicVersion to be written to the wire.
@@ -190,9 +188,8 @@
string QuicVersionToString(const QuicVersion version) {
switch (version) {
- RETURN_STRING_LITERAL(QUIC_VERSION_21);
- RETURN_STRING_LITERAL(QUIC_VERSION_22);
RETURN_STRING_LITERAL(QUIC_VERSION_23);
+ RETURN_STRING_LITERAL(QUIC_VERSION_24);
default:
return "QUIC_VERSION_UNSUPPORTED";
}
@@ -260,14 +257,6 @@
QuicAckFrame::~QuicAckFrame() {}
-CongestionFeedbackMessageTCP::CongestionFeedbackMessageTCP()
- : receive_window(0) {
-}
-
-QuicCongestionFeedbackFrame::QuicCongestionFeedbackFrame() : type(kTCP) {}
-
-QuicCongestionFeedbackFrame::~QuicCongestionFeedbackFrame() {}
-
QuicRstStreamErrorCode AdjustErrorForVersion(
QuicRstStreamErrorCode error_code,
QuicVersion version) {
@@ -309,11 +298,6 @@
ack_frame(frame) {
}
-QuicFrame::QuicFrame(QuicCongestionFeedbackFrame* frame)
- : type(CONGESTION_FEEDBACK_FRAME),
- congestion_feedback_frame(frame) {
-}
-
QuicFrame::QuicFrame(QuicStopWaitingFrame* frame)
: type(STOP_WAITING_FRAME),
stop_waiting_frame(frame) {
@@ -418,11 +402,6 @@
os << "type { ACK_FRAME } " << *(frame.ack_frame);
break;
}
- case CONGESTION_FEEDBACK_FRAME: {
- os << "type { CONGESTION_FEEDBACK_FRAME } "
- << *(frame.congestion_feedback_frame);
- break;
- }
case STOP_WAITING_FRAME: {
os << "type { STOP_WAITING_FRAME } " << *(frame.stop_waiting_frame);
break;
@@ -482,19 +461,6 @@
return os;
}
-ostream& operator<<(ostream& os,
- const QuicCongestionFeedbackFrame& congestion_frame) {
- os << "type: " << congestion_frame.type;
- switch (congestion_frame.type) {
- case kTCP: {
- const CongestionFeedbackMessageTCP& tcp = congestion_frame.tcp;
- os << " receive_window: " << tcp.receive_window;
- break;
- }
- }
- return os;
-}
-
QuicGoAwayFrame::QuicGoAwayFrame()
: error_code(QUIC_NO_ERROR),
last_good_stream_id(0) {
@@ -609,9 +575,6 @@
case ACK_FRAME:
delete it->ack_frame;
break;
- case CONGESTION_FEEDBACK_FRAME:
- delete it->congestion_feedback_frame;
- break;
case STOP_WAITING_FRAME:
delete it->stop_waiting_frame;
break;
diff --git a/net/quic/quic_protocol.h b/net/quic/quic_protocol.h
index 99c0a28..d87cb7e 100644
--- a/net/quic/quic_protocol.h
+++ b/net/quic/quic_protocol.h
@@ -214,11 +214,10 @@
STOP_WAITING_FRAME = 6,
PING_FRAME = 7,
- // STREAM, ACK, and CONGESTION_FEEDBACK frames are special frames. They are
- // encoded differently on the wire and their values do not need to be stable.
+ // STREAM and ACK frames are special frames. They are encoded differently on
+ // the wire and their values do not need to be stable.
STREAM_FRAME,
ACK_FRAME,
- CONGESTION_FEEDBACK_FRAME,
NUM_FRAME_TYPES
};
@@ -310,9 +309,8 @@
// Special case to indicate unknown/unsupported QUIC version.
QUIC_VERSION_UNSUPPORTED = 0,
- QUIC_VERSION_21 = 21, // Headers/crypto streams are flow controlled.
- QUIC_VERSION_22 = 22, // Send Server Config Update messages on crypto stream.
QUIC_VERSION_23 = 23, // Timestamp in the ack frame.
+ QUIC_VERSION_24 = 24, // SPDY/4 header compression.
};
// This vector contains QUIC versions which we currently support.
@@ -322,8 +320,8 @@
//
// IMPORTANT: if you are adding to this list, follow the instructions at
// http://sites/quic/adding-and-removing-versions
-static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_23,
- QUIC_VERSION_22};
+static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_24,
+ QUIC_VERSION_23};
typedef std::vector<QuicVersion> QuicVersionVector;
@@ -451,8 +449,9 @@
QUIC_INVALID_STOP_WAITING_DATA = 60,
// ACK frame data is malformed.
QUIC_INVALID_ACK_DATA = 9,
- // CONGESTION_FEEDBACK frame data is malformed.
- QUIC_INVALID_CONGESTION_FEEDBACK_DATA = 47,
+
+ // deprecated: QUIC_INVALID_CONGESTION_FEEDBACK_DATA = 47,
+
// Version negotiation packet is malformed.
QUIC_INVALID_VERSION_NEGOTIATION_PACKET = 10,
// Public RST packet is malformed.
@@ -742,14 +741,6 @@
QuicPacketSequenceNumber lower,
QuicPacketSequenceNumber higher);
-// Defines for all types of congestion feedback that will be negotiated in QUIC,
-// kTCP MUST be supported by all QUIC implementations to guarantee 100%
-// compatibility.
-// TODO(cyr): Remove this when removing QUIC_VERSION_22.
-enum CongestionFeedbackType {
- kTCP, // Used to mimic TCP.
-};
-
// Defines for all types of congestion control algorithms that can be used in
// QUIC. Note that this is separate from the congestion feedback type -
// some congestion control algorithms may use the same feedback type
@@ -765,27 +756,6 @@
kTime, // Time based loss detection.
};
-// TODO(cyr): Remove this when removing QUIC_VERSION_22.
-struct NET_EXPORT_PRIVATE CongestionFeedbackMessageTCP {
- CongestionFeedbackMessageTCP();
-
- QuicByteCount receive_window;
-};
-
-// TODO(cyr): Remove this when removing QUIC_VERSION_22.
-struct NET_EXPORT_PRIVATE QuicCongestionFeedbackFrame {
- QuicCongestionFeedbackFrame();
- ~QuicCongestionFeedbackFrame();
-
- NET_EXPORT_PRIVATE friend std::ostream& operator<<(
- std::ostream& os, const QuicCongestionFeedbackFrame& c);
-
- CongestionFeedbackType type;
- // This should really be a union, but since the timestamp struct
- // is non-trivial, C++ prohibits it.
- CongestionFeedbackMessageTCP tcp;
-};
-
struct NET_EXPORT_PRIVATE QuicRstStreamFrame {
QuicRstStreamFrame();
QuicRstStreamFrame(QuicStreamId stream_id,
@@ -885,9 +855,6 @@
explicit QuicFrame(QuicStreamFrame* stream_frame);
explicit QuicFrame(QuicAckFrame* frame);
- // TODO(cyr): Remove this when removing QUIC_VERSION_22.
- explicit QuicFrame(QuicCongestionFeedbackFrame* frame);
-
explicit QuicFrame(QuicRstStreamFrame* frame);
explicit QuicFrame(QuicConnectionCloseFrame* frame);
explicit QuicFrame(QuicStopWaitingFrame* frame);
@@ -905,8 +872,6 @@
QuicStreamFrame* stream_frame;
QuicAckFrame* ack_frame;
- // TODO(cyr): Remove this when removing QUIC_VERSION_22.
- QuicCongestionFeedbackFrame* congestion_feedback_frame;
QuicStopWaitingFrame* stop_waiting_frame;
QuicPingFrame* ping_frame;
diff --git a/net/quic/quic_received_packet_manager.cc b/net/quic/quic_received_packet_manager.cc
index 195dbd8..38ceec6 100644
--- a/net/quic/quic_received_packet_manager.cc
+++ b/net/quic/quic_received_packet_manager.cc
@@ -132,11 +132,10 @@
}
}
-QuicReceivedPacketManager::QuicReceivedPacketManager(
- QuicConnectionStats* stats)
+QuicReceivedPacketManager::QuicReceivedPacketManager(QuicConnectionStats* stats)
: peer_least_packet_awaiting_ack_(0),
time_largest_observed_(QuicTime::Zero()),
- receive_algorithm_(ReceiveAlgorithmInterface::Create(kTCP)),
+ receive_algorithm_(ReceiveAlgorithmInterface::Create()),
stats_(stats) {
ack_frame_.largest_observed = 0;
ack_frame_.entropy_hash = 0;
@@ -242,11 +241,6 @@
received_packet_times_.clear();
}
-bool QuicReceivedPacketManager::GenerateCongestionFeedback(
- QuicCongestionFeedbackFrame* feedback) {
- return receive_algorithm_->GenerateCongestionFeedback(feedback);
-}
-
QuicPacketEntropyHash QuicReceivedPacketManager::EntropyHash(
QuicPacketSequenceNumber sequence_number) const {
return entropy_tracker_.EntropyHash(sequence_number);
diff --git a/net/quic/quic_received_packet_manager.h b/net/quic/quic_received_packet_manager.h
index 7e1c88f..94bd3d5 100644
--- a/net/quic/quic_received_packet_manager.h
+++ b/net/quic/quic_received_packet_manager.h
@@ -120,13 +120,6 @@
void UpdateReceivedPacketInfo(QuicAckFrame* ack_frame,
QuicTime approximate_now);
- // Should be called before sending an ACK packet, to decide if we need
- // to attach a QuicCongestionFeedbackFrame block.
- // Returns false if no QuicCongestionFeedbackFrame block is needed.
- // Otherwise fills in feedback and returns true.
- virtual bool GenerateCongestionFeedback(
- QuicCongestionFeedbackFrame* feedback);
-
// QuicReceivedEntropyHashCalculatorInterface
// Called by QuicFramer, when the outgoing ack gets truncated, to recalculate
// the received entropy hash for the truncated ack frame.
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc
index f2c514b..9177552 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -32,7 +32,10 @@
// support a higher or lower value.
static const int64 kMinRetransmissionTimeMs = 200;
static const int64 kMaxRetransmissionTimeMs = 60000;
+// Maximum number of exponential backoffs used for RTO timeouts.
static const size_t kMaxRetransmissions = 10;
+// Maximum number of packets retransmitted upon an RTO.
+static const size_t kMaxRetransmissionsOnTimeout = 2;
// Ensure the handshake timer isnt't faster than 10ms.
// This limits the tenth retransmitted packet to 10s after the initial CHLO.
@@ -232,6 +235,17 @@
// Anytime we are making forward progress and have a new RTT estimate, reset
// the backoff counters.
if (rtt_updated) {
+ if (FLAGS_quic_use_new_rto && consecutive_rto_count_ > 0) {
+ // If the ack acknowledges data sent prior to the RTO,
+ // the RTO was spurious.
+ if (ack_frame.largest_observed < first_rto_transmission_) {
+ // Replace SRTT with latest_rtt and increase the variance to prevent
+ // a spurious RTO from happening again.
+ rtt_stats_.ExpireSmoothedMetrics();
+ } else {
+ send_algorithm_->OnRetransmissionTimeout(true);
+ }
+ }
// Reset all retransmit counters any time a new packet is acked.
consecutive_rto_count_ = 0;
consecutive_tlp_count_ = 0;
@@ -365,7 +379,10 @@
const TransmissionInfo& transmission_info =
unacked_packets_.GetTransmissionInfo(sequence_number);
LOG_IF(DFATAL, transmission_info.retransmittable_frames == nullptr);
- if (transmission_type != TLP_RETRANSMISSION) {
+ // Both TLP and the new RTO leave the packets in flight and let the loss
+ // detection decide if packets are lost.
+ if (transmission_type != TLP_RETRANSMISSION &&
+ (!FLAGS_quic_use_new_rto || transmission_type != RTO_RETRANSMISSION)) {
unacked_packets_.RemoveFromInFlight(sequence_number);
}
// TODO(ianswett): Currently the RTO can fire while there are pending NACK
@@ -380,7 +397,8 @@
void QuicSentPacketManager::RecordSpuriousRetransmissions(
const SequenceNumberList& all_transmissions,
QuicPacketSequenceNumber acked_sequence_number) {
- if (acked_sequence_number < first_rto_transmission_) {
+ if (!FLAGS_quic_use_new_rto &&
+ acked_sequence_number < first_rto_transmission_) {
// Cancel all pending RTO transmissions and restore their in flight status.
// Replace SRTT with latest_rtt and increase the variance to prevent
// a spurious RTO from happening again.
@@ -405,9 +423,8 @@
stats_->bytes_spuriously_retransmitted += retransmit_info.bytes_sent;
++stats_->packets_spuriously_retransmitted;
if (debug_delegate_ != nullptr) {
- debug_delegate_->OnSpuriousPacketRetransmition(
- retransmit_info.transmission_type,
- retransmit_info.bytes_sent);
+ debug_delegate_->OnSpuriousPacketRetransmission(
+ retransmit_info.transmission_type, retransmit_info.bytes_sent);
}
}
}
@@ -535,7 +552,8 @@
LOG_IF(DFATAL, bytes == 0) << "Cannot send empty packets.";
if (original_sequence_number == 0) {
- if (serialized_packet->retransmittable_frames) {
+ if (!FLAGS_quic_ack_notifier_informed_on_serialized &&
+ serialized_packet->retransmittable_frames) {
ack_notifier_manager_.OnSerializedPacket(*serialized_packet);
}
} else {
@@ -623,7 +641,11 @@
return;
case RTO_MODE:
++stats_->rto_count;
- RetransmitAllPackets();
+ if (FLAGS_quic_use_new_rto) {
+ RetransmitRtoPackets();
+ } else {
+ RetransmitAllPackets();
+ }
return;
}
}
@@ -669,6 +691,33 @@
return false;
}
+void QuicSentPacketManager::RetransmitRtoPackets() {
+ LOG_IF(DFATAL, pending_timer_transmission_count_ > 0)
+ << "Retransmissions already queued:" << pending_timer_transmission_count_;
+ // Mark two packets for retransmission.
+ QuicPacketSequenceNumber sequence_number = unacked_packets_.GetLeastUnacked();
+ for (QuicUnackedPacketMap::const_iterator it = unacked_packets_.begin();
+ it != unacked_packets_.end(); ++it, ++sequence_number) {
+ if (it->retransmittable_frames != nullptr &&
+ pending_timer_transmission_count_ < kMaxRetransmissionsOnTimeout) {
+ MarkForRetransmission(sequence_number, RTO_RETRANSMISSION);
+ ++pending_timer_transmission_count_;
+ }
+ // Abandon non-retransmittable data that's in flight to ensure it doesn't
+ // fill up the congestion window.
+ if (it->retransmittable_frames == nullptr && it->in_flight &&
+ it->all_transmissions == nullptr) {
+ unacked_packets_.RemoveFromInFlight(sequence_number);
+ }
+ }
+ if (pending_timer_transmission_count_ > 0) {
+ if (consecutive_rto_count_ == 0) {
+ first_rto_transmission_ = unacked_packets_.largest_sent_packet() + 1;
+ }
+ ++consecutive_rto_count_;
+ }
+}
+
void QuicSentPacketManager::RetransmitAllPackets() {
DVLOG(1) << "RetransmitAllPackets() called with "
<< unacked_packets_.GetNumUnackedPacketsDebugOnly()
@@ -719,14 +768,6 @@
return RTO_MODE;
}
-void QuicSentPacketManager::OnIncomingQuicCongestionFeedbackFrame(
- const QuicCongestionFeedbackFrame& frame,
- const QuicTime& feedback_receive_time) {
- if (frame.type == kTCP) {
- receive_buffer_bytes_ = frame.tcp.receive_window;
- }
-}
-
void QuicSentPacketManager::InvokeLossDetection(QuicTime time) {
SequenceNumberSet lost_packets =
loss_algorithm_->DetectLostPackets(unacked_packets_,
@@ -946,6 +987,11 @@
return send_algorithm_->GetSlowStartThreshold() / kDefaultTCPMSS;
}
+void QuicSentPacketManager::OnSerializedPacket(
+ const SerializedPacket& serialized_packet) {
+ ack_notifier_manager_.OnSerializedPacket(serialized_packet);
+}
+
void QuicSentPacketManager::EnablePacing() {
if (using_pacing_) {
return;
diff --git a/net/quic/quic_sent_packet_manager.h b/net/quic/quic_sent_packet_manager.h
index 287b5fc..6bb2c77 100644
--- a/net/quic/quic_sent_packet_manager.h
+++ b/net/quic/quic_sent_packet_manager.h
@@ -48,7 +48,7 @@
virtual ~DebugDelegate() {}
// Called when a spurious retransmission is detected.
- virtual void OnSpuriousPacketRetransmition(
+ virtual void OnSpuriousPacketRetransmission(
TransmissionType transmission_type,
QuicByteCount byte_size) {}
@@ -156,11 +156,6 @@
// been acked by the peer.
QuicPacketSequenceNumber GetLeastUnacked() const;
- // Called when a congestion feedback frame is received from peer.
- virtual void OnIncomingQuicCongestionFeedbackFrame(
- const QuicCongestionFeedbackFrame& frame,
- const QuicTime& feedback_receive_time);
-
// Called when we have sent bytes to the peer. This informs the manager both
// the number of bytes sent and if they were retransmitted. Returns true if
// the sender should reset the retransmission timer.
@@ -217,6 +212,9 @@
// start threshold and will return 0.
QuicPacketCount GetSlowStartThresholdInTcpMss() const;
+ // Called by the connection every time it receives a serialized packet.
+ void OnSerializedPacket(const SerializedPacket& serialized_packet);
+
// Enables pacing if it has not already been enabled.
void EnablePacing();
@@ -287,6 +285,10 @@
// Retransmits all crypto stream packets.
void RetransmitCryptoPackets();
+ // Retransmits two packets for an RTO and removes any non-retransmittable
+ // packets from flight.
+ void RetransmitRtoPackets();
+
// Retransmits all the packets and abandons by invoking a full RTO.
void RetransmitAllPackets();
@@ -390,7 +392,7 @@
size_t consecutive_tlp_count_;
// Number of times the crypto handshake has been retransmitted.
size_t consecutive_crypto_retransmission_count_;
- // Number of pending transmissions of TLP or crypto packets.
+ // Number of pending transmissions of TLP, RTO, or crypto packets.
size_t pending_timer_transmission_count_;
// Maximum number of tail loss probes to send before firing an RTO.
size_t max_tail_loss_probes_;
diff --git a/net/quic/quic_sent_packet_manager_test.cc b/net/quic/quic_sent_packet_manager_test.cc
index 756c21a..6275094 100644
--- a/net/quic/quic_sent_packet_manager_test.cc
+++ b/net/quic/quic_sent_packet_manager_test.cc
@@ -37,7 +37,7 @@
class MockDebugDelegate : public QuicSentPacketManager::DebugDelegate {
public:
- MOCK_METHOD2(OnSpuriousPacketRetransmition,
+ MOCK_METHOD2(OnSpuriousPacketRetransmission,
void(TransmissionType transmission_type,
QuicByteCount byte_size));
};
@@ -384,7 +384,8 @@
EXPECT_EQ(QuicTime::Zero(), manager_.GetRetransmissionTime());
}
-TEST_F(QuicSentPacketManagerTest, RetransmitTwiceThenAckPreviousBeforeSend) {
+TEST_F(QuicSentPacketManagerTest,
+ DISABLED_RetransmitTwiceThenAckPreviousBeforeSend) {
SendDataPacket(1);
RetransmitAndSendPacket(1, 2);
@@ -416,8 +417,8 @@
TEST_F(QuicSentPacketManagerTest, RetransmitTwiceThenAckFirst) {
StrictMock<MockDebugDelegate> debug_delegate;
- EXPECT_CALL(debug_delegate, OnSpuriousPacketRetransmition(
- TLP_RETRANSMISSION, kDefaultLength)).Times(2);
+ EXPECT_CALL(debug_delegate, OnSpuriousPacketRetransmission(
+ TLP_RETRANSMISSION, kDefaultLength)).Times(2);
manager_.set_debug_delegate(&debug_delegate);
SendDataPacket(1);
@@ -843,13 +844,36 @@
// Advance the time enough to ensure all packets are RTO'd.
clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(1000));
- // The final RTO abandons all of them.
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
- EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
+ if (!FLAGS_quic_use_new_rto) {
+ // The final RTO abandons all of them.
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
+ }
manager_.OnRetransmissionTimeout();
EXPECT_TRUE(manager_.HasPendingRetransmissions());
EXPECT_EQ(2u, stats_.tlp_count);
EXPECT_EQ(1u, stats_.rto_count);
+
+ // Send and Ack the RTO and ensure OnRetransmissionTimeout is called.
+ if (FLAGS_quic_use_new_rto) {
+ EXPECT_EQ(102 * kDefaultLength,
+ QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+
+ RetransmitNextPacket(103);
+ QuicAckFrame ack_frame;
+ ack_frame.largest_observed = 103;
+ for (int i = 0; i < 103; ++i) {
+ ack_frame.missing_packets.insert(i);
+ }
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ EXPECT_CALL(*send_algorithm_,
+ OnCongestionEvent(true, _, ElementsAre(Pair(103, _)), _));
+ EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
+ EXPECT_CALL(*network_change_visitor_, OnRttChange());
+ manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow());
+ // All packets before 103 should be lost.
+ EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ }
}
TEST_F(QuicSentPacketManagerTest, CryptoHandshakeTimeout) {
@@ -1074,16 +1098,169 @@
}
TEST_F(QuicSentPacketManagerTest, RetransmissionTimeout) {
- // Send 100 packets and then ensure all are abandoned when the RTO fires.
+ // Send 100 packets.
const size_t kNumSentPackets = 100;
for (size_t i = 1; i <= kNumSentPackets; ++i) {
SendDataPacket(i);
}
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
- EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
+ }
EXPECT_FALSE(manager_.MaybeRetransmitTailLossProbe());
manager_.OnRetransmissionTimeout();
+ EXPECT_TRUE(manager_.HasPendingRetransmissions());
+ if (FLAGS_quic_use_new_rto) {
+ EXPECT_EQ(100 * kDefaultLength,
+ QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ } else {
+ // Ensure all are abandoned when the RTO fires.
+ EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ }
+ RetransmitNextPacket(101);
+ RetransmitNextPacket(102);
+ if (FLAGS_quic_use_new_rto) {
+ EXPECT_FALSE(manager_.HasPendingRetransmissions());
+ } else {
+ EXPECT_TRUE(manager_.HasPendingRetransmissions());
+ }
+
+ // Ack a retransmission.
+ if (FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ }
+ QuicAckFrame ack_frame;
+ ack_frame.delta_time_largest_observed = QuicTime::Delta::Zero();
+ ack_frame.largest_observed = 102;
+ for (int i = 0; i < 102; ++i) {
+ ack_frame.missing_packets.insert(i);
+ }
+ EXPECT_CALL(*send_algorithm_,
+ OnCongestionEvent(true, _, ElementsAre(Pair(102, _)), _));
+ EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
+ EXPECT_CALL(*network_change_visitor_, OnRttChange());
+ manager_.OnIncomingAck(ack_frame, clock_.Now());
+}
+
+TEST_F(QuicSentPacketManagerTest, TwoRetransmissionTimeoutsAckSecond) {
+ // Send 1 packet.
+ SendDataPacket(1);
+
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
+ }
+ manager_.OnRetransmissionTimeout();
+ EXPECT_TRUE(manager_.HasPendingRetransmissions());
+ if (FLAGS_quic_use_new_rto) {
+ EXPECT_EQ(kDefaultLength,
+ QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ } else {
+ // Ensure all are abandoned when the RTO fires.
+ EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ }
+ RetransmitNextPacket(2);
+ EXPECT_FALSE(manager_.HasPendingRetransmissions());
+
+ // Rto a second time.
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
+ }
+ manager_.OnRetransmissionTimeout();
+ EXPECT_TRUE(manager_.HasPendingRetransmissions());
+ if (FLAGS_quic_use_new_rto) {
+ EXPECT_EQ(2 * kDefaultLength,
+ QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ } else {
+ // Ensure all are abandoned when the RTO fires.
+ EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ }
+ RetransmitNextPacket(3);
+ EXPECT_FALSE(manager_.HasPendingRetransmissions());
+
+ // Ack a retransmission and ensure OnRetransmissionTimeout is called.
+ if (FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ }
+ QuicAckFrame ack_frame;
+ ack_frame.delta_time_largest_observed = QuicTime::Delta::Zero();
+ ack_frame.largest_observed = 2;
+ ack_frame.missing_packets.insert(1);
+ if (FLAGS_quic_use_new_rto) {
+ ExpectAck(2);
+ } else {
+ ExpectUpdatedRtt(2);
+ }
+ manager_.OnIncomingAck(ack_frame, clock_.Now());
+
+ if (FLAGS_quic_use_new_rto) {
+ // The original packet and newest should be outstanding.
+ EXPECT_EQ(2 * kDefaultLength,
+ QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ } else {
+ EXPECT_EQ(kDefaultLength,
+ QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ }
+}
+
+TEST_F(QuicSentPacketManagerTest, TwoRetransmissionTimeoutsAckFirst) {
+ // Send 1 packet.
+ SendDataPacket(1);
+
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
+ }
+ manager_.OnRetransmissionTimeout();
+ EXPECT_TRUE(manager_.HasPendingRetransmissions());
+ if (FLAGS_quic_use_new_rto) {
+ EXPECT_EQ(kDefaultLength,
+ QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ } else {
+ // Ensure all are abandoned when the RTO fires.
+ EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ }
+ RetransmitNextPacket(2);
+ EXPECT_FALSE(manager_.HasPendingRetransmissions());
+
+ // Rto a second time.
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
+ }
+ manager_.OnRetransmissionTimeout();
+ EXPECT_TRUE(manager_.HasPendingRetransmissions());
+ if (FLAGS_quic_use_new_rto) {
+ EXPECT_EQ(2 * kDefaultLength,
+ QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ } else {
+ // Ensure all are abandoned when the RTO fires.
+ EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ }
+ RetransmitNextPacket(3);
+ EXPECT_FALSE(manager_.HasPendingRetransmissions());
+
+ // Ack a retransmission and ensure OnRetransmissionTimeout is called.
+ if (FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ }
+ QuicAckFrame ack_frame;
+ ack_frame.delta_time_largest_observed = QuicTime::Delta::Zero();
+ ack_frame.largest_observed = 3;
+ ack_frame.missing_packets.insert(1);
+ ack_frame.missing_packets.insert(2);
+ ExpectAck(3);
+ manager_.OnIncomingAck(ack_frame, clock_.Now());
+
+ if (FLAGS_quic_use_new_rto) {
+ // The first two packets should still be outstanding.
+ EXPECT_EQ(2 * kDefaultLength,
+ QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ } else {
+ EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ }
}
TEST_F(QuicSentPacketManagerTest, GetTransmissionTime) {
@@ -1155,7 +1332,7 @@
EXPECT_EQ(expected_time, manager_.GetRetransmissionTime());
}
-TEST_F(QuicSentPacketManagerTest, GetTransmissionTimeRTO) {
+TEST_F(QuicSentPacketManagerTest, GetTransmissionTimeSpuriousRTO) {
QuicSentPacketManagerPeer::GetRttStats(&manager_)->UpdateRtt(
QuicTime::Delta::FromMilliseconds(100),
QuicTime::Delta::Zero(),
@@ -1173,38 +1350,71 @@
EXPECT_EQ(expected_time, manager_.GetRetransmissionTime());
// Retransmit the packet by invoking the retransmission timeout.
- EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ }
clock_.AdvanceTime(expected_rto_delay);
manager_.OnRetransmissionTimeout();
- EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ if (FLAGS_quic_use_new_rto) {
+ // All packets are still considered inflight.
+ EXPECT_EQ(4 * kDefaultLength,
+ QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ } else {
+ EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ }
RetransmitNextPacket(5);
RetransmitNextPacket(6);
- EXPECT_EQ(2 * kDefaultLength,
- QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
- EXPECT_TRUE(manager_.HasPendingRetransmissions());
+ if (FLAGS_quic_use_new_rto) {
+ // All previous packets are inflight, plus two rto retransmissions.
+ EXPECT_EQ(6 * kDefaultLength,
+ QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ EXPECT_FALSE(manager_.HasPendingRetransmissions());
+ } else {
+ EXPECT_EQ(2 * kDefaultLength,
+ QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ EXPECT_TRUE(manager_.HasPendingRetransmissions());
+ }
// The delay should double the second time.
expected_time = clock_.Now().Add(expected_rto_delay).Add(expected_rto_delay);
- EXPECT_EQ(expected_time, manager_.GetRetransmissionTime());
+ // Once we always base the timer on the right edge, leaving the older packets
+ // in flight doesn't change the timeout.
+ if (!FLAGS_quic_use_new_rto || FLAGS_quic_rto_uses_last_sent) {
+ EXPECT_EQ(expected_time, manager_.GetRetransmissionTime());
+ }
- // Ack a packet and ensure the RTO goes back to the original value.
+ // Ack a packet before the first RTO and ensure the RTO timeout returns to the
+ // original value and OnRetransmissionTimeout is not called or reverted.
QuicAckFrame ack_frame;
ack_frame.largest_observed = 2;
ack_frame.missing_packets.insert(1);
- ExpectUpdatedRtt(2);
- EXPECT_CALL(*send_algorithm_, RevertRetransmissionTimeout());
+ if (FLAGS_quic_use_new_rto) {
+ ExpectAck(2);
+ } else {
+ ExpectUpdatedRtt(2);
+ EXPECT_CALL(*send_algorithm_, RevertRetransmissionTimeout());
+ }
manager_.OnIncomingAck(ack_frame, clock_.ApproximateNow());
EXPECT_FALSE(manager_.HasPendingRetransmissions());
- EXPECT_EQ(4 * kDefaultLength,
- QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ if (FLAGS_quic_use_new_rto) {
+ EXPECT_EQ(5 * kDefaultLength,
+ QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ } else {
+ EXPECT_EQ(4 * kDefaultLength,
+ QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
+ }
// Wait 2RTTs from now for the RTO, since it's the max of the RTO time
// and the TLP time. In production, there would always be two TLP's first.
// Since retransmission was spurious, smoothed_rtt_ is expired, and replaced
// by the latest RTT sample of 500ms.
expected_time = clock_.Now().Add(QuicTime::Delta::FromMilliseconds(1000));
- EXPECT_EQ(expected_time, manager_.GetRetransmissionTime());
+ // Once we always base the timer on the right edge, leaving the older packets
+ // in flight doesn't change the timeout.
+ if (!FLAGS_quic_use_new_rto || FLAGS_quic_rto_uses_last_sent) {
+ EXPECT_EQ(expected_time, manager_.GetRetransmissionTime());
+ }
}
TEST_F(QuicSentPacketManagerTest, GetTransmissionDelayMin) {
@@ -1219,8 +1429,10 @@
EXPECT_EQ(delay,
QuicSentPacketManagerPeer::GetRetransmissionDelay(&manager_));
delay = delay.Add(delay);
- EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ }
manager_.OnRetransmissionTimeout();
RetransmitNextPacket(i + 2);
}
@@ -1245,8 +1457,10 @@
EXPECT_EQ(delay,
QuicSentPacketManagerPeer::GetRetransmissionDelay(&manager_));
delay = delay.Add(delay);
- EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ if (!FLAGS_quic_use_new_rto) {
+ EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
+ }
manager_.OnRetransmissionTimeout();
RetransmitNextPacket(i + 2);
}
diff --git a/net/quic/quic_server_session.cc b/net/quic/quic_server_session.cc
index 64857c0..41b2a88 100644
--- a/net/quic/quic_server_session.cc
+++ b/net/quic/quic_server_session.cc
@@ -79,10 +79,6 @@
}
void QuicServerSession::OnCongestionWindowChange(QuicTime now) {
- if (connection()->version() <= QUIC_VERSION_21) {
- return;
- }
-
// Only send updates when the application has no data to write.
if (HasDataToWrite()) {
return;
diff --git a/net/quic/quic_session.cc b/net/quic/quic_session.cc
index 865af07..f102845 100644
--- a/net/quic/quic_session.cc
+++ b/net/quic/quic_session.cc
@@ -236,6 +236,10 @@
}
}
+void QuicSession::OnSuccessfulVersionNegotiation(const QuicVersion& version) {
+ headers_stream_->OnSuccessfulVersionNegotiation(version);
+}
+
void QuicSession::OnWindowUpdateFrames(
const vector<QuicWindowUpdateFrame>& frames) {
bool connection_window_updated = false;
@@ -255,13 +259,6 @@
continue;
}
- if (connection_->version() < QUIC_VERSION_21 &&
- (stream_id == kCryptoStreamId || stream_id == kHeadersStreamId)) {
- DLOG(DFATAL) << "WindowUpdate for stream " << stream_id << " in version "
- << QuicVersionToString(connection_->version());
- return;
- }
-
ReliableQuicStream* stream = GetStream(stream_id);
if (stream) {
stream->OnWindowUpdateFrame(frames[i]);
@@ -366,8 +363,10 @@
QuicStreamId id,
const SpdyHeaderBlock& headers,
bool fin,
+ QuicPriority priority,
QuicAckNotifier::DelegateInterface* ack_notifier_delegate) {
- return headers_stream_->WriteHeaders(id, headers, fin, ack_notifier_delegate);
+ return headers_stream_->WriteHeaders(id, headers, fin, priority,
+ ack_notifier_delegate);
}
void QuicSession::SendRstStream(QuicStreamId id,
@@ -498,10 +497,8 @@
}
// Inform all existing streams about the new window.
- if (connection_->version() >= QUIC_VERSION_21) {
- GetCryptoStream()->UpdateSendWindowOffset(new_window);
- headers_stream_->UpdateSendWindowOffset(new_window);
- }
+ GetCryptoStream()->UpdateSendWindowOffset(new_window);
+ headers_stream_->UpdateSendWindowOffset(new_window);
for (DataStreamMap::iterator it = stream_map_.begin();
it != stream_map_.end(); ++it) {
it->second->UpdateSendWindowOffset(new_window);
diff --git a/net/quic/quic_session.h b/net/quic/quic_session.h
index 34fa2f4..0d20b9b 100644
--- a/net/quic/quic_session.h
+++ b/net/quic/quic_session.h
@@ -68,7 +68,7 @@
void OnBlockedFrames(const std::vector<QuicBlockedFrame>& frames) override;
void OnConnectionClosed(QuicErrorCode error, bool from_peer) override;
void OnWriteBlocked() override {}
- void OnSuccessfulVersionNegotiation(const QuicVersion& version) override {}
+ void OnSuccessfulVersionNegotiation(const QuicVersion& version) override;
void OnCanWrite() override;
void OnCongestionWindowChange(QuicTime now) override {}
bool WillingAndAbleToWrite() const override;
@@ -116,6 +116,7 @@
QuicStreamId id,
const SpdyHeaderBlock& headers,
bool fin,
+ QuicPriority priority,
QuicAckNotifier::DelegateInterface* ack_notifier_delegate);
// Called by streams when they want to close the stream in both directions.
diff --git a/net/quic/quic_session_test.cc b/net/quic/quic_session_test.cc
index 96d30b8..842c4eb 100644
--- a/net/quic/quic_session_test.cc
+++ b/net/quic/quic_session_test.cc
@@ -316,6 +316,10 @@
TEST_P(QuicSessionTest, DecompressionError) {
QuicHeadersStream* stream = QuicSessionPeer::GetHeadersStream(&session_);
+ if (version() > QUIC_VERSION_23) {
+ // This test does not apply to HPACK compression.
+ return;
+ }
const unsigned char data[] = {
0x80, 0x03, 0x00, 0x01, // SPDY/3 SYN_STREAM frame
0x00, 0x00, 0x00, 0x25, // flags/length
@@ -723,12 +727,12 @@
headers["header"] = base::Uint64ToString(base::RandUint64()) +
base::Uint64ToString(base::RandUint64()) +
base::Uint64ToString(base::RandUint64());
- headers_stream->WriteHeaders(stream_id, headers, true, nullptr);
+ headers_stream->WriteHeaders(stream_id, headers, true, 0, nullptr);
stream_id += 2;
}
// Write once more to ensure that the headers stream has buffered data. The
// random headers may have exactly filled the flow control window.
- headers_stream->WriteHeaders(stream_id, headers, true, nullptr);
+ headers_stream->WriteHeaders(stream_id, headers, true, 0, nullptr);
EXPECT_TRUE(headers_stream->HasBufferedData());
EXPECT_TRUE(headers_stream->flow_controller()->IsBlocked());
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 5d0beaf..cf8ff39 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -1047,13 +1047,54 @@
InitializeCachedStateInCryptoConfig(server_id, server_info);
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile51(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 QuicStreamFactory::CreateSession51"));
+
QuicConfig config = config_;
+
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile52(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 QuicStreamFactory::CreateSession52"));
+
config.set_max_undecryptable_packets(kMaxUndecryptablePackets);
+
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile53(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 QuicStreamFactory::CreateSession53"));
+
config.SetInitialStreamFlowControlWindowToSend(kInitialReceiveWindowSize);
+
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile54(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 QuicStreamFactory::CreateSession54"));
+
config.SetInitialSessionFlowControlWindowToSend(kInitialReceiveWindowSize);
+
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile55(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 QuicStreamFactory::CreateSession55"));
+
int64 srtt = GetServerNetworkStatsSmoothedRttInMicroseconds(server_id);
+
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile56(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 QuicStreamFactory::CreateSession56"));
+
if (srtt > 0)
config.SetInitialRoundTripTimeUsToSend(static_cast<uint32>(srtt));
+
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
+ tracked_objects::ScopedTracker tracking_profile57(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422516 QuicStreamFactory::CreateSession57"));
+
if (enable_truncated_connection_ids_)
config.SetBytesForConnectionIdToSend(0);
@@ -1146,7 +1187,7 @@
if (http_server_properties_) {
if (quic_supported_servers_at_startup_.empty()) {
- for (const std::pair<net::HostPortPair, net::AlternateProtocolInfo>&
+ for (const std::pair<const net::HostPortPair, net::AlternateProtocolInfo>&
key_value : http_server_properties_->alternate_protocol_map()) {
if (key_value.second.protocol == QUIC) {
quic_supported_servers_at_startup_.insert(key_value.first);
diff --git a/net/quic/quic_time_wait_list_manager.cc b/net/quic/quic_time_wait_list_manager.cc
index 984d95f..52ee2da 100644
--- a/net/quic/quic_time_wait_list_manager.cc
+++ b/net/quic/quic_time_wait_list_manager.cc
@@ -15,6 +15,7 @@
#include "net/quic/crypto/quic_encrypter.h"
#include "net/quic/quic_clock.h"
#include "net/quic/quic_connection_helper.h"
+#include "net/quic/quic_flags.h"
#include "net/quic/quic_framer.h"
#include "net/quic/quic_protocol.h"
#include "net/quic/quic_server_session.h"
@@ -25,14 +26,6 @@
namespace net {
-namespace {
-
-// Time period for which a given connection_id should live in the time-wait
-// state.
-int64 FLAGS_quic_time_wait_list_seconds = 5;
-
-} // namespace
-
// A very simple alarm that just informs the QuicTimeWaitListManager to clean
// up old connection_ids. This alarm should be unregistered and deleted before
// the QuicTimeWaitListManager is deleted.
@@ -120,6 +113,11 @@
delete it->second.close_packet;
connection_id_map_.erase(it);
}
+ TrimTimeWaitListIfNeeded();
+ if (FLAGS_quic_limit_time_wait_list_size) {
+ DCHECK_LT(num_connections(),
+ static_cast<size_t>(FLAGS_quic_time_wait_list_max_connections));
+ }
ConnectionIdData data(num_packets,
version,
helper_->GetClock()->ApproximateNow(),
@@ -272,21 +270,59 @@
connection_id_clean_up_alarm_->Set(next_alarm_time);
}
+bool QuicTimeWaitListManager::MaybeExpireOldestConnection(
+ QuicTime expiration_time) {
+ if (connection_id_map_.empty()) {
+ return false;
+ }
+ ConnectionIdMap::iterator it = connection_id_map_.begin();
+ QuicTime oldest_connection_id_time = it->second.time_added;
+ if (oldest_connection_id_time > expiration_time) {
+ // Too recent, don't retire.
+ return false;
+ }
+ // This connection_id has lived its age, retire it now.
+ const QuicConnectionId connection_id = it->first;
+ delete it->second.close_packet;
+ connection_id_map_.erase(it);
+ visitor_->OnConnectionRemovedFromTimeWaitList(connection_id);
+ return true;
+}
+
void QuicTimeWaitListManager::CleanUpOldConnectionIds() {
QuicTime now = helper_->GetClock()->ApproximateNow();
- while (!connection_id_map_.empty()) {
- ConnectionIdMap::iterator it = connection_id_map_.begin();
- QuicTime oldest_connection_id = it->second.time_added;
- if (now.Subtract(oldest_connection_id) < kTimeWaitPeriod_) {
- break;
+ QuicTime expiration = now.Subtract(kTimeWaitPeriod_);
+ if (FLAGS_quic_limit_time_wait_list_size) {
+ while (MaybeExpireOldestConnection(expiration)) {
}
- const QuicConnectionId connection_id = it->first;
- // This connection_id has lived its age, retire it now.
- delete it->second.close_packet;
- connection_id_map_.erase(it);
- visitor_->OnConnectionRemovedFromTimeWaitList(connection_id);
+ } else {
+ while (!connection_id_map_.empty()) {
+ ConnectionIdMap::iterator it = connection_id_map_.begin();
+ QuicTime oldest_connection_id = it->second.time_added;
+ if (now.Subtract(oldest_connection_id) < kTimeWaitPeriod_) {
+ break;
+ }
+ const QuicConnectionId connection_id = it->first;
+ // This connection_id has lived its age, retire it now.
+ delete it->second.close_packet;
+ connection_id_map_.erase(it);
+ visitor_->OnConnectionRemovedFromTimeWaitList(connection_id);
+ }
}
+
SetConnectionIdCleanUpAlarm();
}
+void QuicTimeWaitListManager::TrimTimeWaitListIfNeeded() {
+ if (FLAGS_quic_limit_time_wait_list_size) {
+ if (FLAGS_quic_time_wait_list_max_connections < 0) {
+ return;
+ }
+ while (num_connections() >=
+ static_cast<size_t>(FLAGS_quic_time_wait_list_max_connections)) {
+ MaybeExpireOldestConnection(QuicTime::Infinite());
+ }
+ }
+}
+
} // namespace net
diff --git a/net/quic/quic_time_wait_list_manager.h b/net/quic/quic_time_wait_list_manager.h
index d6be4c0..0fff158 100644
--- a/net/quic/quic_time_wait_list_manager.h
+++ b/net/quic/quic_time_wait_list_manager.h
@@ -85,6 +85,10 @@
// period.
void CleanUpOldConnectionIds();
+ // If necessary, trims the oldest connections from the time-wait list until
+ // the size is under the configured maximum.
+ void TrimTimeWaitListIfNeeded();
+
// Given a ConnectionId that exists in the time wait list, returns the
// QuicVersion associated with it.
QuicVersion GetQuicVersionFromConnectionId(QuicConnectionId connection_id);
@@ -125,6 +129,15 @@
// Register the alarm to wake up at appropriate time.
void SetConnectionIdCleanUpAlarm();
+ // Removes the oldest connection from the time-wait list if it was added prior
+ // to "expiration_time". To unconditionally remove the oldest connection, use
+ // a QuicTime::Delta:Infinity(). This function modifies the
+ // connection_id_map_. If you plan to call this function in a loop, any
+ // iterators that you hold before the call to this function may be invalid
+ // afterward. Returns true if the oldest connection was expired. Returns
+ // false if the map is empty or the oldest connection has not expired.
+ bool MaybeExpireOldestConnection(QuicTime expiration_time);
+
// A map from a recently closed connection_id to the number of packets
// received after the termination of the connection bound to the
// connection_id.
diff --git a/net/quic/quic_utils.cc b/net/quic/quic_utils.cc
index a0e1de5..f8b31c4 100644
--- a/net/quic/quic_utils.cc
+++ b/net/quic/quic_utils.cc
@@ -169,7 +169,6 @@
RETURN_STRING_LITERAL(QUIC_INVALID_BLOCKED_DATA);
RETURN_STRING_LITERAL(QUIC_INVALID_STOP_WAITING_DATA);
RETURN_STRING_LITERAL(QUIC_INVALID_ACK_DATA);
- RETURN_STRING_LITERAL(QUIC_INVALID_CONGESTION_FEEDBACK_DATA);
RETURN_STRING_LITERAL(QUIC_INVALID_VERSION_NEGOTIATION_PACKET);
RETURN_STRING_LITERAL(QUIC_INVALID_PUBLIC_RST_PACKET);
RETURN_STRING_LITERAL(QUIC_DECRYPTION_FAILURE);
diff --git a/net/quic/reliable_quic_stream.cc b/net/quic/reliable_quic_stream.cc
index 17c4870..379991e 100644
--- a/net/quic/reliable_quic_stream.cc
+++ b/net/quic/reliable_quic_stream.cc
@@ -56,28 +56,20 @@
: delegate_(delegate),
pending_acks_(0),
wrote_last_data_(false),
- num_original_packets_(0),
- num_original_bytes_(0),
num_retransmitted_packets_(0),
num_retransmitted_bytes_(0) {
}
- void OnAckNotification(int num_original_packets,
- int num_original_bytes,
- int num_retransmitted_packets,
+ void OnAckNotification(int num_retransmitted_packets,
int num_retransmitted_bytes,
QuicTime::Delta delta_largest_observed) override {
DCHECK_LT(0, pending_acks_);
--pending_acks_;
- num_original_packets_ += num_original_packets;
- num_original_bytes_ += num_original_bytes;
num_retransmitted_packets_ += num_retransmitted_packets;
num_retransmitted_bytes_ += num_retransmitted_bytes;
if (wrote_last_data_ && pending_acks_ == 0) {
- delegate_->OnAckNotification(num_original_packets_,
- num_original_bytes_,
- num_retransmitted_packets_,
+ delegate_->OnAckNotification(num_retransmitted_packets_,
num_retransmitted_bytes_,
delta_largest_observed);
}
diff --git a/net/quic/reliable_quic_stream_test.cc b/net/quic/reliable_quic_stream_test.cc
index c50cbb4..cecae4b 100644
--- a/net/quic/reliable_quic_stream_test.cc
+++ b/net/quic/reliable_quic_stream_test.cc
@@ -475,13 +475,13 @@
// There were two writes, so OnAckNotification is not propagated
// until the third Ack arrives.
- proxy_delegate->OnAckNotification(1, 2, 3, 4, zero_);
- proxy_delegate->OnAckNotification(10, 20, 30, 40, zero_);
+ proxy_delegate->OnAckNotification(3, 4, zero_);
+ proxy_delegate->OnAckNotification(30, 40, zero_);
// The arguments to delegate->OnAckNotification are the sum of the
// arguments to proxy_delegate OnAckNotification calls.
- EXPECT_CALL(*delegate.get(), OnAckNotification(111, 222, 333, 444, zero_));
- proxy_delegate->OnAckNotification(100, 200, 300, 400, zero_);
+ EXPECT_CALL(*delegate.get(), OnAckNotification(333, 444, zero_));
+ proxy_delegate->OnAckNotification(300, 400, zero_);
}
// Verify delegate behavior when packets are acked before the
@@ -511,7 +511,7 @@
EXPECT_TRUE(HasWriteBlockedStreams());
// Handle the ack of the first write.
- proxy_delegate->OnAckNotification(1, 2, 3, 4, zero_);
+ proxy_delegate->OnAckNotification(3, 4, zero_);
proxy_delegate = nullptr;
EXPECT_CALL(*session_, WritevData(kHeadersStreamId, _, _, _, _, _)).WillOnce(
@@ -521,8 +521,8 @@
stream_->OnCanWrite();
// Handle the ack for the second write.
- EXPECT_CALL(*delegate.get(), OnAckNotification(101, 202, 303, 404, zero_));
- proxy_delegate->OnAckNotification(100, 200, 300, 400, zero_);
+ EXPECT_CALL(*delegate.get(), OnAckNotification(303, 404, zero_));
+ proxy_delegate->OnAckNotification(300, 400, zero_);
}
// Verify delegate behavior when WriteOrBufferData does not buffer.
@@ -542,8 +542,8 @@
EXPECT_FALSE(HasWriteBlockedStreams());
// Handle the ack.
- EXPECT_CALL(*delegate.get(), OnAckNotification(1, 2, 3, 4, zero_));
- proxy_delegate->OnAckNotification(1, 2, 3, 4, zero_);
+ EXPECT_CALL(*delegate.get(), OnAckNotification(3, 4, zero_));
+ proxy_delegate->OnAckNotification(3, 4, zero_);
}
// Verify delegate behavior when WriteOrBufferData buffers all the data.
@@ -567,8 +567,8 @@
stream_->OnCanWrite();
// Handle the ack.
- EXPECT_CALL(*delegate.get(), OnAckNotification(1, 2, 3, 4, zero_));
- proxy_delegate->OnAckNotification(1, 2, 3, 4, zero_);
+ EXPECT_CALL(*delegate.get(), OnAckNotification(3, 4, zero_));
+ proxy_delegate->OnAckNotification(3, 4, zero_);
}
// Verify delegate behavior when WriteOrBufferData when the FIN is
@@ -595,9 +595,9 @@
stream_->OnCanWrite();
// Handle the acks.
- proxy_delegate->OnAckNotification(1, 2, 3, 4, zero_);
- EXPECT_CALL(*delegate.get(), OnAckNotification(11, 22, 33, 44, zero_));
- proxy_delegate->OnAckNotification(10, 20, 30, 40, zero_);
+ proxy_delegate->OnAckNotification(3, 4, zero_);
+ EXPECT_CALL(*delegate.get(), OnAckNotification(33, 44, zero_));
+ proxy_delegate->OnAckNotification(30, 40, zero_);
}
// Verify that when we receive a packet which violates flow control (i.e. sends
diff --git a/net/quic/test_tools/mock_crypto_client_stream.cc b/net/quic/test_tools/mock_crypto_client_stream.cc
index c6e6780..335a2bd 100644
--- a/net/quic/test_tools/mock_crypto_client_stream.cc
+++ b/net/quic/test_tools/mock_crypto_client_stream.cc
@@ -88,7 +88,6 @@
#endif
cgst.push_back(kQBIC);
QuicConfig config;
- config.SetCongestionFeedback(cgst, kQBIC);
config.SetIdleConnectionStateLifetime(
QuicTime::Delta::FromSeconds(2 * kMaximumIdleTimeoutSecs),
QuicTime::Delta::FromSeconds(kMaximumIdleTimeoutSecs));
diff --git a/net/quic/test_tools/quic_config_peer.cc b/net/quic/test_tools/quic_config_peer.cc
index 05f7538..53ca554 100644
--- a/net/quic/test_tools/quic_config_peer.cc
+++ b/net/quic/test_tools/quic_config_peer.cc
@@ -45,5 +45,10 @@
config->bytes_for_connection_id_.SetReceivedValue(bytes);
}
+// static
+QuicTag QuicConfigPeer::CongestionFeedback(QuicConfig* config) {
+ return config->congestion_feedback_.GetTag();
+}
+
} // namespace test
} // namespace net
diff --git a/net/quic/test_tools/quic_config_peer.h b/net/quic/test_tools/quic_config_peer.h
index 46726eb..410c818 100644
--- a/net/quic/test_tools/quic_config_peer.h
+++ b/net/quic/test_tools/quic_config_peer.h
@@ -5,6 +5,7 @@
#ifndef NET_QUIC_TEST_TOOLS_QUIC_CONFIG_PEER_H_
#define NET_QUIC_TEST_TOOLS_QUIC_CONFIG_PEER_H_
+#include "net/quic/quic_config.h"
#include "net/quic/quic_protocol.h"
namespace net {
@@ -29,6 +30,8 @@
static void SetReceivedBytesForConnectionId(QuicConfig* config, uint32 bytes);
+ static QuicTag CongestionFeedback(QuicConfig* config);
+
private:
DISALLOW_COPY_AND_ASSIGN(QuicConfigPeer);
};
diff --git a/net/quic/test_tools/quic_connection_peer.cc b/net/quic/test_tools/quic_connection_peer.cc
index ad44f41..9253e55 100644
--- a/net/quic/test_tools/quic_connection_peer.cc
+++ b/net/quic/test_tools/quic_connection_peer.cc
@@ -193,6 +193,11 @@
}
// static
+QuicAlarm* QuicConnectionPeer::GetFecAlarm(QuicConnection* connection) {
+ return connection->fec_alarm_.get();
+}
+
+// static
QuicAlarm* QuicConnectionPeer::GetResumeWritesAlarm(
QuicConnection* connection) {
return connection->resume_writes_alarm_.get();
diff --git a/net/quic/test_tools/quic_connection_peer.h b/net/quic/test_tools/quic_connection_peer.h
index 5a3e5d2..7cbbb1f 100644
--- a/net/quic/test_tools/quic_connection_peer.h
+++ b/net/quic/test_tools/quic_connection_peer.h
@@ -104,6 +104,7 @@
static QuicAlarm* GetAckAlarm(QuicConnection* connection);
static QuicAlarm* GetPingAlarm(QuicConnection* connection);
+ static QuicAlarm* GetFecAlarm(QuicConnection* connection);
static QuicAlarm* GetResumeWritesAlarm(QuicConnection* connection);
static QuicAlarm* GetRetransmissionAlarm(QuicConnection* connection);
static QuicAlarm* GetSendAlarm(QuicConnection* connection);
diff --git a/net/quic/test_tools/quic_packet_generator_peer.cc b/net/quic/test_tools/quic_packet_generator_peer.cc
index ad0693a..c6ef402 100644
--- a/net/quic/test_tools/quic_packet_generator_peer.cc
+++ b/net/quic/test_tools/quic_packet_generator_peer.cc
@@ -16,5 +16,11 @@
return &generator->packet_creator_;
}
+// static
+QuicTime::Delta QuicPacketGeneratorPeer::GetFecTimeout(
+ QuicPacketGenerator* generator) {
+ return generator->fec_timeout_;
+}
+
} // namespace test
} // namespace net
diff --git a/net/quic/test_tools/quic_packet_generator_peer.h b/net/quic/test_tools/quic_packet_generator_peer.h
index 0762d1f..fba8dbe 100644
--- a/net/quic/test_tools/quic_packet_generator_peer.h
+++ b/net/quic/test_tools/quic_packet_generator_peer.h
@@ -17,6 +17,7 @@
class QuicPacketGeneratorPeer {
public:
static QuicPacketCreator* GetPacketCreator(QuicPacketGenerator* generator);
+ static QuicTime::Delta GetFecTimeout(QuicPacketGenerator* generator);
private:
DISALLOW_COPY_AND_ASSIGN(QuicPacketGeneratorPeer);
diff --git a/net/quic/test_tools/quic_test_packet_maker.cc b/net/quic/test_tools/quic_test_packet_maker.cc
index 6540426..1b97bda 100644
--- a/net/quic/test_tools/quic_test_packet_maker.cc
+++ b/net/quic/test_tools/quic_test_packet_maker.cc
@@ -22,8 +22,8 @@
: version_(version),
connection_id_(connection_id),
clock_(clock),
- spdy_request_framer_(SPDY3),
- spdy_response_framer_(SPDY3) {
+ spdy_request_framer_(version > QUIC_VERSION_23 ? SPDY4 : SPDY3),
+ spdy_response_framer_(version > QUIC_VERSION_23 ? SPDY4 : SPDY3) {
}
QuicTestPacketMaker::~QuicTestPacketMaker() {
@@ -69,21 +69,11 @@
QuicAckFrame ack(MakeAckFrame(largest_received));
ack.delta_time_largest_observed = QuicTime::Delta::Zero();
- if (version_ > QUIC_VERSION_22) {
- for (QuicPacketSequenceNumber i = least_unacked; i <= largest_received;
- ++i) {
- ack.received_packet_times.push_back(make_pair(i, clock_->Now()));
- }
+ for (QuicPacketSequenceNumber i = least_unacked; i <= largest_received; ++i) {
+ ack.received_packet_times.push_back(make_pair(i, clock_->Now()));
}
QuicFrames frames;
frames.push_back(QuicFrame(&ack));
- QuicCongestionFeedbackFrame feedback;
- if (send_feedback && version_ <= QUIC_VERSION_22) {
- feedback.type = kTCP;
- feedback.tcp.receive_window = 256000;
-
- frames.push_back(QuicFrame(&feedback));
- }
QuicStopWaitingFrame stop_waiting;
stop_waiting.least_unacked = least_unacked;
@@ -134,22 +124,13 @@
QuicAckFrame ack(MakeAckFrame(largest_received));
ack.delta_time_largest_observed = QuicTime::Delta::Zero();
- if (version_ > QUIC_VERSION_22) {
- for (QuicPacketSequenceNumber i = least_unacked; i <= largest_received;
- ++i) {
- ack.received_packet_times.push_back(make_pair(i, clock_->Now()));
- }
+ for (QuicPacketSequenceNumber i = least_unacked; i <= largest_received; ++i) {
+ ack.received_packet_times.push_back(make_pair(i, clock_->Now()));
}
QuicFramer framer(SupportedVersions(version_), clock_->Now(), false);
QuicFrames frames;
frames.push_back(QuicFrame(&ack));
- QuicCongestionFeedbackFrame feedback;
- if (send_feedback && version_ <= QUIC_VERSION_22) {
- feedback.type = kTCP;
- feedback.tcp.receive_window = 256000;
- frames.push_back(QuicFrame(&feedback));
- }
QuicStopWaitingFrame stop_waiting;
stop_waiting.least_unacked = least_unacked;
@@ -179,14 +160,24 @@
QuicStreamId stream_id,
bool should_include_version,
bool fin,
+ QuicPriority priority,
const SpdyHeaderBlock& headers) {
InitializeHeader(sequence_number, should_include_version);
- SpdySynStreamIR syn_stream(stream_id);
- syn_stream.set_name_value_block(headers);
- syn_stream.set_fin(fin);
- syn_stream.set_priority(0);
- scoped_ptr<SpdySerializedFrame> spdy_frame(
- spdy_request_framer_.SerializeSynStream(syn_stream));
+ scoped_ptr<SpdySerializedFrame> spdy_frame;
+ if (spdy_request_framer_.protocol_version() == SPDY3) {
+ SpdySynStreamIR syn_stream(stream_id);
+ syn_stream.set_name_value_block(headers);
+ syn_stream.set_fin(fin);
+ syn_stream.set_priority(priority);
+ spdy_frame.reset(spdy_request_framer_.SerializeSynStream(syn_stream));
+ } else {
+ SpdyHeadersIR headers_frame(stream_id);
+ headers_frame.set_name_value_block(headers);
+ headers_frame.set_fin(fin);
+ headers_frame.set_priority(priority);
+ headers_frame.set_has_priority(true);
+ spdy_frame.reset(spdy_request_framer_.SerializeFrame(headers_frame));
+ }
QuicStreamFrame frame(kHeadersStreamId, false, 0,
MakeIOVector(base::StringPiece(spdy_frame->data(),
spdy_frame->size())));
@@ -200,11 +191,18 @@
bool fin,
const SpdyHeaderBlock& headers) {
InitializeHeader(sequence_number, should_include_version);
- SpdySynReplyIR syn_reply(stream_id);
- syn_reply.set_name_value_block(headers);
- syn_reply.set_fin(fin);
- scoped_ptr<SpdySerializedFrame> spdy_frame(
- spdy_response_framer_.SerializeSynReply(syn_reply));
+ scoped_ptr<SpdySerializedFrame> spdy_frame;
+ if (spdy_request_framer_.protocol_version() == SPDY3) {
+ SpdySynReplyIR syn_reply(stream_id);
+ syn_reply.set_name_value_block(headers);
+ syn_reply.set_fin(fin);
+ spdy_frame.reset(spdy_response_framer_.SerializeSynReply(syn_reply));
+ } else {
+ SpdyHeadersIR headers_frame(stream_id);
+ headers_frame.set_name_value_block(headers);
+ headers_frame.set_fin(fin);
+ spdy_frame.reset(spdy_request_framer_.SerializeFrame(headers_frame));
+ }
QuicStreamFrame frame(kHeadersStreamId, false, 0,
MakeIOVector(base::StringPiece(spdy_frame->data(),
spdy_frame->size())));
diff --git a/net/quic/test_tools/quic_test_packet_maker.h b/net/quic/test_tools/quic_test_packet_maker.h
index 9120eeb..6a75e7c 100644
--- a/net/quic/test_tools/quic_test_packet_maker.h
+++ b/net/quic/test_tools/quic_test_packet_maker.h
@@ -57,6 +57,7 @@
QuicStreamId stream_id,
bool should_include_version,
bool fin,
+ QuicPriority priority,
const SpdyHeaderBlock& headers);
scoped_ptr<QuicEncryptedPacket> MakeResponseHeadersPacket(
QuicPacketSequenceNumber sequence_number,
diff --git a/net/quic/test_tools/quic_test_utils.cc b/net/quic/test_tools/quic_test_utils.cc
index 27020d3..c8b6a40 100644
--- a/net/quic/test_tools/quic_test_utils.cc
+++ b/net/quic/test_tools/quic_test_utils.cc
@@ -108,9 +108,6 @@
ON_CALL(*this, OnAckFrame(_))
.WillByDefault(testing::Return(true));
- ON_CALL(*this, OnCongestionFeedbackFrame(_))
- .WillByDefault(testing::Return(true));
-
ON_CALL(*this, OnStopWaitingFrame(_))
.WillByDefault(testing::Return(true));
@@ -156,11 +153,6 @@
return true;
}
-bool NoOpFramerVisitor::OnCongestionFeedbackFrame(
- const QuicCongestionFeedbackFrame& frame) {
- return true;
-}
-
bool NoOpFramerVisitor::OnStopWaitingFrame(
const QuicStopWaitingFrame& frame) {
return true;
diff --git a/net/quic/test_tools/quic_test_utils.h b/net/quic/test_tools/quic_test_utils.h
index d653f80..cf56b66 100644
--- a/net/quic/test_tools/quic_test_utils.h
+++ b/net/quic/test_tools/quic_test_utils.h
@@ -171,8 +171,6 @@
MOCK_METHOD1(OnFecProtectedPayload, void(base::StringPiece payload));
MOCK_METHOD1(OnStreamFrame, bool(const QuicStreamFrame& frame));
MOCK_METHOD1(OnAckFrame, bool(const QuicAckFrame& frame));
- MOCK_METHOD1(OnCongestionFeedbackFrame,
- bool(const QuicCongestionFeedbackFrame& frame));
MOCK_METHOD1(OnStopWaitingFrame, bool(const QuicStopWaitingFrame& frame));
MOCK_METHOD1(OnPingFrame, bool(const QuicPingFrame& frame));
MOCK_METHOD1(OnFecData, void(const QuicFecData& fec));
@@ -207,8 +205,6 @@
void OnFecProtectedPayload(base::StringPiece payload) override {}
bool OnStreamFrame(const QuicStreamFrame& frame) override;
bool OnAckFrame(const QuicAckFrame& frame) override;
- bool OnCongestionFeedbackFrame(
- const QuicCongestionFeedbackFrame& frame) override;
bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override;
bool OnPingFrame(const QuicPingFrame& frame) override;
void OnFecData(const QuicFecData& fec) override {}
@@ -460,9 +456,6 @@
bool using_pacing));
MOCK_METHOD1(SetNumEmulatedConnections, void(int num_connections));
MOCK_METHOD1(SetMaxPacketSize, void(QuicByteCount max_packet_size));
- MOCK_METHOD2(OnIncomingQuicCongestionFeedbackFrame,
- void(const QuicCongestionFeedbackFrame&,
- QuicTime feedback_receive_time));
MOCK_METHOD4(OnCongestionEvent, void(bool rtt_updated,
QuicByteCount bytes_in_flight,
const CongestionVector& acked_packets,
@@ -539,11 +532,10 @@
public:
MockAckNotifierDelegate();
- MOCK_METHOD5(OnAckNotification, void(int num_original_packets,
- int num_original_bytes,
- int num_retransmitted_packets,
- int num_retransmitted_bytes,
- QuicTime::Delta delta_largest_observed));
+ MOCK_METHOD3(OnAckNotification,
+ void(int num_retransmitted_packets,
+ int num_retransmitted_bytes,
+ QuicTime::Delta delta_largest_observed));
protected:
// Object is ref counted.
diff --git a/net/quic/test_tools/simple_quic_framer.cc b/net/quic/test_tools/simple_quic_framer.cc
index 0f413d7..f9f37ad 100644
--- a/net/quic/test_tools/simple_quic_framer.cc
+++ b/net/quic/test_tools/simple_quic_framer.cc
@@ -72,12 +72,6 @@
return true;
}
- bool OnCongestionFeedbackFrame(
- const QuicCongestionFeedbackFrame& frame) override {
- feedback_frames_.push_back(frame);
- return true;
- }
-
bool OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override {
stop_waiting_frames_.push_back(frame);
return true;
@@ -126,9 +120,6 @@
const vector<QuicConnectionCloseFrame>& connection_close_frames() const {
return connection_close_frames_;
}
- const vector<QuicCongestionFeedbackFrame>& feedback_frames() const {
- return feedback_frames_;
- }
const vector<QuicGoAwayFrame>& goaway_frames() const {
return goaway_frames_;
}
@@ -163,7 +154,6 @@
scoped_ptr<QuicPublicResetPacket> public_reset_packet_;
string fec_redundancy_;
vector<QuicAckFrame> ack_frames_;
- vector<QuicCongestionFeedbackFrame> feedback_frames_;
vector<QuicStopWaitingFrame> stop_waiting_frames_;
vector<QuicPingFrame> ping_frames_;
vector<QuicStreamFrame> stream_frames_;
@@ -228,7 +218,6 @@
size_t SimpleQuicFramer::num_frames() const {
return ack_frames().size() +
- feedback_frames().size() +
goaway_frames().size() +
rst_stream_frames().size() +
stop_waiting_frames().size() +
@@ -258,11 +247,6 @@
return visitor_->rst_stream_frames();
}
-const vector<QuicCongestionFeedbackFrame>&
-SimpleQuicFramer::feedback_frames() const {
- return visitor_->feedback_frames();
-}
-
const vector<QuicGoAwayFrame>&
SimpleQuicFramer::goaway_frames() const {
return visitor_->goaway_frames();
diff --git a/net/quic/test_tools/simple_quic_framer.h b/net/quic/test_tools/simple_quic_framer.h
index 7a31014..4e2ed31 100644
--- a/net/quic/test_tools/simple_quic_framer.h
+++ b/net/quic/test_tools/simple_quic_framer.h
@@ -41,7 +41,6 @@
size_t num_frames() const;
const std::vector<QuicAckFrame>& ack_frames() const;
const std::vector<QuicConnectionCloseFrame>& connection_close_frames() const;
- const std::vector<QuicCongestionFeedbackFrame>& feedback_frames() const;
const std::vector<QuicStopWaitingFrame>& stop_waiting_frames() const;
const std::vector<QuicPingFrame>& ping_frames() const;
const std::vector<QuicGoAwayFrame>& goaway_frames() const;
diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc
index 8b6c17c..cd36336 100644
--- a/net/socket/client_socket_pool_manager.cc
+++ b/net/socket/client_socket_pool_manager.cc
@@ -29,9 +29,9 @@
256 // WEBSOCKET_SOCKET_POOL
};
-COMPILE_ASSERT(arraysize(g_max_sockets_per_pool) ==
- HttpNetworkSession::NUM_SOCKET_POOL_TYPES,
- max_sockets_per_pool_length_mismatch);
+static_assert(arraysize(g_max_sockets_per_pool) ==
+ HttpNetworkSession::NUM_SOCKET_POOL_TYPES,
+ "max sockets per pool length mismatch");
// Default to allow up to 6 connections per host. Experiment and tuning may
// try other values (greater than 0). Too large may cause many problems, such
@@ -48,9 +48,9 @@
30 // WEBSOCKET_SOCKET_POOL
};
-COMPILE_ASSERT(arraysize(g_max_sockets_per_group) ==
- HttpNetworkSession::NUM_SOCKET_POOL_TYPES,
- max_sockets_per_group_length_mismatch);
+static_assert(arraysize(g_max_sockets_per_group) ==
+ HttpNetworkSession::NUM_SOCKET_POOL_TYPES,
+ "max sockets per group length mismatch");
// The max number of sockets to allow per proxy server. This applies both to
// http and SOCKS proxies. See http://crbug.com/12066 and
@@ -60,9 +60,9 @@
kDefaultMaxSocketsPerProxyServer // WEBSOCKET_SOCKET_POOL
};
-COMPILE_ASSERT(arraysize(g_max_sockets_per_proxy_server) ==
- HttpNetworkSession::NUM_SOCKET_POOL_TYPES,
- max_sockets_per_proxy_server_length_mismatch);
+static_assert(arraysize(g_max_sockets_per_proxy_server) ==
+ HttpNetworkSession::NUM_SOCKET_POOL_TYPES,
+ "max sockets per proxy server length mismatch");
// The meat of the implementation for the InitSocketHandleForHttpRequest,
// InitSocketHandleForRawConnect and PreconnectSocketsForHttpRequest methods.
diff --git a/net/socket/client_socket_pool_manager_impl.cc b/net/socket/client_socket_pool_manager_impl.cc
index 2a8caf5..6d0751b 100644
--- a/net/socket/client_socket_pool_manager_impl.cc
+++ b/net/socket/client_socket_pool_manager_impl.cc
@@ -79,7 +79,6 @@
ssl_socket_pool_(new SSLClientSocketPool(max_sockets_per_pool(pool_type),
max_sockets_per_group(pool_type),
&ssl_pool_histograms_,
- host_resolver,
cert_verifier,
channel_id_service,
transport_security_state,
@@ -295,18 +294,17 @@
std::pair<SSLSocketPoolMap::iterator, bool> ssl_https_ret =
ssl_socket_pools_for_https_proxies_.insert(std::make_pair(
- http_proxy,
- new SSLClientSocketPool(
- max_sockets_per_proxy_server(pool_type_),
- max_sockets_per_group(pool_type_),
- &ssl_for_https_proxy_pool_histograms_, host_resolver_,
- cert_verifier_, channel_id_service_, transport_security_state_,
- cert_transparency_verifier_, cert_policy_enforcer_,
- ssl_session_cache_shard_, socket_factory_,
- tcp_https_ret.first->second /* https proxy */,
- NULL /* no socks proxy */, NULL /* no http proxy */,
- ssl_config_service_.get(), enable_ssl_connect_job_waiting_,
- net_log_)));
+ http_proxy, new SSLClientSocketPool(
+ max_sockets_per_proxy_server(pool_type_),
+ max_sockets_per_group(pool_type_),
+ &ssl_for_https_proxy_pool_histograms_, cert_verifier_,
+ channel_id_service_, transport_security_state_,
+ cert_transparency_verifier_, cert_policy_enforcer_,
+ ssl_session_cache_shard_, socket_factory_,
+ tcp_https_ret.first->second /* https proxy */,
+ NULL /* no socks proxy */, NULL /* no http proxy */,
+ ssl_config_service_.get(),
+ enable_ssl_connect_job_waiting_, net_log_)));
DCHECK(tcp_https_ret.second);
std::pair<HTTPProxySocketPoolMap::iterator, bool> ret =
@@ -317,7 +315,6 @@
max_sockets_per_proxy_server(pool_type_),
max_sockets_per_group(pool_type_),
&http_proxy_pool_histograms_,
- host_resolver_,
tcp_http_ret.first->second,
ssl_https_ret.first->second,
net_log_)));
@@ -334,8 +331,8 @@
SSLClientSocketPool* new_pool = new SSLClientSocketPool(
max_sockets_per_proxy_server(pool_type_),
- max_sockets_per_group(pool_type_), &ssl_pool_histograms_, host_resolver_,
- cert_verifier_, channel_id_service_, transport_security_state_,
+ max_sockets_per_group(pool_type_), &ssl_pool_histograms_, cert_verifier_,
+ channel_id_service_, transport_security_state_,
cert_transparency_verifier_, cert_policy_enforcer_,
ssl_session_cache_shard_, socket_factory_,
NULL, /* no tcp pool, we always go through a proxy */
diff --git a/net/socket/client_socket_pool_manager_impl.h b/net/socket/client_socket_pool_manager_impl.h
index 515b1e1..d669333 100644
--- a/net/socket/client_socket_pool_manager_impl.h
+++ b/net/socket/client_socket_pool_manager_impl.h
@@ -41,8 +41,7 @@
class OwnedPoolMap : public std::map<Key, Value> {
public:
OwnedPoolMap() {
- COMPILE_ASSERT(base::is_pointer<Value>::value,
- value_must_be_a_pointer);
+ static_assert(base::is_pointer<Value>::value, "value must be a pointer");
}
~OwnedPoolMap() {
diff --git a/net/socket/socks5_client_socket.cc b/net/socket/socks5_client_socket.cc
index 681f73f..b435e13 100644
--- a/net/socket/socks5_client_socket.cc
+++ b/net/socket/socks5_client_socket.cc
@@ -25,8 +25,8 @@
const uint8 SOCKS5ClientSocket::kTunnelCommand = 0x01;
const uint8 SOCKS5ClientSocket::kNullByte = 0x00;
-COMPILE_ASSERT(sizeof(struct in_addr) == 4, incorrect_system_size_of_IPv4);
-COMPILE_ASSERT(sizeof(struct in6_addr) == 16, incorrect_system_size_of_IPv6);
+static_assert(sizeof(struct in_addr) == 4, "incorrect system size of IPv4");
+static_assert(sizeof(struct in6_addr) == 16, "incorrect system size of IPv6");
SOCKS5ClientSocket::SOCKS5ClientSocket(
scoped_ptr<ClientSocketHandle> transport_socket,
diff --git a/net/socket/socks_client_socket.cc b/net/socket/socks_client_socket.cc
index ecf717f..75eb36a 100644
--- a/net/socket/socks_client_socket.cc
+++ b/net/socket/socks_client_socket.cc
@@ -44,8 +44,8 @@
uint16 nw_port;
uint8 ip[4];
};
-COMPILE_ASSERT(sizeof(SOCKS4ServerRequest) == kWriteHeaderSize,
- socks4_server_request_struct_wrong_size);
+static_assert(sizeof(SOCKS4ServerRequest) == kWriteHeaderSize,
+ "socks4 server request struct has incorrect size");
// A struct holding details of the SOCKS4 Server Response.
struct SOCKS4ServerResponse {
@@ -54,8 +54,8 @@
uint16 port;
uint8 ip[4];
};
-COMPILE_ASSERT(sizeof(SOCKS4ServerResponse) == kReadHeaderSize,
- socks4_server_response_struct_wrong_size);
+static_assert(sizeof(SOCKS4ServerResponse) == kReadHeaderSize,
+ "socks4 server response struct has incorrect size");
SOCKSClientSocket::SOCKSClientSocket(
scoped_ptr<ClientSocketHandle> transport_socket,
diff --git a/net/socket/ssl_client_socket_openssl.cc b/net/socket/ssl_client_socket_openssl.cc
index a78a7cf..504b702 100644
--- a/net/socket/ssl_client_socket_openssl.cc
+++ b/net/socket/ssl_client_socket_openssl.cc
@@ -11,6 +11,7 @@
#include <openssl/bio.h>
#include <openssl/err.h>
#include <openssl/ssl.h>
+#include <string.h>
#include "base/bind.h"
#include "base/callback_helpers.h"
@@ -1900,9 +1901,10 @@
// If we didn't find a protocol, we select the first one from our list.
if (npn_status_ == kNextProtoNoOverlap) {
- const std::string proto = NextProtoToString(ssl_config_.next_protos[0]);
- *out = reinterpret_cast<uint8*>(const_cast<char*>(proto.data()));
- *outlen = proto.size();
+ // NextProtoToString returns a pointer to a static string.
+ const char* proto = NextProtoToString(ssl_config_.next_protos[0]);
+ *out = reinterpret_cast<unsigned char*>(const_cast<char*>(proto));
+ *outlen = strlen(proto);
}
npn_proto_.assign(reinterpret_cast<const char*>(*out), *outlen);
diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc
index 0e75a20..b791b1c 100644
--- a/net/socket/ssl_client_socket_pool.cc
+++ b/net/socket/ssl_client_socket_pool.cc
@@ -591,7 +591,6 @@
SOCKSClientSocketPool* socks_pool,
HttpProxyClientSocketPool* http_proxy_pool,
ClientSocketFactory* client_socket_factory,
- HostResolver* host_resolver,
const SSLClientSocketContext& context,
const SSLConnectJob::GetMessengerCallback& get_messenger_callback,
NetLog* net_log)
@@ -599,7 +598,6 @@
socks_pool_(socks_pool),
http_proxy_pool_(http_proxy_pool),
client_socket_factory_(client_socket_factory),
- host_resolver_(host_resolver),
context_(context),
get_messenger_callback_(get_messenger_callback),
net_log_(net_log) {
@@ -628,7 +626,6 @@
int max_sockets,
int max_sockets_per_group,
ClientSocketPoolHistograms* histograms,
- HostResolver* host_resolver,
CertVerifier* cert_verifier,
ChannelIDService* channel_id_service,
TransportSecurityState* transport_security_state,
@@ -656,7 +653,6 @@
socks_pool,
http_proxy_pool,
client_socket_factory,
- host_resolver,
SSLClientSocketContext(cert_verifier,
channel_id_service,
transport_security_state,
diff --git a/net/socket/ssl_client_socket_pool.h b/net/socket/ssl_client_socket_pool.h
index 7556488..f895d7c 100644
--- a/net/socket/ssl_client_socket_pool.h
+++ b/net/socket/ssl_client_socket_pool.h
@@ -13,7 +13,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "net/base/privacy_mode.h"
-#include "net/dns/host_resolver.h"
#include "net/http/http_response_info.h"
#include "net/socket/client_socket_pool.h"
#include "net/socket/client_socket_pool_base.h"
@@ -279,7 +278,6 @@
SSLClientSocketPool(int max_sockets,
int max_sockets_per_group,
ClientSocketPoolHistograms* histograms,
- HostResolver* host_resolver,
CertVerifier* cert_verifier,
ChannelIDService* channel_id_service,
TransportSecurityState* transport_security_state,
@@ -370,7 +368,6 @@
SOCKSClientSocketPool* socks_pool,
HttpProxyClientSocketPool* http_proxy_pool,
ClientSocketFactory* client_socket_factory,
- HostResolver* host_resolver,
const SSLClientSocketContext& context,
const SSLConnectJob::GetMessengerCallback& get_messenger_callback,
NetLog* net_log);
@@ -390,7 +387,6 @@
SOCKSClientSocketPool* const socks_pool_;
HttpProxyClientSocketPool* const http_proxy_pool_;
ClientSocketFactory* const client_socket_factory_;
- HostResolver* const host_resolver_;
const SSLClientSocketContext context_;
base::TimeDelta timeout_;
SSLConnectJob::GetMessengerCallback get_messenger_callback_;
diff --git a/net/socket/ssl_client_socket_pool_unittest.cc b/net/socket/ssl_client_socket_pool_unittest.cc
index 0131a5f..411a5d7 100644
--- a/net/socket/ssl_client_socket_pool_unittest.cc
+++ b/net/socket/ssl_client_socket_pool_unittest.cc
@@ -129,7 +129,6 @@
http_proxy_socket_pool_(kMaxSockets,
kMaxSocketsPerGroup,
&http_proxy_histograms_,
- &host_resolver_,
&transport_socket_pool_,
NULL,
NULL),
@@ -143,8 +142,8 @@
ssl_histograms_.reset(new ClientSocketPoolHistograms("SSLUnitTest"));
pool_.reset(new SSLClientSocketPool(
kMaxSockets, kMaxSocketsPerGroup, ssl_histograms_.get(),
- NULL /* host_resolver */, NULL /* cert_verifier */,
- NULL /* channel_id_service */, NULL /* transport_security_state */,
+ NULL /* cert_verifier */, NULL /* channel_id_service */,
+ NULL /* transport_security_state */,
NULL /* cert_transparency_verifier */, NULL /* cert_policy_enforcer */,
std::string() /* ssl_session_cache_shard */, &socket_factory_,
transport_pool ? &transport_socket_pool_ : NULL,
diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
index 7a926ce..a02cb2e 100644
--- a/net/spdy/spdy_framer.cc
+++ b/net/spdy/spdy_framer.cc
@@ -158,16 +158,16 @@
visitor_(NULL),
debug_visitor_(NULL),
display_protocol_("SPDY"),
- spdy_version_(version),
+ protocol_version_(version),
syn_frame_processed_(false),
probable_http_response_(false),
expect_continuation_(0),
end_stream_when_done_(false) {
- DCHECK_GE(spdy_version_, SPDY_MIN_VERSION);
- DCHECK_LE(spdy_version_, SPDY_MAX_VERSION);
+ DCHECK_GE(protocol_version_, SPDY_MIN_VERSION);
+ DCHECK_LE(protocol_version_, SPDY_MAX_VERSION);
DCHECK_LE(kMaxControlFrameSize,
- SpdyConstants::GetFrameMaximumSize(spdy_version_) +
- SpdyConstants::GetControlFrameHeaderSize(spdy_version_));
+ SpdyConstants::GetFrameMaximumSize(protocol_version_) +
+ SpdyConstants::GetControlFrameHeaderSize(protocol_version_));
Reset();
}
@@ -1060,7 +1060,8 @@
if (current_frame_length_ >
SpdyConstants::GetFrameMaximumSize(protocol_version()) +
SpdyConstants::GetControlFrameHeaderSize(protocol_version())) {
- DLOG(WARNING) << "Received control frame with way too big of a payload: "
+ DLOG(WARNING) << "Received control frame of type " << current_frame_type_
+ << " with way too big of a payload: "
<< current_frame_length_;
set_error(SPDY_CONTROL_PAYLOAD_TOO_LARGE);
return;
@@ -1281,7 +1282,7 @@
void SpdyFramer::WriteHeaderBlockToZ(const SpdyHeaderBlock* headers,
z_stream* z) const {
unsigned length_length = 4;
- if (spdy_version_ < 3)
+ if (protocol_version() < 3)
length_length = 2;
WriteLengthZ(headers->size(), length_length, kZStandardData, z);
@@ -2976,54 +2977,50 @@
SpdyStreamId stream_id,
SpdyFrameType type,
int padding_payload_len) {
- uint8 end_flag = 0;
- uint8 flags = 0;
- if (type == HEADERS) {
- end_flag = HEADERS_FLAG_END_HEADERS;
- } else if (type == PUSH_PROMISE) {
- end_flag = PUSH_PROMISE_FLAG_END_PUSH_PROMISE;
- } else {
- DLOG(FATAL) << "CONTINUATION frames cannot be used with frame type "
- << FrameTypeToString(type);
- }
+ uint8 end_flag = 0;
+ uint8 flags = 0;
+ if (type == HEADERS) {
+ end_flag = HEADERS_FLAG_END_HEADERS;
+ } else if (type == PUSH_PROMISE) {
+ end_flag = PUSH_PROMISE_FLAG_END_PUSH_PROMISE;
+ } else {
+ DLOG(FATAL) << "CONTINUATION frames cannot be used with frame type "
+ << FrameTypeToString(type);
+ }
- // Write all the padding payload and as much of the data payload as possible
- // into the initial frame.
- size_t bytes_remaining = 0;
- bytes_remaining = hpack_encoding.size() -
- std::min(hpack_encoding.size(),
- kMaxControlFrameSize - builder->length() -
- padding_payload_len);
- builder->WriteBytes(&hpack_encoding[0],
- hpack_encoding.size() - bytes_remaining);
- if (padding_payload_len > 0) {
- string padding = string(padding_payload_len, 0);
- builder->WriteBytes(padding.data(), padding.length());
- }
- if (bytes_remaining > 0) {
- builder->OverwriteLength(*this,
- kMaxControlFrameSize - GetControlFrameHeaderSize());
- }
+ // Write all the padding payload and as much of the data payload as possible
+ // into the initial frame.
+ size_t bytes_remaining = 0;
+ bytes_remaining =
+ hpack_encoding.size() -
+ std::min(hpack_encoding.size(),
+ kMaxControlFrameSize - builder->length() - padding_payload_len);
+ builder->WriteBytes(&hpack_encoding[0],
+ hpack_encoding.size() - bytes_remaining);
+ if (padding_payload_len > 0) {
+ string padding = string(padding_payload_len, 0);
+ builder->WriteBytes(padding.data(), padding.length());
+ }
+ if (bytes_remaining > 0) {
+ builder->OverwriteLength(
+ *this, kMaxControlFrameSize - GetControlFrameHeaderSize());
+ }
- // Tack on CONTINUATION frames for the overflow.
- while (bytes_remaining > 0) {
- size_t bytes_to_write = std::min(bytes_remaining,
- kMaxControlFrameSize -
- GetContinuationMinimumSize());
- // Write CONTINUATION frame prefix.
- if (bytes_remaining == bytes_to_write) {
- flags |= end_flag;
- }
- builder->BeginNewFrame(*this,
- CONTINUATION,
- flags,
- stream_id);
- // Write payload fragment.
- builder->WriteBytes(&hpack_encoding[hpack_encoding.size() -
- bytes_remaining],
- bytes_to_write);
- bytes_remaining -= bytes_to_write;
+ // Tack on CONTINUATION frames for the overflow.
+ while (bytes_remaining > 0) {
+ size_t bytes_to_write = std::min(
+ bytes_remaining, kMaxControlFrameSize - GetContinuationMinimumSize());
+ // Write CONTINUATION frame prefix.
+ if (bytes_remaining == bytes_to_write) {
+ flags |= end_flag;
}
+ builder->BeginNewFrame(*this, CONTINUATION, flags, stream_id);
+ // Write payload fragment.
+ builder->WriteBytes(
+ &hpack_encoding[hpack_encoding.size() - bytes_remaining],
+ bytes_to_write);
+ bytes_remaining -= bytes_to_write;
+ }
}
// The following compression setting are based on Brian Olson's analysis. See
@@ -3087,16 +3084,16 @@
}
HpackEncoder* SpdyFramer::GetHpackEncoder() {
- DCHECK_LT(SPDY3, spdy_version_);
- if (hpack_encoder_.get() == NULL) {
+ DCHECK_LT(SPDY3, protocol_version());
+ if (hpack_encoder_.get() == nullptr) {
hpack_encoder_.reset(new HpackEncoder(ObtainHpackHuffmanTable()));
}
return hpack_encoder_.get();
}
HpackDecoder* SpdyFramer::GetHpackDecoder() {
- DCHECK_LT(SPDY3, spdy_version_);
- if (hpack_decoder_.get() == NULL) {
+ DCHECK_LT(SPDY3, protocol_version());
+ if (hpack_decoder_.get() == nullptr) {
hpack_decoder_.reset(new HpackDecoder(ObtainHpackHuffmanTable()));
}
return hpack_decoder_.get();
diff --git a/net/spdy/spdy_framer.h b/net/spdy/spdy_framer.h
index bb6e61d..7ce2c85 100644
--- a/net/spdy/spdy_framer.h
+++ b/net/spdy/spdy_framer.h
@@ -565,14 +565,14 @@
static const char* StatusCodeToString(int status_code);
static const char* FrameTypeToString(SpdyFrameType type);
- SpdyMajorVersion protocol_version() const { return spdy_version_; }
+ SpdyMajorVersion protocol_version() const { return protocol_version_; }
bool probable_http_response() const { return probable_http_response_; }
SpdyStreamId expect_continuation() const { return expect_continuation_; }
SpdyPriority GetLowestPriority() const {
- return spdy_version_ < SPDY3 ? 3 : 7;
+ return protocol_version_ < SPDY3 ? 3 : 7;
}
SpdyPriority GetHighestPriority() const { return 0; }
@@ -774,8 +774,8 @@
std::string display_protocol_;
- // The major SPDY version to be spoken/understood by this framer.
- const SpdyMajorVersion spdy_version_;
+ // The protocol version to be spoken/understood by this framer.
+ const SpdyMajorVersion protocol_version_;
// Tracks if we've ever gotten far enough in framing to see a control frame of
// type SYN_STREAM or SYN_REPLY.
diff --git a/net/spdy/spdy_framer_test.cc b/net/spdy/spdy_framer_test.cc
index 2309bda..c297913 100644
--- a/net/spdy/spdy_framer_test.cc
+++ b/net/spdy/spdy_framer_test.cc
@@ -294,7 +294,8 @@
std::cerr << "OnStreamFrameData(" << stream_id << ", \"";
if (len > 0) {
for (size_t i = 0 ; i < len; ++i) {
- std::cerr << std::hex << (0xFF & (unsigned int)data[i]) << std::dec;
+ std::cerr << std::hex << (0xFF & static_cast<unsigned int>(data[i]))
+ << std::dec;
}
}
std::cerr << "\", " << len << ")\n";
@@ -667,7 +668,6 @@
bool IsSpdy2() { return spdy_version_ == SPDY2; }
bool IsSpdy3() { return spdy_version_ == SPDY3; }
bool IsSpdy4() { return spdy_version_ == SPDY4; }
- bool IsSpdy5() { return spdy_version_ == SPDY5; }
// Version of SPDY protocol to be used.
SpdyMajorVersion spdy_version_;
@@ -4674,7 +4674,7 @@
TEST_P(SpdyFramerTest, SizesTest) {
SpdyFramer framer(spdy_version_);
- if (IsSpdy4() || IsSpdy5()) {
+ if (IsSpdy4()) {
EXPECT_EQ(9u, framer.GetDataFrameMinimumSize());
EXPECT_EQ(9u, framer.GetControlFrameHeaderSize());
EXPECT_EQ(14u, framer.GetSynStreamMinimumSize());
diff --git a/net/spdy/spdy_headers_block_parser.cc b/net/spdy/spdy_headers_block_parser.cc
index 231533f..9686427 100644
--- a/net/spdy/spdy_headers_block_parser.cc
+++ b/net/spdy/spdy_headers_block_parser.cc
@@ -12,14 +12,15 @@
SpdyHeadersBlockParser::SpdyHeadersBlockParser(
SpdyMajorVersion spdy_version,
- SpdyHeadersHandlerInterface* handler) :
- state_(READING_HEADER_BLOCK_LEN),
- length_field_size_(LengthFieldSizeForVersion(spdy_version)),
- max_headers_in_block_(MaxNumberOfHeadersForVersion(spdy_version)),
- total_bytes_received_(0),
- remaining_key_value_pairs_for_frame_(0),
- handler_(handler),
- error_(OK) {
+ SpdyHeadersHandlerInterface* handler)
+ : state_(READING_HEADER_BLOCK_LEN),
+ length_field_size_(LengthFieldSizeForVersion(spdy_version)),
+ max_headers_in_block_(MaxNumberOfHeadersForVersion(spdy_version)),
+ total_bytes_received_(0),
+ remaining_key_value_pairs_for_frame_(0),
+ handler_(handler),
+ error_(OK),
+ spdy_version_(spdy_version) {
// The handler that we set must not be NULL.
DCHECK(handler_ != NULL);
}
diff --git a/net/spdy/spdy_headers_block_parser.h b/net/spdy/spdy_headers_block_parser.h
index c0f97ca..3c0c8e3 100644
--- a/net/spdy/spdy_headers_block_parser.h
+++ b/net/spdy/spdy_headers_block_parser.h
@@ -78,6 +78,8 @@
};
ParserError get_error() const { return error_; }
+ SpdyMajorVersion spdy_version() const { return spdy_version_; }
+
// Returns the size in bytes of a length field in a SPDY header.
static size_t LengthFieldSizeForVersion(SpdyMajorVersion spdy_version);
@@ -138,6 +140,8 @@
SpdyStreamId stream_id_;
ParserError error_;
+
+ const SpdyMajorVersion spdy_version_;
};
} // namespace net
diff --git a/net/spdy/spdy_http_utils.cc b/net/spdy/spdy_http_utils.cc
index fc77f5d..c604880 100644
--- a/net/spdy/spdy_http_utils.cc
+++ b/net/spdy/spdy_http_utils.cc
@@ -160,10 +160,8 @@
}
}
-
-COMPILE_ASSERT(HIGHEST - LOWEST < 4 &&
- HIGHEST - MINIMUM_PRIORITY < 5,
- request_priority_incompatible_with_spdy);
+static_assert(HIGHEST - LOWEST < 4 && HIGHEST - MINIMUM_PRIORITY < 5,
+ "request priority incompatible with spdy");
SpdyPriority ConvertRequestPriorityToSpdyPriority(
const RequestPriority priority,
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index 21401b5..e286333 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -417,7 +417,7 @@
DataVector data_vector_;
AlternateVector alternate_vector_;
AlternateDeterministicVector alternate_deterministic_vector_;
- const BoundNetLog& log_;
+ const BoundNetLog log_;
SpdyNetworkTransactionTestParams test_params_;
int port_;
bool deterministic_;
@@ -4556,6 +4556,27 @@
helper.VerifyDataConsumed();
}
+// HTTP_1_1_REQUIRED results in ERR_HTTP_1_1_REQUIRED.
+TEST_P(SpdyNetworkTransactionTest, HTTP11RequiredError) {
+ // HTTP_1_1_REQUIRED is only supported by SPDY4.
+ if (spdy_util_.spdy_version() < SPDY4)
+ return;
+
+ NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
+ BoundNetLog(), GetParam(), nullptr);
+
+ scoped_ptr<SpdyFrame> go_away(spdy_util_.ConstructSpdyGoAway(
+ 0, GOAWAY_HTTP_1_1_REQUIRED, "Try again using HTTP/1.1 please."));
+ MockRead reads[] = {
+ CreateMockRead(*go_away),
+ };
+ DelayedSocketData data(0, reads, arraysize(reads), nullptr, 0);
+
+ helper.RunToCompletion(&data);
+ TransactionHelperResult out = helper.output();
+ EXPECT_EQ(ERR_HTTP_1_1_REQUIRED, out.rv);
+}
+
// Retry with HTTP/1.1 when receiving HTTP_1_1_REQUIRED. Note that no actual
// protocol negotiation happens, instead this test forces protocols for both
// sockets.
diff --git a/net/spdy/spdy_protocol.cc b/net/spdy/spdy_protocol.cc
index a0e8313..3993c01 100644
--- a/net/spdy/spdy_protocol.cc
+++ b/net/spdy/spdy_protocol.cc
@@ -42,7 +42,6 @@
return true;
case SPDY4:
- case SPDY5:
// Check for recognized extensions.
if (frame_type_field == SerializeFrameType(version, ALTSVC) ||
frame_type_field == SerializeFrameType(version, BLOCKED)) {
@@ -91,7 +90,6 @@
}
break;
case SPDY4:
- case SPDY5:
switch (frame_type_field) {
case 0:
return DATA;
@@ -152,7 +150,6 @@
return -1;
}
case SPDY4:
- case SPDY5:
switch (frame_type) {
case DATA:
return 0;
@@ -195,7 +192,6 @@
case SPDY3:
return 0;
case SPDY4:
- case SPDY5:
return SerializeFrameType(version, DATA);
}
@@ -222,7 +218,6 @@
return true;
case SPDY4:
- case SPDY5:
// HEADER_TABLE_SIZE is the first valid setting id.
if (setting_id_field <
SerializeSettingId(version, SETTINGS_HEADER_TABLE_SIZE)) {
@@ -265,7 +260,6 @@
}
break;
case SPDY4:
- case SPDY5:
switch (setting_id_field) {
case 1:
return SETTINGS_HEADER_TABLE_SIZE;
@@ -312,7 +306,6 @@
return -1;
}
case SPDY4:
- case SPDY5:
switch (id) {
case SETTINGS_HEADER_TABLE_SIZE:
return 1;
@@ -354,7 +347,6 @@
return true;
case SPDY4:
- case SPDY5:
// NO_ERROR is the first valid status code.
if (rst_stream_status_field <
SerializeRstStreamStatus(version, RST_STREAM_PROTOCOL_ERROR)) {
@@ -416,7 +408,6 @@
}
break;
case SPDY4:
- case SPDY5:
switch (rst_stream_status_field) {
case 1:
return RST_STREAM_PROTOCOL_ERROR;
@@ -483,7 +474,6 @@
return -1;
}
case SPDY4:
- case SPDY5:
switch (rst_stream_status) {
case RST_STREAM_PROTOCOL_ERROR:
return 1;
@@ -535,7 +525,6 @@
return true;
case SPDY4:
- case SPDY5:
// GOAWAY_NO_ERROR is the first valid status.
if (goaway_status_field < SerializeGoAwayStatus(version,
GOAWAY_NO_ERROR)) {
@@ -569,7 +558,6 @@
}
break;
case SPDY4:
- case SPDY5:
switch (goaway_status_field) {
case 0:
return GOAWAY_NO_ERROR;
@@ -615,8 +603,6 @@
return SPDY3;
case 4:
return SPDY4;
- case 5:
- return SPDY5;
default:
LOG(DFATAL) << "Unsupported SPDY version number: " << version_number;
return SPDY3;
@@ -631,8 +617,6 @@
return 3;
case SPDY4:
return 4;
- case SPDY5:
- return 5;
default:
LOG(DFATAL) << "Unsupported SPDY major version: " << version;
return -1;
@@ -646,9 +630,7 @@
case SPDY3:
return "spdy/3";
case SPDY4:
- return "spdy/4";
- case SPDY5:
- return "spdy/5";
+ return "h2-14";
default:
LOG(DFATAL) << "Unsupported SPDY major version: " << version;
return "spdy/3";
@@ -683,7 +665,6 @@
return -1;
}
case SPDY4:
- case SPDY5:
switch (status) {
case GOAWAY_NO_ERROR:
return 0;
@@ -728,7 +709,6 @@
case SPDY3:
return 8;
case SPDY4:
- case SPDY5:
return 9;
}
LOG(DFATAL) << "Unhandled SPDY version.";
@@ -741,7 +721,6 @@
case SPDY3:
return 8;
case SPDY4:
- case SPDY5:
return 9;
}
LOG(DFATAL) << "Unhandled SPDY version.";
@@ -778,6 +757,14 @@
return version <= SPDY3 ? 8 : 6;
}
+int32 SpdyConstants::GetInitialStreamWindowSize(SpdyMajorVersion version) {
+ return (version <= SPDY3) ? (64 * 1024) : (64 * 1024 - 1);
+}
+
+int32 SpdyConstants::GetInitialSessionWindowSize(SpdyMajorVersion version) {
+ return (version <= SPDY3) ? (64 * 1024) : (64 * 1024 - 1);
+}
+
void SpdyDataIR::Visit(SpdyFrameVisitor* visitor) const {
return visitor->VisitData(*this);
}
diff --git a/net/spdy/spdy_protocol.h b/net/spdy/spdy_protocol.h
index beaf14a..80f46d7 100644
--- a/net/spdy/spdy_protocol.h
+++ b/net/spdy/spdy_protocol.h
@@ -36,8 +36,8 @@
SPDY_MIN_VERSION = SPDY2,
SPDY3 = 3,
SPDY4 = 4,
- SPDY5 = 5,
- SPDY_MAX_VERSION = SPDY5
+ HTTP2 = SPDY4,
+ SPDY_MAX_VERSION = SPDY4
};
// A SPDY stream id is a 31 bit entity.
@@ -47,18 +47,12 @@
// flow control).
const SpdyStreamId kSessionFlowControlStreamId = 0;
-// Initial window size for a Spdy stream in bytes.
-const int32 kSpdyStreamInitialWindowSize = 64 * 1024; // 64 KBytes
-
// The maxmium possible control frame size allowed by the spec.
const int32 kSpdyMaxControlFrameSize = (1 << 24) - 1;
// The maximum control frame size we accept.
const int32 kControlFrameSizeLimit = 1 << 14;
-// Initial window size for a Spdy session in bytes.
-const int32 kSpdySessionInitialWindowSize = 64 * 1024; // 64 KBytes
-
// Maximum window size for a Spdy stream or session.
const int32 kSpdyMaximumWindowSize = 0x7FFFFFFF; // Max signed 32bit int
@@ -533,6 +527,12 @@
// Returns the size (in bytes) of a wire setting ID and value.
static size_t GetSettingSize(SpdyMajorVersion version);
+ // Initial window size for a stream in bytes.
+ static int32 GetInitialStreamWindowSize(SpdyMajorVersion version);
+
+ // Initial window size for a session in bytes.
+ static int32 GetInitialSessionWindowSize(SpdyMajorVersion version);
+
static SpdyMajorVersion ParseMajorVersion(int version_number);
static int SerializeMajorVersion(SpdyMajorVersion version);
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index a468dc4..234e318 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -129,10 +129,10 @@
// If these compile asserts fail then SpdyProtocolErrorDetails needs
// to be updated with new values, as do the mapping functions above.
-COMPILE_ASSERT(12 == SpdyFramer::LAST_ERROR,
- SpdyProtocolErrorDetails_SpdyErrors_mismatch);
-COMPILE_ASSERT(17 == RST_STREAM_NUM_STATUS_CODES,
- SpdyProtocolErrorDetails_RstStreamStatus_mismatch);
+static_assert(12 == SpdyFramer::LAST_ERROR,
+ "SpdyProtocolErrorDetails / Spdy Errors mismatch");
+static_assert(17 == RST_STREAM_NUM_STATUS_CODES,
+ "SpdyProtocolErrorDetails / RstStreamStatus mismatch");
// Splits pushed |headers| into request and response parts. Request headers are
// the headers specifying resource URL.
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index c5398fc..ba3cb61 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -1808,10 +1808,6 @@
histogram_tester.ExpectBucketCount(
"Net.SpdySynStreamCompressionPercentage", 82, 1);
break;
- case SPDY5:
- histogram_tester.ExpectBucketCount(
- "Net.SpdySynStreamCompressionPercentage", 82, 1);
- break;
default:
NOTREACHED();
}
diff --git a/net/spdy/spdy_test_utils.cc b/net/spdy/spdy_test_utils.cc
index 6c13962..8ea16c8 100644
--- a/net/spdy/spdy_test_utils.cc
+++ b/net/spdy/spdy_test_utils.cc
@@ -95,7 +95,6 @@
case SPDY2:
case SPDY3:
case SPDY4:
- case SPDY5:
frame->data()[4] = flags;
break;
default:
@@ -118,7 +117,6 @@
}
break;
case SPDY4:
- case SPDY5:
CHECK_GT(1u<<14, length);
{
int32 wire_length = base::HostToNet32(length);
diff --git a/net/ssl/ssl_connection_status_flags.h b/net/ssl/ssl_connection_status_flags.h
index e2a8193..d3bfed2 100644
--- a/net/ssl/ssl_connection_status_flags.h
+++ b/net/ssl/ssl_connection_status_flags.h
@@ -49,8 +49,8 @@
SSL_CONNECTION_VERSION_QUIC = 7,
SSL_CONNECTION_VERSION_MAX,
};
-COMPILE_ASSERT(SSL_CONNECTION_VERSION_MAX - 1 <= SSL_CONNECTION_VERSION_MASK,
- SSL_CONNECTION_VERSION_MASK_too_small);
+static_assert(SSL_CONNECTION_VERSION_MAX - 1 <= SSL_CONNECTION_VERSION_MASK,
+ "SSL_CONNECTION_VERSION_MASK too small");
inline uint16 SSLConnectionStatusToCipherSuite(int connection_status) {
return static_cast<uint16>(connection_status);
diff --git a/net/test/url_request/url_request_mock_http_job.cc b/net/test/url_request/url_request_mock_http_job.cc
index ede87cf..1c6e35c 100644
--- a/net/test/url_request/url_request_mock_http_job.cc
+++ b/net/test/url_request/url_request_mock_http_job.cc
@@ -133,8 +133,8 @@
GURL URLRequestMockHTTPJob::GetMockUrlWithFailure(const base::FilePath& path,
FailurePhase phase,
int net_error) {
- COMPILE_ASSERT(arraysize(kFailurePhase) == MAX_FAILURE_PHASE,
- kFailurePhase_must_match_FailurePhase_enum);
+ static_assert(arraysize(kFailurePhase) == MAX_FAILURE_PHASE,
+ "kFailurePhase must match FailurePhase enum");
DCHECK_GE(phase, START);
DCHECK_LE(phase, READ_SYNC);
std::string url(GetMockUrl(path).spec());
diff --git a/net/test/url_request/url_request_slow_download_job.cc b/net/test/url_request/url_request_slow_download_job.cc
new file mode 100644
index 0000000..718a9f0
--- /dev/null
+++ b/net/test/url_request/url_request_slow_download_job.cc
@@ -0,0 +1,265 @@
+// Copyright (c) 2012 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 "net/test/url_request/url_request_slow_download_job.h"
+
+#include "base/bind.h"
+#include "base/compiler_specific.h"
+#include "base/logging.h"
+#include "base/message_loop/message_loop.h"
+#include "base/strings/string_util.h"
+#include "base/strings/stringprintf.h"
+#include "net/base/io_buffer.h"
+#include "net/base/net_errors.h"
+#include "net/http/http_response_headers.h"
+#include "net/url_request/url_request.h"
+#include "net/url_request/url_request_filter.h"
+#include "url/gurl.h"
+
+namespace net {
+
+const char URLRequestSlowDownloadJob::kUnknownSizeUrl[] =
+ "http://url.handled.by.slow.download/download-unknown-size";
+const char URLRequestSlowDownloadJob::kKnownSizeUrl[] =
+ "http://url.handled.by.slow.download/download-known-size";
+const char URLRequestSlowDownloadJob::kFinishDownloadUrl[] =
+ "http://url.handled.by.slow.download/download-finish";
+const char URLRequestSlowDownloadJob::kErrorDownloadUrl[] =
+ "http://url.handled.by.slow.download/download-error";
+
+const int URLRequestSlowDownloadJob::kFirstDownloadSize = 1024 * 35;
+const int URLRequestSlowDownloadJob::kSecondDownloadSize = 1024 * 10;
+
+// static
+base::LazyInstance<URLRequestSlowDownloadJob::SlowJobsSet>::Leaky
+ URLRequestSlowDownloadJob::pending_requests_ = LAZY_INSTANCE_INITIALIZER;
+
+void URLRequestSlowDownloadJob::Start() {
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE, base::Bind(&URLRequestSlowDownloadJob::StartAsync,
+ weak_factory_.GetWeakPtr()));
+}
+
+// static
+void URLRequestSlowDownloadJob::AddUrlHandler() {
+ URLRequestFilter* filter = URLRequestFilter::GetInstance();
+ filter->AddUrlHandler(GURL(kUnknownSizeUrl),
+ &URLRequestSlowDownloadJob::Factory);
+ filter->AddUrlHandler(GURL(kKnownSizeUrl),
+ &URLRequestSlowDownloadJob::Factory);
+ filter->AddUrlHandler(GURL(kFinishDownloadUrl),
+ &URLRequestSlowDownloadJob::Factory);
+ filter->AddUrlHandler(GURL(kErrorDownloadUrl),
+ &URLRequestSlowDownloadJob::Factory);
+}
+
+// static
+URLRequestJob* URLRequestSlowDownloadJob::Factory(
+ URLRequest* request,
+ NetworkDelegate* network_delegate,
+ const std::string& scheme) {
+ URLRequestSlowDownloadJob* job =
+ new URLRequestSlowDownloadJob(request, network_delegate);
+ if (request->url().spec() != kFinishDownloadUrl &&
+ request->url().spec() != kErrorDownloadUrl)
+ pending_requests_.Get().insert(job);
+ return job;
+}
+
+// static
+size_t URLRequestSlowDownloadJob::NumberOutstandingRequests() {
+ return pending_requests_.Get().size();
+}
+
+// static
+void URLRequestSlowDownloadJob::FinishPendingRequests() {
+ typedef std::set<URLRequestSlowDownloadJob*> JobList;
+ for (JobList::iterator it = pending_requests_.Get().begin();
+ it != pending_requests_.Get().end(); ++it) {
+ (*it)->set_should_finish_download();
+ }
+}
+
+void URLRequestSlowDownloadJob::ErrorPendingRequests() {
+ typedef std::set<URLRequestSlowDownloadJob*> JobList;
+ for (JobList::iterator it = pending_requests_.Get().begin();
+ it != pending_requests_.Get().end(); ++it) {
+ (*it)->set_should_error_download();
+ }
+}
+
+URLRequestSlowDownloadJob::URLRequestSlowDownloadJob(
+ URLRequest* request,
+ NetworkDelegate* network_delegate)
+ : URLRequestJob(request, network_delegate),
+ bytes_already_sent_(0),
+ should_error_download_(false),
+ should_finish_download_(false),
+ buffer_size_(0),
+ weak_factory_(this) {
+}
+
+void URLRequestSlowDownloadJob::StartAsync() {
+ if (LowerCaseEqualsASCII(kFinishDownloadUrl, request_->url().spec().c_str()))
+ URLRequestSlowDownloadJob::FinishPendingRequests();
+ if (LowerCaseEqualsASCII(kErrorDownloadUrl, request_->url().spec().c_str()))
+ URLRequestSlowDownloadJob::ErrorPendingRequests();
+
+ NotifyHeadersComplete();
+}
+
+// ReadRawData and CheckDoneStatus together implement a state
+// machine. ReadRawData may be called arbitrarily by the network stack.
+// It responds by:
+// * If there are bytes remaining in the first chunk, they are
+// returned.
+// [No bytes remaining in first chunk. ]
+// * If should_finish_download_ is not set, it returns IO_PENDING,
+// and starts calling CheckDoneStatus on a regular timer.
+// [should_finish_download_ set.]
+// * If there are bytes remaining in the second chunk, they are filled.
+// * Otherwise, return *bytes_read = 0 to indicate end of request.
+// CheckDoneStatus is called on a regular basis, in the specific
+// case where we have transmitted all of the first chunk and none of the
+// second. If should_finish_download_ becomes set, it will "complete"
+// the ReadRawData call that spawned off the CheckDoneStatus() repeated call.
+//
+// FillBufferHelper is a helper function that does the actual work of figuring
+// out where in the state machine we are and how we should fill the buffer.
+// It returns an enum indicating the state of the read.
+URLRequestSlowDownloadJob::ReadStatus
+URLRequestSlowDownloadJob::FillBufferHelper(IOBuffer* buf,
+ int buf_size,
+ int* bytes_written) {
+ if (bytes_already_sent_ < kFirstDownloadSize) {
+ int bytes_to_write =
+ std::min(kFirstDownloadSize - bytes_already_sent_, buf_size);
+ for (int i = 0; i < bytes_to_write; ++i) {
+ buf->data()[i] = '*';
+ }
+ *bytes_written = bytes_to_write;
+ bytes_already_sent_ += bytes_to_write;
+ return BUFFER_FILLED;
+ }
+
+ if (!should_finish_download_)
+ return REQUEST_BLOCKED;
+
+ if (bytes_already_sent_ < kFirstDownloadSize + kSecondDownloadSize) {
+ int bytes_to_write =
+ std::min(kFirstDownloadSize + kSecondDownloadSize - bytes_already_sent_,
+ buf_size);
+ for (int i = 0; i < bytes_to_write; ++i) {
+ buf->data()[i] = '*';
+ }
+ *bytes_written = bytes_to_write;
+ bytes_already_sent_ += bytes_to_write;
+ return BUFFER_FILLED;
+ }
+
+ return REQUEST_COMPLETE;
+}
+
+bool URLRequestSlowDownloadJob::ReadRawData(IOBuffer* buf,
+ int buf_size,
+ int* bytes_read) {
+ if (LowerCaseEqualsASCII(kFinishDownloadUrl,
+ request_->url().spec().c_str()) ||
+ LowerCaseEqualsASCII(kErrorDownloadUrl, request_->url().spec().c_str())) {
+ VLOG(10) << __FUNCTION__ << " called w/ kFinish/ErrorDownloadUrl.";
+ *bytes_read = 0;
+ return true;
+ }
+
+ VLOG(10) << __FUNCTION__ << " called at position " << bytes_already_sent_
+ << " in the stream.";
+ ReadStatus status = FillBufferHelper(buf, buf_size, bytes_read);
+ switch (status) {
+ case BUFFER_FILLED:
+ return true;
+ case REQUEST_BLOCKED:
+ buffer_ = buf;
+ buffer_size_ = buf_size;
+ SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0));
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE, base::Bind(&URLRequestSlowDownloadJob::CheckDoneStatus,
+ weak_factory_.GetWeakPtr()),
+ base::TimeDelta::FromMilliseconds(100));
+ return false;
+ case REQUEST_COMPLETE:
+ *bytes_read = 0;
+ return true;
+ }
+ NOTREACHED();
+ return true;
+}
+
+void URLRequestSlowDownloadJob::CheckDoneStatus() {
+ if (should_finish_download_) {
+ VLOG(10) << __FUNCTION__ << " called w/ should_finish_download_ set.";
+ DCHECK(NULL != buffer_.get());
+ int bytes_written = 0;
+ ReadStatus status =
+ FillBufferHelper(buffer_.get(), buffer_size_, &bytes_written);
+ DCHECK_EQ(BUFFER_FILLED, status);
+ buffer_ = NULL; // Release the reference.
+ SetStatus(URLRequestStatus());
+ NotifyReadComplete(bytes_written);
+ } else if (should_error_download_) {
+ VLOG(10) << __FUNCTION__ << " called w/ should_finish_ownload_ set.";
+ NotifyDone(
+ URLRequestStatus(URLRequestStatus::FAILED, ERR_CONNECTION_RESET));
+ } else {
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE, base::Bind(&URLRequestSlowDownloadJob::CheckDoneStatus,
+ weak_factory_.GetWeakPtr()),
+ base::TimeDelta::FromMilliseconds(100));
+ }
+}
+
+// Public virtual version.
+void URLRequestSlowDownloadJob::GetResponseInfo(HttpResponseInfo* info) {
+ // Forward to private const version.
+ GetResponseInfoConst(info);
+}
+
+URLRequestSlowDownloadJob::~URLRequestSlowDownloadJob() {
+ pending_requests_.Get().erase(this);
+}
+
+// Private const version.
+void URLRequestSlowDownloadJob::GetResponseInfoConst(
+ HttpResponseInfo* info) const {
+ // Send back mock headers.
+ std::string raw_headers;
+ if (LowerCaseEqualsASCII(kFinishDownloadUrl,
+ request_->url().spec().c_str()) ||
+ LowerCaseEqualsASCII(kErrorDownloadUrl, request_->url().spec().c_str())) {
+ raw_headers.append(
+ "HTTP/1.1 200 OK\n"
+ "Content-type: text/plain\n");
+ } else {
+ raw_headers.append(
+ "HTTP/1.1 200 OK\n"
+ "Content-type: application/octet-stream\n"
+ "Cache-Control: max-age=0\n");
+
+ if (LowerCaseEqualsASCII(kKnownSizeUrl, request_->url().spec().c_str())) {
+ raw_headers.append(base::StringPrintf(
+ "Content-Length: %d\n", kFirstDownloadSize + kSecondDownloadSize));
+ }
+ }
+
+ // ParseRawHeaders expects \0 to end each header line.
+ ReplaceSubstringsAfterOffset(&raw_headers, 0, "\n", std::string("\0", 1));
+ info->headers = new HttpResponseHeaders(raw_headers);
+}
+
+bool URLRequestSlowDownloadJob::GetMimeType(std::string* mime_type) const {
+ HttpResponseInfo info;
+ GetResponseInfoConst(&info);
+ return info.headers.get() && info.headers->GetMimeType(mime_type);
+}
+
+} // namespace net
diff --git a/net/test/url_request/url_request_slow_download_job.h b/net/test/url_request/url_request_slow_download_job.h
new file mode 100644
index 0000000..a264a84
--- /dev/null
+++ b/net/test/url_request/url_request_slow_download_job.h
@@ -0,0 +1,99 @@
+// Copyright (c) 2012 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.
+// This class simulates a slow download. Requests to |kUnknownSizeUrl| and
+// |kKnownSizeUrl| start downloads that pause after the first N bytes, to be
+// completed by sending a request to |kFinishDownloadUrl|.
+
+#ifndef NET_TEST_URL_REQUEST_URL_REQUEST_SLOW_DOWNLOAD_JOB_H_
+#define NET_TEST_URL_REQUEST_URL_REQUEST_SLOW_DOWNLOAD_JOB_H_
+
+#include <set>
+#include <string>
+
+#include "base/lazy_instance.h"
+#include "base/memory/weak_ptr.h"
+#include "net/url_request/url_request_job.h"
+
+namespace net {
+
+class URLRequestSlowDownloadJob : public URLRequestJob {
+ public:
+ // Test URLs.
+ static const char kUnknownSizeUrl[];
+ static const char kKnownSizeUrl[];
+ static const char kFinishDownloadUrl[];
+ static const char kErrorDownloadUrl[];
+
+ // Download sizes.
+ static const int kFirstDownloadSize;
+ static const int kSecondDownloadSize;
+
+ // Timer callback, used to check to see if we should finish our download and
+ // send the second chunk.
+ void CheckDoneStatus();
+
+ // URLRequestJob methods
+ void Start() override;
+ bool GetMimeType(std::string* mime_type) const override;
+ void GetResponseInfo(HttpResponseInfo* info) override;
+ bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
+
+ static URLRequestJob* Factory(URLRequest* request,
+ NetworkDelegate* network_delegate,
+ const std::string& scheme);
+
+ // Returns the current number of URLRequestSlowDownloadJobs that have
+ // not yet completed.
+ static size_t NumberOutstandingRequests();
+
+ // Adds the testing URLs to the URLRequestFilter.
+ static void AddUrlHandler();
+
+ private:
+ URLRequestSlowDownloadJob(URLRequest* request,
+ NetworkDelegate* network_delegate);
+ ~URLRequestSlowDownloadJob() override;
+
+ // Enum indicating where we are in the read after a call to
+ // FillBufferHelper.
+ enum ReadStatus {
+ // The buffer was filled with data and may be returned.
+ BUFFER_FILLED,
+
+ // No data was added to the buffer because kFinishDownloadUrl has
+ // not yet been seen and we've already returned the first chunk.
+ REQUEST_BLOCKED,
+
+ // No data was added to the buffer because we've already returned
+ // all the data.
+ REQUEST_COMPLETE
+ };
+ ReadStatus FillBufferHelper(IOBuffer* buf, int buf_size, int* bytes_written);
+
+ void GetResponseInfoConst(HttpResponseInfo* info) const;
+
+ // Mark all pending requests to be finished. We keep track of pending
+ // requests in |pending_requests_|.
+ static void FinishPendingRequests();
+ static void ErrorPendingRequests();
+ typedef std::set<URLRequestSlowDownloadJob*> SlowJobsSet;
+ static base::LazyInstance<SlowJobsSet>::Leaky pending_requests_;
+
+ void StartAsync();
+
+ void set_should_finish_download() { should_finish_download_ = true; }
+ void set_should_error_download() { should_error_download_ = true; }
+
+ int bytes_already_sent_;
+ bool should_error_download_;
+ bool should_finish_download_;
+ scoped_refptr<IOBuffer> buffer_;
+ int buffer_size_;
+
+ base::WeakPtrFactory<URLRequestSlowDownloadJob> weak_factory_;
+};
+
+} // namespace content
+
+#endif // NET_TEST_URL_REQUEST_URL_REQUEST_SLOW_DOWNLOAD_JOB_H_
diff --git a/net/tools/crash_cache/crash_cache.cc b/net/tools/crash_cache/crash_cache.cc
index 9ec15bb..60d7158 100644
--- a/net/tools/crash_cache/crash_cache.cc
+++ b/net/tools/crash_cache/crash_cache.cc
@@ -114,7 +114,7 @@
"remove_load2",
"remove_load3"
};
- COMPILE_ASSERT(arraysize(folders) == disk_cache::MAX_CRASH, sync_folders);
+ static_assert(arraysize(folders) == disk_cache::MAX_CRASH, "sync folders");
DCHECK(action > disk_cache::NO_CRASH && action < disk_cache::MAX_CRASH);
*full_path = path.AppendASCII(folders[action]);
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
index bedfb50..1104528 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -117,6 +117,15 @@
// TODO(rtenneti): Add kTBBR after BBR code is checked in.
// QuicTag congestion_control_tags[] = {kRENO, kTBBR, kQBIC};
QuicTag congestion_control_tags[] = {kRENO, kQBIC};
+ QuicVersionVector spdy3_versions;
+ QuicVersionVector spdy4_versions;
+ for (QuicVersion version : all_supported_versions) {
+ if (version > QUIC_VERSION_23) {
+ spdy4_versions.push_back(version);
+ } else {
+ spdy3_versions.push_back(version);
+ }
+ }
for (size_t congestion_control_index = 0;
congestion_control_index < arraysize(congestion_control_tags);
congestion_control_index++) {
@@ -124,27 +133,29 @@
congestion_control_tags[congestion_control_index];
for (int use_fec = 0; use_fec < 2; ++use_fec) {
for (int use_pacing = 0; use_pacing < 2; ++use_pacing) {
- // Add an entry for server and client supporting all versions.
- params.push_back(TestParams(all_supported_versions,
- all_supported_versions,
- all_supported_versions[0],
- use_pacing != 0,
- use_fec != 0,
- congestion_control_tag));
+ for (int spdy_version = 3; spdy_version <= 4; ++spdy_version) {
+ const QuicVersionVector* client_versions =
+ spdy_version == 3 ? &spdy3_versions : &spdy4_versions;
+ // Add an entry for server and client supporting all versions.
+ params.push_back(TestParams(*client_versions, all_supported_versions,
+ (*client_versions)[0], use_pacing != 0,
+ use_fec != 0, congestion_control_tag));
- // Test client supporting all versions and server supporting 1 version.
- // Simulate an old server and exercise version downgrade in the client.
- // Protocol negotiation should occur. Skip the i = 0 case because it is
- // essentially the same as the default case.
- for (size_t i = 1; i < all_supported_versions.size(); ++i) {
- QuicVersionVector server_supported_versions;
- server_supported_versions.push_back(all_supported_versions[i]);
- params.push_back(TestParams(all_supported_versions,
- server_supported_versions,
- server_supported_versions[0],
- use_pacing != 0,
- use_fec != 0,
- congestion_control_tag));
+ // Test client supporting all versions and server supporting 1
+ // version.
+ // Simulate an old server and exercise version downgrade in the
+ // client.
+ // Protocol negotiation should occur. Skip the i = 0 case because it
+ // is
+ // essentially the same as the default case.
+ for (QuicVersion version : *client_versions) {
+ QuicVersionVector server_supported_versions;
+ server_supported_versions.push_back(version);
+ params.push_back(
+ TestParams(*client_versions, server_supported_versions,
+ server_supported_versions[0], use_pacing != 0,
+ use_fec != 0, congestion_control_tag));
+ }
}
}
}
@@ -1374,9 +1385,7 @@
public:
TestAckNotifierDelegate() {}
- void OnAckNotification(int /*num_original_packets*/,
- int /*num_original_bytes*/,
- int /*num_retransmitted_packets*/,
+ void OnAckNotification(int /*num_retransmitted_packets*/,
int /*num_retransmitted_bytes*/,
QuicTime::Delta /*delta_largest_observed*/) override {
ASSERT_FALSE(has_been_notified_);
@@ -1393,13 +1402,15 @@
bool has_been_notified_ = false;
};
-TEST_P(EndToEndTest, AckNotifierWithPacketLoss) {
- // Verify that even in the presence of packet loss, an AckNotifierDelegate
- // will get informed that the data it is interested in has been ACKed. This
- // tests end-to-end ACK notification, and demonstrates that retransmissions do
- // not break this functionality.
+TEST_P(EndToEndTest, AckNotifierWithPacketLossAndBlockedSocket) {
+ // Verify that even in the presence of packet loss and occasionally blocked
+ // socket, an AckNotifierDelegate will get informed that the data it is
+ // interested in has been ACKed. This tests end-to-end ACK notification, and
+ // demonstrates that retransmissions do not break this functionality.
ValueRestore<bool> old_flag(&FLAGS_quic_attach_ack_notifiers_to_packets,
true);
+ ValueRestore<bool> old_flag2(&FLAGS_quic_ack_notifier_informed_on_serialized,
+ true);
SetPacketLossPercentage(5);
ASSERT_TRUE(Initialize());
@@ -1407,6 +1418,7 @@
// Wait for the server SHLO before upping the packet loss.
client_->client()->WaitForCryptoHandshakeConfirmed();
SetPacketLossPercentage(30);
+ client_writer_->set_fake_blocked_socket_percentage(10);
// Create a POST request and send the headers only.
HTTPMessage request(HttpConstants::HTTP_1_1, HttpConstants::POST, "/foo");
@@ -1430,11 +1442,14 @@
// Send another request to flush out any pending ACKs on the server.
client_->SendSynchronousRequest(request_string);
+ // Pause the server to avoid races.
+ server_thread_->Pause();
// Make sure the delegate does get the notification it expects.
while (!delegate->has_been_notified()) {
// Waits for up to 50 ms.
client_->client()->WaitForEvents();
}
+ server_thread_->Resume();
}
} // namespace
diff --git a/net/tools/quic/quic_client_bin.cc b/net/tools/quic/quic_client_bin.cc
index dcebd39..3800944 100644
--- a/net/tools/quic/quic_client_bin.cc
+++ b/net/tools/quic/quic_client_bin.cc
@@ -48,6 +48,9 @@
#include "base/strings/string_util.h"
#include "net/base/ip_endpoint.h"
#include "net/base/privacy_mode.h"
+#include "net/cert/cert_verifier.h"
+#include "net/http/transport_security_state.h"
+#include "net/quic/crypto/proof_verifier_chromium.h"
#include "net/quic/quic_protocol.h"
#include "net/quic/quic_server_id.h"
#include "net/quic/quic_utils.h"
@@ -57,6 +60,9 @@
#include "url/gurl.h"
using base::StringPiece;
+using net::CertVerifier;
+using net::ProofVerifierChromium;
+using net::TransportSecurityState;
using std::cout;
using std::cerr;
using std::map;
@@ -171,8 +177,9 @@
VLOG(1) << "Resolved " << host << " to " << host_port << endl;
// Build the client, and try to connect.
+ bool is_https = (FLAGS_port == 443);
net::EpollServer epoll_server;
- net::QuicServerId server_id(host, FLAGS_port, /*is_https=*/false,
+ net::QuicServerId server_id(host, FLAGS_port, is_https,
net::PRIVACY_MODE_DISABLED);
net::QuicVersionVector versions = net::QuicSupportedVersions();
if (FLAGS_quic_version != -1) {
@@ -181,6 +188,16 @@
}
net::tools::QuicClient client(net::IPEndPoint(ip_addr, FLAGS_port), server_id,
versions, &epoll_server);
+ scoped_ptr<CertVerifier> cert_verifier;
+ scoped_ptr<TransportSecurityState> transport_security_state;
+ if (is_https) {
+ // For secure QUIC we need to verify the cert chain.a
+ cert_verifier.reset(CertVerifier::CreateDefault());
+ transport_security_state.reset(new TransportSecurityState);
+ // TODO(rtenneti): Fix "Proof invalid: Missing context" error.
+ client.SetProofVerifier(new ProofVerifierChromium(
+ cert_verifier.get(), transport_security_state.get()));
+ }
if (!client.Initialize()) {
cerr << "Failed to initialize client." << endl;
return 1;
diff --git a/net/tools/quic/quic_dispatcher.cc b/net/tools/quic/quic_dispatcher.cc
index fa32fc0..1771026 100644
--- a/net/tools/quic/quic_dispatcher.cc
+++ b/net/tools/quic/quic_dispatcher.cc
@@ -103,11 +103,6 @@
DCHECK(false);
return false;
}
- bool OnCongestionFeedbackFrame(
- const QuicCongestionFeedbackFrame& /*frame*/) override {
- DCHECK(false);
- return false;
- }
bool OnStopWaitingFrame(const QuicStopWaitingFrame& /*frame*/) override {
DCHECK(false);
return false;
diff --git a/net/tools/quic/quic_server_session.cc b/net/tools/quic/quic_server_session.cc
index 6e64da5..f25ad92 100644
--- a/net/tools/quic/quic_server_session.cc
+++ b/net/tools/quic/quic_server_session.cc
@@ -80,10 +80,6 @@
}
void QuicServerSession::OnCongestionWindowChange(QuicTime now) {
- if (connection()->version() <= QUIC_VERSION_21) {
- return;
- }
-
// Only send updates when the application has no data to write.
if (HasDataToWrite()) {
return;
diff --git a/net/tools/quic/quic_server_session_test.cc b/net/tools/quic/quic_server_session_test.cc
index c093b54..71c2b42 100644
--- a/net/tools/quic/quic_server_session_test.cc
+++ b/net/tools/quic/quic_server_session_test.cc
@@ -299,10 +299,6 @@
};
TEST_P(QuicServerSessionTest, BandwidthEstimates) {
- if (version() <= QUIC_VERSION_21) {
- return;
- }
-
// Test that bandwidth estimate updates are sent to the client, only after the
// bandwidth estimate has changes sufficiently, and enough time has passed,
// and we don't have any other data to write.
diff --git a/net/tools/quic/quic_time_wait_list_manager.cc b/net/tools/quic/quic_time_wait_list_manager.cc
index ed6addc..1cb86a5 100644
--- a/net/tools/quic/quic_time_wait_list_manager.cc
+++ b/net/tools/quic/quic_time_wait_list_manager.cc
@@ -14,6 +14,7 @@
#include "net/quic/crypto/quic_decrypter.h"
#include "net/quic/crypto/quic_encrypter.h"
#include "net/quic/quic_clock.h"
+#include "net/quic/quic_flags.h"
#include "net/quic/quic_framer.h"
#include "net/quic/quic_protocol.h"
#include "net/quic/quic_utils.h"
@@ -26,13 +27,8 @@
namespace net {
namespace tools {
-namespace {
-
-// Time period for which a given connection_id should live in the time-wait
-// state.
-int64 FLAGS_quic_time_wait_list_seconds = 5;
-
-} // namespace
+// TODO(rtenneti): Remove the duplicated code in this file. Share code with
+// "net/quic/quic_time_wait_list_manager.cc"
// A very simple alarm that just informs the QuicTimeWaitListManager to clean
// up old connection_ids. This alarm should be unregistered and deleted before
@@ -122,6 +118,11 @@
delete it->second.close_packet;
connection_id_map_.erase(it);
}
+ TrimTimeWaitListIfNeeded();
+ if (FLAGS_quic_limit_time_wait_list_size) {
+ DCHECK_LT(num_connections(),
+ static_cast<size_t>(FLAGS_quic_time_wait_list_max_connections));
+ }
ConnectionIdData data(num_packets,
version,
clock_.ApproximateNow(),
@@ -278,22 +279,60 @@
next_alarm_interval, connection_id_clean_up_alarm_.get());
}
+bool QuicTimeWaitListManager::MaybeExpireOldestConnection(
+ QuicTime expiration_time) {
+ if (connection_id_map_.empty()) {
+ return false;
+ }
+ ConnectionIdMap::iterator it = connection_id_map_.begin();
+ QuicTime oldest_connection_id_time = it->second.time_added;
+ if (oldest_connection_id_time > expiration_time) {
+ // Too recent, don't retire.
+ return false;
+ }
+ // This connection_id has lived its age, retire it now.
+ const QuicConnectionId connection_id = it->first;
+ delete it->second.close_packet;
+ connection_id_map_.erase(it);
+ visitor_->OnConnectionRemovedFromTimeWaitList(connection_id);
+ return true;
+}
+
void QuicTimeWaitListManager::CleanUpOldConnectionIds() {
QuicTime now = clock_.ApproximateNow();
- while (!connection_id_map_.empty()) {
- ConnectionIdMap::iterator it = connection_id_map_.begin();
- QuicTime oldest_connection_id = it->second.time_added;
- if (now.Subtract(oldest_connection_id) < kTimeWaitPeriod_) {
- break;
+ QuicTime expiration = now.Subtract(kTimeWaitPeriod_);
+ if (FLAGS_quic_limit_time_wait_list_size) {
+ while (MaybeExpireOldestConnection(expiration)) {
}
- const QuicConnectionId connection_id = it->first;
- // This connection_id has lived its age, retire it now.
- delete it->second.close_packet;
- connection_id_map_.erase(it);
- visitor_->OnConnectionRemovedFromTimeWaitList(connection_id);
+ } else {
+ while (!connection_id_map_.empty()) {
+ ConnectionIdMap::iterator it = connection_id_map_.begin();
+ QuicTime oldest_connection_id = it->second.time_added;
+ if (now.Subtract(oldest_connection_id) < kTimeWaitPeriod_) {
+ break;
+ }
+ const QuicConnectionId connection_id = it->first;
+ // This connection_id has lived its age, retire it now.
+ delete it->second.close_packet;
+ connection_id_map_.erase(it);
+ visitor_->OnConnectionRemovedFromTimeWaitList(connection_id);
+ }
}
+
SetConnectionIdCleanUpAlarm();
}
+void QuicTimeWaitListManager::TrimTimeWaitListIfNeeded() {
+ if (FLAGS_quic_limit_time_wait_list_size) {
+ if (FLAGS_quic_time_wait_list_max_connections < 0) {
+ return;
+ }
+ while (num_connections() >=
+ static_cast<size_t>(FLAGS_quic_time_wait_list_max_connections)) {
+ MaybeExpireOldestConnection(QuicTime::Infinite());
+ }
+ }
+}
+
} // namespace tools
} // namespace net
diff --git a/net/tools/quic/quic_time_wait_list_manager.h b/net/tools/quic/quic_time_wait_list_manager.h
index a00a646..fe5f020 100644
--- a/net/tools/quic/quic_time_wait_list_manager.h
+++ b/net/tools/quic/quic_time_wait_list_manager.h
@@ -89,6 +89,10 @@
// period.
void CleanUpOldConnectionIds();
+ // If necessary, trims the oldest connections from the time-wait list until
+ // the size is under the configured maximum.
+ void TrimTimeWaitListIfNeeded();
+
// Given a ConnectionId that exists in the time wait list, returns the
// QuicVersion associated with it.
QuicVersion GetQuicVersionFromConnectionId(QuicConnectionId connection_id);
@@ -129,6 +133,15 @@
// Register the alarm with the epoll server to wake up at appropriate time.
void SetConnectionIdCleanUpAlarm();
+ // Removes the oldest connection from the time-wait list if it was added prior
+ // to "expiration_time". To unconditionally remove the oldest connection, use
+ // a QuicTime::Delta:Infinity(). This function modifies the
+ // connection_id_map_. If you plan to call this function in a loop, any
+ // iterators that you hold before the call to this function may be invalid
+ // afterward. Returns true if the oldest connection was expired. Returns
+ // false if the map is empty or the oldest connection has not expired.
+ bool MaybeExpireOldestConnection(QuicTime expiration_time);
+
// A map from a recently closed connection_id to the number of packets
// received after the termination of the connection bound to the
// connection_id.
diff --git a/net/tools/quic/quic_time_wait_list_manager_test.cc b/net/tools/quic/quic_time_wait_list_manager_test.cc
index 17c26d8..0bb9f82 100644
--- a/net/tools/quic/quic_time_wait_list_manager_test.cc
+++ b/net/tools/quic/quic_time_wait_list_manager_test.cc
@@ -11,6 +11,7 @@
#include "net/quic/crypto/quic_decrypter.h"
#include "net/quic/crypto/quic_encrypter.h"
#include "net/quic/quic_data_reader.h"
+#include "net/quic/quic_flags.h"
#include "net/quic/quic_framer.h"
#include "net/quic/quic_packet_writer.h"
#include "net/quic/quic_protocol.h"
@@ -25,6 +26,7 @@
using net::test::NoOpFramerVisitor;
using net::test::QuicVersionMax;
using net::test::QuicVersionMin;
+using net::test::ValueRestore;
using testing::Args;
using testing::Assign;
using testing::DoAll;
@@ -218,6 +220,7 @@
EXPECT_FALSE(IsConnectionIdInTimeWait(connection_id_));
EXPECT_CALL(visitor_, OnConnectionAddedToTimeWaitList(connection_id_));
AddConnectionId(connection_id_);
+ EXPECT_EQ(1u, time_wait_list_manager_.num_connections());
EXPECT_TRUE(IsConnectionIdInTimeWait(connection_id_));
}
@@ -255,6 +258,7 @@
TEST_F(QuicTimeWaitListManagerTest, SendPublicResetWithExponentialBackOff) {
EXPECT_CALL(visitor_, OnConnectionAddedToTimeWaitList(connection_id_));
AddConnectionId(connection_id_);
+ EXPECT_EQ(1u, time_wait_list_manager_.num_connections());
for (int sequence_number = 1; sequence_number < 101; ++sequence_number) {
if ((sequence_number & (sequence_number - 1)) == 0) {
EXPECT_CALL(writer_, WritePacket(_, _, _, _))
@@ -273,29 +277,29 @@
}
TEST_F(QuicTimeWaitListManagerTest, CleanUpOldConnectionIds) {
- const int kConnectionIdCount = 100;
- const int kOldConnectionIdCount = 31;
+ const size_t kConnectionIdCount = 100;
+ const size_t kOldConnectionIdCount = 31;
// Add connection_ids such that their expiry time is kTimeWaitPeriod_.
epoll_server_.set_now_in_usec(0);
- for (int connection_id = 1;
- connection_id <= kOldConnectionIdCount;
+ for (size_t connection_id = 1; connection_id <= kOldConnectionIdCount;
++connection_id) {
EXPECT_CALL(visitor_, OnConnectionAddedToTimeWaitList(connection_id));
AddConnectionId(connection_id);
}
+ EXPECT_EQ(kOldConnectionIdCount, time_wait_list_manager_.num_connections());
// Add remaining connection_ids such that their add time is
// 2 * kTimeWaitPeriod.
const QuicTime::Delta time_wait_period =
QuicTimeWaitListManagerPeer::time_wait_period(&time_wait_list_manager_);
epoll_server_.set_now_in_usec(time_wait_period.ToMicroseconds());
- for (int connection_id = kOldConnectionIdCount + 1;
- connection_id <= kConnectionIdCount;
- ++connection_id) {
+ for (size_t connection_id = kOldConnectionIdCount + 1;
+ connection_id <= kConnectionIdCount; ++connection_id) {
EXPECT_CALL(visitor_, OnConnectionAddedToTimeWaitList(connection_id));
AddConnectionId(connection_id);
}
+ EXPECT_EQ(kConnectionIdCount, time_wait_list_manager_.num_connections());
QuicTime::Delta offset = QuicTime::Delta::FromMicroseconds(39);
// Now set the current time as time_wait_period + offset usecs.
@@ -306,21 +310,22 @@
time_wait_period.Subtract(offset).ToMicroseconds();
EXPECT_CALL(epoll_server_, RegisterAlarm(next_alarm_time, _));
- for (int connection_id = 1; connection_id <= kConnectionIdCount;
+ for (size_t connection_id = 1; connection_id <= kConnectionIdCount;
++connection_id) {
if (connection_id <= kOldConnectionIdCount) {
EXPECT_CALL(visitor_, OnConnectionRemovedFromTimeWaitList(connection_id));
}
}
time_wait_list_manager_.CleanUpOldConnectionIds();
- for (int connection_id = 1;
- connection_id <= kConnectionIdCount;
+ for (size_t connection_id = 1; connection_id <= kConnectionIdCount;
++connection_id) {
EXPECT_EQ(connection_id > kOldConnectionIdCount,
IsConnectionIdInTimeWait(connection_id))
<< "kOldConnectionIdCount: " << kOldConnectionIdCount
<< " connection_id: " << connection_id;
}
+ EXPECT_EQ(kConnectionIdCount - kOldConnectionIdCount,
+ time_wait_list_manager_.num_connections());
}
TEST_F(QuicTimeWaitListManagerTest, SendQueuedPackets) {
@@ -366,6 +371,7 @@
.Times(0);
EXPECT_CALL(visitor_, OnWriteBlocked(&time_wait_list_manager_));
ProcessPacket(other_connection_id, other_sequence_number);
+ EXPECT_EQ(2u, time_wait_list_manager_.num_connections());
// Now expect all the write blocked public reset packets to be sent again.
writer_is_blocked_ = false;
@@ -421,6 +427,7 @@
new QuicEncryptedPacket(
new char[kConnectionCloseLength], kConnectionCloseLength, true));
EXPECT_TRUE(IsConnectionIdInTimeWait(connection_id_));
+ EXPECT_EQ(1u, time_wait_list_manager_.num_connections());
EXPECT_CALL(writer_, WritePacket(_,
kConnectionCloseLength,
@@ -445,6 +452,7 @@
EXPECT_CALL(visitor_, OnConnectionRemovedFromTimeWaitList(connection_id_));
time_wait_list_manager_.CleanUpOldConnectionIds();
EXPECT_FALSE(IsConnectionIdInTimeWait(connection_id_));
+ EXPECT_EQ(0u, time_wait_list_manager_.num_connections());
}
TEST_F(QuicTimeWaitListManagerTest, ConnectionIdsOrderedByTime) {
@@ -464,6 +472,7 @@
epoll_server_.set_now_in_usec(10);
EXPECT_CALL(visitor_, OnConnectionAddedToTimeWaitList(kConnectionId2));
AddConnectionId(kConnectionId2);
+ EXPECT_EQ(2u, time_wait_list_manager_.num_connections());
const QuicTime::Delta time_wait_period =
QuicTimeWaitListManagerPeer::time_wait_period(&time_wait_list_manager_);
@@ -475,7 +484,46 @@
time_wait_list_manager_.CleanUpOldConnectionIds();
EXPECT_FALSE(IsConnectionIdInTimeWait(kConnectionId1));
EXPECT_TRUE(IsConnectionIdInTimeWait(kConnectionId2));
+ EXPECT_EQ(1u, time_wait_list_manager_.num_connections());
}
+
+TEST_F(QuicTimeWaitListManagerTest, MaxConnectionsTest) {
+ ValueRestore<bool> old_flag(&FLAGS_quic_limit_time_wait_list_size, true);
+ // Basically, shut off time-based eviction.
+ FLAGS_quic_time_wait_list_seconds = 10000000000;
+ FLAGS_quic_time_wait_list_max_connections = 5;
+
+ QuicConnectionId current_connection_id = 0;
+ // Add exactly the maximum number of connections
+ for (int64 i = 0; i < FLAGS_quic_time_wait_list_max_connections; ++i) {
+ ++current_connection_id;
+ EXPECT_FALSE(IsConnectionIdInTimeWait(current_connection_id));
+ EXPECT_CALL(visitor_,
+ OnConnectionAddedToTimeWaitList(current_connection_id));
+ AddConnectionId(current_connection_id);
+ EXPECT_EQ(current_connection_id, time_wait_list_manager_.num_connections());
+ EXPECT_TRUE(IsConnectionIdInTimeWait(current_connection_id));
+ }
+
+ // Now keep adding. Since we're already at the max, every new connection-id
+ // will evict the oldest one.
+ for (int64 i = 0; i < FLAGS_quic_time_wait_list_max_connections; ++i) {
+ ++current_connection_id;
+ const QuicConnectionId id_to_evict =
+ current_connection_id - FLAGS_quic_time_wait_list_max_connections;
+ EXPECT_TRUE(IsConnectionIdInTimeWait(id_to_evict));
+ EXPECT_FALSE(IsConnectionIdInTimeWait(current_connection_id));
+ EXPECT_CALL(visitor_, OnConnectionRemovedFromTimeWaitList(id_to_evict));
+ EXPECT_CALL(visitor_,
+ OnConnectionAddedToTimeWaitList(current_connection_id));
+ AddConnectionId(current_connection_id);
+ EXPECT_EQ(static_cast<size_t>(FLAGS_quic_time_wait_list_max_connections),
+ time_wait_list_manager_.num_connections());
+ EXPECT_FALSE(IsConnectionIdInTimeWait(id_to_evict));
+ EXPECT_TRUE(IsConnectionIdInTimeWait(current_connection_id));
+ }
+}
+
} // namespace
} // namespace test
} // namespace tools
diff --git a/net/tools/quic/test_tools/quic_test_utils.h b/net/tools/quic/test_tools/quic_test_utils.h
index 2766209..a6ee24f 100644
--- a/net/tools/quic/test_tools/quic_test_utils.h
+++ b/net/tools/quic/test_tools/quic_test_utils.h
@@ -170,11 +170,10 @@
public:
MockAckNotifierDelegate();
- MOCK_METHOD5(OnAckNotification, void(int num_original_packets,
- int num_original_bytes,
- int num_retransmitted_packets,
- int num_retransmitted_bytes,
- QuicTime::Delta delta_largest_observed));
+ MOCK_METHOD3(OnAckNotification,
+ void(int num_retransmitted_packets,
+ int num_retransmitted_bytes,
+ QuicTime::Delta delta_largest_observed));
protected:
// Object is ref counted.
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index c2e1135..303dd17 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -209,8 +209,7 @@
ftp_enabled_(false),
#endif
http_cache_enabled_(true),
- throttling_enabled_(false),
- channel_id_enabled_(true) {
+ throttling_enabled_(false) {
}
URLRequestContextBuilder::~URLRequestContextBuilder() {}
@@ -232,6 +231,14 @@
http_network_session_params_.enable_quic = quic_enabled;
}
+void URLRequestContextBuilder::SetCookieAndChannelIdStores(
+ const scoped_refptr<CookieStore>& cookie_store,
+ scoped_ptr<ChannelIDService> channel_id_service) {
+ DCHECK(cookie_store);
+ cookie_store_ = cookie_store;
+ channel_id_service_ = channel_id_service.Pass();
+}
+
URLRequestContext* URLRequestContextBuilder::Build() {
BasicURLRequestContext* context = new BasicURLRequestContext;
URLRequestContextStorage* storage = context->storage();
@@ -290,15 +297,17 @@
extra_http_auth_handlers_[i].factory);
}
storage->set_http_auth_handler_factory(http_auth_handler_registry_factory);
- storage->set_cookie_store(new CookieMonster(NULL, NULL));
- if (channel_id_enabled_) {
+ if (cookie_store_) {
+ storage->set_cookie_store(cookie_store_.get());
+ storage->set_channel_id_service(channel_id_service_.Pass());
+ } else {
+ storage->set_cookie_store(new CookieMonster(NULL, NULL));
// TODO(mmenke): This always creates a file thread, even when it ends up
// not being used. Consider lazily creating the thread.
- storage->set_channel_id_service(
- new ChannelIDService(
- new DefaultChannelIDStore(NULL),
- context->GetFileThread()->message_loop_proxy()));
+ storage->set_channel_id_service(make_scoped_ptr(
+ new ChannelIDService(new DefaultChannelIDStore(NULL),
+ context->GetFileThread()->message_loop_proxy())));
}
storage->set_transport_security_state(new net::TransportSecurityState());
diff --git a/net/url_request/url_request_context_builder.h b/net/url_request/url_request_context_builder.h
index f26552a..209b36a 100644
--- a/net/url_request/url_request_context_builder.h
+++ b/net/url_request/url_request_context_builder.h
@@ -32,6 +32,8 @@
namespace net {
+class ChannelIDService;
+class CookieStore;
class FtpTransactionFactory;
class HostMappingRules;
class HttpAuthHandlerFactory;
@@ -174,9 +176,16 @@
throttling_enabled_ = throttling_enabled;
}
- void set_channel_id_enabled(bool enable) {
- channel_id_enabled_ = enable;
- }
+ // Override the default in-memory cookie store and channel id service.
+ // |cookie_store| must not be NULL. |channel_id_service| may be NULL to
+ // disable channel id for this context.
+ // Note that a persistent cookie store should not be used with an in-memory
+ // channel id service, and one cookie store should not be shared between
+ // multiple channel-id stores (or used both with and without a channel id
+ // store).
+ void SetCookieAndChannelIdStores(
+ const scoped_refptr<CookieStore>& cookie_store,
+ scoped_ptr<ChannelIDService> channel_id_service);
URLRequestContext* Build();
@@ -204,16 +213,17 @@
#endif
bool http_cache_enabled_;
bool throttling_enabled_;
- bool channel_id_enabled_;
HttpCacheParams http_cache_params_;
HttpNetworkSessionParams http_network_session_params_;
base::FilePath transport_security_persister_path_;
scoped_ptr<NetLog> net_log_;
scoped_ptr<HostResolver> host_resolver_;
+ scoped_ptr<ChannelIDService> channel_id_service_;
scoped_ptr<ProxyConfigService> proxy_config_service_;
scoped_ptr<ProxyService> proxy_service_;
scoped_ptr<NetworkDelegate> network_delegate_;
+ scoped_refptr<CookieStore> cookie_store_;
scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_;
std::vector<SchemeFactory> extra_http_auth_handlers_;
diff --git a/net/url_request/url_request_context_storage.cc b/net/url_request/url_request_context_storage.cc
index ea10c7e..ea6a66b 100644
--- a/net/url_request/url_request_context_storage.cc
+++ b/net/url_request/url_request_context_storage.cc
@@ -49,9 +49,9 @@
}
void URLRequestContextStorage::set_channel_id_service(
- ChannelIDService* channel_id_service) {
- context_->set_channel_id_service(channel_id_service);
- channel_id_service_.reset(channel_id_service);
+ scoped_ptr<ChannelIDService> channel_id_service) {
+ context_->set_channel_id_service(channel_id_service.get());
+ channel_id_service_ = channel_id_service.Pass();
}
void URLRequestContextStorage::set_fraudulent_certificate_reporter(
diff --git a/net/url_request/url_request_context_storage.h b/net/url_request/url_request_context_storage.h
index 5571b9a..d1e2c51 100644
--- a/net/url_request/url_request_context_storage.h
+++ b/net/url_request/url_request_context_storage.h
@@ -48,8 +48,7 @@
void set_net_log(NetLog* net_log);
void set_host_resolver(scoped_ptr<HostResolver> host_resolver);
void set_cert_verifier(CertVerifier* cert_verifier);
- void set_channel_id_service(
- ChannelIDService* channel_id_service);
+ void set_channel_id_service(scoped_ptr<ChannelIDService> channel_id_service);
void set_fraudulent_certificate_reporter(
FraudulentCertificateReporter* fraudulent_certificate_reporter);
void set_http_auth_handler_factory(
diff --git a/net/url_request/url_request_simple_job_unittest.cc b/net/url_request/url_request_simple_job_unittest.cc
index 5ee71b5..7fbdefb 100644
--- a/net/url_request/url_request_simple_job_unittest.cc
+++ b/net/url_request/url_request_simple_job_unittest.cc
@@ -20,10 +20,11 @@
const char kTestData[] = "Huge data array";
const int kRangeFirstPosition = 5;
const int kRangeLastPosition = 8;
-COMPILE_ASSERT(kRangeFirstPosition > 0 &&
- kRangeFirstPosition < kRangeLastPosition &&
- kRangeLastPosition < static_cast<int>(arraysize(kTestData) - 1),
- invalid_range);
+static_assert(kRangeFirstPosition > 0 &&
+ kRangeFirstPosition < kRangeLastPosition &&
+ kRangeLastPosition <
+ static_cast<int>(arraysize(kTestData) - 1),
+ "invalid range");
class MockSimpleJob : public URLRequestSimpleJob {
public:
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc
index 6be7da3..107da78 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -117,10 +117,9 @@
context_storage_.set_cookie_store(new CookieMonster(NULL, NULL));
// In-memory Channel ID service.
if (!channel_id_service()) {
- context_storage_.set_channel_id_service(
- new ChannelIDService(
- new DefaultChannelIDStore(NULL),
- base::WorkerPool::GetTaskRunner(true)));
+ context_storage_.set_channel_id_service(make_scoped_ptr(
+ new ChannelIDService(new DefaultChannelIDStore(NULL),
+ base::WorkerPool::GetTaskRunner(true))));
}
if (!http_user_agent_settings()) {
context_storage_.set_http_user_agent_settings(
diff --git a/net/websockets/websocket_basic_handshake_stream.cc b/net/websockets/websocket_basic_handshake_stream.cc
index bac2438..c0f20c7 100644
--- a/net/websockets/websocket_basic_handshake_stream.cc
+++ b/net/websockets/websocket_basic_handshake_stream.cc
@@ -272,8 +272,8 @@
static const char kNoContextTakeover[] = "no_context_takeover";
static const char kMaxWindowBits[] = "max_window_bits";
const size_t kPrefixLen = arraysize(kClientPrefix) - 1;
- COMPILE_ASSERT(kPrefixLen == arraysize(kServerPrefix) - 1,
- the_strings_server_and_client_must_be_the_same_length);
+ static_assert(kPrefixLen == arraysize(kServerPrefix) - 1,
+ "the strings server and client must be the same length");
typedef std::vector<WebSocketExtension::Parameter> ParameterVector;
DCHECK_EQ("permessage-deflate", extension.name());
diff --git a/net/websockets/websocket_channel.cc b/net/websockets/websocket_channel.cc
index 30abb2db..8e48c1e 100644
--- a/net/websockets/websocket_channel.cc
+++ b/net/websockets/websocket_channel.cc
@@ -1066,8 +1066,8 @@
body = new IOBuffer(payload_length);
size = payload_length;
base::WriteBigEndian(body->data(), code);
- COMPILE_ASSERT(sizeof(code) == kWebSocketCloseCodeLength,
- they_should_both_be_two);
+ static_assert(sizeof(code) == kWebSocketCloseCodeLength,
+ "they should both be two");
std::copy(
reason.begin(), reason.end(), body->data() + kWebSocketCloseCodeLength);
}
@@ -1102,8 +1102,8 @@
const char* data = buffer->data();
uint16 unchecked_code = 0;
base::ReadBigEndian(data, &unchecked_code);
- COMPILE_ASSERT(sizeof(unchecked_code) == kWebSocketCloseCodeLength,
- they_should_both_be_two_bytes);
+ static_assert(sizeof(unchecked_code) == kWebSocketCloseCodeLength,
+ "they should both be two bytes");
switch (unchecked_code) {
case kWebSocketErrorNoStatusReceived:
diff --git a/net/websockets/websocket_frame.cc b/net/websockets/websocket_frame.cc
index 6fe972b..a90cc0a 100644
--- a/net/websockets/websocket_frame.cc
+++ b/net/websockets/websocket_frame.cc
@@ -178,9 +178,9 @@
typedef size_t PackedMaskType;
PackedMaskType packed_mask_key = 0;
static const size_t kPackedMaskKeySize = sizeof(packed_mask_key);
- COMPILE_ASSERT((kPackedMaskKeySize >= kMaskingKeyLength &&
- kPackedMaskKeySize % kMaskingKeyLength == 0),
- word_size_is_not_multiple_of_mask_length);
+ static_assert((kPackedMaskKeySize >= kMaskingKeyLength &&
+ kPackedMaskKeySize % kMaskingKeyLength == 0),
+ "word size is not a multiple of mask length");
char* const end = data + data_size;
// If the buffer is too small for the vectorised version to be useful, revert
// to the byte-at-a-time implementation early.
diff --git a/net/websockets/websocket_frame_perftest.cc b/net/websockets/websocket_frame_perftest.cc
index 11fe5af..98ea624 100644
--- a/net/websockets/websocket_frame_perftest.cc
+++ b/net/websockets/websocket_frame_perftest.cc
@@ -19,9 +19,9 @@
const int kLongPayloadSize = 1 << 16;
const char kMaskingKey[] = "\xFE\xED\xBE\xEF";
-COMPILE_ASSERT(arraysize(kMaskingKey) ==
- WebSocketFrameHeader::kMaskingKeyLength + 1,
- incorrect_masking_key_size);
+static_assert(arraysize(kMaskingKey) ==
+ WebSocketFrameHeader::kMaskingKeyLength + 1,
+ "incorrect masking key size");
class WebSocketFrameTestMaskBenchmark : public ::testing::Test {
protected:
diff --git a/net/websockets/websocket_frame_test.cc b/net/websockets/websocket_frame_test.cc
index 104bab5..eca94f0 100644
--- a/net/websockets/websocket_frame_test.cc
+++ b/net/websockets/websocket_frame_test.cc
@@ -51,9 +51,9 @@
TEST(WebSocketFrameHeaderTest, FrameLengthsWithMasking) {
static const char kMaskingKey[] = "\xDE\xAD\xBE\xEF";
- COMPILE_ASSERT(arraysize(kMaskingKey) - 1 ==
- WebSocketFrameHeader::kMaskingKeyLength,
- incorrect_masking_key_size);
+ static_assert(
+ arraysize(kMaskingKey) - 1 == WebSocketFrameHeader::kMaskingKeyLength,
+ "incorrect masking key size");
struct TestCase {
const char* frame_header;
@@ -294,8 +294,8 @@
"\x08\x12\x11\xcb\x73\x71\xf3\xc9\xcb\xf7\x34\x61\x1a\xb2\x46\x08"
"\xbf\x41\x62\xba\x96\x6f\xe0\xe9\x4d\xcc\xea\x90\xd5\x2b\xbc\x16"
};
- COMPILE_ASSERT(arraysize(kTestInput) == arraysize(kTestOutput),
- output_and_input_arrays_have_the_same_length);
+ static_assert(arraysize(kTestInput) == arraysize(kTestOutput),
+ "output and input arrays should have the same length");
scoped_ptr<char, base::AlignedFreeDeleter> scratch(
static_cast<char*>(
base::AlignedAlloc(kScratchBufferSize, kMaxVectorAlignment)));
diff --git a/net/websockets/websocket_handshake_stream_create_helper_test.cc b/net/websockets/websocket_handshake_stream_create_helper_test.cc
index 5dff5cf..512de24 100644
--- a/net/websockets/websocket_handshake_stream_create_helper_test.cc
+++ b/net/websockets/websocket_handshake_stream_create_helper_test.cc
@@ -105,7 +105,7 @@
HttpRequestInfo request_info;
request_info.url = GURL(socket_url);
request_info.method = "GET";
- request_info.load_flags = LOAD_DISABLE_CACHE | LOAD_DO_NOT_PROMPT_FOR_LOGIN;
+ request_info.load_flags = LOAD_DISABLE_CACHE;
int rv = handshake->InitializeStream(
&request_info, DEFAULT_PRIORITY, BoundNetLog(), CompletionCallback());
EXPECT_EQ(OK, rv);
diff --git a/net/websockets/websocket_stream.cc b/net/websockets/websocket_stream.cc
index c0d0c4c..002d511 100644
--- a/net/websockets/websocket_stream.cc
+++ b/net/websockets/websocket_stream.cc
@@ -111,9 +111,7 @@
url_request_->SetUserData(
WebSocketHandshakeStreamBase::CreateHelper::DataKey(),
create_helper_);
- url_request_->SetLoadFlags(LOAD_DISABLE_CACHE |
- LOAD_BYPASS_CACHE |
- LOAD_DO_NOT_PROMPT_FOR_LOGIN);
+ url_request_->SetLoadFlags(LOAD_DISABLE_CACHE | LOAD_BYPASS_CACHE);
}
// Destroying this object destroys the URLRequest, which cancels the request
diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn
index af3a950..b5cfcdb 100644
--- a/sandbox/linux/BUILD.gn
+++ b/sandbox/linux/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/features.gni")
+import("//testing/test.gni")
declare_args() {
compile_suid_client = is_linux
@@ -193,6 +194,7 @@
deps = [
"//base",
+ ":sandbox_services",
":seccomp_bpf",
]
}
diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
index 06e1a64..274ae28 100644
--- a/sandbox/linux/services/credentials.cc
+++ b/sandbox/linux/services/credentials.cc
@@ -15,12 +15,13 @@
#include "base/basictypes.h"
#include "base/bind.h"
+#include "base/files/file_path.h"
+#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/posix/eintr_wrapper.h"
-#include "base/strings/string_number_conversions.h"
+#include "base/process/process.h"
#include "base/template_util.h"
#include "base/third_party/valgrind/valgrind.h"
-#include "base/threading/thread.h"
#include "sandbox/linux/services/syscall_wrappers.h"
namespace {
@@ -96,51 +97,36 @@
return true;
}
-// chroot() and chdir() to /proc/<tid>/fdinfo.
-void ChrootToThreadFdInfo(base::PlatformThreadId tid, bool* result) {
- DCHECK(result);
- *result = false;
-
- static_assert((base::is_same<base::PlatformThreadId, int>::value),
- "platform thread id should be an int");
- const std::string current_thread_fdinfo = "/proc/" +
- base::IntToString(tid) + "/fdinfo/";
-
- // Make extra sure that /proc/<tid>/fdinfo is unique to the thread.
- CHECK(0 == unshare(CLONE_FILES));
- int chroot_ret = chroot(current_thread_fdinfo.c_str());
- if (chroot_ret) {
- PLOG(ERROR) << "Could not chroot";
- return;
- }
-
- // CWD is essentially an implicit file descriptor, so be careful to not leave
- // it behind.
- PCHECK(0 == chdir("/"));
-
- *result = true;
- return;
-}
-
// chroot() to an empty dir that is "safe". To be safe, it must not contain
// any subdirectory (chroot-ing there would allow a chroot escape) and it must
// be impossible to create an empty directory there.
// We achieve this by doing the following:
-// 1. We create a new thread, which will create a new /proc/<tid>/ directory
-// 2. We chroot to /proc/<tid>/fdinfo/
+// 1. We create a new process sharing file system information.
+// 2. In the child, we chroot to /proc/self/fdinfo/
// This is already "safe", since fdinfo/ does not contain another directory and
// one cannot create another directory there.
-// 3. The thread dies
+// 3. The process dies
// After (3) happens, the directory is not available anymore in /proc.
bool ChrootToSafeEmptyDir() {
- base::Thread chrooter("sandbox_chrooter");
- if (!chrooter.Start()) return false;
- bool is_chrooted = false;
- chrooter.message_loop()->PostTask(FROM_HERE,
- base::Bind(&ChrootToThreadFdInfo, chrooter.thread_id(), &is_chrooted));
- // Make sure our task has run before committing the return value.
- chrooter.Stop();
- return is_chrooted;
+ // We do not use a thread because when we are in a PID namespace, we cannot
+ // easily get a handle to the /proc/tid directory for the thread (since /proc
+ // may not be aware of the PID namespace). With a process, we can just use
+ // /proc/self.
+ pid_t pid = base::ForkWithFlags(SIGCHLD | CLONE_FS, nullptr, nullptr);
+ PCHECK(pid != -1);
+ if (pid == 0) {
+ RAW_CHECK(chroot("/proc/self/fdinfo/") == 0);
+
+ // CWD is essentially an implicit file descriptor, so be careful to not
+ // leave it behind.
+ RAW_CHECK(chdir("/") == 0);
+ _exit(0);
+ }
+
+ int status = -1;
+ PCHECK(HANDLE_EINTR(waitpid(pid, &status, 0)) == pid);
+
+ return status == 0;
}
// CHECK() that an attempt to move to a new user namespace raised an expected
@@ -243,7 +229,10 @@
}
bool Credentials::DropFileSystemAccess() {
- return ChrootToSafeEmptyDir();
+ CHECK(ChrootToSafeEmptyDir());
+ CHECK(!base::DirectoryExists(base::FilePath("/proc")));
+ // We never let this function fail.
+ return true;
}
} // namespace sandbox.
diff --git a/sandbox/linux/services/credentials_unittest.cc b/sandbox/linux/services/credentials_unittest.cc
index 92f199a..4fc9023 100644
--- a/sandbox/linux/services/credentials_unittest.cc
+++ b/sandbox/linux/services/credentials_unittest.cc
@@ -11,6 +11,7 @@
#include <sys/types.h>
#include <unistd.h>
+#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_file.h"
#include "base/logging.h"
@@ -22,13 +23,6 @@
namespace {
-bool DirectoryExists(const char* path) {
- struct stat dir;
- errno = 0;
- int ret = stat(path, &dir);
- return -1 != ret || ENOENT != errno;
-}
-
bool WorkingDirectoryIsRoot() {
char current_dir[PATH_MAX];
char* cwd = getcwd(current_dir, sizeof(current_dir));
@@ -141,7 +135,7 @@
// Probably missing kernel support.
if (!Credentials::MoveToNewUserNS()) return;
CHECK(Credentials::DropFileSystemAccess());
- CHECK(!DirectoryExists("/proc"));
+ CHECK(!base::DirectoryExists(base::FilePath("/proc")));
CHECK(WorkingDirectoryIsRoot());
// We want the chroot to never have a subdirectory. A subdirectory
// could allow a chroot escape.
diff --git a/sandbox/linux/services/syscall_wrappers.cc b/sandbox/linux/services/syscall_wrappers.cc
index 1840c96..efadbaf 100644
--- a/sandbox/linux/services/syscall_wrappers.cc
+++ b/sandbox/linux/services/syscall_wrappers.cc
@@ -29,9 +29,11 @@
return syscall(__NR_gettid);
}
-namespace {
-
-bool CloneArgumentsValid(unsigned long flags, pid_t* ptid, pid_t* ctid) {
+long sys_clone(unsigned long flags,
+ decltype(nullptr) child_stack,
+ pid_t* ptid,
+ pid_t* ctid,
+ decltype(nullptr) tls) {
const bool clone_tls_used = flags & CLONE_SETTLS;
const bool invalid_ctid =
(flags & (CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID)) && !ctid;
@@ -39,65 +41,7 @@
// We do not support CLONE_VM.
const bool clone_vm_used = flags & CLONE_VM;
-
- return !(clone_tls_used || invalid_ctid || invalid_ptid || clone_vm_used);
-}
-
-bool IsRunningOnValgrind() {
- return RUNNING_ON_VALGRIND;
-}
-
-// This function runs on the stack specified on the clone call. It uses longjmp
-// to switch back to the original stack so the child can return from sys_clone.
-int CloneHelper(void* arg) {
- jmp_buf* env_ptr = reinterpret_cast<jmp_buf*>(arg);
- longjmp(*env_ptr, 1);
-
- // Should not be reached.
- RAW_CHECK(false);
- return 1;
-}
-
-// This function is noinline to ensure that stack_buf is below the stack pointer
-// that is saved when setjmp is called below. This is needed because when
-// compiled with FORTIFY_SOURCE, glibc's longjmp checks that the stack is moved
-// upwards. See crbug.com/442912 for more details.
-#if defined(ADDRESS_SANITIZER)
-// Disable AddressSanitizer instrumentation for this function to make sure
-// |stack_buf| is allocated on thread stack instead of ASan's fake stack.
-// Under ASan longjmp() will attempt to clean up the area between the old and
-// new stack pointers and print a warning that may confuse the user.
-__attribute__((no_sanitize_address))
-#endif
-NOINLINE pid_t CloneAndLongjmpInChild(unsigned long flags,
- pid_t* ptid,
- pid_t* ctid,
- jmp_buf* env) {
- // We use the libc clone wrapper instead of making the syscall
- // directly because making the syscall may fail to update the libc's
- // internal pid cache. The libc interface unfortunately requires
- // specifying a new stack, so we use setjmp/longjmp to emulate
- // fork-like behavior.
- char stack_buf[PTHREAD_STACK_MIN];
-#if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
- defined(ARCH_CPU_MIPS64_FAMILY) || defined(ARCH_CPU_MIPS_FAMILY)
- // The stack grows downward.
- void* stack = stack_buf + sizeof(stack_buf);
-#else
-#error "Unsupported architecture"
-#endif
- return clone(&CloneHelper, stack, flags, env, ptid, nullptr, ctid);
-}
-
-} // namespace
-
-long sys_clone(unsigned long flags,
- decltype(nullptr) child_stack,
- pid_t* ptid,
- pid_t* ctid,
- decltype(nullptr) tls) {
-
- if (!CloneArgumentsValid(flags, ptid, ctid)) {
+ if (clone_tls_used || invalid_ctid || invalid_ptid || clone_vm_used) {
RAW_LOG(FATAL, "Invalid usage of sys_clone");
}
@@ -116,27 +60,6 @@
return sys_clone(flags, nullptr, nullptr, nullptr, nullptr);
}
-pid_t ForkWithFlags(unsigned long flags, pid_t* ptid, pid_t* ctid) {
- if (!CloneArgumentsValid(flags, ptid, ctid)) {
- RAW_LOG(FATAL, "Invalid usage of ForkWithFlags");
- }
-
- // Valgrind's clone implementation does not support specifiying a child_stack
- // without CLONE_VM, so we cannot use libc's clone wrapper when running under
- // Valgrind. As a result, the libc pid cache may be incorrect under Valgrind.
- // See crbug.com/442817 for more details.
- if (IsRunningOnValgrind()) {
- return sys_clone(flags, nullptr, ptid, ctid, nullptr);
- }
-
- jmp_buf env;
- if (setjmp(env) == 0) {
- return CloneAndLongjmpInChild(flags, ptid, ctid, &env);
- }
-
- return 0;
-}
-
void sys_exit_group(int status) {
syscall(__NR_exit_group, status);
}
diff --git a/sandbox/linux/services/syscall_wrappers.h b/sandbox/linux/services/syscall_wrappers.h
index 2001f38..7f703e0 100644
--- a/sandbox/linux/services/syscall_wrappers.h
+++ b/sandbox/linux/services/syscall_wrappers.h
@@ -33,18 +33,6 @@
pid_t* ctid,
decltype(nullptr) regs);
-// A wrapper for clone with fork-like behavior, meaning that it returns the
-// child's pid in the parent and 0 in the child. |flags|, |ptid|, and |ctid| are
-// as in the clone system call (the CLONE_VM flag is not supported).
-//
-// This function uses the libc clone wrapper (which updates libc's pid cache)
-// internally, so callers may expect things like getpid() to work correctly
-// after in both the child and parent. An exception is when this code is run
-// under Valgrind. Valgrind does not support the libc clone wrapper, so the libc
-// pid cache may be incorrect after this function is called under Valgrind.
-SANDBOX_EXPORT pid_t
-ForkWithFlags(unsigned long flags, pid_t* ptid, pid_t* ctid);
-
SANDBOX_EXPORT void sys_exit_group(int status);
// The official system call takes |args| as void* (in order to be extensible),
diff --git a/sandbox/linux/services/syscall_wrappers_unittest.cc b/sandbox/linux/services/syscall_wrappers_unittest.cc
index bac3881..a8b48fe 100644
--- a/sandbox/linux/services/syscall_wrappers_unittest.cc
+++ b/sandbox/linux/services/syscall_wrappers_unittest.cc
@@ -60,35 +60,6 @@
EXPECT_EQ(kSuccessExit, WEXITSTATUS(status));
}
-TEST(SyscallWrappers, ForkWithFlagsUpdatesPidCache) {
- // The libc clone function, which allows ForkWithFlags to keep the pid cache
- // up to date, does not work on Valgrind.
- if (IsRunningOnValgrind()) {
- return;
- }
-
- // Warm up the libc pid cache, if there is one.
- ASSERT_EQ(sys_getpid(), getpid());
-
- pid_t ctid = 0;
- pid_t pid = ForkWithFlags(CLONE_CHILD_SETTID | SIGCHLD, nullptr, &ctid);
-
- const int kSuccessExit = 0;
- if (0 == pid) {
- // In child. Check both the raw getpid syscall and the libc getpid wrapper
- // (which may rely on a pid cache).
- if (sys_getpid() == ctid && getpid() == ctid)
- _exit(kSuccessExit);
- _exit(1);
- }
-
- ASSERT_NE(-1, pid);
- int status = 0;
- ASSERT_EQ(pid, HANDLE_EINTR(waitpid(pid, &status, 0)));
- ASSERT_TRUE(WIFEXITED(status));
- EXPECT_EQ(kSuccessExit, WEXITSTATUS(status));
-}
-
} // namespace
} // namespace sandbox
diff --git a/services/js/BUILD.gn b/services/js/BUILD.gn
index 2c3827a..785fb0d 100644
--- a/services/js/BUILD.gn
+++ b/services/js/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//mojo/public/mojo_application.gni")
+import("//testing/test.gni")
group("js") {
deps = [
diff --git a/services/view_manager/BUILD.gn b/services/view_manager/BUILD.gn
index 13fc4e5..4b062b7 100644
--- a/services/view_manager/BUILD.gn
+++ b/services/view_manager/BUILD.gn
@@ -4,6 +4,7 @@
import("//build/config/ui.gni")
import("//mojo/public/mojo_application.gni")
+import("//testing/test.gni")
mojo_native_application("view_manager") {
sources = [
diff --git a/services/window_manager/BUILD.gn b/services/window_manager/BUILD.gn
index 97c1d6e..e84f071 100644
--- a/services/window_manager/BUILD.gn
+++ b/services/window_manager/BUILD.gn
@@ -4,6 +4,7 @@
import("//build/config/ui.gni")
import("//mojo/public/mojo_application.gni")
+import("//testing/test.gni")
mojo_native_application("window_manager") {
sources = [
diff --git a/shell/BUILD.gn b/shell/BUILD.gn
index 63fcde4..2ce1174 100644
--- a/shell/BUILD.gn
+++ b/shell/BUILD.gn
@@ -5,6 +5,7 @@
import("//build/config/ui.gni")
import("//mojo/public/mojo.gni")
import("//mojo/public/tools/bindings/mojom.gni")
+import("//testing/test.gni")
# We don't support building in the component build since mojo apps are
# inherently components.
@@ -25,7 +26,6 @@
if (is_android) {
deps += [
":mojo_shell_apk",
- ":mojo_shell_tests_apk",
]
}
}
@@ -328,13 +328,13 @@
native_libs = [ "libmojo_shell.so" ]
- asset_location = mojo_shell_assets_dir
deps = [
":copy_mojo_shell",
":copy_mojo_shell_assets",
":java",
":resources",
+ "//base:base_java",
"//services/native_viewport:native_viewport_java",
]
}
@@ -348,18 +348,6 @@
"//base:base_java",
]
}
-
- unittest_apk("mojo_shell_tests_apk") {
- unittests_dep = ":mojo_shell_tests"
-
- asset_location = mojo_shell_test_assets_dir
-
- deps = [
- unittests_dep,
- ":copy_mojo_shell_test_assets",
- ":mojo_shell_tests_java",
- ]
- }
}
mojom("app_child_process_bindings") {
@@ -443,8 +431,12 @@
deps += [
":jni_headers",
+ ":copy_mojo_shell_test_assets",
+ ":mojo_shell_tests_java",
"//testing/android:native_test_native_code",
]
+
+# TODO(qsr): asset_location = mojo_shell_assets_dir ?
}
}
diff --git a/shell/application_manager/BUILD.gn b/shell/application_manager/BUILD.gn
index c6828d7..76e6838 100644
--- a/shell/application_manager/BUILD.gn
+++ b/shell/application_manager/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//mojo/public/tools/bindings/mojom.gni")
+import("//testing/test.gni")
component("application_manager") {
output_name = "mojo_application_manager"
diff --git a/shell/child_process_host.cc b/shell/child_process_host.cc
index 9a68ec4..dd749a7 100644
--- a/shell/child_process_host.cc
+++ b/shell/child_process_host.cc
@@ -24,25 +24,21 @@
ChildProcessHost::ChildProcessHost(Context* context,
Delegate* delegate,
ChildProcess::Type type)
- : context_(context),
- delegate_(delegate),
- type_(type),
- child_process_handle_(base::kNullProcessHandle) {
+ : context_(context), delegate_(delegate), type_(type) {
DCHECK(delegate);
platform_channel_ = platform_channel_pair_.PassServerHandle();
CHECK(platform_channel_.is_valid());
}
ChildProcessHost::~ChildProcessHost() {
- if (child_process_handle_ != base::kNullProcessHandle) {
+ if (child_process_.IsValid()) {
LOG(WARNING) << "Destroying ChildProcessHost with unjoined child";
- base::CloseProcessHandle(child_process_handle_);
- child_process_handle_ = base::kNullProcessHandle;
+ child_process_.Close();
}
}
void ChildProcessHost::Start() {
- DCHECK_EQ(child_process_handle_, base::kNullProcessHandle);
+ DCHECK(!child_process_.IsValid());
delegate_->WillStart();
@@ -53,12 +49,11 @@
}
int ChildProcessHost::Join() {
- DCHECK_NE(child_process_handle_, base::kNullProcessHandle);
+ DCHECK(child_process_.IsValid());
int rv = -1;
- // Note: |WaitForExitCode()| closes the process handle.
- LOG_IF(ERROR, !base::WaitForExitCode(child_process_handle_, &rv))
+ LOG_IF(ERROR, child_process_.WaitForExit(&rv))
<< "Failed to wait for child process";
- child_process_handle_ = base::kNullProcessHandle;
+ child_process_.Close();
return rv;
}
@@ -86,8 +81,8 @@
#elif defined(OS_POSIX)
options.fds_to_remap = &handle_passing_info;
#endif
-
- if (!base::LaunchProcess(child_command_line, options, &child_process_handle_))
+ child_process_ = base::LaunchProcess(child_command_line, options);
+ if (!child_process_.IsValid())
return false;
platform_channel_pair_.ChildProcessLaunched();
diff --git a/shell/child_process_host.h b/shell/child_process_host.h
index 8ed37e6..9531350 100644
--- a/shell/child_process_host.h
+++ b/shell/child_process_host.h
@@ -6,7 +6,7 @@
#define SHELL_CHILD_PROCESS_HOST_H_
#include "base/macros.h"
-#include "base/process/process_handle.h"
+#include "base/process/process.h"
#include "mojo/edk/embedder/platform_channel_pair.h"
#include "mojo/edk/embedder/scoped_platform_handle.h"
#include "shell/child_process.h" // For |ChildProcess::Type|.
@@ -65,7 +65,7 @@
Delegate* const delegate_;
const ChildProcess::Type type_;
- base::ProcessHandle child_process_handle_;
+ base::Process child_process_;
embedder::PlatformChannelPair platform_channel_pair_;
diff --git a/skia/BUILD.gn b/skia/BUILD.gn
index 7d4fb3e..4ddce5e 100644
--- a/skia/BUILD.gn
+++ b/skia/BUILD.gn
@@ -4,12 +4,10 @@
import("//build/config/features.gni")
import("//build/config/ui.gni")
+import("//testing/test.gni")
if (cpu_arch == "arm") {
import("//build/config/arm.gni")
}
-if (is_android) {
- import("//build/config/android/rules.gni")
-}
skia_support_gpu = !is_ios
skia_support_pdf = !is_ios && (enable_basic_printing || enable_print_preview)
@@ -479,6 +477,11 @@
"ext/bitmap_platform_device_mac.cc",
"ext/bitmap_platform_device_mac.h",
]
+ } else if (use_cairo) {
+ sources += [
+ "ext/bitmap_platform_device_cairo.cc",
+ "ext/bitmap_platform_device_cairo.h",
+ ]
} else {
sources += [
"ext/bitmap_platform_device_skia.cc",
@@ -519,6 +522,7 @@
configs += [
"//build/config/linux:fontconfig",
"//build/config/linux:freetype2",
+ "//build/config/linux:pangocairo",
]
deps += [ "//third_party/icu:icuuc" ]
}
@@ -727,13 +731,3 @@
"//ui/gfx/geometry",
]
}
-
-if (is_android) {
- # GYP: //skia/skia_tests.gyp:skia_unittests_apk
- unittest_apk("skia_unittests_apk") {
- unittests_dep = ":skia_unittests"
- deps = [
- ":skia_unittests",
- ]
- }
-}
diff --git a/skia/ext/bitmap_platform_device_cairo.cc b/skia/ext/bitmap_platform_device_cairo.cc
new file mode 100644
index 0000000..a331bed
--- /dev/null
+++ b/skia/ext/bitmap_platform_device_cairo.cc
@@ -0,0 +1,225 @@
+// 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 "skia/ext/bitmap_platform_device_cairo.h"
+#include "skia/ext/platform_canvas.h"
+
+#if defined(OS_OPENBSD)
+#include <cairo.h>
+#else
+#include <cairo/cairo.h>
+#endif
+
+namespace skia {
+
+namespace {
+
+void CairoSurfaceReleaseProc(void*, void* context) {
+ SkASSERT(context);
+ cairo_surface_destroy(static_cast<cairo_surface_t*>(context));
+}
+
+// Back the destination bitmap by a Cairo surface. The bitmap's
+// pixelRef takes ownership of the passed-in surface and will call
+// cairo_surface_destroy() upon destruction.
+//
+// Note: it may immediately destroy the surface, if it fails to create a bitmap
+// with pixels, thus the caller must either ref() the surface before hand, or
+// it must not refer to the surface after this call.
+bool InstallCairoSurfacePixels(SkBitmap* dst,
+ cairo_surface_t* surface,
+ bool is_opaque) {
+ SkASSERT(dst);
+ if (!surface) {
+ return false;
+ }
+ SkImageInfo info
+ = SkImageInfo::MakeN32Premul(cairo_image_surface_get_width(surface),
+ cairo_image_surface_get_height(surface));
+ return dst->installPixels(info,
+ cairo_image_surface_get_data(surface),
+ cairo_image_surface_get_stride(surface),
+ NULL,
+ &CairoSurfaceReleaseProc,
+ static_cast<void*>(surface));
+}
+
+void LoadMatrixToContext(cairo_t* context, const SkMatrix& matrix) {
+ cairo_matrix_t cairo_matrix;
+ cairo_matrix_init(&cairo_matrix,
+ SkScalarToFloat(matrix.getScaleX()),
+ SkScalarToFloat(matrix.getSkewY()),
+ SkScalarToFloat(matrix.getSkewX()),
+ SkScalarToFloat(matrix.getScaleY()),
+ SkScalarToFloat(matrix.getTranslateX()),
+ SkScalarToFloat(matrix.getTranslateY()));
+ cairo_set_matrix(context, &cairo_matrix);
+}
+
+void LoadClipToContext(cairo_t* context, const SkRegion& clip) {
+ cairo_reset_clip(context);
+
+ // TODO(brettw) support non-rect clips.
+ SkIRect bounding = clip.getBounds();
+ cairo_rectangle(context, bounding.fLeft, bounding.fTop,
+ bounding.fRight - bounding.fLeft,
+ bounding.fBottom - bounding.fTop);
+ cairo_clip(context);
+}
+
+} // namespace
+
+void BitmapPlatformDevice::SetMatrixClip(
+ const SkMatrix& transform,
+ const SkRegion& region) {
+ transform_ = transform;
+ clip_region_ = region;
+ config_dirty_ = true;
+}
+
+void BitmapPlatformDevice::LoadConfig() {
+ if (!config_dirty_ || !cairo_)
+ return; // Nothing to do.
+ config_dirty_ = false;
+
+ // Load the identity matrix since this is what our clip is relative to.
+ cairo_matrix_t cairo_matrix;
+ cairo_matrix_init_identity(&cairo_matrix);
+ cairo_set_matrix(cairo_, &cairo_matrix);
+
+ LoadClipToContext(cairo_, clip_region_);
+ LoadMatrixToContext(cairo_, transform_);
+}
+
+// We use this static factory function instead of the regular constructor so
+// that we can create the pixel data before calling the constructor. This is
+// required so that we can call the base class' constructor with the pixel
+// data.
+BitmapPlatformDevice* BitmapPlatformDevice::Create(int width, int height,
+ bool is_opaque,
+ cairo_surface_t* surface) {
+ if (cairo_surface_status(surface) != CAIRO_STATUS_SUCCESS) {
+ cairo_surface_destroy(surface);
+ return NULL;
+ }
+
+ // must call this before trying to install the surface, since that may result
+ // in the surface being destroyed.
+ cairo_t* cairo = cairo_create(surface);
+
+ SkBitmap bitmap;
+ if (!InstallCairoSurfacePixels(&bitmap, surface, is_opaque)) {
+ cairo_destroy(cairo);
+ return NULL;
+ }
+
+ // The device object will take ownership of the graphics context.
+ return new BitmapPlatformDevice(bitmap, cairo);
+}
+
+BitmapPlatformDevice* BitmapPlatformDevice::Create(int width, int height,
+ bool is_opaque) {
+ // This initializes the bitmap to all zeros.
+ cairo_surface_t* surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
+ width, height);
+
+ BitmapPlatformDevice* device = Create(width, height, is_opaque, surface);
+
+#ifndef NDEBUG
+ if (device && is_opaque) // Fill with bright bluish green
+ SkCanvas(device).drawColor(0xFF00FF80);
+#endif
+
+ return device;
+}
+
+BitmapPlatformDevice* BitmapPlatformDevice::CreateAndClear(int width,
+ int height,
+ bool is_opaque) {
+ // The Linux port always constructs initialized bitmaps, so there is no extra
+ // work to perform here.
+ return Create(width, height, is_opaque);
+}
+
+BitmapPlatformDevice* BitmapPlatformDevice::Create(int width, int height,
+ bool is_opaque,
+ uint8_t* data) {
+ cairo_surface_t* surface = cairo_image_surface_create_for_data(
+ data, CAIRO_FORMAT_ARGB32, width, height,
+ cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, width));
+
+ return Create(width, height, is_opaque, surface);
+}
+
+// Ownership of the cairo object is transferred.
+BitmapPlatformDevice::BitmapPlatformDevice(
+ const SkBitmap& bitmap,
+ cairo_t* cairo)
+ : SkBitmapDevice(bitmap),
+ cairo_(cairo),
+ config_dirty_(true),
+ transform_(SkMatrix::I()) { // Want to load the config next time.
+ SetPlatformDevice(this, this);
+}
+
+BitmapPlatformDevice::~BitmapPlatformDevice() {
+ cairo_destroy(cairo_);
+}
+
+SkBaseDevice* BitmapPlatformDevice::onCreateCompatibleDevice(
+ const CreateInfo& info) {
+ SkASSERT(info.fInfo.colorType() == kN32_SkColorType);
+ return BitmapPlatformDevice::Create(info.fInfo.width(), info.fInfo.height(),
+ info.fInfo.isOpaque());
+}
+
+cairo_t* BitmapPlatformDevice::BeginPlatformPaint() {
+ LoadConfig();
+ cairo_surface_t* surface = cairo_get_target(cairo_);
+ // Tell cairo to flush anything it has pending.
+ cairo_surface_flush(surface);
+ // Tell Cairo that we (probably) modified (actually, will modify) its pixel
+ // buffer directly.
+ cairo_surface_mark_dirty(surface);
+ return cairo_;
+}
+
+void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform,
+ const SkRegion& region,
+ const SkClipStack&) {
+ SetMatrixClip(transform, region);
+}
+
+// PlatformCanvas impl
+
+SkCanvas* CreatePlatformCanvas(int width, int height, bool is_opaque,
+ uint8_t* data, OnFailureType failureType) {
+ skia::RefPtr<SkBaseDevice> dev = skia::AdoptRef(
+ BitmapPlatformDevice::Create(width, height, is_opaque, data));
+ return CreateCanvas(dev, failureType);
+}
+
+// Port of PlatformBitmap to linux
+PlatformBitmap::~PlatformBitmap() {
+ cairo_destroy(surface_);
+}
+
+bool PlatformBitmap::Allocate(int width, int height, bool is_opaque) {
+ // The SkBitmap allocates and owns the bitmap memory; PlatformBitmap owns the
+ // cairo drawing context tied to the bitmap. The SkBitmap's pixelRef can
+ // outlive the PlatformBitmap if additional copies are made.
+ int stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, width);
+
+ cairo_surface_t* surf = cairo_image_surface_create(
+ CAIRO_FORMAT_ARGB32,
+ width,
+ height);
+ if (cairo_surface_status(surf) != CAIRO_STATUS_SUCCESS) {
+ cairo_surface_destroy(surf);
+ return false;
+ }
+ return InstallCairoSurfacePixels(&bitmap_, surf, is_opaque);
+}
+
+} // namespace skia
diff --git a/skia/ext/bitmap_platform_device_cairo.h b/skia/ext/bitmap_platform_device_cairo.h
new file mode 100644
index 0000000..977cdad
--- /dev/null
+++ b/skia/ext/bitmap_platform_device_cairo.h
@@ -0,0 +1,130 @@
+// 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.
+
+#ifndef SKIA_EXT_BITMAP_PLATFORM_DEVICE_CAIRO_H_
+#define SKIA_EXT_BITMAP_PLATFORM_DEVICE_CAIRO_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
+#include "skia/ext/platform_device.h"
+
+typedef struct _cairo_surface cairo_surface_t;
+
+// -----------------------------------------------------------------------------
+// Image byte ordering on Linux:
+//
+// Pixels are packed into 32-bit words these days. Even for 24-bit images,
+// often 8-bits will be left unused for alignment reasons. Thus, when you see
+// ARGB as the byte order you have to wonder if that's in memory order or
+// little-endian order. Here I'll write A.R.G.B to specifiy the memory order.
+//
+// GdkPixbuf's provide a nice backing store and defaults to R.G.B.A order.
+// They'll do the needed byte swapping to match the X server when drawn.
+//
+// Skia can be controled in skia/include/corecg/SkUserConfig.h (see bits about
+// SK_R32_SHIFT). For Linux we define it to be ARGB in registers. For little
+// endian machines that means B.G.R.A in memory.
+//
+// The image loaders are controlled in
+// webkit/port/platform/image-decoders/ImageDecoder.h (see setRGBA). These are
+// also configured for ARGB in registers.
+//
+// Cairo's only 32-bit mode is ARGB in registers.
+//
+// X servers commonly have a 32-bit visual with xRGB in registers (since they
+// typically don't do alpha blending of drawables at the user level. Composite
+// extensions aside.)
+//
+// We don't use GdkPixbuf because its byte order differs from the rest. Most
+// importantly, it differs from Cairo which, being a system library, is
+// something that we can't easily change.
+// -----------------------------------------------------------------------------
+
+namespace skia {
+
+// -----------------------------------------------------------------------------
+// This is the Linux bitmap backing for Skia. We create a Cairo image surface
+// to store the backing buffer. This buffer is BGRA in memory (on little-endian
+// machines).
+//
+// For now we are also using Cairo to paint to the Drawables so we provide an
+// accessor for getting the surface.
+//
+// This is all quite ok for test_shell. In the future we will want to use
+// shared memory between the renderer and the main process at least. In this
+// case we'll probably create the buffer from a precreated region of memory.
+// -----------------------------------------------------------------------------
+class BitmapPlatformDevice : public SkBitmapDevice, public PlatformDevice {
+ public:
+ // Create a BitmapPlatformDeviceLinux from an already constructed bitmap;
+ // you should probably be using Create(). This may become private later if
+ // we ever have to share state between some native drawing UI and Skia, like
+ // the Windows and Mac versions of this class do.
+ //
+ // This object takes ownership of @cairo.
+ BitmapPlatformDevice(const SkBitmap& other, cairo_t* cairo);
+ ~BitmapPlatformDevice() override;
+
+ // Constructs a device with size |width| * |height| with contents initialized
+ // to zero. |is_opaque| should be set if the caller knows the bitmap will be
+ // completely opaque and allows some optimizations.
+ static BitmapPlatformDevice* Create(int width, int height, bool is_opaque);
+
+ // Performs the same construction as Create.
+ // Other ports require a separate construction routine because Create does not
+ // initialize the bitmap to 0.
+ static BitmapPlatformDevice* CreateAndClear(int width, int height,
+ bool is_opaque);
+
+ // This doesn't take ownership of |data|. If |data| is NULL, the contents
+ // of the device are initialized to 0.
+ static BitmapPlatformDevice* Create(int width, int height, bool is_opaque,
+ uint8_t* data);
+
+ // Overridden from SkBaseDevice:
+ void setMatrixClip(const SkMatrix& transform,
+ const SkRegion& region,
+ const SkClipStack&) override;
+
+ // Overridden from PlatformDevice:
+ cairo_t* BeginPlatformPaint() override;
+
+ protected:
+ SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& info) override;
+
+ private:
+ static BitmapPlatformDevice* Create(int width, int height, bool is_opaque,
+ cairo_surface_t* surface);
+
+ // Sets the transform and clip operations. This will not update the Cairo
+ // context, but will mark the config as dirty. The next call of LoadConfig
+ // will pick up these changes.
+ void SetMatrixClip(const SkMatrix& transform, const SkRegion& region);
+
+ // Loads the current transform and clip into the context.
+ void LoadConfig();
+
+ // Graphics context used to draw into the surface.
+ cairo_t* cairo_;
+
+ // True when there is a transform or clip that has not been set to the
+ // context. The context is retrieved for every text operation, and the
+ // transform and clip do not change as much. We can save time by not loading
+ // the clip and transform for every one.
+ bool config_dirty_;
+
+ // Translation assigned to the context: we need to keep track of this
+ // separately so it can be updated even if the context isn't created yet.
+ SkMatrix transform_;
+
+ // The current clipping
+ SkRegion clip_region_;
+
+ DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice);
+};
+
+} // namespace skia
+
+#endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_CAIRO_H_
diff --git a/skia/ext/platform_canvas_unittest.cc b/skia/ext/platform_canvas_unittest.cc
index a7dfb69..9ab5667 100644
--- a/skia/ext/platform_canvas_unittest.cc
+++ b/skia/ext/platform_canvas_unittest.cc
@@ -207,6 +207,8 @@
EXPECT_TRUE(VerifyBlackRect(*canvas, kLayerX, kLayerY, kLayerW, kLayerH));
}
+#if !defined(USE_AURA) // http://crbug.com/154358
+
// Test native clipping.
TEST(PlatformCanvas, ClipRegion) {
// Initialize a white canvas
@@ -232,6 +234,8 @@
EXPECT_TRUE(VerifyCanvasColor(*canvas, SK_ColorWHITE));
}
+#endif // !defined(USE_AURA)
+
// Test the layers get filled properly by native rendering.
TEST(PlatformCanvas, FillLayer) {
// Create the canvas initialized to opaque white.
@@ -289,6 +293,8 @@
EXPECT_TRUE(VerifyBlackRect(*canvas, kInnerX, kInnerY, kInnerW, kInnerH));
}
+#if !defined(USE_AURA) // http://crbug.com/154358
+
// Test that translation + make layer works properly.
TEST(PlatformCanvas, TranslateLayer) {
// Create the canvas initialized to opaque white.
@@ -389,6 +395,8 @@
#endif
}
+#endif // #if !defined(USE_AURA)
+
TEST(PlatformBitmapTest, PlatformBitmap) {
const int kWidth = 400;
const int kHeight = 300;
diff --git a/skia/ext/skia_utils_ios_unittest.mm b/skia/ext/skia_utils_ios_unittest.mm
index 8d0c9be..c199304 100644
--- a/skia/ext/skia_utils_ios_unittest.mm
+++ b/skia/ext/skia_utils_ios_unittest.mm
@@ -8,6 +8,7 @@
#import <UIKit/UIKit.h>
#include "base/base64.h"
+#include "base/ios/ios_util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
diff --git a/skia/ext/vector_canvas_unittest.cc b/skia/ext/vector_canvas_unittest.cc
index d2cbf29..d3ad9a0 100644
--- a/skia/ext/vector_canvas_unittest.cc
+++ b/skia/ext/vector_canvas_unittest.cc
@@ -450,6 +450,8 @@
////////////////////////////////////////////////////////////////////////////////
// Actual tests
+#if !defined(USE_AURA) // http://crbug.com/154358
+
TEST_F(VectorCanvasTest, BasicDrawing) {
EXPECT_EQ(Image(*vcanvas_).PercentageDifferent(Image(*pcanvas_)), 0.)
<< L"clean";
@@ -963,4 +965,6 @@
}
}
+#endif // !defined(USE_AURA)
+
} // namespace skia
diff --git a/skia/skia_library.gypi b/skia/skia_library.gypi
index 67281ec..36bdee6 100644
--- a/skia/skia_library.gypi
+++ b/skia/skia_library.gypi
@@ -244,6 +244,11 @@
'-Wno-unused-function',
],
}],
+ [ 'use_cairo == 1 and use_pango == 1', {
+ 'dependencies': [
+ '../build/linux/system.gyp:pangocairo',
+ ],
+ }],
[ 'OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
'sources!': [
'../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp',
diff --git a/skia/skia_test_expectations.txt b/skia/skia_test_expectations.txt
index 4327f6e..66ce1ed 100644
--- a/skia/skia_test_expectations.txt
+++ b/skia/skia_test_expectations.txt
@@ -48,4 +48,44 @@
#
# START OVERRIDES HERE
+# rebaselines for SK_SUPPORT_LEGACY_HQ_SCALING
+crbug.com/449873 compositing/reflections/simple-composited-reflections.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 fast/backgrounds/repeat/negative-offset-repeat-transformed.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 fast/borders/border-image-rotate-transform.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 fast/css/resize-corner-tracking-transformed-iframe.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 fast/css/resize-corner-tracking-transformed.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 fast/images/exif-orientation-height-image-document.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 fast/images/exif-orientation-image-document.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 fast/images/exif-orientation.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 fast/reflections/reflection-direction.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 fast/reflections/reflection-masks-opacity.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 fast/reflections/reflection-masks-outset.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 fast/reflections/reflection-masks.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 fast/reflections/reflection-with-zoom.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 fast/text/international/rtl-white-space-pre-wrap.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 fast/text/international/unicode-bidi-plaintext-in-textarea.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 media/audio-repaint.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 scrollbars/rtl-resizer-position.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 svg/batik/filters/feTile.svg [ ImageOnlyFailure Pass ]
+crbug.com/449873 svg/batik/text/smallFonts.svg [ ImageOnlyFailure Pass ]
+crbug.com/449873 svg/batik/text/textFeatures.svg [ ImageOnlyFailure Pass ]
+crbug.com/449873 svg/custom/clip-mask-negative-scale.svg [ ImageOnlyFailure Pass ]
+crbug.com/449873 svg/custom/focus-ring.svg [ ImageOnlyFailure Pass ]
+crbug.com/449873 svg/custom/transformed-outlines.svg [ ImageOnlyFailure Pass ]
+crbug.com/449873 svg/hixie/perf/004.xml [ ImageOnlyFailure Pass ]
+crbug.com/449873 virtual/antialiasedtext/fast/text/international/rtl-white-space-pre-wrap.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 virtual/antialiasedtext/fast/text/international/unicode-bidi-plaintext-in-textarea.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 virtual/deferred/fast/images/exif-orientation-height-image-document.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 virtual/deferred/fast/images/exif-orientation-image-document.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 virtual/deferred/fast/images/exif-orientation.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 virtual/prefer_compositing_to_lcd_text/scrollbars/rtl-resizer-position.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 virtual/slimmingpaint/fast/borders/border-image-rotate-transform.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 virtual/slimmingpaint/fast/css/resize-corner-tracking-transformed-iframe.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 virtual/slimmingpaint/fast/css/resize-corner-tracking-transformed.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 virtual/slimmingpaint/fast/images/exif-orientation-height-image-document.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 virtual/slimmingpaint/fast/images/exif-orientation-image-document.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 virtual/slimmingpaint/fast/images/exif-orientation.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 virtual/slimmingpaint/fast/text/international/rtl-white-space-pre-wrap.html [ ImageOnlyFailure Pass ]
+crbug.com/449873 virtual/slimmingpaint/fast/text/international/unicode-bidi-plaintext-in-textarea.html [ ImageOnlyFailure Pass ]
+
# END OVERRIDES HERE (this line ensures that the file is newline-terminated)
diff --git a/sky/engine/platform/BUILD.gn b/sky/engine/platform/BUILD.gn
index 20e644b..d1f5bae 100644
--- a/sky/engine/platform/BUILD.gn
+++ b/sky/engine/platform/BUILD.gn
@@ -5,6 +5,7 @@
import("//build/config/ui.gni")
import("//sky/engine/build/scripts/scripts.gni")
import("//sky/engine/config.gni")
+import("//testing/test.gni")
# Most targets in this file are private actions so use that as the default.
visibility = [ ":*" ]
diff --git a/sky/engine/platform/graphics/Canvas2DLayerBridge.cpp b/sky/engine/platform/graphics/Canvas2DLayerBridge.cpp
index 6bab12a..f337d98 100644
--- a/sky/engine/platform/graphics/Canvas2DLayerBridge.cpp
+++ b/sky/engine/platform/graphics/Canvas2DLayerBridge.cpp
@@ -55,7 +55,8 @@
return nullptr;
gr->resetContext();
SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height());
- return adoptRef(SkSurface::NewRenderTarget(gr, info, msaaSampleCount));
+ SkSurfaceProps disableLCDProps(0, kUnknown_SkPixelGeometry);
+ return adoptRef(SkSurface::NewRenderTarget(gr, info, msaaSampleCount, &disableLCDProps));
}
PassRefPtr<Canvas2DLayerBridge> Canvas2DLayerBridge::create(const IntSize& size, OpacityMode opacityMode, int msaaSampleCount)
diff --git a/sky/engine/web/BUILD.gn b/sky/engine/web/BUILD.gn
index 3f0f386..48d3277 100644
--- a/sky/engine/web/BUILD.gn
+++ b/sky/engine/web/BUILD.gn
@@ -4,6 +4,7 @@
import("//build/config/ui.gni")
import("//sky/engine/config.gni")
+import("//testing/test.gni")
visibility = [ "//sky/*" ]
diff --git a/sky/engine/wtf/BUILD.gn b/sky/engine/wtf/BUILD.gn
index 240d2fe..ce09a35 100644
--- a/sky/engine/wtf/BUILD.gn
+++ b/sky/engine/wtf/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//testing/test.gni")
+
visibility = [ "//sky/*" ]
component("wtf") {
diff --git a/testing/android/java/AndroidManifest.xml b/testing/android/java/AndroidManifest.xml
index 93dd71b..8cc36b2 100644
--- a/testing/android/java/AndroidManifest.xml
+++ b/testing/android/java/AndroidManifest.xml
@@ -12,6 +12,13 @@
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
+ <uses-permission android:name="android.permission.CAMERA" />
+ <uses-permission android:name="android.permission.INTERNET"/>
+ <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
+ <uses-permission android:name="android.permission.RECORD_AUDIO"/>
+ <uses-permission android:name="android.permission.WAKE_LOCK"/>
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+
<application android:label="ChromeNativeTests"
android:name="org.chromium.base.BaseChromiumApplication">
<activity android:name=".ChromeNativeTestActivity"
@@ -28,11 +35,4 @@
android:targetPackage="org.chromium.native_test"
android:label="Instrumentation entry point for org.chromium.native_test"/>
- <uses-permission android:name="android.permission.CAMERA" />
- <uses-permission android:name="android.permission.INTERNET"/>
- <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
- <uses-permission android:name="android.permission.RECORD_AUDIO"/>
- <uses-permission android:name="android.permission.WAKE_LOCK"/>
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
-
</manifest>
diff --git a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
index 42befe5..d476cbc 100644
--- a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
+++ b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
@@ -7,6 +7,7 @@
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
+import android.os.Environment;
import android.os.Handler;
import android.util.Log;
@@ -16,6 +17,8 @@
import org.chromium.base.ResourceExtractor;
import org.chromium.base.library_loader.NativeLibraries;
+import java.io.File;
+
/**
* Android's NativeActivity is mostly useful for pure-native code.
* Our tests need to go up to our own java classes, which is not possible using
@@ -75,7 +78,16 @@
if (commandLineFlags == null) commandLineFlags = "";
String commandLineFilePath = getIntent().getStringExtra(EXTRA_COMMAND_LINE_FILE);
- if (commandLineFilePath == null) commandLineFilePath = "";
+ if (commandLineFilePath == null) {
+ commandLineFilePath = "";
+ } else {
+ File commandLineFile = new File(commandLineFilePath);
+ if (!commandLineFile.isAbsolute()) {
+ commandLineFilePath = Environment.getExternalStorageDirectory() + "/"
+ + commandLineFilePath;
+ }
+ Log.i(TAG, "command line file path: " + commandLineFilePath);
+ }
// This directory is used by build/android/pylib/test_package_apk.py.
nativeRunTests(commandLineFlags, commandLineFilePath, getFilesDir().getAbsolutePath(),
diff --git a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestInstrumentationTestRunner.java b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestInstrumentationTestRunner.java
index a5cf485..43135cc 100644
--- a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestInstrumentationTestRunner.java
+++ b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestInstrumentationTestRunner.java
@@ -27,9 +27,13 @@
* An Instrumentation that runs tests based on ChromeNativeTestActivity.
*/
public class ChromeNativeTestInstrumentationTestRunner extends Instrumentation {
+ // TODO(jbudorick): Remove this extra when b/18981674 is fixed.
+ public static final String EXTRA_ONLY_OUTPUT_FAILURES =
+ "org.chromium.native_test.ChromeNativeTestInstrumentationTestRunner."
+ + "OnlyOutputFailures";
private static final String TAG = "ChromeNativeTestInstrumentationTestRunner";
- private static final Pattern RE_TEST_OUTPUT = Pattern.compile("\\[ *([^ ]*) *\\] ?([^ ]*) .*");
+ private static final Pattern RE_TEST_OUTPUT = Pattern.compile("\\[ *([^ ]*) *\\] ?([^ ]+) .*");
private static interface ResultsBundleGenerator {
public Bundle generate(Map<String, TestResult> rawResults);
@@ -39,6 +43,7 @@
private String mCommandLineFlags;
private Bundle mLogBundle;
private ResultsBundleGenerator mBundleGenerator;
+ private boolean mOnlyOutputFailures;
@Override
public void onCreate(Bundle arguments) {
@@ -46,6 +51,7 @@
mCommandLineFlags = arguments.getString(ChromeNativeTestActivity.EXTRA_COMMAND_LINE_FLAGS);
mLogBundle = new Bundle();
mBundleGenerator = new RobotiumBundleGenerator();
+ mOnlyOutputFailures = arguments.containsKey(EXTRA_ONLY_OUTPUT_FAILURES);
start();
}
@@ -117,17 +123,27 @@
for (String l = r.readLine(); l != null && !l.equals("<<ScopedMainEntryLogger");
l = r.readLine()) {
Matcher m = RE_TEST_OUTPUT.matcher(l);
+ boolean isFailure = false;
if (m.matches()) {
if (m.group(1).equals("RUN")) {
results.put(m.group(2), TestResult.UNKNOWN);
} else if (m.group(1).equals("FAILED")) {
results.put(m.group(2), TestResult.FAILED);
+ isFailure = true;
+ mLogBundle.putString(Instrumentation.REPORT_KEY_STREAMRESULT, l + "\n");
+ sendStatus(0, mLogBundle);
} else if (m.group(1).equals("OK")) {
results.put(m.group(2), TestResult.PASSED);
}
}
- mLogBundle.putString(Instrumentation.REPORT_KEY_STREAMRESULT, l + "\n");
- sendStatus(0, mLogBundle);
+
+ // TODO(jbudorick): mOnlyOutputFailures is a workaround for b/18981674. Remove it
+ // once that issue is fixed.
+ if (!mOnlyOutputFailures || isFailure) {
+ mLogBundle.putString(Instrumentation.REPORT_KEY_STREAMRESULT, l + "\n");
+ sendStatus(0, mLogBundle);
+ }
+ Log.i(TAG, l);
}
} catch (InterruptedException e) {
Log.e(TAG, "Interrupted while waiting for FIFO file creation: " + e.toString());
@@ -168,6 +184,9 @@
++testsPassed;
break;
case FAILED:
+ // TODO(jbudorick): Remove this log message once AMP execution and
+ // results handling has been stabilized.
+ Log.d(TAG, "FAILED: " + entry.getKey());
++testsFailed;
break;
default:
@@ -178,11 +197,12 @@
}
StringBuilder resultBuilder = new StringBuilder();
- resultBuilder.append("\nOK (" + Integer.toString(testsPassed) + " tests)");
if (testsFailed > 0) {
resultBuilder.append(
"\nFAILURES!!! Tests run: " + Integer.toString(rawResults.size())
+ ", Failures: " + Integer.toString(testsFailed) + ", Errors: 0");
+ } else {
+ resultBuilder.append("\nOK (" + Integer.toString(testsPassed) + " tests)");
}
resultsBundle.putString(Instrumentation.REPORT_KEY_STREAMRESULT,
resultBuilder.toString());
diff --git a/testing/buildbot/chromium.chromiumos.json b/testing/buildbot/chromium.chromiumos.json
index 3e0535e..7d2f975 100644
--- a/testing/buildbot/chromium.chromiumos.json
+++ b/testing/buildbot/chromium.chromiumos.json
@@ -86,7 +86,6 @@
},
"sql_unittests",
"nacl_loader_unittests",
- "athena_unittests",
"app_shell_browsertests",
"app_shell_unittests",
"chromevox_tests",
@@ -100,7 +99,6 @@
"app_shell_browsertests",
"app_shell_unittests",
"ash_unittests",
- "athena_unittests",
"aura_unittests",
"base_unittests",
"cacheinvalidation_unittests",
@@ -250,7 +248,6 @@
"shards": 2
}
},
- "athena_unittests",
"gcm_unit_tests",
"skia_unittests",
{
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json
index 68fb55b..4da8bc0 100644
--- a/testing/buildbot/chromium.fyi.json
+++ b/testing/buildbot/chromium.fyi.json
@@ -333,33 +333,20 @@
}
]
},
- "Linux ChromiumOS Athena Tests (1)": {
- "gtest_tests": [
- {
- "test": "athena_unittests",
- "swarming": {
- "can_use_on_swarming_builders": true
- }
- },
- {
- "test": "browser_tests",
- "swarming": {
- "can_use_on_swarming_builders": true,
- "shards": 5
- }
- }
- ]
- },
"Site Isolation Linux": {
"gtest_tests": [
{ "test": "content_unittests", "args": ["--site-per-process"] },
- { "test": "content_browsertests", "args": ["--site-per-process", "--gtest_filter=-*.AllowTargetedNavigationsAfterSwap:*.SupportCrossProcessPostMessage:*.DontSwapProcessWithOnlyTargetBlank:*.DisownOpener:*.NavigateWithLeftoverFrames:*.DontPreemptNavigationWithFrameTreeUpdate:*.ProcessExitWithSwappedOutViews:*.SupportCrossProcessPostMessageWithMessagePort:*.AllowTargetedNavigationsInOpenerAfterSwap"] }
+ { "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.*"] }
]
},
"Site Isolation Win": {
"gtest_tests": [
{ "test": "content_unittests", "args": ["--site-per-process"] },
- { "test": "content_browsertests", "args": ["--site-per-process", "--gtest_filter=-*.AllowTargetedNavigationsAfterSwap:*.SupportCrossProcessPostMessage:*.DontSwapProcessWithOnlyTargetBlank:*.DisownOpener:*.NavigateWithLeftoverFrames:*.DontPreemptNavigationWithFrameTreeUpdate:*.ProcessExitWithSwappedOutViews:*.SupportCrossProcessPostMessageWithMessagePort:*.AllowTargetedNavigationsInOpenerAfterSwap"] }
+ { "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.*"] }
]
},
"Browser Side Navigation Linux": {
@@ -367,5 +354,50 @@
{ "test": "content_unittests", "args": ["--enable-browser-side-navigation", "--gtest_filter=-ResourceDispatcherHostTest.TransferNavigationHtml:ResourceDispatcherHostTest.TransferNavigationText:ResourceDispatcherHostTest.TransferNavigationWithProcessCrash:ResourceDispatcherHostTest.TransferNavigationWithTwoRedirects:ResourceDispatcherHostTest.TransferTwoNavigationsHtml:RenderFrameHostManagerTest.CancelPendingProperlyDeletesOrSwaps:WebContentsImplTest.CrossSiteNotPreemptedDuringBeforeUnload"] },
{ "test": "content_browsertests", "args": ["--enable-browser-side-navigation"] }
]
+ },
+ "CrWinClang tester": {
+ "gtest_tests": [
+ {
+ "test": "base_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
+ "cacheinvalidation_unittests",
+ "chrome_elf_unittests",
+ "components_unittests",
+ "courgette_unittests",
+ "crypto_unittests",
+ "extensions_unittests",
+ "gcm_unit_tests",
+ "google_apis_unittests",
+ "gpu_unittests",
+ "url_unittests",
+ "jingle_unittests",
+ "content_unittests",
+ "device_unittests",
+ "media_unittests",
+ "net_unittests",
+ "ppapi_unittests",
+ "printing_unittests",
+ "remoting_unittests",
+ "sbox_unittests",
+ "sbox_integration_tests",
+ "sbox_validation_tests",
+ "ipc_tests",
+ "sync_unit_tests",
+ "unit_tests",
+ "sql_unittests",
+ "ui_base_unittests",
+ "views_unittests",
+ "browser_tests",
+ {
+ "test": "content_browsertests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
+ "installer_util_unittests"
+ ]
}
}
diff --git a/testing/buildbot/chromium.linux.json b/testing/buildbot/chromium.linux.json
index 3c05ad7..7c71066 100644
--- a/testing/buildbot/chromium.linux.json
+++ b/testing/buildbot/chromium.linux.json
@@ -33,7 +33,12 @@
"cast_unittests",
"cc_unittests",
"chromedriver_unittests",
- "components_unittests",
+ {
+ "test": "components_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"compositor_unittests",
{
"test": "content_browsertests",
@@ -66,7 +71,12 @@
}
},
"google_apis_unittests",
- "gpu_unittests",
+ {
+ "test": "gpu_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "interactive_ui_tests",
"swarming": {
@@ -76,7 +86,12 @@
"ipc_mojo_unittests",
"ipc_tests",
"jingle_unittests",
- "media_unittests",
+ {
+ "test": "media_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"mojo_common_unittests",
"mojo_public_bindings_unittests",
"mojo_public_environment_unittests",
@@ -127,6 +142,18 @@
],
"scripts": [
{
+ "name": "checkdeps",
+ "script": "checkdeps.py"
+ },
+ {
+ "name": "checklicenses",
+ "script": "checklicenses.py"
+ },
+ {
+ "name": "checkperms",
+ "script": "checkperms.py"
+ },
+ {
"name": "telemetry_unittests",
"script": "telemetry_unittests.py"
},
@@ -174,7 +201,12 @@
"cast_unittests",
"cc_unittests",
"chromedriver_unittests",
- "components_unittests",
+ {
+ "test": "components_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"compositor_unittests",
{
"test": "content_browsertests",
@@ -207,7 +239,12 @@
}
},
"google_apis_unittests",
- "gpu_unittests",
+ {
+ "test": "gpu_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "interactive_ui_tests",
"swarming": {
@@ -217,7 +254,12 @@
"ipc_mojo_unittests",
"ipc_tests",
"jingle_unittests",
- "media_unittests",
+ {
+ "test": "media_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"mojo_common_unittests",
"mojo_public_bindings_unittests",
"mojo_public_environment_unittests",
@@ -307,7 +349,12 @@
"cast_unittests",
"cc_unittests",
"chromedriver_unittests",
- "components_unittests",
+ {
+ "test": "components_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"compositor_unittests",
{
"test": "content_browsertests",
@@ -340,7 +387,12 @@
}
},
"google_apis_unittests",
- "gpu_unittests",
+ {
+ "test": "gpu_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "interactive_ui_tests",
"swarming": {
@@ -351,7 +403,12 @@
"ipc_mojo_unittests",
"ipc_tests",
"jingle_unittests",
- "media_unittests",
+ {
+ "test": "media_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"mojo_common_unittests",
"mojo_public_bindings_unittests",
"mojo_public_environment_unittests",
diff --git a/testing/buildbot/chromium.mac.json b/testing/buildbot/chromium.mac.json
index cfc0a2a..8f8a30e 100644
--- a/testing/buildbot/chromium.mac.json
+++ b/testing/buildbot/chromium.mac.json
@@ -30,7 +30,12 @@
"cast_unittests",
"cc_unittests",
"chromedriver_unittests",
- "components_unittests",
+ {
+ "test": "components_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "content_browsertests",
"swarming": {
@@ -52,7 +57,12 @@
"can_use_on_swarming_builders": true
}
},
- "gpu_unittests",
+ {
+ "test": "gpu_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"google_apis_unittests",
{
"test": "interactive_ui_tests",
@@ -62,7 +72,12 @@
},
"ipc_tests",
"jingle_unittests",
- "media_unittests",
+ {
+ "test": "media_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "message_center_unittests",
"swarming": {
@@ -154,7 +169,12 @@
"cast_unittests",
"cc_unittests",
"chromedriver_unittests",
- "components_unittests",
+ {
+ "test": "components_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "content_browsertests",
"swarming": {
@@ -176,7 +196,12 @@
"can_use_on_swarming_builders": true
}
},
- "gpu_unittests",
+ {
+ "test": "gpu_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"google_apis_unittests",
{
"test": "interactive_ui_tests",
@@ -186,7 +211,12 @@
},
"ipc_tests",
"jingle_unittests",
- "media_unittests",
+ {
+ "test": "media_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "message_center_unittests",
"swarming": {
@@ -278,7 +308,12 @@
"cast_unittests",
"cc_unittests",
"chromedriver_unittests",
- "components_unittests",
+ {
+ "test": "components_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "content_browsertests",
"swarming": {
@@ -300,7 +335,12 @@
"can_use_on_swarming_builders": true
}
},
- "gpu_unittests",
+ {
+ "test": "gpu_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"google_apis_unittests",
{
"test": "interactive_ui_tests",
@@ -310,7 +350,12 @@
},
"ipc_tests",
"jingle_unittests",
- "media_unittests",
+ {
+ "test": "media_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "message_center_unittests",
"swarming": {
@@ -402,7 +447,12 @@
"cast_unittests",
"cc_unittests",
"chromedriver_unittests",
- "components_unittests",
+ {
+ "test": "components_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "content_browsertests",
"swarming": {
@@ -424,7 +474,12 @@
"can_use_on_swarming_builders": true
}
},
- "gpu_unittests",
+ {
+ "test": "gpu_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"google_apis_unittests",
{
"test": "interactive_ui_tests",
@@ -435,7 +490,12 @@
},
"ipc_tests",
"jingle_unittests",
- "media_unittests",
+ {
+ "test": "media_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "message_center_unittests",
"swarming": {
diff --git a/testing/buildbot/chromium.memory.json b/testing/buildbot/chromium.memory.json
index 296c0a7..168f3a3 100644
--- a/testing/buildbot/chromium.memory.json
+++ b/testing/buildbot/chromium.memory.json
@@ -233,7 +233,6 @@
"can_use_on_swarming_builders": true
}
},
- "athena_unittests",
"aura_unittests",
{
"test": "base_unittests",
diff --git a/testing/buildbot/chromium.webkit.json b/testing/buildbot/chromium.webkit.json
index 47f4c49..475f4ec 100644
--- a/testing/buildbot/chromium.webkit.json
+++ b/testing/buildbot/chromium.webkit.json
@@ -83,7 +83,6 @@
},
"sql_unittests",
"nacl_loader_unittests",
- "athena_unittests",
"app_shell_browsertests",
"app_shell_unittests",
"chromevox_tests",
@@ -173,7 +172,6 @@
"shards": 2
}
},
- "athena_unittests",
"gcm_unit_tests",
"skia_unittests",
{
diff --git a/testing/buildbot/chromium.win.json b/testing/buildbot/chromium.win.json
index a138a36..a257144 100644
--- a/testing/buildbot/chromium.win.json
+++ b/testing/buildbot/chromium.win.json
@@ -23,7 +23,12 @@
"cc_unittests",
"chromedriver_unittests",
"chrome_elf_unittests",
- "components_unittests",
+ {
+ "test": "components_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"compositor_unittests",
{
"test": "content_browsertests",
@@ -44,7 +49,12 @@
"gcm_unit_tests",
"gfx_unittests",
"google_apis_unittests",
- "gpu_unittests",
+ {
+ "test": "gpu_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"installer_util_unittests",
{
"test": "interactive_ui_tests",
@@ -55,7 +65,12 @@
},
"ipc_tests",
"jingle_unittests",
- "media_unittests",
+ {
+ "test": "media_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "net_unittests",
"swarming": {
@@ -128,7 +143,12 @@
"cc_unittests",
"chromedriver_unittests",
"chrome_elf_unittests",
- "components_unittests",
+ {
+ "test": "components_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"compositor_unittests",
{
"test": "content_browsertests",
@@ -149,7 +169,12 @@
"gcm_unit_tests",
"gfx_unittests",
"google_apis_unittests",
- "gpu_unittests",
+ {
+ "test": "gpu_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"installer_util_unittests",
{
"test": "interactive_ui_tests",
@@ -160,7 +185,12 @@
},
"ipc_tests",
"jingle_unittests",
- "media_unittests",
+ {
+ "test": "media_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"mojo_common_unittests",
"mojo_public_bindings_unittests",
"mojo_public_environment_unittests",
@@ -244,7 +274,12 @@
"chromedriver_unittests",
"chrome_elf_unittests",
"components_browsertests",
- "components_unittests",
+ {
+ "test": "components_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"compositor_unittests",
{
"test": "content_browsertests",
@@ -266,7 +301,12 @@
"gcm_unit_tests",
"gfx_unittests",
"google_apis_unittests",
- "gpu_unittests",
+ {
+ "test": "gpu_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"installer_util_unittests",
{
"test": "interactive_ui_tests",
@@ -278,7 +318,12 @@
"ipc_tests",
"jingle_unittests",
"keyboard_unittests",
- "media_unittests",
+ {
+ "test": "media_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"message_center_unittests",
"mojo_common_unittests",
"mojo_public_bindings_unittests",
@@ -367,7 +412,12 @@
"chromedriver_unittests",
"chrome_elf_unittests",
"components_browsertests",
- "components_unittests",
+ {
+ "test": "components_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"compositor_unittests",
{
"test": "content_browsertests",
@@ -389,7 +439,12 @@
"gcm_unit_tests",
"gfx_unittests",
"google_apis_unittests",
- "gpu_unittests",
+ {
+ "test": "gpu_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"installer_util_unittests",
{
"test": "interactive_ui_tests",
@@ -401,7 +456,12 @@
"ipc_tests",
"jingle_unittests",
"keyboard_unittests",
- "media_unittests",
+ {
+ "test": "media_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"message_center_unittests",
"mojo_common_unittests",
"mojo_public_bindings_unittests",
@@ -487,7 +547,12 @@
"cc_unittests",
"chromedriver_unittests",
"chrome_elf_unittests",
- "components_unittests",
+ {
+ "test": "components_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"compositor_unittests",
{
"test": "content_browsertests",
@@ -507,7 +572,12 @@
"events_unittests",
"extensions_unittests",
"gcm_unit_tests",
- "gpu_unittests",
+ {
+ "test": "gpu_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"installer_util_unittests",
{
"test": "interactive_ui_tests",
@@ -518,7 +588,12 @@
},
"ipc_tests",
"jingle_unittests",
- "media_unittests",
+ {
+ "test": "media_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
"mojo_common_unittests",
"mojo_public_bindings_unittests",
"mojo_public_environment_unittests",
diff --git a/testing/buildbot/chromium_athena.json b/testing/buildbot/chromium_athena.json
deleted file mode 100644
index 7b9d3c6..0000000
--- a/testing/buildbot/chromium_athena.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "compile_targets": [
- "chrome",
- "athena_main"
- ],
- "gtest_tests": [
- {
- "test": "browser_tests",
- "swarming": {
- "can_use_on_swarming_builders": true,
- "shards": 5
- }
- },
- {
- "test": "athena_unittests",
- "swarming": {
- "can_use_on_swarming_builders": true,
- "shards": 5
- }
- }
- ]
-}
diff --git a/testing/buildbot/chromium_memory_trybot.json b/testing/buildbot/chromium_memory_trybot.json
index 2b8564e..af0f169 100644
--- a/testing/buildbot/chromium_memory_trybot.json
+++ b/testing/buildbot/chromium_memory_trybot.json
@@ -16,7 +16,12 @@
},
"cacheinvalidation_unittests",
"cc_unittests",
- "components_unittests",
+ {
+ "test": "components_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "content_browsertests",
"swarming": {
@@ -39,7 +44,12 @@
"gcm_unit_tests",
"gfx_unittests",
"google_apis_unittests",
- "gpu_unittests",
+ {
+ "test": "gpu_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "interactive_ui_tests",
"swarming": {
@@ -49,11 +59,17 @@
},
"ipc_tests",
"jingle_unittests",
- "media_unittests",
+ {
+ "test": "media_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "net_unittests",
"swarming": {
- "can_use_on_swarming_builders": true
+ "can_use_on_swarming_builders": true,
+ "shards": 2
}
},
"ppapi_unittests",
diff --git a/testing/buildbot/chromium_trybot.json b/testing/buildbot/chromium_trybot.json
index cdf0ea1..eef2619 100644
--- a/testing/buildbot/chromium_trybot.json
+++ b/testing/buildbot/chromium_trybot.json
@@ -67,7 +67,12 @@
"platforms": ["win"]
},
"components_browsertests",
- "components_unittests",
+ {
+ "test": "components_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "compositor_unittests",
"platforms": ["linux", "win"]
@@ -112,7 +117,12 @@
}
},
"google_apis_unittests",
- "gpu_unittests",
+ {
+ "test": "gpu_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "interactive_ui_tests",
"swarming": {
@@ -135,7 +145,12 @@
"platforms": ["linux", "win"]
},
"media_perftests",
- "media_unittests",
+ {
+ "test": "media_unittests",
+ "swarming": {
+ "can_use_on_swarming_builders": true
+ }
+ },
{
"test": "message_center_unittests",
"swarming": {
@@ -251,15 +266,6 @@
]
},
{
- "test": "athena_unittests",
- "platforms": ["linux"],
- "chromium_configs": [
- "chromium_chromeos",
- "chromium_chromeos_athena",
- "chromium_chromeos_ozone"
- ]
- },
- {
"test": "display_unittests",
"platforms": ["linux"]
},
diff --git a/testing/chromoting/browser_test_commands_linux.txt b/testing/chromoting/browser_test_commands_linux.txt
index 2f5f2be..d6f2bf5 100644
--- a/testing/chromoting/browser_test_commands_linux.txt
+++ b/testing/chromoting/browser_test_commands_linux.txt
@@ -3,4 +3,6 @@
/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=RemoteDesktopBrowserTest.MANUAL_Auth --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=gafyd
/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=RemoteDesktopBrowserTest.MANUAL_Auth --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=non-gmail
/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=RemoteDesktopBrowserTest.MANUAL_Launch --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting
-/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=Me2MeBrowserTest.MANUAL_Me2Me_Connect_Local_Host --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 --me2me-pin=123456 --override-user-data-dir=/tmp/chromoting_test_profile
\ No newline at end of file
+/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=Me2MeBrowserTest.MANUAL_Me2Me_Connect_Local_Host --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 --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
\ No newline at end of file
diff --git a/testing/chromoting/browser_tests_launcher.py b/testing/chromoting/browser_tests_launcher.py
index be66955..0cb903b 100644
--- a/testing/chromoting/browser_tests_launcher.py
+++ b/testing/chromoting/browser_tests_launcher.py
@@ -80,20 +80,14 @@
shutil.rmtree(user_profile_dir)
-def InitialiseTestMachineForLinux(cfg_file, manifest_file, user_profile_dir):
+def InitialiseTestMachineForLinux(cfg_file):
"""Sets up a Linux machine for connect-to-host browser-tests.
- Copy over me2me host-config and manifest files to expected locations.
+ Copy over me2me host-config to expected locations.
By default, the Linux me2me host expects the host-config file to be under
$HOME/.config/chrome-remote-desktop
Its name is expected to have a hash that is specific to a machine.
- When a user launches the remoting web-app, the native-message host process is
- started. For this to work, the manifest file for me2me host is expected to be
- in a specific folder under the user-profile dir.
-
- This function performs both the above tasks.
-
TODO(anandc):
Once we have Linux machines in the swarming lab already installed with the
me2me host, this function should also perform the step of starting the host.
@@ -102,8 +96,6 @@
Args:
cfg_file: location of test account's host-config file.
- manifest_file: location of me2me host manifest file.
- user_profile_dir: user-profile-dir to be used by the connect-to-host tests.
"""
# First get home directory on current machine.
@@ -121,21 +113,39 @@
config_file_src,
os.path.join(default_config_file_location, default_config_file_name))
- # Next, create a user-profile dir, and place the me2me manifest.json file in
- # the expected location for native-messating-host to work properly.
+ # Finally, start chromoting host.
+ RunCommandInSubProcess(CHROMOTING_HOST_PATH + ' --start')
+
+
+def SetupUserProfileDir(me2me_manifest_file, it2me_manifest_file,
+ user_profile_dir):
+ """Sets up the Google Chrome user profile directory
+
+ Delete the previous user profile directory if exists and create a new one.
+ This invalidates any state changes by the previous test so each test can start
+ with the same environment.
+
+ When a user launches the remoting web-app, the native messaging host process
+ is started. For this to work, this function places the me2me and it2me native
+ messaging host manifest files in a specific folder under the user-profile dir.
+
+ Args:
+ me2me_manifest_file: location of me2me native messaging host manifest file.
+ it2me_manifest_file: location of it2me native messaging host manifest file.
+ user_profile_dir: Chrome user-profile-directory.
+ """
native_messaging_folder = os.path.join(user_profile_dir, NATIVE_MESSAGING_DIR)
if os.path.exists(user_profile_dir):
shutil.rmtree(user_profile_dir)
os.makedirs(native_messaging_folder)
- manifest_file_src = os.path.join(os.getcwd(), manifest_file)
- manifest_file_dest = (
- os.path.join(native_messaging_folder, os.path.basename(manifest_file)))
- shutil.copyfile(manifest_file_src, manifest_file_dest)
-
- # Finally, start chromoting host.
- RunCommandInSubProcess(CHROMOTING_HOST_PATH + ' --start')
+ manifest_files = [me2me_manifest_file, it2me_manifest_file]
+ for manifest_file in manifest_files:
+ manifest_file_src = os.path.join(os.getcwd(), manifest_file)
+ manifest_file_dest = (
+ os.path.join(native_messaging_folder, os.path.basename(manifest_file)))
+ shutil.copyfile(manifest_file_src, manifest_file_dest)
def main():
@@ -146,19 +156,24 @@
help='path to folder having product and test binaries.')
parser.add_argument('-c', '--cfg_file',
help='path to test host config file.')
- parser.add_argument('-m', '--manifest_file',
+ parser.add_argument('--me2me_manifest_file',
help='path to me2me host manifest file.')
+ parser.add_argument('--it2me_manifest_file',
+ help='path to it2me host manifest file.')
parser.add_argument(
'-u', '--user_profile_dir',
help='path to user-profile-dir, used by connect-to-host tests.')
args = parser.parse_args()
- InitialiseTestMachineForLinux(args.cfg_file, args.manifest_file,
- args.user_profile_dir)
+ InitialiseTestMachineForLinux(args.cfg_file)
with open(args.commands_file) as f:
for line in f:
+ # Reset the user profile directory to start each test with a clean slate.
+ SetupUserProfileDir(args.me2me_manifest_file, args.it2me_manifest_file,
+ args.user_profile_dir)
+
# Replace the PROD_DIR value in the command-line with
# the passed in value.
line = line.replace(PROD_DIR_ID, args.prod_dir)
diff --git a/testing/chromoting/chromoting_integration_tests.isolate b/testing/chromoting/chromoting_integration_tests.isolate
index 83eb440..be04bd6 100644
--- a/testing/chromoting/chromoting_integration_tests.isolate
+++ b/testing/chromoting/chromoting_integration_tests.isolate
@@ -13,8 +13,10 @@
'<(PRODUCT_DIR)',
'--cfg_file',
'../../remoting/tools/internal/test-account-host-config.json',
- '--manifest_file',
+ '--me2me_manifest_file',
'<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json',
+ '--it2me_manifest_file',
+ '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_assistance.json',
'--user_profile_dir',
'/tmp/chromoting_test_profile',
],
@@ -27,6 +29,7 @@
'<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
'../../remoting/tools/internal/test-account-host-config.json',
'<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json',
+ '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_assistance.json',
],
},
}],
@@ -44,6 +47,7 @@
'<(PRODUCT_DIR)/browser_tests<(EXECUTABLE_SUFFIX)',
'<(PRODUCT_DIR)/remoting/remoting.webapp/',
'<(PRODUCT_DIR)/remoting/remoting.webapp.v2/',
+ '<(PRODUCT_DIR)/remoting/browser_test_resources/',
'<(PRODUCT_DIR)/resources.pak',
'../../remoting/tools/internal/test_accounts.json',
],
diff --git a/testing/commit_queue/config.json b/testing/commit_queue/config.json
index 3e39bf3..a3142a5 100644
--- a/testing/commit_queue/config.json
+++ b/testing/commit_queue/config.json
@@ -8,10 +8,10 @@
"linux_chromium_asan_rel_ng": ["defaulttests"]
},
"tryserver.chromium.mac": {
+ "mac_chromium_gn_rel": ["defaulttests"]
},
"tryserver.chromium.win": {
- "win8_chromium_ng": ["defaulttests"],
- "win_chromium_compile_dbg_ng": ["defaulttests"]
+ "win8_chromium_ng": ["defaulttests"]
}
}
}
@@ -54,6 +54,7 @@
"linux_chromium_asan_rel": ["defaulttests"],
"linux_chromium_chromeos_compile_dbg_ng": ["defaulttests"],
"linux_chromium_chromeos_rel_ng": ["defaulttests"],
+ "linux_chromium_gn_chromeos_rel": ["defaulttests"],
"linux_chromium_gn_dbg": ["defaulttests"],
"linux_chromium_gn_rel": ["defaulttests"],
"linux_chromium_rel_ng": ["defaulttests"],
@@ -83,10 +84,11 @@
"ios_rel_device_ninja_ng": ["defaulttests"]
},
"tryserver.chromium.win": {
- "win_chromium_compile_dbg": ["defaulttests"],
+ "win8_chromium_rel": ["defaulttests"],
+ "win8_chromium_gn_rel": ["defaulttests"],
+ "win_chromium_compile_dbg_ng": ["defaulttests"],
"win_chromium_rel_ng": ["defaulttests"],
- "win_chromium_x64_rel_ng": ["defaulttests"],
- "win8_chromium_rel": ["defaulttests"]
+ "win_chromium_x64_rel_ng": ["defaulttests"]
},
"tryserver.chromium.gpu": {
"linux_gpu": ["defaulttests"],
diff --git a/testing/scripts/checklicenses.py b/testing/scripts/checklicenses.py
new file mode 100755
index 0000000..43342d0
--- /dev/null
+++ b/testing/scripts/checklicenses.py
@@ -0,0 +1,46 @@
+#!/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.
+
+import json
+import os
+import sys
+
+
+import common
+
+
+def main_run(args):
+ with common.temporary_file() as tempfile_path:
+ rc = common.run_command([
+ os.path.join(common.SRC_DIR, 'tools', 'checklicenses',
+ 'checklicenses.py'),
+ '--json', tempfile_path
+ ])
+
+ with open(tempfile_path) as f:
+ checklicenses_results = json.load(f)
+
+ result_set = set()
+ for result in checklicenses_results:
+ result_set.add((result['filename'], result['license']))
+
+ json.dump({
+ 'valid': True,
+ 'failures': ['%s: %s' % (r[0], r[1]) for r in result_set],
+ }, args.output)
+
+ return rc
+
+
+def main_compile_targets(args):
+ json.dump([], args.output)
+
+
+if __name__ == '__main__':
+ funcs = {
+ 'run': main_run,
+ 'compile_targets': main_compile_targets,
+ }
+ sys.exit(common.run_script(sys.argv[1:], funcs))
diff --git a/testing/scripts/checkperms.py b/testing/scripts/checkperms.py
new file mode 100755
index 0000000..17e32c4
--- /dev/null
+++ b/testing/scripts/checkperms.py
@@ -0,0 +1,46 @@
+#!/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.
+
+import json
+import os
+import sys
+
+
+import common
+
+
+def main_run(args):
+ with common.temporary_file() as tempfile_path:
+ rc = common.run_command([
+ os.path.join(common.SRC_DIR, 'tools', 'checkperms', 'checkperms.py'),
+ '--root', args.paths['checkout'],
+ '--json', tempfile_path
+ ])
+
+ with open(tempfile_path) as f:
+ checkperms_results = json.load(f)
+
+ result_set = set()
+ for result in checkperms_results:
+ result_set.add((result['rel_path'], result['error']))
+
+ json.dump({
+ 'valid': True,
+ 'failures': ['%s: %s' % (r[0], r[1]) for r in result_set],
+ }, args.output)
+
+ return rc
+
+
+def main_compile_targets(args):
+ json.dump([], args.output)
+
+
+if __name__ == '__main__':
+ funcs = {
+ 'run': main_run,
+ 'compile_targets': main_compile_targets,
+ }
+ sys.exit(common.run_script(sys.argv[1:], funcs))
diff --git a/testing/test.gni b/testing/test.gni
index 50b23df..9362a78 100644
--- a/testing/test.gni
+++ b/testing/test.gni
@@ -1,3 +1,237 @@
# 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.
+
+# ==============================================================================
+# TEST SETUP
+# ==============================================================================
+
+# Define a test as an executable (or apk on Android) with the "testonly" flag
+# set.
+template("test") {
+ if (is_android) {
+ import("//build/config/android/config.gni")
+ import("//build/config/android/rules.gni")
+
+ main_target_name = target_name
+ library_name = "_${target_name}__library"
+ apk_name = "${target_name}_apk"
+
+ shared_library(library_name) {
+ # Configs will always be defined since we set_defaults for a component
+ # in the main config. We want to use those rather than whatever came with
+ # the nested shared/static library inside the component.
+ configs = [] # Prevent list overwriting warning.
+ configs = invoker.configs
+
+ # See above call.
+ set_sources_assignment_filter([])
+
+ testonly = true
+
+ if (defined(invoker.all_dependent_configs)) {
+ all_dependent_configs = invoker.all_dependent_configs
+ }
+ if (defined(invoker.allow_circular_includes_from)) {
+ allow_circular_includes_from = invoker.allow_circular_includes_from
+ }
+ if (defined(invoker.cflags)) {
+ cflags = invoker.cflags
+ }
+ if (defined(invoker.cflags_c)) {
+ cflags_c = invoker.cflags_c
+ }
+ if (defined(invoker.cflags_cc)) {
+ cflags_cc = invoker.cflags_cc
+ }
+ if (defined(invoker.cflags_objc)) {
+ cflags_objc = invoker.cflags_objc
+ }
+ if (defined(invoker.cflags_objcc)) {
+ cflags_objcc = invoker.cflags_objcc
+ }
+ if (defined(invoker.check_includes)) {
+ check_includes = invoker.check_includes
+ }
+ if (defined(invoker.data)) {
+ data = invoker.data
+ }
+ if (defined(invoker.data_deps)) {
+ data_deps = invoker.data_deps
+ }
+ if (defined(invoker.datadeps)) {
+ datadeps = invoker.datadeps
+ }
+ if (defined(invoker.defines)) {
+ defines = invoker.defines
+ }
+ deps = []
+ if (!defined(invoker.use_launcher) || invoker.use_launcher) {
+ deps += [ "//testing/android:native_test_native_code" ]
+ }
+ if (defined(invoker.deps)) {
+ deps += invoker.deps
+ }
+ if (defined(invoker.direct_dependent_configs)) {
+ direct_dependent_configs = invoker.direct_dependent_configs
+ }
+ if (defined(invoker.forward_dependent_configs_from)) {
+ forward_dependent_configs_from = invoker.forward_dependent_configs_from
+ }
+ if (defined(invoker.include_dirs)) {
+ include_dirs = invoker.include_dirs
+ }
+ if (defined(invoker.ldflags)) {
+ ldflags = invoker.ldflags
+ }
+ if (defined(invoker.lib_dirs)) {
+ lib_dirs = invoker.lib_dirs
+ }
+ if (defined(invoker.libs)) {
+ libs = invoker.libs
+ }
+ if (defined(invoker.output_extension)) {
+ output_extension = invoker.output_extension
+ }
+ if (defined(invoker.output_name)) {
+ output_name = invoker.output_name
+ }
+ if (defined(invoker.public)) {
+ public = invoker.public
+ }
+ if (defined(invoker.public_configs)) {
+ public_configs = invoker.public_configs
+ }
+ if (defined(invoker.public_deps)) {
+ public_deps = invoker.public_deps
+ }
+ if (defined(invoker.sources)) {
+ sources = invoker.sources
+ }
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+ }
+
+ unittest_apk(apk_name) {
+ unittests_dep = ":$library_name"
+ apk_name = main_target_name
+ if (defined(invoker.output_name)) {
+ test_output_name = invoker.output_name
+ unittests_binary = "lib${test_output_name}.so"
+ }
+ deps = [
+ ":$library_name",
+ ]
+ if (defined(invoker.apk_deps)) {
+ deps += invoker.apk_deps
+ }
+ }
+
+ group(target_name) {
+ testonly = true
+
+ deps = [
+ ":$library_name",
+ ":$apk_name",
+ ]
+ }
+ } else {
+ executable(target_name) {
+ # See above.
+ configs = [] # Prevent list overwriting warning.
+ configs = invoker.configs
+
+ # See above call.
+ set_sources_assignment_filter([])
+
+ testonly = true
+
+ if (defined(invoker.all_dependent_configs)) {
+ all_dependent_configs = invoker.all_dependent_configs
+ }
+ if (defined(invoker.allow_circular_includes_from)) {
+ allow_circular_includes_from = invoker.allow_circular_includes_from
+ }
+ if (defined(invoker.cflags)) {
+ cflags = invoker.cflags
+ }
+ if (defined(invoker.cflags_c)) {
+ cflags_c = invoker.cflags_c
+ }
+ if (defined(invoker.cflags_cc)) {
+ cflags_cc = invoker.cflags_cc
+ }
+ if (defined(invoker.cflags_objc)) {
+ cflags_objc = invoker.cflags_objc
+ }
+ if (defined(invoker.cflags_objcc)) {
+ cflags_objcc = invoker.cflags_objcc
+ }
+ if (defined(invoker.check_includes)) {
+ check_includes = invoker.check_includes
+ }
+ if (defined(invoker.data)) {
+ data = invoker.data
+ }
+ if (defined(invoker.data_deps)) {
+ data_deps = invoker.data_deps
+ }
+ if (defined(invoker.datadeps)) {
+ datadeps = invoker.datadeps
+ }
+ if (defined(invoker.defines)) {
+ defines = invoker.defines
+ }
+
+ # All shared libraries must have the sanitizer deps to properly link in
+ # asan mode (this target will be empty in other cases).
+ if (defined(invoker.deps)) {
+ deps = invoker.deps + [ "//build/config/sanitizers:deps" ]
+ } else {
+ deps = [
+ "//build/config/sanitizers:deps",
+ ]
+ }
+ if (defined(invoker.direct_dependent_configs)) {
+ direct_dependent_configs = invoker.direct_dependent_configs
+ }
+ if (defined(invoker.forward_dependent_configs_from)) {
+ forward_dependent_configs_from = invoker.forward_dependent_configs_from
+ }
+ if (defined(invoker.include_dirs)) {
+ include_dirs = invoker.include_dirs
+ }
+ if (defined(invoker.ldflags)) {
+ ldflags = invoker.ldflags
+ }
+ if (defined(invoker.lib_dirs)) {
+ lib_dirs = invoker.lib_dirs
+ }
+ if (defined(invoker.libs)) {
+ libs = invoker.libs
+ }
+ if (defined(invoker.output_extension)) {
+ output_extension = invoker.output_extension
+ }
+ if (defined(invoker.output_name)) {
+ output_name = invoker.output_name
+ }
+ if (defined(invoker.public)) {
+ public = invoker.public
+ }
+ if (defined(invoker.public_configs)) {
+ public_configs = invoker.public_configs
+ }
+ if (defined(invoker.public_deps)) {
+ public_deps = invoker.public_deps
+ }
+ if (defined(invoker.sources)) {
+ sources = invoker.sources
+ }
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+ }
+ }
+}
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
index c0d23f3..d245868 100644
--- a/third_party/boringssl/BUILD.gn
+++ b/third_party/boringssl/BUILD.gn
@@ -92,6 +92,8 @@
}
} else if (cpu_arch == "arm") {
sources += gypi_values.boringssl_linux_arm_sources
+ } else if (cpu_arch == "arm64") {
+ sources += gypi_values.boringssl_linux_aarch64_sources
} else {
defines += [ "OPENSSL_NO_ASM" ]
}
diff --git a/third_party/boringssl/boringssl.gyp b/third_party/boringssl/boringssl.gyp
index d0b716a..845a920 100644
--- a/third_party/boringssl/boringssl.gyp
+++ b/third_party/boringssl/boringssl.gyp
@@ -29,6 +29,9 @@
['target_arch == "arm"', {
'sources': [ '<@(boringssl_linux_arm_sources)' ],
}],
+ ['target_arch == "arm64"', {
+ 'sources': [ '<@(boringssl_linux_aarch64_sources)' ],
+ }],
['target_arch == "ia32"', {
'conditions': [
['OS == "mac"', {
@@ -77,7 +80,7 @@
}],
]
}],
- ['target_arch != "arm" and target_arch != "ia32" and target_arch != "x64"', {
+ ['target_arch != "arm" and target_arch != "ia32" and target_arch != "x64" and target_arch != "arm64"', {
'defines': [ 'OPENSSL_NO_ASM' ],
}],
],
diff --git a/third_party/boringssl/boringssl.gypi b/third_party/boringssl/boringssl.gypi
index 5fd17d6..b61dc77 100644
--- a/third_party/boringssl/boringssl.gypi
+++ b/third_party/boringssl/boringssl.gypi
@@ -96,6 +96,9 @@
'src/crypto/cipher/e_null.c',
'src/crypto/cipher/e_rc2.c',
'src/crypto/cipher/e_rc4.c',
+ 'src/crypto/cipher/e_ssl3.c',
+ 'src/crypto/cipher/e_tls.c',
+ 'src/crypto/cipher/tls_cbc.c',
'src/crypto/conf/conf.c',
'src/crypto/conf/conf_error.c',
'src/crypto/cpu-arm.c',
@@ -290,7 +293,6 @@
'src/ssl/d1_srvr.c',
'src/ssl/pqueue/pqueue.c',
'src/ssl/s3_both.c',
- 'src/ssl/s3_cbc.c',
'src/ssl/s3_clnt.c',
'src/ssl/s3_enc.c',
'src/ssl/s3_lib.c',
@@ -311,11 +313,20 @@
'src/ssl/t1_lib.c',
'src/ssl/t1_reneg.c',
],
+ 'boringssl_linux_aarch64_sources': [
+ 'linux-aarch64/crypto/aes/aesv8-armx.S',
+ 'linux-aarch64/crypto/modes/ghashv8-armx.S',
+ 'linux-aarch64/crypto/sha/sha1-armv8.S',
+ 'linux-aarch64/crypto/sha/sha256-armv8.S',
+ 'linux-aarch64/crypto/sha/sha512-armv8.S',
+ ],
'boringssl_linux_arm_sources': [
'linux-arm/crypto/aes/aes-armv4.S',
+ 'linux-arm/crypto/aes/aesv8-armx.S',
'linux-arm/crypto/aes/bsaes-armv7.S',
'linux-arm/crypto/bn/armv4-mont.S',
'linux-arm/crypto/modes/ghash-armv4.S',
+ 'linux-arm/crypto/modes/ghashv8-armx.S',
'linux-arm/crypto/sha/sha1-armv4-large.S',
'linux-arm/crypto/sha/sha256-armv4.S',
'linux-arm/crypto/sha/sha512-armv4.S',
diff --git a/third_party/boringssl/boringssl_unittest.cc b/third_party/boringssl/boringssl_unittest.cc
index f7e475d..177298f 100644
--- a/third_party/boringssl/boringssl_unittest.cc
+++ b/third_party/boringssl/boringssl_unittest.cc
@@ -56,88 +56,85 @@
return true;
}
-bool CryptoCipherPath(base::FilePath *result) {
+bool CryptoCipherTestPath(base::FilePath *result) {
if (!BoringSSLPath(result))
return false;
*result = result->Append(FILE_PATH_LITERAL("crypto"));
*result = result->Append(FILE_PATH_LITERAL("cipher"));
+ *result = result->Append(FILE_PATH_LITERAL("test"));
return true;
}
} // anonymous namespace
-TEST(BoringSSL, AES128GCM) {
- base::FilePath data_file;
- ASSERT_TRUE(CryptoCipherPath(&data_file));
- data_file = data_file.Append(FILE_PATH_LITERAL("aes_128_gcm_tests.txt"));
+struct AEADTest {
+ const base::CommandLine::CharType *name;
+ const base::FilePath::CharType *test_vector_filename;
+};
- std::vector<base::CommandLine::StringType> args;
- args.push_back(FILE_PATH_LITERAL("aes-128-gcm"));
- args.push_back(data_file.value());
+static const AEADTest kAEADTests[] = {
+ {FILE_PATH_LITERAL("aes-128-gcm"),
+ FILE_PATH_LITERAL("aes_128_gcm_tests.txt")},
+ {FILE_PATH_LITERAL("aes-128-key-wrap"),
+ FILE_PATH_LITERAL("aes_128_key_wrap_tests.txt")},
+ {FILE_PATH_LITERAL("aes-256-gcm"),
+ FILE_PATH_LITERAL("aes_256_gcm_tests.txt")},
+ {FILE_PATH_LITERAL("aes-256-key-wrap"),
+ FILE_PATH_LITERAL("aes_256_key_wrap_tests.txt")},
+ {FILE_PATH_LITERAL("chacha20-poly1305"),
+ FILE_PATH_LITERAL("chacha20_poly1305_tests.txt")},
+ {FILE_PATH_LITERAL("rc4-md5-tls"),
+ FILE_PATH_LITERAL("rc4_md5_tls_tests.txt")},
+ {FILE_PATH_LITERAL("rc4-sha1-tls"),
+ FILE_PATH_LITERAL("rc4_sha1_tls_tests.txt")},
+ {FILE_PATH_LITERAL("aes-128-cbc-sha1-tls"),
+ FILE_PATH_LITERAL("aes_128_cbc_sha1_tls_tests.txt")},
+ {FILE_PATH_LITERAL("aes-128-cbc-sha1-tls-implicit-iv"),
+ FILE_PATH_LITERAL("aes_128_cbc_sha1_tls_implicit_iv_tests.txt")},
+ {FILE_PATH_LITERAL("aes-128-cbc-sha256-tls"),
+ FILE_PATH_LITERAL("aes_128_cbc_sha256_tls_tests.txt")},
+ {FILE_PATH_LITERAL("aes-256-cbc-sha1-tls"),
+ FILE_PATH_LITERAL("aes_256_cbc_sha1_tls_tests.txt")},
+ {FILE_PATH_LITERAL("aes-256-cbc-sha1-tls-implicit-iv"),
+ FILE_PATH_LITERAL("aes_256_cbc_sha1_tls_implicit_iv_tests.txt")},
+ {FILE_PATH_LITERAL("aes-256-cbc-sha256-tls"),
+ FILE_PATH_LITERAL("aes_256_cbc_sha256_tls_tests.txt")},
+ {FILE_PATH_LITERAL("aes-256-cbc-sha384-tls"),
+ FILE_PATH_LITERAL("aes_256_cbc_sha384_tls_tests.txt")},
+ {FILE_PATH_LITERAL("des-ede3-cbc-sha1-tls"),
+ FILE_PATH_LITERAL("des_ede3_cbc_sha1_tls_tests.txt")},
+ {FILE_PATH_LITERAL("des-ede3-cbc-sha1-tls-implicit-iv"),
+ FILE_PATH_LITERAL("des_ede3_cbc_sha1_tls_implicit_iv_tests.txt")},
+ {FILE_PATH_LITERAL("rc4-md5-ssl3"),
+ FILE_PATH_LITERAL("rc4_md5_ssl3_tests.txt")},
+ {FILE_PATH_LITERAL("rc4-sha1-ssl3"),
+ FILE_PATH_LITERAL("rc4_sha1_ssl3_tests.txt")},
+ {FILE_PATH_LITERAL("aes-128-cbc-sha1-ssl3"),
+ FILE_PATH_LITERAL("aes_128_cbc_sha1_ssl3_tests.txt")},
+ {FILE_PATH_LITERAL("aes-256-cbc-sha1-ssl3"),
+ FILE_PATH_LITERAL("aes_256_cbc_sha1_ssl3_tests.txt")},
+ {FILE_PATH_LITERAL("des-ede3-cbc-sha1-ssl3"),
+ FILE_PATH_LITERAL("des_ede3_cbc_sha1_ssl3_tests.txt")},
+};
- TestProcess("aead_test", args);
-}
+TEST(BoringSSL, AEADs) {
+ base::FilePath test_vector_dir;
+ ASSERT_TRUE(CryptoCipherTestPath(&test_vector_dir));
-TEST(BoringSSL, AES256GCM) {
- base::FilePath data_file;
- ASSERT_TRUE(CryptoCipherPath(&data_file));
- data_file = data_file.Append(FILE_PATH_LITERAL("aes_256_gcm_tests.txt"));
+ for (size_t i = 0; i < arraysize(kAEADTests); i++) {
+ const AEADTest& test = kAEADTests[i];
+ SCOPED_TRACE(test.name);
- std::vector<base::CommandLine::StringType> args;
- args.push_back(FILE_PATH_LITERAL("aes-256-gcm"));
- args.push_back(data_file.value());
+ base::FilePath test_vector_file =
+ test_vector_dir.Append(test.test_vector_filename);
- TestProcess("aead_test", args);
-}
+ std::vector<base::CommandLine::StringType> args;
+ args.push_back(test.name);
+ args.push_back(test_vector_file.value());
-TEST(BoringSSL, ChaCha20Poly1305) {
- base::FilePath data_file;
- ASSERT_TRUE(CryptoCipherPath(&data_file));
- data_file =
- data_file.Append(FILE_PATH_LITERAL("chacha20_poly1305_tests.txt"));
-
- std::vector<base::CommandLine::StringType> args;
- args.push_back(FILE_PATH_LITERAL("chacha20-poly1305"));
- args.push_back(data_file.value());
-
- TestProcess("aead_test", args);
-}
-
-TEST(BoringSSL, RC4MD5) {
- base::FilePath data_file;
- ASSERT_TRUE(CryptoCipherPath(&data_file));
- data_file = data_file.Append(FILE_PATH_LITERAL("rc4_md5_tests.txt"));
-
- std::vector<base::CommandLine::StringType> args;
- args.push_back(FILE_PATH_LITERAL("rc4-md5"));
- args.push_back(data_file.value());
-
- TestProcess("aead_test", args);
-}
-
-TEST(BoringSSL, AESKW128) {
- base::FilePath data_file;
- ASSERT_TRUE(CryptoCipherPath(&data_file));
- data_file = data_file.Append(FILE_PATH_LITERAL("aes_128_key_wrap_tests.txt"));
-
- std::vector<base::CommandLine::StringType> args;
- args.push_back(FILE_PATH_LITERAL("aes-128-key-wrap"));
- args.push_back(data_file.value());
-
- TestProcess("aead_test", args);
-}
-
-TEST(BoringSSL, AESKW256) {
- base::FilePath data_file;
- ASSERT_TRUE(CryptoCipherPath(&data_file));
- data_file = data_file.Append(FILE_PATH_LITERAL("aes_256_key_wrap_tests.txt"));
-
- std::vector<base::CommandLine::StringType> args;
- args.push_back(FILE_PATH_LITERAL("aes-256-key-wrap"));
- args.push_back(data_file.value());
-
- TestProcess("aead_test", args);
+ TestProcess("aead_test", args);
+ }
}
TEST(BoringSSL, Base64) {
@@ -162,7 +159,7 @@
TEST(BoringSSL, Cipher) {
base::FilePath data_file;
- ASSERT_TRUE(CryptoCipherPath(&data_file));
+ ASSERT_TRUE(CryptoCipherTestPath(&data_file));
data_file = data_file.Append(FILE_PATH_LITERAL("cipher_test.txt"));
std::vector<base::CommandLine::StringType> args;
diff --git a/third_party/boringssl/linux-aarch64/crypto/aes/aesv8-armx.S b/third_party/boringssl/linux-aarch64/crypto/aes/aesv8-armx.S
new file mode 100644
index 0000000..0a4b1ac
--- /dev/null
+++ b/third_party/boringssl/linux-aarch64/crypto/aes/aesv8-armx.S
@@ -0,0 +1,725 @@
+#include "arm_arch.h"
+
+#if __ARM_MAX_ARCH__>=7
+.text
+.arch armv8-a+crypto
+.align 5
+rcon:
+.long 0x01,0x01,0x01,0x01
+.long 0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d // rotate-n-splat
+.long 0x1b,0x1b,0x1b,0x1b
+
+.globl aes_v8_set_encrypt_key
+.type aes_v8_set_encrypt_key,%function
+.align 5
+aes_v8_set_encrypt_key:
+.Lenc_key:
+ stp x29,x30,[sp,#-16]!
+ add x29,sp,#0
+ mov x3,#-1
+ cmp x0,#0
+ b.eq .Lenc_key_abort
+ cmp x2,#0
+ b.eq .Lenc_key_abort
+ mov x3,#-2
+ cmp w1,#128
+ b.lt .Lenc_key_abort
+ cmp w1,#256
+ b.gt .Lenc_key_abort
+ tst w1,#0x3f
+ b.ne .Lenc_key_abort
+
+ adr x3,rcon
+ cmp w1,#192
+
+ eor v0.16b,v0.16b,v0.16b
+ ld1 {v3.16b},[x0],#16
+ mov w1,#8 // reuse w1
+ ld1 {v1.4s,v2.4s},[x3],#32
+
+ b.lt .Loop128
+ b.eq .L192
+ b .L256
+
+.align 4
+.Loop128:
+ tbl v6.16b,{v3.16b},v2.16b
+ ext v5.16b,v0.16b,v3.16b,#12
+ st1 {v3.4s},[x2],#16
+ aese v6.16b,v0.16b
+ subs w1,w1,#1
+
+ eor v3.16b,v3.16b,v5.16b
+ ext v5.16b,v0.16b,v5.16b,#12
+ eor v3.16b,v3.16b,v5.16b
+ ext v5.16b,v0.16b,v5.16b,#12
+ eor v6.16b,v6.16b,v1.16b
+ eor v3.16b,v3.16b,v5.16b
+ shl v1.16b,v1.16b,#1
+ eor v3.16b,v3.16b,v6.16b
+ b.ne .Loop128
+
+ ld1 {v1.4s},[x3]
+
+ tbl v6.16b,{v3.16b},v2.16b
+ ext v5.16b,v0.16b,v3.16b,#12
+ st1 {v3.4s},[x2],#16
+ aese v6.16b,v0.16b
+
+ eor v3.16b,v3.16b,v5.16b
+ ext v5.16b,v0.16b,v5.16b,#12
+ eor v3.16b,v3.16b,v5.16b
+ ext v5.16b,v0.16b,v5.16b,#12
+ eor v6.16b,v6.16b,v1.16b
+ eor v3.16b,v3.16b,v5.16b
+ shl v1.16b,v1.16b,#1
+ eor v3.16b,v3.16b,v6.16b
+
+ tbl v6.16b,{v3.16b},v2.16b
+ ext v5.16b,v0.16b,v3.16b,#12
+ st1 {v3.4s},[x2],#16
+ aese v6.16b,v0.16b
+
+ eor v3.16b,v3.16b,v5.16b
+ ext v5.16b,v0.16b,v5.16b,#12
+ eor v3.16b,v3.16b,v5.16b
+ ext v5.16b,v0.16b,v5.16b,#12
+ eor v6.16b,v6.16b,v1.16b
+ eor v3.16b,v3.16b,v5.16b
+ eor v3.16b,v3.16b,v6.16b
+ st1 {v3.4s},[x2]
+ add x2,x2,#0x50
+
+ mov w12,#10
+ b .Ldone
+
+.align 4
+.L192:
+ ld1 {v4.8b},[x0],#8
+ movi v6.16b,#8 // borrow v6.16b
+ st1 {v3.4s},[x2],#16
+ sub v2.16b,v2.16b,v6.16b // adjust the mask
+
+.Loop192:
+ tbl v6.16b,{v4.16b},v2.16b
+ ext v5.16b,v0.16b,v3.16b,#12
+ st1 {v4.8b},[x2],#8
+ aese v6.16b,v0.16b
+ subs w1,w1,#1
+
+ eor v3.16b,v3.16b,v5.16b
+ ext v5.16b,v0.16b,v5.16b,#12
+ eor v3.16b,v3.16b,v5.16b
+ ext v5.16b,v0.16b,v5.16b,#12
+ eor v3.16b,v3.16b,v5.16b
+
+ dup v5.4s,v3.s[3]
+ eor v5.16b,v5.16b,v4.16b
+ eor v6.16b,v6.16b,v1.16b
+ ext v4.16b,v0.16b,v4.16b,#12
+ shl v1.16b,v1.16b,#1
+ eor v4.16b,v4.16b,v5.16b
+ eor v3.16b,v3.16b,v6.16b
+ eor v4.16b,v4.16b,v6.16b
+ st1 {v3.4s},[x2],#16
+ b.ne .Loop192
+
+ mov w12,#12
+ add x2,x2,#0x20
+ b .Ldone
+
+.align 4
+.L256:
+ ld1 {v4.16b},[x0]
+ mov w1,#7
+ mov w12,#14
+ st1 {v3.4s},[x2],#16
+
+.Loop256:
+ tbl v6.16b,{v4.16b},v2.16b
+ ext v5.16b,v0.16b,v3.16b,#12
+ st1 {v4.4s},[x2],#16
+ aese v6.16b,v0.16b
+ subs w1,w1,#1
+
+ eor v3.16b,v3.16b,v5.16b
+ ext v5.16b,v0.16b,v5.16b,#12
+ eor v3.16b,v3.16b,v5.16b
+ ext v5.16b,v0.16b,v5.16b,#12
+ eor v6.16b,v6.16b,v1.16b
+ eor v3.16b,v3.16b,v5.16b
+ shl v1.16b,v1.16b,#1
+ eor v3.16b,v3.16b,v6.16b
+ st1 {v3.4s},[x2],#16
+ b.eq .Ldone
+
+ dup v6.4s,v3.s[3] // just splat
+ ext v5.16b,v0.16b,v4.16b,#12
+ aese v6.16b,v0.16b
+
+ eor v4.16b,v4.16b,v5.16b
+ ext v5.16b,v0.16b,v5.16b,#12
+ eor v4.16b,v4.16b,v5.16b
+ ext v5.16b,v0.16b,v5.16b,#12
+ eor v4.16b,v4.16b,v5.16b
+
+ eor v4.16b,v4.16b,v6.16b
+ b .Loop256
+
+.Ldone:
+ str w12,[x2]
+ mov x3,#0
+
+.Lenc_key_abort:
+ mov x0,x3 // return value
+ ldr x29,[sp],#16
+ ret
+.size aes_v8_set_encrypt_key,.-aes_v8_set_encrypt_key
+
+.globl aes_v8_set_decrypt_key
+.type aes_v8_set_decrypt_key,%function
+.align 5
+aes_v8_set_decrypt_key:
+ stp x29,x30,[sp,#-16]!
+ add x29,sp,#0
+ bl .Lenc_key
+
+ cmp x0,#0
+ b.ne .Ldec_key_abort
+
+ sub x2,x2,#240 // restore original x2
+ mov x4,#-16
+ add x0,x2,x12,lsl#4 // end of key schedule
+
+ ld1 {v0.4s},[x2]
+ ld1 {v1.4s},[x0]
+ st1 {v0.4s},[x0],x4
+ st1 {v1.4s},[x2],#16
+
+.Loop_imc:
+ ld1 {v0.4s},[x2]
+ ld1 {v1.4s},[x0]
+ aesimc v0.16b,v0.16b
+ aesimc v1.16b,v1.16b
+ st1 {v0.4s},[x0],x4
+ st1 {v1.4s},[x2],#16
+ cmp x0,x2
+ b.hi .Loop_imc
+
+ ld1 {v0.4s},[x2]
+ aesimc v0.16b,v0.16b
+ st1 {v0.4s},[x0]
+
+ eor x0,x0,x0 // return value
+.Ldec_key_abort:
+ ldp x29,x30,[sp],#16
+ ret
+.size aes_v8_set_decrypt_key,.-aes_v8_set_decrypt_key
+.globl aes_v8_encrypt
+.type aes_v8_encrypt,%function
+.align 5
+aes_v8_encrypt:
+ ldr w3,[x2,#240]
+ ld1 {v0.4s},[x2],#16
+ ld1 {v2.16b},[x0]
+ sub w3,w3,#2
+ ld1 {v1.4s},[x2],#16
+
+.Loop_enc:
+ aese v2.16b,v0.16b
+ ld1 {v0.4s},[x2],#16
+ aesmc v2.16b,v2.16b
+ subs w3,w3,#2
+ aese v2.16b,v1.16b
+ ld1 {v1.4s},[x2],#16
+ aesmc v2.16b,v2.16b
+ b.gt .Loop_enc
+
+ aese v2.16b,v0.16b
+ ld1 {v0.4s},[x2]
+ aesmc v2.16b,v2.16b
+ aese v2.16b,v1.16b
+ eor v2.16b,v2.16b,v0.16b
+
+ st1 {v2.16b},[x1]
+ ret
+.size aes_v8_encrypt,.-aes_v8_encrypt
+.globl aes_v8_decrypt
+.type aes_v8_decrypt,%function
+.align 5
+aes_v8_decrypt:
+ ldr w3,[x2,#240]
+ ld1 {v0.4s},[x2],#16
+ ld1 {v2.16b},[x0]
+ sub w3,w3,#2
+ ld1 {v1.4s},[x2],#16
+
+.Loop_dec:
+ aesd v2.16b,v0.16b
+ ld1 {v0.4s},[x2],#16
+ aesimc v2.16b,v2.16b
+ subs w3,w3,#2
+ aesd v2.16b,v1.16b
+ ld1 {v1.4s},[x2],#16
+ aesimc v2.16b,v2.16b
+ b.gt .Loop_dec
+
+ aesd v2.16b,v0.16b
+ ld1 {v0.4s},[x2]
+ aesimc v2.16b,v2.16b
+ aesd v2.16b,v1.16b
+ eor v2.16b,v2.16b,v0.16b
+
+ st1 {v2.16b},[x1]
+ ret
+.size aes_v8_decrypt,.-aes_v8_decrypt
+.globl aes_v8_cbc_encrypt
+.type aes_v8_cbc_encrypt,%function
+.align 5
+aes_v8_cbc_encrypt:
+ stp x29,x30,[sp,#-16]!
+ add x29,sp,#0
+ subs x2,x2,#16
+ mov x8,#16
+ b.lo .Lcbc_abort
+ csel x8,xzr,x8,eq
+
+ cmp w5,#0 // en- or decrypting?
+ ldr w5,[x3,#240]
+ and x2,x2,#-16
+ ld1 {v6.16b},[x4]
+ ld1 {v0.16b},[x0],x8
+
+ ld1 {v16.4s-v17.4s},[x3] // load key schedule...
+ sub w5,w5,#6
+ add x7,x3,x5,lsl#4 // pointer to last 7 round keys
+ sub w5,w5,#2
+ ld1 {v18.4s-v19.4s},[x7],#32
+ ld1 {v20.4s-v21.4s},[x7],#32
+ ld1 {v22.4s-v23.4s},[x7],#32
+ ld1 {v7.4s},[x7]
+
+ add x7,x3,#32
+ mov w6,w5
+ b.eq .Lcbc_dec
+
+ cmp w5,#2
+ eor v0.16b,v0.16b,v6.16b
+ eor v5.16b,v16.16b,v7.16b
+ b.eq .Lcbc_enc128
+
+.Loop_cbc_enc:
+ aese v0.16b,v16.16b
+ ld1 {v16.4s},[x7],#16
+ aesmc v0.16b,v0.16b
+ subs w6,w6,#2
+ aese v0.16b,v17.16b
+ ld1 {v17.4s},[x7],#16
+ aesmc v0.16b,v0.16b
+ b.gt .Loop_cbc_enc
+
+ aese v0.16b,v16.16b
+ aesmc v0.16b,v0.16b
+ subs x2,x2,#16
+ aese v0.16b,v17.16b
+ aesmc v0.16b,v0.16b
+ csel x8,xzr,x8,eq
+ aese v0.16b,v18.16b
+ aesmc v0.16b,v0.16b
+ add x7,x3,#16
+ aese v0.16b,v19.16b
+ aesmc v0.16b,v0.16b
+ ld1 {v16.16b},[x0],x8
+ aese v0.16b,v20.16b
+ aesmc v0.16b,v0.16b
+ eor v16.16b,v16.16b,v5.16b
+ aese v0.16b,v21.16b
+ aesmc v0.16b,v0.16b
+ ld1 {v17.4s},[x7],#16 // re-pre-load rndkey[1]
+ aese v0.16b,v22.16b
+ aesmc v0.16b,v0.16b
+ aese v0.16b,v23.16b
+
+ mov w6,w5
+ eor v6.16b,v0.16b,v7.16b
+ st1 {v6.16b},[x1],#16
+ b.hs .Loop_cbc_enc
+
+ b .Lcbc_done
+
+.align 5
+.Lcbc_enc128:
+ ld1 {v2.4s-v3.4s},[x7]
+ aese v0.16b,v16.16b
+ aesmc v0.16b,v0.16b
+ b .Lenter_cbc_enc128
+.Loop_cbc_enc128:
+ aese v0.16b,v16.16b
+ aesmc v0.16b,v0.16b
+ st1 {v6.16b},[x1],#16
+.Lenter_cbc_enc128:
+ aese v0.16b,v17.16b
+ aesmc v0.16b,v0.16b
+ subs x2,x2,#16
+ aese v0.16b,v2.16b
+ aesmc v0.16b,v0.16b
+ csel x8,xzr,x8,eq
+ aese v0.16b,v3.16b
+ aesmc v0.16b,v0.16b
+ aese v0.16b,v18.16b
+ aesmc v0.16b,v0.16b
+ aese v0.16b,v19.16b
+ aesmc v0.16b,v0.16b
+ ld1 {v16.16b},[x0],x8
+ aese v0.16b,v20.16b
+ aesmc v0.16b,v0.16b
+ aese v0.16b,v21.16b
+ aesmc v0.16b,v0.16b
+ aese v0.16b,v22.16b
+ aesmc v0.16b,v0.16b
+ eor v16.16b,v16.16b,v5.16b
+ aese v0.16b,v23.16b
+ eor v6.16b,v0.16b,v7.16b
+ b.hs .Loop_cbc_enc128
+
+ st1 {v6.16b},[x1],#16
+ b .Lcbc_done
+.align 5
+.Lcbc_dec:
+ ld1 {v18.16b},[x0],#16
+ subs x2,x2,#32 // bias
+ add w6,w5,#2
+ orr v3.16b,v0.16b,v0.16b
+ orr v1.16b,v0.16b,v0.16b
+ orr v19.16b,v18.16b,v18.16b
+ b.lo .Lcbc_dec_tail
+
+ orr v1.16b,v18.16b,v18.16b
+ ld1 {v18.16b},[x0],#16
+ orr v2.16b,v0.16b,v0.16b
+ orr v3.16b,v1.16b,v1.16b
+ orr v19.16b,v18.16b,v18.16b
+
+.Loop3x_cbc_dec:
+ aesd v0.16b,v16.16b
+ aesd v1.16b,v16.16b
+ aesd v18.16b,v16.16b
+ ld1 {v16.4s},[x7],#16
+ aesimc v0.16b,v0.16b
+ aesimc v1.16b,v1.16b
+ aesimc v18.16b,v18.16b
+ subs w6,w6,#2
+ aesd v0.16b,v17.16b
+ aesd v1.16b,v17.16b
+ aesd v18.16b,v17.16b
+ ld1 {v17.4s},[x7],#16
+ aesimc v0.16b,v0.16b
+ aesimc v1.16b,v1.16b
+ aesimc v18.16b,v18.16b
+ b.gt .Loop3x_cbc_dec
+
+ aesd v0.16b,v16.16b
+ aesd v1.16b,v16.16b
+ aesd v18.16b,v16.16b
+ eor v4.16b,v6.16b,v7.16b
+ aesimc v0.16b,v0.16b
+ aesimc v1.16b,v1.16b
+ aesimc v18.16b,v18.16b
+ eor v5.16b,v2.16b,v7.16b
+ aesd v0.16b,v17.16b
+ aesd v1.16b,v17.16b
+ aesd v18.16b,v17.16b
+ eor v17.16b,v3.16b,v7.16b
+ subs x2,x2,#0x30
+ aesimc v0.16b,v0.16b
+ aesimc v1.16b,v1.16b
+ aesimc v18.16b,v18.16b
+ orr v6.16b,v19.16b,v19.16b
+ csel x6,x2,x6,lo // x6, w6, is zero at this point
+ aesd v0.16b,v20.16b
+ aesd v1.16b,v20.16b
+ aesd v18.16b,v20.16b
+ add x0,x0,x6 // x0 is adjusted in such way that
+ // at exit from the loop v1.16b-v18.16b
+ // are loaded with last "words"
+ aesimc v0.16b,v0.16b
+ aesimc v1.16b,v1.16b
+ aesimc v18.16b,v18.16b
+ mov x7,x3
+ aesd v0.16b,v21.16b
+ aesd v1.16b,v21.16b
+ aesd v18.16b,v21.16b
+ ld1 {v2.16b},[x0],#16
+ aesimc v0.16b,v0.16b
+ aesimc v1.16b,v1.16b
+ aesimc v18.16b,v18.16b
+ ld1 {v3.16b},[x0],#16
+ aesd v0.16b,v22.16b
+ aesd v1.16b,v22.16b
+ aesd v18.16b,v22.16b
+ ld1 {v19.16b},[x0],#16
+ aesimc v0.16b,v0.16b
+ aesimc v1.16b,v1.16b
+ aesimc v18.16b,v18.16b
+ ld1 {v16.4s},[x7],#16 // re-pre-load rndkey[0]
+ aesd v0.16b,v23.16b
+ aesd v1.16b,v23.16b
+ aesd v18.16b,v23.16b
+
+ add w6,w5,#2
+ eor v4.16b,v4.16b,v0.16b
+ eor v5.16b,v5.16b,v1.16b
+ eor v18.16b,v18.16b,v17.16b
+ ld1 {v17.4s},[x7],#16 // re-pre-load rndkey[1]
+ orr v0.16b,v2.16b,v2.16b
+ st1 {v4.16b},[x1],#16
+ orr v1.16b,v3.16b,v3.16b
+ st1 {v5.16b},[x1],#16
+ st1 {v18.16b},[x1],#16
+ orr v18.16b,v19.16b,v19.16b
+ b.hs .Loop3x_cbc_dec
+
+ cmn x2,#0x30
+ b.eq .Lcbc_done
+ nop
+
+.Lcbc_dec_tail:
+ aesd v1.16b,v16.16b
+ aesd v18.16b,v16.16b
+ ld1 {v16.4s},[x7],#16
+ aesimc v1.16b,v1.16b
+ aesimc v18.16b,v18.16b
+ subs w6,w6,#2
+ aesd v1.16b,v17.16b
+ aesd v18.16b,v17.16b
+ ld1 {v17.4s},[x7],#16
+ aesimc v1.16b,v1.16b
+ aesimc v18.16b,v18.16b
+ b.gt .Lcbc_dec_tail
+
+ aesd v1.16b,v16.16b
+ aesd v18.16b,v16.16b
+ aesimc v1.16b,v1.16b
+ aesimc v18.16b,v18.16b
+ aesd v1.16b,v17.16b
+ aesd v18.16b,v17.16b
+ aesimc v1.16b,v1.16b
+ aesimc v18.16b,v18.16b
+ aesd v1.16b,v20.16b
+ aesd v18.16b,v20.16b
+ aesimc v1.16b,v1.16b
+ aesimc v18.16b,v18.16b
+ cmn x2,#0x20
+ aesd v1.16b,v21.16b
+ aesd v18.16b,v21.16b
+ aesimc v1.16b,v1.16b
+ aesimc v18.16b,v18.16b
+ eor v5.16b,v6.16b,v7.16b
+ aesd v1.16b,v22.16b
+ aesd v18.16b,v22.16b
+ aesimc v1.16b,v1.16b
+ aesimc v18.16b,v18.16b
+ eor v17.16b,v3.16b,v7.16b
+ aesd v1.16b,v23.16b
+ aesd v18.16b,v23.16b
+ b.eq .Lcbc_dec_one
+ eor v5.16b,v5.16b,v1.16b
+ eor v17.16b,v17.16b,v18.16b
+ orr v6.16b,v19.16b,v19.16b
+ st1 {v5.16b},[x1],#16
+ st1 {v17.16b},[x1],#16
+ b .Lcbc_done
+
+.Lcbc_dec_one:
+ eor v5.16b,v5.16b,v18.16b
+ orr v6.16b,v19.16b,v19.16b
+ st1 {v5.16b},[x1],#16
+
+.Lcbc_done:
+ st1 {v6.16b},[x4]
+.Lcbc_abort:
+ ldr x29,[sp],#16
+ ret
+.size aes_v8_cbc_encrypt,.-aes_v8_cbc_encrypt
+.globl aes_v8_ctr32_encrypt_blocks
+.type aes_v8_ctr32_encrypt_blocks,%function
+.align 5
+aes_v8_ctr32_encrypt_blocks:
+ stp x29,x30,[sp,#-16]!
+ add x29,sp,#0
+ ldr w5,[x3,#240]
+
+ ldr w8, [x4, #12]
+ ld1 {v0.4s},[x4]
+
+ ld1 {v16.4s-v17.4s},[x3] // load key schedule...
+ sub w5,w5,#4
+ mov x12,#16
+ cmp x2,#2
+ add x7,x3,x5,lsl#4 // pointer to last 5 round keys
+ sub w5,w5,#2
+ ld1 {v20.4s-v21.4s},[x7],#32
+ ld1 {v22.4s-v23.4s},[x7],#32
+ ld1 {v7.4s},[x7]
+ add x7,x3,#32
+ mov w6,w5
+ csel x12,xzr,x12,lo
+#ifndef __ARMEB__
+ rev w8, w8
+#endif
+ orr v1.16b,v0.16b,v0.16b
+ add w10, w8, #1
+ orr v18.16b,v0.16b,v0.16b
+ add w8, w8, #2
+ orr v6.16b,v0.16b,v0.16b
+ rev w10, w10
+ mov v1.s[3],w10
+ b.ls .Lctr32_tail
+ rev w12, w8
+ sub x2,x2,#3 // bias
+ mov v18.s[3],w12
+ b .Loop3x_ctr32
+
+.align 4
+.Loop3x_ctr32:
+ aese v0.16b,v16.16b
+ aese v1.16b,v16.16b
+ aese v18.16b,v16.16b
+ ld1 {v16.4s},[x7],#16
+ aesmc v0.16b,v0.16b
+ aesmc v1.16b,v1.16b
+ aesmc v18.16b,v18.16b
+ subs w6,w6,#2
+ aese v0.16b,v17.16b
+ aese v1.16b,v17.16b
+ aese v18.16b,v17.16b
+ ld1 {v17.4s},[x7],#16
+ aesmc v0.16b,v0.16b
+ aesmc v1.16b,v1.16b
+ aesmc v18.16b,v18.16b
+ b.gt .Loop3x_ctr32
+
+ aese v0.16b,v16.16b
+ aese v1.16b,v16.16b
+ aese v18.16b,v16.16b
+ mov x7,x3
+ aesmc v4.16b,v0.16b
+ ld1 {v2.16b},[x0],#16
+ aesmc v5.16b,v1.16b
+ aesmc v18.16b,v18.16b
+ orr v0.16b,v6.16b,v6.16b
+ aese v4.16b,v17.16b
+ ld1 {v3.16b},[x0],#16
+ aese v5.16b,v17.16b
+ aese v18.16b,v17.16b
+ orr v1.16b,v6.16b,v6.16b
+ aesmc v4.16b,v4.16b
+ ld1 {v19.16b},[x0],#16
+ aesmc v5.16b,v5.16b
+ aesmc v17.16b,v18.16b
+ orr v18.16b,v6.16b,v6.16b
+ add w9,w8,#1
+ aese v4.16b,v20.16b
+ aese v5.16b,v20.16b
+ aese v17.16b,v20.16b
+ eor v2.16b,v2.16b,v7.16b
+ add w10,w8,#2
+ aesmc v4.16b,v4.16b
+ aesmc v5.16b,v5.16b
+ aesmc v17.16b,v17.16b
+ eor v3.16b,v3.16b,v7.16b
+ add w8,w8,#3
+ aese v4.16b,v21.16b
+ aese v5.16b,v21.16b
+ aese v17.16b,v21.16b
+ eor v19.16b,v19.16b,v7.16b
+ rev w9,w9
+ aesmc v4.16b,v4.16b
+ ld1 {v16.4s},[x7],#16 // re-pre-load rndkey[0]
+ aesmc v5.16b,v5.16b
+ aesmc v17.16b,v17.16b
+ mov v0.s[3], w9
+ rev w10,w10
+ aese v4.16b,v22.16b
+ aese v5.16b,v22.16b
+ aese v17.16b,v22.16b
+ mov v1.s[3], w10
+ rev w12,w8
+ aesmc v4.16b,v4.16b
+ aesmc v5.16b,v5.16b
+ aesmc v17.16b,v17.16b
+ mov v18.s[3], w12
+ subs x2,x2,#3
+ aese v4.16b,v23.16b
+ aese v5.16b,v23.16b
+ aese v17.16b,v23.16b
+
+ mov w6,w5
+ eor v2.16b,v2.16b,v4.16b
+ eor v3.16b,v3.16b,v5.16b
+ eor v19.16b,v19.16b,v17.16b
+ ld1 {v17.4s},[x7],#16 // re-pre-load rndkey[1]
+ st1 {v2.16b},[x1],#16
+ st1 {v3.16b},[x1],#16
+ st1 {v19.16b},[x1],#16
+ b.hs .Loop3x_ctr32
+
+ adds x2,x2,#3
+ b.eq .Lctr32_done
+ cmp x2,#1
+ mov x12,#16
+ csel x12,xzr,x12,eq
+
+.Lctr32_tail:
+ aese v0.16b,v16.16b
+ aese v1.16b,v16.16b
+ ld1 {v16.4s},[x7],#16
+ aesmc v0.16b,v0.16b
+ aesmc v1.16b,v1.16b
+ subs w6,w6,#2
+ aese v0.16b,v17.16b
+ aese v1.16b,v17.16b
+ ld1 {v17.4s},[x7],#16
+ aesmc v0.16b,v0.16b
+ aesmc v1.16b,v1.16b
+ b.gt .Lctr32_tail
+
+ aese v0.16b,v16.16b
+ aese v1.16b,v16.16b
+ aesmc v0.16b,v0.16b
+ aesmc v1.16b,v1.16b
+ aese v0.16b,v17.16b
+ aese v1.16b,v17.16b
+ aesmc v0.16b,v0.16b
+ aesmc v1.16b,v1.16b
+ ld1 {v2.16b},[x0],x12
+ aese v0.16b,v20.16b
+ aese v1.16b,v20.16b
+ ld1 {v3.16b},[x0]
+ aesmc v0.16b,v0.16b
+ aesmc v1.16b,v1.16b
+ aese v0.16b,v21.16b
+ aese v1.16b,v21.16b
+ aesmc v0.16b,v0.16b
+ aesmc v1.16b,v1.16b
+ aese v0.16b,v22.16b
+ aese v1.16b,v22.16b
+ eor v2.16b,v2.16b,v7.16b
+ aesmc v0.16b,v0.16b
+ aesmc v1.16b,v1.16b
+ eor v3.16b,v3.16b,v7.16b
+ aese v0.16b,v23.16b
+ aese v1.16b,v23.16b
+
+ cmp x2,#1
+ eor v2.16b,v2.16b,v0.16b
+ eor v3.16b,v3.16b,v1.16b
+ st1 {v2.16b},[x1],#16
+ b.eq .Lctr32_done
+ st1 {v3.16b},[x1]
+
+.Lctr32_done:
+ ldr x29,[sp],#16
+ ret
+.size aes_v8_ctr32_encrypt_blocks,.-aes_v8_ctr32_encrypt_blocks
+#endif
diff --git a/third_party/boringssl/linux-aarch64/crypto/modes/ghashv8-armx.S b/third_party/boringssl/linux-aarch64/crypto/modes/ghashv8-armx.S
new file mode 100644
index 0000000..1bfb263
--- /dev/null
+++ b/third_party/boringssl/linux-aarch64/crypto/modes/ghashv8-armx.S
@@ -0,0 +1,115 @@
+#include "arm_arch.h"
+
+.text
+.arch armv8-a+crypto
+.global gcm_init_v8
+.type gcm_init_v8,%function
+.align 4
+gcm_init_v8:
+ ld1 {v17.2d},[x1] //load H
+ movi v16.16b,#0xe1
+ ext v3.16b,v17.16b,v17.16b,#8
+ shl v16.2d,v16.2d,#57
+ ushr v18.2d,v16.2d,#63
+ ext v16.16b,v18.16b,v16.16b,#8 //t0=0xc2....01
+ dup v17.4s,v17.s[1]
+ ushr v19.2d,v3.2d,#63
+ sshr v17.4s,v17.4s,#31 //broadcast carry bit
+ and v19.16b,v19.16b,v16.16b
+ shl v3.2d,v3.2d,#1
+ ext v19.16b,v19.16b,v19.16b,#8
+ and v16.16b,v16.16b,v17.16b
+ orr v3.16b,v3.16b,v19.16b //H<<<=1
+ eor v3.16b,v3.16b,v16.16b //twisted H
+ st1 {v3.2d},[x0]
+
+ ret
+.size gcm_init_v8,.-gcm_init_v8
+
+.global gcm_gmult_v8
+.type gcm_gmult_v8,%function
+.align 4
+gcm_gmult_v8:
+ ld1 {v17.2d},[x0] //load Xi
+ movi v19.16b,#0xe1
+ ld1 {v20.2d},[x1] //load twisted H
+ shl v19.2d,v19.2d,#57
+#ifndef __ARMEB__
+ rev64 v17.16b,v17.16b
+#endif
+ ext v21.16b,v20.16b,v20.16b,#8
+ mov x3,#0
+ ext v3.16b,v17.16b,v17.16b,#8
+ mov x12,#0
+ eor v21.16b,v21.16b,v20.16b //Karatsuba pre-processing
+ mov x2,x0
+ b .Lgmult_v8
+.size gcm_gmult_v8,.-gcm_gmult_v8
+
+.global gcm_ghash_v8
+.type gcm_ghash_v8,%function
+.align 4
+gcm_ghash_v8:
+ ld1 {v0.2d},[x0] //load [rotated] Xi
+ subs x3,x3,#16
+ movi v19.16b,#0xe1
+ mov x12,#16
+ ld1 {v20.2d},[x1] //load twisted H
+ csel x12,xzr,x12,eq
+ ext v0.16b,v0.16b,v0.16b,#8
+ shl v19.2d,v19.2d,#57
+ ld1 {v17.2d},[x2],x12 //load [rotated] inp
+ ext v21.16b,v20.16b,v20.16b,#8
+#ifndef __ARMEB__
+ rev64 v0.16b,v0.16b
+ rev64 v17.16b,v17.16b
+#endif
+ eor v21.16b,v21.16b,v20.16b //Karatsuba pre-processing
+ ext v3.16b,v17.16b,v17.16b,#8
+ b .Loop_v8
+
+.align 4
+.Loop_v8:
+ ext v18.16b,v0.16b,v0.16b,#8
+ eor v3.16b,v3.16b,v0.16b //inp^=Xi
+ eor v17.16b,v17.16b,v18.16b //v17.16b is rotated inp^Xi
+
+.Lgmult_v8:
+ pmull v0.1q,v20.1d,v3.1d //H.lo·Xi.lo
+ eor v17.16b,v17.16b,v3.16b //Karatsuba pre-processing
+ pmull2 v2.1q,v20.2d,v3.2d //H.hi·Xi.hi
+ subs x3,x3,#16
+ pmull v1.1q,v21.1d,v17.1d //(H.lo+H.hi)·(Xi.lo+Xi.hi)
+ csel x12,xzr,x12,eq
+
+ ext v17.16b,v0.16b,v2.16b,#8 //Karatsuba post-processing
+ eor v18.16b,v0.16b,v2.16b
+ eor v1.16b,v1.16b,v17.16b
+ ld1 {v17.2d},[x2],x12 //load [rotated] inp
+ eor v1.16b,v1.16b,v18.16b
+ pmull v18.1q,v0.1d,v19.1d //1st phase
+
+ ins v2.d[0],v1.d[1]
+ ins v1.d[1],v0.d[0]
+#ifndef __ARMEB__
+ rev64 v17.16b,v17.16b
+#endif
+ eor v0.16b,v1.16b,v18.16b
+ ext v3.16b,v17.16b,v17.16b,#8
+
+ ext v18.16b,v0.16b,v0.16b,#8 //2nd phase
+ pmull v0.1q,v0.1d,v19.1d
+ eor v18.16b,v18.16b,v2.16b
+ eor v0.16b,v0.16b,v18.16b
+ b.hs .Loop_v8
+
+#ifndef __ARMEB__
+ rev64 v0.16b,v0.16b
+#endif
+ ext v0.16b,v0.16b,v0.16b,#8
+ st1 {v0.2d},[x0] //write out Xi
+
+ ret
+.size gcm_ghash_v8,.-gcm_ghash_v8
+.asciz "GHASH for ARMv8, CRYPTOGAMS by <appro@openssl.org>"
+.align 2
diff --git a/third_party/boringssl/linux-aarch64/crypto/sha/sha1-armv8.S b/third_party/boringssl/linux-aarch64/crypto/sha/sha1-armv8.S
new file mode 100644
index 0000000..f9d1262
--- /dev/null
+++ b/third_party/boringssl/linux-aarch64/crypto/sha/sha1-armv8.S
@@ -0,0 +1,1211 @@
+#include "arm_arch.h"
+
+.text
+
+.globl sha1_block_data_order
+.type sha1_block_data_order,%function
+.align 6
+sha1_block_data_order:
+ ldr x16,.LOPENSSL_armcap_P
+ adr x17,.LOPENSSL_armcap_P
+ add x16,x16,x17
+ ldr w16,[x16]
+ tst w16,#ARMV8_SHA1
+ b.ne .Lv8_entry
+
+ stp x29,x30,[sp,#-96]!
+ add x29,sp,#0
+ stp x19,x20,[sp,#16]
+ stp x21,x22,[sp,#32]
+ stp x23,x24,[sp,#48]
+ stp x25,x26,[sp,#64]
+ stp x27,x28,[sp,#80]
+
+ ldp w20,w21,[x0]
+ ldp w22,w23,[x0,#8]
+ ldr w24,[x0,#16]
+
+.Loop:
+ ldr x3,[x1],#64
+ movz w28,#0x7999
+ sub x2,x2,#1
+ movk w28,#0x5a82,lsl#16
+#ifdef __ARMEB__
+ ror x3,x3,#32
+#else
+ rev32 x3,x3
+#endif
+ add w24,w24,w28 // warm it up
+ add w24,w24,w3
+ lsr x4,x3,#32
+ ldr x5,[x1,#-56]
+ bic w25,w23,w21
+ and w26,w22,w21
+ ror w27,w20,#27
+ add w23,w23,w28 // future e+=K
+ orr w25,w25,w26
+ add w24,w24,w27 // e+=rot(a,5)
+ ror w21,w21,#2
+ add w23,w23,w4 // future e+=X[i]
+ add w24,w24,w25 // e+=F(b,c,d)
+#ifdef __ARMEB__
+ ror x5,x5,#32
+#else
+ rev32 x5,x5
+#endif
+ bic w25,w22,w20
+ and w26,w21,w20
+ ror w27,w24,#27
+ add w22,w22,w28 // future e+=K
+ orr w25,w25,w26
+ add w23,w23,w27 // e+=rot(a,5)
+ ror w20,w20,#2
+ add w22,w22,w5 // future e+=X[i]
+ add w23,w23,w25 // e+=F(b,c,d)
+ lsr x6,x5,#32
+ ldr x7,[x1,#-48]
+ bic w25,w21,w24
+ and w26,w20,w24
+ ror w27,w23,#27
+ add w21,w21,w28 // future e+=K
+ orr w25,w25,w26
+ add w22,w22,w27 // e+=rot(a,5)
+ ror w24,w24,#2
+ add w21,w21,w6 // future e+=X[i]
+ add w22,w22,w25 // e+=F(b,c,d)
+#ifdef __ARMEB__
+ ror x7,x7,#32
+#else
+ rev32 x7,x7
+#endif
+ bic w25,w20,w23
+ and w26,w24,w23
+ ror w27,w22,#27
+ add w20,w20,w28 // future e+=K
+ orr w25,w25,w26
+ add w21,w21,w27 // e+=rot(a,5)
+ ror w23,w23,#2
+ add w20,w20,w7 // future e+=X[i]
+ add w21,w21,w25 // e+=F(b,c,d)
+ lsr x8,x7,#32
+ ldr x9,[x1,#-40]
+ bic w25,w24,w22
+ and w26,w23,w22
+ ror w27,w21,#27
+ add w24,w24,w28 // future e+=K
+ orr w25,w25,w26
+ add w20,w20,w27 // e+=rot(a,5)
+ ror w22,w22,#2
+ add w24,w24,w8 // future e+=X[i]
+ add w20,w20,w25 // e+=F(b,c,d)
+#ifdef __ARMEB__
+ ror x9,x9,#32
+#else
+ rev32 x9,x9
+#endif
+ bic w25,w23,w21
+ and w26,w22,w21
+ ror w27,w20,#27
+ add w23,w23,w28 // future e+=K
+ orr w25,w25,w26
+ add w24,w24,w27 // e+=rot(a,5)
+ ror w21,w21,#2
+ add w23,w23,w9 // future e+=X[i]
+ add w24,w24,w25 // e+=F(b,c,d)
+ lsr x10,x9,#32
+ ldr x11,[x1,#-32]
+ bic w25,w22,w20
+ and w26,w21,w20
+ ror w27,w24,#27
+ add w22,w22,w28 // future e+=K
+ orr w25,w25,w26
+ add w23,w23,w27 // e+=rot(a,5)
+ ror w20,w20,#2
+ add w22,w22,w10 // future e+=X[i]
+ add w23,w23,w25 // e+=F(b,c,d)
+#ifdef __ARMEB__
+ ror x11,x11,#32
+#else
+ rev32 x11,x11
+#endif
+ bic w25,w21,w24
+ and w26,w20,w24
+ ror w27,w23,#27
+ add w21,w21,w28 // future e+=K
+ orr w25,w25,w26
+ add w22,w22,w27 // e+=rot(a,5)
+ ror w24,w24,#2
+ add w21,w21,w11 // future e+=X[i]
+ add w22,w22,w25 // e+=F(b,c,d)
+ lsr x12,x11,#32
+ ldr x13,[x1,#-24]
+ bic w25,w20,w23
+ and w26,w24,w23
+ ror w27,w22,#27
+ add w20,w20,w28 // future e+=K
+ orr w25,w25,w26
+ add w21,w21,w27 // e+=rot(a,5)
+ ror w23,w23,#2
+ add w20,w20,w12 // future e+=X[i]
+ add w21,w21,w25 // e+=F(b,c,d)
+#ifdef __ARMEB__
+ ror x13,x13,#32
+#else
+ rev32 x13,x13
+#endif
+ bic w25,w24,w22
+ and w26,w23,w22
+ ror w27,w21,#27
+ add w24,w24,w28 // future e+=K
+ orr w25,w25,w26
+ add w20,w20,w27 // e+=rot(a,5)
+ ror w22,w22,#2
+ add w24,w24,w13 // future e+=X[i]
+ add w20,w20,w25 // e+=F(b,c,d)
+ lsr x14,x13,#32
+ ldr x15,[x1,#-16]
+ bic w25,w23,w21
+ and w26,w22,w21
+ ror w27,w20,#27
+ add w23,w23,w28 // future e+=K
+ orr w25,w25,w26
+ add w24,w24,w27 // e+=rot(a,5)
+ ror w21,w21,#2
+ add w23,w23,w14 // future e+=X[i]
+ add w24,w24,w25 // e+=F(b,c,d)
+#ifdef __ARMEB__
+ ror x15,x15,#32
+#else
+ rev32 x15,x15
+#endif
+ bic w25,w22,w20
+ and w26,w21,w20
+ ror w27,w24,#27
+ add w22,w22,w28 // future e+=K
+ orr w25,w25,w26
+ add w23,w23,w27 // e+=rot(a,5)
+ ror w20,w20,#2
+ add w22,w22,w15 // future e+=X[i]
+ add w23,w23,w25 // e+=F(b,c,d)
+ lsr x16,x15,#32
+ ldr x17,[x1,#-8]
+ bic w25,w21,w24
+ and w26,w20,w24
+ ror w27,w23,#27
+ add w21,w21,w28 // future e+=K
+ orr w25,w25,w26
+ add w22,w22,w27 // e+=rot(a,5)
+ ror w24,w24,#2
+ add w21,w21,w16 // future e+=X[i]
+ add w22,w22,w25 // e+=F(b,c,d)
+#ifdef __ARMEB__
+ ror x17,x17,#32
+#else
+ rev32 x17,x17
+#endif
+ bic w25,w20,w23
+ and w26,w24,w23
+ ror w27,w22,#27
+ add w20,w20,w28 // future e+=K
+ orr w25,w25,w26
+ add w21,w21,w27 // e+=rot(a,5)
+ ror w23,w23,#2
+ add w20,w20,w17 // future e+=X[i]
+ add w21,w21,w25 // e+=F(b,c,d)
+ lsr x19,x17,#32
+ eor w3,w3,w5
+ bic w25,w24,w22
+ and w26,w23,w22
+ ror w27,w21,#27
+ eor w3,w3,w11
+ add w24,w24,w28 // future e+=K
+ orr w25,w25,w26
+ add w20,w20,w27 // e+=rot(a,5)
+ eor w3,w3,w16
+ ror w22,w22,#2
+ add w24,w24,w19 // future e+=X[i]
+ add w20,w20,w25 // e+=F(b,c,d)
+ ror w3,w3,#31
+ eor w4,w4,w6
+ bic w25,w23,w21
+ and w26,w22,w21
+ ror w27,w20,#27
+ eor w4,w4,w12
+ add w23,w23,w28 // future e+=K
+ orr w25,w25,w26
+ add w24,w24,w27 // e+=rot(a,5)
+ eor w4,w4,w17
+ ror w21,w21,#2
+ add w23,w23,w3 // future e+=X[i]
+ add w24,w24,w25 // e+=F(b,c,d)
+ ror w4,w4,#31
+ eor w5,w5,w7
+ bic w25,w22,w20
+ and w26,w21,w20
+ ror w27,w24,#27
+ eor w5,w5,w13
+ add w22,w22,w28 // future e+=K
+ orr w25,w25,w26
+ add w23,w23,w27 // e+=rot(a,5)
+ eor w5,w5,w19
+ ror w20,w20,#2
+ add w22,w22,w4 // future e+=X[i]
+ add w23,w23,w25 // e+=F(b,c,d)
+ ror w5,w5,#31
+ eor w6,w6,w8
+ bic w25,w21,w24
+ and w26,w20,w24
+ ror w27,w23,#27
+ eor w6,w6,w14
+ add w21,w21,w28 // future e+=K
+ orr w25,w25,w26
+ add w22,w22,w27 // e+=rot(a,5)
+ eor w6,w6,w3
+ ror w24,w24,#2
+ add w21,w21,w5 // future e+=X[i]
+ add w22,w22,w25 // e+=F(b,c,d)
+ ror w6,w6,#31
+ eor w7,w7,w9
+ bic w25,w20,w23
+ and w26,w24,w23
+ ror w27,w22,#27
+ eor w7,w7,w15
+ add w20,w20,w28 // future e+=K
+ orr w25,w25,w26
+ add w21,w21,w27 // e+=rot(a,5)
+ eor w7,w7,w4
+ ror w23,w23,#2
+ add w20,w20,w6 // future e+=X[i]
+ add w21,w21,w25 // e+=F(b,c,d)
+ ror w7,w7,#31
+ movz w28,#0xeba1
+ movk w28,#0x6ed9,lsl#16
+ eor w8,w8,w10
+ bic w25,w24,w22
+ and w26,w23,w22
+ ror w27,w21,#27
+ eor w8,w8,w16
+ add w24,w24,w28 // future e+=K
+ orr w25,w25,w26
+ add w20,w20,w27 // e+=rot(a,5)
+ eor w8,w8,w5
+ ror w22,w22,#2
+ add w24,w24,w7 // future e+=X[i]
+ add w20,w20,w25 // e+=F(b,c,d)
+ ror w8,w8,#31
+ eor w9,w9,w11
+ eor w25,w23,w21
+ ror w27,w20,#27
+ add w23,w23,w28 // future e+=K
+ eor w9,w9,w17
+ eor w25,w25,w22
+ add w24,w24,w27 // e+=rot(a,5)
+ ror w21,w21,#2
+ eor w9,w9,w6
+ add w23,w23,w8 // future e+=X[i]
+ add w24,w24,w25 // e+=F(b,c,d)
+ ror w9,w9,#31
+ eor w10,w10,w12
+ eor w25,w22,w20
+ ror w27,w24,#27
+ add w22,w22,w28 // future e+=K
+ eor w10,w10,w19
+ eor w25,w25,w21
+ add w23,w23,w27 // e+=rot(a,5)
+ ror w20,w20,#2
+ eor w10,w10,w7
+ add w22,w22,w9 // future e+=X[i]
+ add w23,w23,w25 // e+=F(b,c,d)
+ ror w10,w10,#31
+ eor w11,w11,w13
+ eor w25,w21,w24
+ ror w27,w23,#27
+ add w21,w21,w28 // future e+=K
+ eor w11,w11,w3
+ eor w25,w25,w20
+ add w22,w22,w27 // e+=rot(a,5)
+ ror w24,w24,#2
+ eor w11,w11,w8
+ add w21,w21,w10 // future e+=X[i]
+ add w22,w22,w25 // e+=F(b,c,d)
+ ror w11,w11,#31
+ eor w12,w12,w14
+ eor w25,w20,w23
+ ror w27,w22,#27
+ add w20,w20,w28 // future e+=K
+ eor w12,w12,w4
+ eor w25,w25,w24
+ add w21,w21,w27 // e+=rot(a,5)
+ ror w23,w23,#2
+ eor w12,w12,w9
+ add w20,w20,w11 // future e+=X[i]
+ add w21,w21,w25 // e+=F(b,c,d)
+ ror w12,w12,#31
+ eor w13,w13,w15
+ eor w25,w24,w22
+ ror w27,w21,#27
+ add w24,w24,w28 // future e+=K
+ eor w13,w13,w5
+ eor w25,w25,w23
+ add w20,w20,w27 // e+=rot(a,5)
+ ror w22,w22,#2
+ eor w13,w13,w10
+ add w24,w24,w12 // future e+=X[i]
+ add w20,w20,w25 // e+=F(b,c,d)
+ ror w13,w13,#31
+ eor w14,w14,w16
+ eor w25,w23,w21
+ ror w27,w20,#27
+ add w23,w23,w28 // future e+=K
+ eor w14,w14,w6
+ eor w25,w25,w22
+ add w24,w24,w27 // e+=rot(a,5)
+ ror w21,w21,#2
+ eor w14,w14,w11
+ add w23,w23,w13 // future e+=X[i]
+ add w24,w24,w25 // e+=F(b,c,d)
+ ror w14,w14,#31
+ eor w15,w15,w17
+ eor w25,w22,w20
+ ror w27,w24,#27
+ add w22,w22,w28 // future e+=K
+ eor w15,w15,w7
+ eor w25,w25,w21
+ add w23,w23,w27 // e+=rot(a,5)
+ ror w20,w20,#2
+ eor w15,w15,w12
+ add w22,w22,w14 // future e+=X[i]
+ add w23,w23,w25 // e+=F(b,c,d)
+ ror w15,w15,#31
+ eor w16,w16,w19
+ eor w25,w21,w24
+ ror w27,w23,#27
+ add w21,w21,w28 // future e+=K
+ eor w16,w16,w8
+ eor w25,w25,w20
+ add w22,w22,w27 // e+=rot(a,5)
+ ror w24,w24,#2
+ eor w16,w16,w13
+ add w21,w21,w15 // future e+=X[i]
+ add w22,w22,w25 // e+=F(b,c,d)
+ ror w16,w16,#31
+ eor w17,w17,w3
+ eor w25,w20,w23
+ ror w27,w22,#27
+ add w20,w20,w28 // future e+=K
+ eor w17,w17,w9
+ eor w25,w25,w24
+ add w21,w21,w27 // e+=rot(a,5)
+ ror w23,w23,#2
+ eor w17,w17,w14
+ add w20,w20,w16 // future e+=X[i]
+ add w21,w21,w25 // e+=F(b,c,d)
+ ror w17,w17,#31
+ eor w19,w19,w4
+ eor w25,w24,w22
+ ror w27,w21,#27
+ add w24,w24,w28 // future e+=K
+ eor w19,w19,w10
+ eor w25,w25,w23
+ add w20,w20,w27 // e+=rot(a,5)
+ ror w22,w22,#2
+ eor w19,w19,w15
+ add w24,w24,w17 // future e+=X[i]
+ add w20,w20,w25 // e+=F(b,c,d)
+ ror w19,w19,#31
+ eor w3,w3,w5
+ eor w25,w23,w21
+ ror w27,w20,#27
+ add w23,w23,w28 // future e+=K
+ eor w3,w3,w11
+ eor w25,w25,w22
+ add w24,w24,w27 // e+=rot(a,5)
+ ror w21,w21,#2
+ eor w3,w3,w16
+ add w23,w23,w19 // future e+=X[i]
+ add w24,w24,w25 // e+=F(b,c,d)
+ ror w3,w3,#31
+ eor w4,w4,w6
+ eor w25,w22,w20
+ ror w27,w24,#27
+ add w22,w22,w28 // future e+=K
+ eor w4,w4,w12
+ eor w25,w25,w21
+ add w23,w23,w27 // e+=rot(a,5)
+ ror w20,w20,#2
+ eor w4,w4,w17
+ add w22,w22,w3 // future e+=X[i]
+ add w23,w23,w25 // e+=F(b,c,d)
+ ror w4,w4,#31
+ eor w5,w5,w7
+ eor w25,w21,w24
+ ror w27,w23,#27
+ add w21,w21,w28 // future e+=K
+ eor w5,w5,w13
+ eor w25,w25,w20
+ add w22,w22,w27 // e+=rot(a,5)
+ ror w24,w24,#2
+ eor w5,w5,w19
+ add w21,w21,w4 // future e+=X[i]
+ add w22,w22,w25 // e+=F(b,c,d)
+ ror w5,w5,#31
+ eor w6,w6,w8
+ eor w25,w20,w23
+ ror w27,w22,#27
+ add w20,w20,w28 // future e+=K
+ eor w6,w6,w14
+ eor w25,w25,w24
+ add w21,w21,w27 // e+=rot(a,5)
+ ror w23,w23,#2
+ eor w6,w6,w3
+ add w20,w20,w5 // future e+=X[i]
+ add w21,w21,w25 // e+=F(b,c,d)
+ ror w6,w6,#31
+ eor w7,w7,w9
+ eor w25,w24,w22
+ ror w27,w21,#27
+ add w24,w24,w28 // future e+=K
+ eor w7,w7,w15
+ eor w25,w25,w23
+ add w20,w20,w27 // e+=rot(a,5)
+ ror w22,w22,#2
+ eor w7,w7,w4
+ add w24,w24,w6 // future e+=X[i]
+ add w20,w20,w25 // e+=F(b,c,d)
+ ror w7,w7,#31
+ eor w8,w8,w10
+ eor w25,w23,w21
+ ror w27,w20,#27
+ add w23,w23,w28 // future e+=K
+ eor w8,w8,w16
+ eor w25,w25,w22
+ add w24,w24,w27 // e+=rot(a,5)
+ ror w21,w21,#2
+ eor w8,w8,w5
+ add w23,w23,w7 // future e+=X[i]
+ add w24,w24,w25 // e+=F(b,c,d)
+ ror w8,w8,#31
+ eor w9,w9,w11
+ eor w25,w22,w20
+ ror w27,w24,#27
+ add w22,w22,w28 // future e+=K
+ eor w9,w9,w17
+ eor w25,w25,w21
+ add w23,w23,w27 // e+=rot(a,5)
+ ror w20,w20,#2
+ eor w9,w9,w6
+ add w22,w22,w8 // future e+=X[i]
+ add w23,w23,w25 // e+=F(b,c,d)
+ ror w9,w9,#31
+ eor w10,w10,w12
+ eor w25,w21,w24
+ ror w27,w23,#27
+ add w21,w21,w28 // future e+=K
+ eor w10,w10,w19
+ eor w25,w25,w20
+ add w22,w22,w27 // e+=rot(a,5)
+ ror w24,w24,#2
+ eor w10,w10,w7
+ add w21,w21,w9 // future e+=X[i]
+ add w22,w22,w25 // e+=F(b,c,d)
+ ror w10,w10,#31
+ eor w11,w11,w13
+ eor w25,w20,w23
+ ror w27,w22,#27
+ add w20,w20,w28 // future e+=K
+ eor w11,w11,w3
+ eor w25,w25,w24
+ add w21,w21,w27 // e+=rot(a,5)
+ ror w23,w23,#2
+ eor w11,w11,w8
+ add w20,w20,w10 // future e+=X[i]
+ add w21,w21,w25 // e+=F(b,c,d)
+ ror w11,w11,#31
+ movz w28,#0xbcdc
+ movk w28,#0x8f1b,lsl#16
+ eor w12,w12,w14
+ eor w25,w24,w22
+ ror w27,w21,#27
+ add w24,w24,w28 // future e+=K
+ eor w12,w12,w4
+ eor w25,w25,w23
+ add w20,w20,w27 // e+=rot(a,5)
+ ror w22,w22,#2
+ eor w12,w12,w9
+ add w24,w24,w11 // future e+=X[i]
+ add w20,w20,w25 // e+=F(b,c,d)
+ ror w12,w12,#31
+ orr w25,w21,w22
+ and w26,w21,w22
+ eor w13,w13,w15
+ ror w27,w20,#27
+ and w25,w25,w23
+ add w23,w23,w28 // future e+=K
+ eor w13,w13,w5
+ add w24,w24,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w21,w21,#2
+ eor w13,w13,w10
+ add w23,w23,w12 // future e+=X[i]
+ add w24,w24,w25 // e+=F(b,c,d)
+ ror w13,w13,#31
+ orr w25,w20,w21
+ and w26,w20,w21
+ eor w14,w14,w16
+ ror w27,w24,#27
+ and w25,w25,w22
+ add w22,w22,w28 // future e+=K
+ eor w14,w14,w6
+ add w23,w23,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w20,w20,#2
+ eor w14,w14,w11
+ add w22,w22,w13 // future e+=X[i]
+ add w23,w23,w25 // e+=F(b,c,d)
+ ror w14,w14,#31
+ orr w25,w24,w20
+ and w26,w24,w20
+ eor w15,w15,w17
+ ror w27,w23,#27
+ and w25,w25,w21
+ add w21,w21,w28 // future e+=K
+ eor w15,w15,w7
+ add w22,w22,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w24,w24,#2
+ eor w15,w15,w12
+ add w21,w21,w14 // future e+=X[i]
+ add w22,w22,w25 // e+=F(b,c,d)
+ ror w15,w15,#31
+ orr w25,w23,w24
+ and w26,w23,w24
+ eor w16,w16,w19
+ ror w27,w22,#27
+ and w25,w25,w20
+ add w20,w20,w28 // future e+=K
+ eor w16,w16,w8
+ add w21,w21,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w23,w23,#2
+ eor w16,w16,w13
+ add w20,w20,w15 // future e+=X[i]
+ add w21,w21,w25 // e+=F(b,c,d)
+ ror w16,w16,#31
+ orr w25,w22,w23
+ and w26,w22,w23
+ eor w17,w17,w3
+ ror w27,w21,#27
+ and w25,w25,w24
+ add w24,w24,w28 // future e+=K
+ eor w17,w17,w9
+ add w20,w20,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w22,w22,#2
+ eor w17,w17,w14
+ add w24,w24,w16 // future e+=X[i]
+ add w20,w20,w25 // e+=F(b,c,d)
+ ror w17,w17,#31
+ orr w25,w21,w22
+ and w26,w21,w22
+ eor w19,w19,w4
+ ror w27,w20,#27
+ and w25,w25,w23
+ add w23,w23,w28 // future e+=K
+ eor w19,w19,w10
+ add w24,w24,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w21,w21,#2
+ eor w19,w19,w15
+ add w23,w23,w17 // future e+=X[i]
+ add w24,w24,w25 // e+=F(b,c,d)
+ ror w19,w19,#31
+ orr w25,w20,w21
+ and w26,w20,w21
+ eor w3,w3,w5
+ ror w27,w24,#27
+ and w25,w25,w22
+ add w22,w22,w28 // future e+=K
+ eor w3,w3,w11
+ add w23,w23,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w20,w20,#2
+ eor w3,w3,w16
+ add w22,w22,w19 // future e+=X[i]
+ add w23,w23,w25 // e+=F(b,c,d)
+ ror w3,w3,#31
+ orr w25,w24,w20
+ and w26,w24,w20
+ eor w4,w4,w6
+ ror w27,w23,#27
+ and w25,w25,w21
+ add w21,w21,w28 // future e+=K
+ eor w4,w4,w12
+ add w22,w22,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w24,w24,#2
+ eor w4,w4,w17
+ add w21,w21,w3 // future e+=X[i]
+ add w22,w22,w25 // e+=F(b,c,d)
+ ror w4,w4,#31
+ orr w25,w23,w24
+ and w26,w23,w24
+ eor w5,w5,w7
+ ror w27,w22,#27
+ and w25,w25,w20
+ add w20,w20,w28 // future e+=K
+ eor w5,w5,w13
+ add w21,w21,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w23,w23,#2
+ eor w5,w5,w19
+ add w20,w20,w4 // future e+=X[i]
+ add w21,w21,w25 // e+=F(b,c,d)
+ ror w5,w5,#31
+ orr w25,w22,w23
+ and w26,w22,w23
+ eor w6,w6,w8
+ ror w27,w21,#27
+ and w25,w25,w24
+ add w24,w24,w28 // future e+=K
+ eor w6,w6,w14
+ add w20,w20,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w22,w22,#2
+ eor w6,w6,w3
+ add w24,w24,w5 // future e+=X[i]
+ add w20,w20,w25 // e+=F(b,c,d)
+ ror w6,w6,#31
+ orr w25,w21,w22
+ and w26,w21,w22
+ eor w7,w7,w9
+ ror w27,w20,#27
+ and w25,w25,w23
+ add w23,w23,w28 // future e+=K
+ eor w7,w7,w15
+ add w24,w24,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w21,w21,#2
+ eor w7,w7,w4
+ add w23,w23,w6 // future e+=X[i]
+ add w24,w24,w25 // e+=F(b,c,d)
+ ror w7,w7,#31
+ orr w25,w20,w21
+ and w26,w20,w21
+ eor w8,w8,w10
+ ror w27,w24,#27
+ and w25,w25,w22
+ add w22,w22,w28 // future e+=K
+ eor w8,w8,w16
+ add w23,w23,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w20,w20,#2
+ eor w8,w8,w5
+ add w22,w22,w7 // future e+=X[i]
+ add w23,w23,w25 // e+=F(b,c,d)
+ ror w8,w8,#31
+ orr w25,w24,w20
+ and w26,w24,w20
+ eor w9,w9,w11
+ ror w27,w23,#27
+ and w25,w25,w21
+ add w21,w21,w28 // future e+=K
+ eor w9,w9,w17
+ add w22,w22,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w24,w24,#2
+ eor w9,w9,w6
+ add w21,w21,w8 // future e+=X[i]
+ add w22,w22,w25 // e+=F(b,c,d)
+ ror w9,w9,#31
+ orr w25,w23,w24
+ and w26,w23,w24
+ eor w10,w10,w12
+ ror w27,w22,#27
+ and w25,w25,w20
+ add w20,w20,w28 // future e+=K
+ eor w10,w10,w19
+ add w21,w21,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w23,w23,#2
+ eor w10,w10,w7
+ add w20,w20,w9 // future e+=X[i]
+ add w21,w21,w25 // e+=F(b,c,d)
+ ror w10,w10,#31
+ orr w25,w22,w23
+ and w26,w22,w23
+ eor w11,w11,w13
+ ror w27,w21,#27
+ and w25,w25,w24
+ add w24,w24,w28 // future e+=K
+ eor w11,w11,w3
+ add w20,w20,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w22,w22,#2
+ eor w11,w11,w8
+ add w24,w24,w10 // future e+=X[i]
+ add w20,w20,w25 // e+=F(b,c,d)
+ ror w11,w11,#31
+ orr w25,w21,w22
+ and w26,w21,w22
+ eor w12,w12,w14
+ ror w27,w20,#27
+ and w25,w25,w23
+ add w23,w23,w28 // future e+=K
+ eor w12,w12,w4
+ add w24,w24,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w21,w21,#2
+ eor w12,w12,w9
+ add w23,w23,w11 // future e+=X[i]
+ add w24,w24,w25 // e+=F(b,c,d)
+ ror w12,w12,#31
+ orr w25,w20,w21
+ and w26,w20,w21
+ eor w13,w13,w15
+ ror w27,w24,#27
+ and w25,w25,w22
+ add w22,w22,w28 // future e+=K
+ eor w13,w13,w5
+ add w23,w23,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w20,w20,#2
+ eor w13,w13,w10
+ add w22,w22,w12 // future e+=X[i]
+ add w23,w23,w25 // e+=F(b,c,d)
+ ror w13,w13,#31
+ orr w25,w24,w20
+ and w26,w24,w20
+ eor w14,w14,w16
+ ror w27,w23,#27
+ and w25,w25,w21
+ add w21,w21,w28 // future e+=K
+ eor w14,w14,w6
+ add w22,w22,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w24,w24,#2
+ eor w14,w14,w11
+ add w21,w21,w13 // future e+=X[i]
+ add w22,w22,w25 // e+=F(b,c,d)
+ ror w14,w14,#31
+ orr w25,w23,w24
+ and w26,w23,w24
+ eor w15,w15,w17
+ ror w27,w22,#27
+ and w25,w25,w20
+ add w20,w20,w28 // future e+=K
+ eor w15,w15,w7
+ add w21,w21,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w23,w23,#2
+ eor w15,w15,w12
+ add w20,w20,w14 // future e+=X[i]
+ add w21,w21,w25 // e+=F(b,c,d)
+ ror w15,w15,#31
+ movz w28,#0xc1d6
+ movk w28,#0xca62,lsl#16
+ orr w25,w22,w23
+ and w26,w22,w23
+ eor w16,w16,w19
+ ror w27,w21,#27
+ and w25,w25,w24
+ add w24,w24,w28 // future e+=K
+ eor w16,w16,w8
+ add w20,w20,w27 // e+=rot(a,5)
+ orr w25,w25,w26
+ ror w22,w22,#2
+ eor w16,w16,w13
+ add w24,w24,w15 // future e+=X[i]
+ add w20,w20,w25 // e+=F(b,c,d)
+ ror w16,w16,#31
+ eor w17,w17,w3
+ eor w25,w23,w21
+ ror w27,w20,#27
+ add w23,w23,w28 // future e+=K
+ eor w17,w17,w9
+ eor w25,w25,w22
+ add w24,w24,w27 // e+=rot(a,5)
+ ror w21,w21,#2
+ eor w17,w17,w14
+ add w23,w23,w16 // future e+=X[i]
+ add w24,w24,w25 // e+=F(b,c,d)
+ ror w17,w17,#31
+ eor w19,w19,w4
+ eor w25,w22,w20
+ ror w27,w24,#27
+ add w22,w22,w28 // future e+=K
+ eor w19,w19,w10
+ eor w25,w25,w21
+ add w23,w23,w27 // e+=rot(a,5)
+ ror w20,w20,#2
+ eor w19,w19,w15
+ add w22,w22,w17 // future e+=X[i]
+ add w23,w23,w25 // e+=F(b,c,d)
+ ror w19,w19,#31
+ eor w3,w3,w5
+ eor w25,w21,w24
+ ror w27,w23,#27
+ add w21,w21,w28 // future e+=K
+ eor w3,w3,w11
+ eor w25,w25,w20
+ add w22,w22,w27 // e+=rot(a,5)
+ ror w24,w24,#2
+ eor w3,w3,w16
+ add w21,w21,w19 // future e+=X[i]
+ add w22,w22,w25 // e+=F(b,c,d)
+ ror w3,w3,#31
+ eor w4,w4,w6
+ eor w25,w20,w23
+ ror w27,w22,#27
+ add w20,w20,w28 // future e+=K
+ eor w4,w4,w12
+ eor w25,w25,w24
+ add w21,w21,w27 // e+=rot(a,5)
+ ror w23,w23,#2
+ eor w4,w4,w17
+ add w20,w20,w3 // future e+=X[i]
+ add w21,w21,w25 // e+=F(b,c,d)
+ ror w4,w4,#31
+ eor w5,w5,w7
+ eor w25,w24,w22
+ ror w27,w21,#27
+ add w24,w24,w28 // future e+=K
+ eor w5,w5,w13
+ eor w25,w25,w23
+ add w20,w20,w27 // e+=rot(a,5)
+ ror w22,w22,#2
+ eor w5,w5,w19
+ add w24,w24,w4 // future e+=X[i]
+ add w20,w20,w25 // e+=F(b,c,d)
+ ror w5,w5,#31
+ eor w6,w6,w8
+ eor w25,w23,w21
+ ror w27,w20,#27
+ add w23,w23,w28 // future e+=K
+ eor w6,w6,w14
+ eor w25,w25,w22
+ add w24,w24,w27 // e+=rot(a,5)
+ ror w21,w21,#2
+ eor w6,w6,w3
+ add w23,w23,w5 // future e+=X[i]
+ add w24,w24,w25 // e+=F(b,c,d)
+ ror w6,w6,#31
+ eor w7,w7,w9
+ eor w25,w22,w20
+ ror w27,w24,#27
+ add w22,w22,w28 // future e+=K
+ eor w7,w7,w15
+ eor w25,w25,w21
+ add w23,w23,w27 // e+=rot(a,5)
+ ror w20,w20,#2
+ eor w7,w7,w4
+ add w22,w22,w6 // future e+=X[i]
+ add w23,w23,w25 // e+=F(b,c,d)
+ ror w7,w7,#31
+ eor w8,w8,w10
+ eor w25,w21,w24
+ ror w27,w23,#27
+ add w21,w21,w28 // future e+=K
+ eor w8,w8,w16
+ eor w25,w25,w20
+ add w22,w22,w27 // e+=rot(a,5)
+ ror w24,w24,#2
+ eor w8,w8,w5
+ add w21,w21,w7 // future e+=X[i]
+ add w22,w22,w25 // e+=F(b,c,d)
+ ror w8,w8,#31
+ eor w9,w9,w11
+ eor w25,w20,w23
+ ror w27,w22,#27
+ add w20,w20,w28 // future e+=K
+ eor w9,w9,w17
+ eor w25,w25,w24
+ add w21,w21,w27 // e+=rot(a,5)
+ ror w23,w23,#2
+ eor w9,w9,w6
+ add w20,w20,w8 // future e+=X[i]
+ add w21,w21,w25 // e+=F(b,c,d)
+ ror w9,w9,#31
+ eor w10,w10,w12
+ eor w25,w24,w22
+ ror w27,w21,#27
+ add w24,w24,w28 // future e+=K
+ eor w10,w10,w19
+ eor w25,w25,w23
+ add w20,w20,w27 // e+=rot(a,5)
+ ror w22,w22,#2
+ eor w10,w10,w7
+ add w24,w24,w9 // future e+=X[i]
+ add w20,w20,w25 // e+=F(b,c,d)
+ ror w10,w10,#31
+ eor w11,w11,w13
+ eor w25,w23,w21
+ ror w27,w20,#27
+ add w23,w23,w28 // future e+=K
+ eor w11,w11,w3
+ eor w25,w25,w22
+ add w24,w24,w27 // e+=rot(a,5)
+ ror w21,w21,#2
+ eor w11,w11,w8
+ add w23,w23,w10 // future e+=X[i]
+ add w24,w24,w25 // e+=F(b,c,d)
+ ror w11,w11,#31
+ eor w12,w12,w14
+ eor w25,w22,w20
+ ror w27,w24,#27
+ add w22,w22,w28 // future e+=K
+ eor w12,w12,w4
+ eor w25,w25,w21
+ add w23,w23,w27 // e+=rot(a,5)
+ ror w20,w20,#2
+ eor w12,w12,w9
+ add w22,w22,w11 // future e+=X[i]
+ add w23,w23,w25 // e+=F(b,c,d)
+ ror w12,w12,#31
+ eor w13,w13,w15
+ eor w25,w21,w24
+ ror w27,w23,#27
+ add w21,w21,w28 // future e+=K
+ eor w13,w13,w5
+ eor w25,w25,w20
+ add w22,w22,w27 // e+=rot(a,5)
+ ror w24,w24,#2
+ eor w13,w13,w10
+ add w21,w21,w12 // future e+=X[i]
+ add w22,w22,w25 // e+=F(b,c,d)
+ ror w13,w13,#31
+ eor w14,w14,w16
+ eor w25,w20,w23
+ ror w27,w22,#27
+ add w20,w20,w28 // future e+=K
+ eor w14,w14,w6
+ eor w25,w25,w24
+ add w21,w21,w27 // e+=rot(a,5)
+ ror w23,w23,#2
+ eor w14,w14,w11
+ add w20,w20,w13 // future e+=X[i]
+ add w21,w21,w25 // e+=F(b,c,d)
+ ror w14,w14,#31
+ eor w15,w15,w17
+ eor w25,w24,w22
+ ror w27,w21,#27
+ add w24,w24,w28 // future e+=K
+ eor w15,w15,w7
+ eor w25,w25,w23
+ add w20,w20,w27 // e+=rot(a,5)
+ ror w22,w22,#2
+ eor w15,w15,w12
+ add w24,w24,w14 // future e+=X[i]
+ add w20,w20,w25 // e+=F(b,c,d)
+ ror w15,w15,#31
+ eor w16,w16,w19
+ eor w25,w23,w21
+ ror w27,w20,#27
+ add w23,w23,w28 // future e+=K
+ eor w16,w16,w8
+ eor w25,w25,w22
+ add w24,w24,w27 // e+=rot(a,5)
+ ror w21,w21,#2
+ eor w16,w16,w13
+ add w23,w23,w15 // future e+=X[i]
+ add w24,w24,w25 // e+=F(b,c,d)
+ ror w16,w16,#31
+ eor w17,w17,w3
+ eor w25,w22,w20
+ ror w27,w24,#27
+ add w22,w22,w28 // future e+=K
+ eor w17,w17,w9
+ eor w25,w25,w21
+ add w23,w23,w27 // e+=rot(a,5)
+ ror w20,w20,#2
+ eor w17,w17,w14
+ add w22,w22,w16 // future e+=X[i]
+ add w23,w23,w25 // e+=F(b,c,d)
+ ror w17,w17,#31
+ eor w19,w19,w4
+ eor w25,w21,w24
+ ror w27,w23,#27
+ add w21,w21,w28 // future e+=K
+ eor w19,w19,w10
+ eor w25,w25,w20
+ add w22,w22,w27 // e+=rot(a,5)
+ ror w24,w24,#2
+ eor w19,w19,w15
+ add w21,w21,w17 // future e+=X[i]
+ add w22,w22,w25 // e+=F(b,c,d)
+ ror w19,w19,#31
+ ldp w4,w5,[x0]
+ eor w25,w20,w23
+ ror w27,w22,#27
+ add w20,w20,w28 // future e+=K
+ eor w25,w25,w24
+ add w21,w21,w27 // e+=rot(a,5)
+ ror w23,w23,#2
+ add w20,w20,w19 // future e+=X[i]
+ add w21,w21,w25 // e+=F(b,c,d)
+ ldp w6,w7,[x0,#8]
+ eor w25,w24,w22
+ ror w27,w21,#27
+ eor w25,w25,w23
+ add w20,w20,w27 // e+=rot(a,5)
+ ror w22,w22,#2
+ ldr w8,[x0,#16]
+ add w20,w20,w25 // e+=F(b,c,d)
+ add w21,w21,w5
+ add w22,w22,w6
+ add w20,w20,w4
+ add w23,w23,w7
+ add w24,w24,w8
+ stp w20,w21,[x0]
+ stp w22,w23,[x0,#8]
+ str w24,[x0,#16]
+ cbnz x2,.Loop
+
+ ldp x19,x20,[sp,#16]
+ ldp x21,x22,[sp,#32]
+ ldp x23,x24,[sp,#48]
+ ldp x25,x26,[sp,#64]
+ ldp x27,x28,[sp,#80]
+ ldr x29,[sp],#96
+ ret
+.size sha1_block_data_order,.-sha1_block_data_order
+.type sha1_block_armv8,%function
+.align 6
+sha1_block_armv8:
+.Lv8_entry:
+ stp x29,x30,[sp,#-16]!
+ add x29,sp,#0
+
+ adr x4,.Lconst
+ eor v1.16b,v1.16b,v1.16b
+ ld1 {v0.4s},[x0],#16
+ ld1 {v1.s}[0],[x0]
+ sub x0,x0,#16
+ ld1 {v16.4s-v19.4s},[x4]
+
+.Loop_hw:
+ ld1 {v4.16b-v7.16b},[x1],#64
+ sub x2,x2,#1
+ rev32 v4.16b,v4.16b
+ rev32 v5.16b,v5.16b
+
+ add v20.4s,v16.4s,v4.4s
+ rev32 v6.16b,v6.16b
+ orr v22.16b,v0.16b,v0.16b // offload
+
+ add v21.4s,v16.4s,v5.4s
+ rev32 v7.16b,v7.16b
+ .inst 0x5e280803 //sha1h v3.16b,v0.16b
+ .inst 0x5e140020 //sha1c v0.16b,v1.16b,v20.4s // 0
+ add v20.4s,v16.4s,v6.4s
+ .inst 0x5e0630a4 //sha1su0 v4.16b,v5.16b,v6.16b
+ .inst 0x5e280802 //sha1h v2.16b,v0.16b // 1
+ .inst 0x5e150060 //sha1c v0.16b,v3.16b,v21.4s
+ add v21.4s,v16.4s,v7.4s
+ .inst 0x5e2818e4 //sha1su1 v4.16b,v7.16b
+ .inst 0x5e0730c5 //sha1su0 v5.16b,v6.16b,v7.16b
+ .inst 0x5e280803 //sha1h v3.16b,v0.16b // 2
+ .inst 0x5e140040 //sha1c v0.16b,v2.16b,v20.4s
+ add v20.4s,v16.4s,v4.4s
+ .inst 0x5e281885 //sha1su1 v5.16b,v4.16b
+ .inst 0x5e0430e6 //sha1su0 v6.16b,v7.16b,v4.16b
+ .inst 0x5e280802 //sha1h v2.16b,v0.16b // 3
+ .inst 0x5e150060 //sha1c v0.16b,v3.16b,v21.4s
+ add v21.4s,v17.4s,v5.4s
+ .inst 0x5e2818a6 //sha1su1 v6.16b,v5.16b
+ .inst 0x5e053087 //sha1su0 v7.16b,v4.16b,v5.16b
+ .inst 0x5e280803 //sha1h v3.16b,v0.16b // 4
+ .inst 0x5e140040 //sha1c v0.16b,v2.16b,v20.4s
+ add v20.4s,v17.4s,v6.4s
+ .inst 0x5e2818c7 //sha1su1 v7.16b,v6.16b
+ .inst 0x5e0630a4 //sha1su0 v4.16b,v5.16b,v6.16b
+ .inst 0x5e280802 //sha1h v2.16b,v0.16b // 5
+ .inst 0x5e151060 //sha1p v0.16b,v3.16b,v21.4s
+ add v21.4s,v17.4s,v7.4s
+ .inst 0x5e2818e4 //sha1su1 v4.16b,v7.16b
+ .inst 0x5e0730c5 //sha1su0 v5.16b,v6.16b,v7.16b
+ .inst 0x5e280803 //sha1h v3.16b,v0.16b // 6
+ .inst 0x5e141040 //sha1p v0.16b,v2.16b,v20.4s
+ add v20.4s,v17.4s,v4.4s
+ .inst 0x5e281885 //sha1su1 v5.16b,v4.16b
+ .inst 0x5e0430e6 //sha1su0 v6.16b,v7.16b,v4.16b
+ .inst 0x5e280802 //sha1h v2.16b,v0.16b // 7
+ .inst 0x5e151060 //sha1p v0.16b,v3.16b,v21.4s
+ add v21.4s,v17.4s,v5.4s
+ .inst 0x5e2818a6 //sha1su1 v6.16b,v5.16b
+ .inst 0x5e053087 //sha1su0 v7.16b,v4.16b,v5.16b
+ .inst 0x5e280803 //sha1h v3.16b,v0.16b // 8
+ .inst 0x5e141040 //sha1p v0.16b,v2.16b,v20.4s
+ add v20.4s,v18.4s,v6.4s
+ .inst 0x5e2818c7 //sha1su1 v7.16b,v6.16b
+ .inst 0x5e0630a4 //sha1su0 v4.16b,v5.16b,v6.16b
+ .inst 0x5e280802 //sha1h v2.16b,v0.16b // 9
+ .inst 0x5e151060 //sha1p v0.16b,v3.16b,v21.4s
+ add v21.4s,v18.4s,v7.4s
+ .inst 0x5e2818e4 //sha1su1 v4.16b,v7.16b
+ .inst 0x5e0730c5 //sha1su0 v5.16b,v6.16b,v7.16b
+ .inst 0x5e280803 //sha1h v3.16b,v0.16b // 10
+ .inst 0x5e142040 //sha1m v0.16b,v2.16b,v20.4s
+ add v20.4s,v18.4s,v4.4s
+ .inst 0x5e281885 //sha1su1 v5.16b,v4.16b
+ .inst 0x5e0430e6 //sha1su0 v6.16b,v7.16b,v4.16b
+ .inst 0x5e280802 //sha1h v2.16b,v0.16b // 11
+ .inst 0x5e152060 //sha1m v0.16b,v3.16b,v21.4s
+ add v21.4s,v18.4s,v5.4s
+ .inst 0x5e2818a6 //sha1su1 v6.16b,v5.16b
+ .inst 0x5e053087 //sha1su0 v7.16b,v4.16b,v5.16b
+ .inst 0x5e280803 //sha1h v3.16b,v0.16b // 12
+ .inst 0x5e142040 //sha1m v0.16b,v2.16b,v20.4s
+ add v20.4s,v18.4s,v6.4s
+ .inst 0x5e2818c7 //sha1su1 v7.16b,v6.16b
+ .inst 0x5e0630a4 //sha1su0 v4.16b,v5.16b,v6.16b
+ .inst 0x5e280802 //sha1h v2.16b,v0.16b // 13
+ .inst 0x5e152060 //sha1m v0.16b,v3.16b,v21.4s
+ add v21.4s,v19.4s,v7.4s
+ .inst 0x5e2818e4 //sha1su1 v4.16b,v7.16b
+ .inst 0x5e0730c5 //sha1su0 v5.16b,v6.16b,v7.16b
+ .inst 0x5e280803 //sha1h v3.16b,v0.16b // 14
+ .inst 0x5e142040 //sha1m v0.16b,v2.16b,v20.4s
+ add v20.4s,v19.4s,v4.4s
+ .inst 0x5e281885 //sha1su1 v5.16b,v4.16b
+ .inst 0x5e0430e6 //sha1su0 v6.16b,v7.16b,v4.16b
+ .inst 0x5e280802 //sha1h v2.16b,v0.16b // 15
+ .inst 0x5e151060 //sha1p v0.16b,v3.16b,v21.4s
+ add v21.4s,v19.4s,v5.4s
+ .inst 0x5e2818a6 //sha1su1 v6.16b,v5.16b
+ .inst 0x5e053087 //sha1su0 v7.16b,v4.16b,v5.16b
+ .inst 0x5e280803 //sha1h v3.16b,v0.16b // 16
+ .inst 0x5e141040 //sha1p v0.16b,v2.16b,v20.4s
+ add v20.4s,v19.4s,v6.4s
+ .inst 0x5e2818c7 //sha1su1 v7.16b,v6.16b
+ .inst 0x5e280802 //sha1h v2.16b,v0.16b // 17
+ .inst 0x5e151060 //sha1p v0.16b,v3.16b,v21.4s
+ add v21.4s,v19.4s,v7.4s
+
+ .inst 0x5e280803 //sha1h v3.16b,v0.16b // 18
+ .inst 0x5e141040 //sha1p v0.16b,v2.16b,v20.4s
+
+ .inst 0x5e280802 //sha1h v2.16b,v0.16b // 19
+ .inst 0x5e151060 //sha1p v0.16b,v3.16b,v21.4s
+
+ add v1.4s,v1.4s,v2.4s
+ add v0.4s,v0.4s,v22.4s
+
+ cbnz x2,.Loop_hw
+
+ st1 {v0.4s},[x0],#16
+ st1 {v1.s}[0],[x0]
+
+ ldr x29,[sp],#16
+ ret
+.size sha1_block_armv8,.-sha1_block_armv8
+.align 6
+.Lconst:
+.long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 //K_00_19
+.long 0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1 //K_20_39
+.long 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc //K_40_59
+.long 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6 //K_60_79
+.LOPENSSL_armcap_P:
+.quad OPENSSL_armcap_P-.
+.asciz "SHA1 block transform for ARMv8, CRYPTOGAMS by <appro@openssl.org>"
+.align 2
+.comm OPENSSL_armcap_P,4,4
diff --git a/third_party/boringssl/linux-aarch64/crypto/sha/sha256-armv8.S b/third_party/boringssl/linux-aarch64/crypto/sha/sha256-armv8.S
new file mode 100644
index 0000000..bd43b1f
--- /dev/null
+++ b/third_party/boringssl/linux-aarch64/crypto/sha/sha256-armv8.S
@@ -0,0 +1,1141 @@
+#include "arm_arch.h"
+
+.text
+
+.globl sha256_block_data_order
+.type sha256_block_data_order,%function
+.align 6
+sha256_block_data_order:
+ ldr x16,.LOPENSSL_armcap_P
+ adr x17,.LOPENSSL_armcap_P
+ add x16,x16,x17
+ ldr w16,[x16]
+ tst w16,#ARMV8_SHA256
+ b.ne .Lv8_entry
+ stp x29,x30,[sp,#-128]!
+ add x29,sp,#0
+
+ stp x19,x20,[sp,#16]
+ stp x21,x22,[sp,#32]
+ stp x23,x24,[sp,#48]
+ stp x25,x26,[sp,#64]
+ stp x27,x28,[sp,#80]
+ sub sp,sp,#4*4
+
+ ldp w20,w21,[x0] // load context
+ ldp w22,w23,[x0,#2*4]
+ ldp w24,w25,[x0,#4*4]
+ add x2,x1,x2,lsl#6 // end of input
+ ldp w26,w27,[x0,#6*4]
+ adr x30,K256
+ stp x0,x2,[x29,#96]
+
+.Loop:
+ ldp w3,w4,[x1],#2*4
+ ldr w19,[x30],#4 // *K++
+ eor w28,w21,w22 // magic seed
+ str x1,[x29,#112]
+#ifndef __ARMEB__
+ rev w3,w3 // 0
+#endif
+ ror w16,w24,#6
+ add w27,w27,w19 // h+=K[i]
+ eor w6,w24,w24,ror#14
+ and w17,w25,w24
+ bic w19,w26,w24
+ add w27,w27,w3 // h+=X[i]
+ orr w17,w17,w19 // Ch(e,f,g)
+ eor w19,w20,w21 // a^b, b^c in next round
+ eor w16,w16,w6,ror#11 // Sigma1(e)
+ ror w6,w20,#2
+ add w27,w27,w17 // h+=Ch(e,f,g)
+ eor w17,w20,w20,ror#9
+ add w27,w27,w16 // h+=Sigma1(e)
+ and w28,w28,w19 // (b^c)&=(a^b)
+ add w23,w23,w27 // d+=h
+ eor w28,w28,w21 // Maj(a,b,c)
+ eor w17,w6,w17,ror#13 // Sigma0(a)
+ add w27,w27,w28 // h+=Maj(a,b,c)
+ ldr w28,[x30],#4 // *K++, w19 in next round
+ //add w27,w27,w17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev w4,w4 // 1
+#endif
+ ldp w5,w6,[x1],#2*4
+ add w27,w27,w17 // h+=Sigma0(a)
+ ror w16,w23,#6
+ add w26,w26,w28 // h+=K[i]
+ eor w7,w23,w23,ror#14
+ and w17,w24,w23
+ bic w28,w25,w23
+ add w26,w26,w4 // h+=X[i]
+ orr w17,w17,w28 // Ch(e,f,g)
+ eor w28,w27,w20 // a^b, b^c in next round
+ eor w16,w16,w7,ror#11 // Sigma1(e)
+ ror w7,w27,#2
+ add w26,w26,w17 // h+=Ch(e,f,g)
+ eor w17,w27,w27,ror#9
+ add w26,w26,w16 // h+=Sigma1(e)
+ and w19,w19,w28 // (b^c)&=(a^b)
+ add w22,w22,w26 // d+=h
+ eor w19,w19,w20 // Maj(a,b,c)
+ eor w17,w7,w17,ror#13 // Sigma0(a)
+ add w26,w26,w19 // h+=Maj(a,b,c)
+ ldr w19,[x30],#4 // *K++, w28 in next round
+ //add w26,w26,w17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev w5,w5 // 2
+#endif
+ add w26,w26,w17 // h+=Sigma0(a)
+ ror w16,w22,#6
+ add w25,w25,w19 // h+=K[i]
+ eor w8,w22,w22,ror#14
+ and w17,w23,w22
+ bic w19,w24,w22
+ add w25,w25,w5 // h+=X[i]
+ orr w17,w17,w19 // Ch(e,f,g)
+ eor w19,w26,w27 // a^b, b^c in next round
+ eor w16,w16,w8,ror#11 // Sigma1(e)
+ ror w8,w26,#2
+ add w25,w25,w17 // h+=Ch(e,f,g)
+ eor w17,w26,w26,ror#9
+ add w25,w25,w16 // h+=Sigma1(e)
+ and w28,w28,w19 // (b^c)&=(a^b)
+ add w21,w21,w25 // d+=h
+ eor w28,w28,w27 // Maj(a,b,c)
+ eor w17,w8,w17,ror#13 // Sigma0(a)
+ add w25,w25,w28 // h+=Maj(a,b,c)
+ ldr w28,[x30],#4 // *K++, w19 in next round
+ //add w25,w25,w17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev w6,w6 // 3
+#endif
+ ldp w7,w8,[x1],#2*4
+ add w25,w25,w17 // h+=Sigma0(a)
+ ror w16,w21,#6
+ add w24,w24,w28 // h+=K[i]
+ eor w9,w21,w21,ror#14
+ and w17,w22,w21
+ bic w28,w23,w21
+ add w24,w24,w6 // h+=X[i]
+ orr w17,w17,w28 // Ch(e,f,g)
+ eor w28,w25,w26 // a^b, b^c in next round
+ eor w16,w16,w9,ror#11 // Sigma1(e)
+ ror w9,w25,#2
+ add w24,w24,w17 // h+=Ch(e,f,g)
+ eor w17,w25,w25,ror#9
+ add w24,w24,w16 // h+=Sigma1(e)
+ and w19,w19,w28 // (b^c)&=(a^b)
+ add w20,w20,w24 // d+=h
+ eor w19,w19,w26 // Maj(a,b,c)
+ eor w17,w9,w17,ror#13 // Sigma0(a)
+ add w24,w24,w19 // h+=Maj(a,b,c)
+ ldr w19,[x30],#4 // *K++, w28 in next round
+ //add w24,w24,w17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev w7,w7 // 4
+#endif
+ add w24,w24,w17 // h+=Sigma0(a)
+ ror w16,w20,#6
+ add w23,w23,w19 // h+=K[i]
+ eor w10,w20,w20,ror#14
+ and w17,w21,w20
+ bic w19,w22,w20
+ add w23,w23,w7 // h+=X[i]
+ orr w17,w17,w19 // Ch(e,f,g)
+ eor w19,w24,w25 // a^b, b^c in next round
+ eor w16,w16,w10,ror#11 // Sigma1(e)
+ ror w10,w24,#2
+ add w23,w23,w17 // h+=Ch(e,f,g)
+ eor w17,w24,w24,ror#9
+ add w23,w23,w16 // h+=Sigma1(e)
+ and w28,w28,w19 // (b^c)&=(a^b)
+ add w27,w27,w23 // d+=h
+ eor w28,w28,w25 // Maj(a,b,c)
+ eor w17,w10,w17,ror#13 // Sigma0(a)
+ add w23,w23,w28 // h+=Maj(a,b,c)
+ ldr w28,[x30],#4 // *K++, w19 in next round
+ //add w23,w23,w17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev w8,w8 // 5
+#endif
+ ldp w9,w10,[x1],#2*4
+ add w23,w23,w17 // h+=Sigma0(a)
+ ror w16,w27,#6
+ add w22,w22,w28 // h+=K[i]
+ eor w11,w27,w27,ror#14
+ and w17,w20,w27
+ bic w28,w21,w27
+ add w22,w22,w8 // h+=X[i]
+ orr w17,w17,w28 // Ch(e,f,g)
+ eor w28,w23,w24 // a^b, b^c in next round
+ eor w16,w16,w11,ror#11 // Sigma1(e)
+ ror w11,w23,#2
+ add w22,w22,w17 // h+=Ch(e,f,g)
+ eor w17,w23,w23,ror#9
+ add w22,w22,w16 // h+=Sigma1(e)
+ and w19,w19,w28 // (b^c)&=(a^b)
+ add w26,w26,w22 // d+=h
+ eor w19,w19,w24 // Maj(a,b,c)
+ eor w17,w11,w17,ror#13 // Sigma0(a)
+ add w22,w22,w19 // h+=Maj(a,b,c)
+ ldr w19,[x30],#4 // *K++, w28 in next round
+ //add w22,w22,w17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev w9,w9 // 6
+#endif
+ add w22,w22,w17 // h+=Sigma0(a)
+ ror w16,w26,#6
+ add w21,w21,w19 // h+=K[i]
+ eor w12,w26,w26,ror#14
+ and w17,w27,w26
+ bic w19,w20,w26
+ add w21,w21,w9 // h+=X[i]
+ orr w17,w17,w19 // Ch(e,f,g)
+ eor w19,w22,w23 // a^b, b^c in next round
+ eor w16,w16,w12,ror#11 // Sigma1(e)
+ ror w12,w22,#2
+ add w21,w21,w17 // h+=Ch(e,f,g)
+ eor w17,w22,w22,ror#9
+ add w21,w21,w16 // h+=Sigma1(e)
+ and w28,w28,w19 // (b^c)&=(a^b)
+ add w25,w25,w21 // d+=h
+ eor w28,w28,w23 // Maj(a,b,c)
+ eor w17,w12,w17,ror#13 // Sigma0(a)
+ add w21,w21,w28 // h+=Maj(a,b,c)
+ ldr w28,[x30],#4 // *K++, w19 in next round
+ //add w21,w21,w17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev w10,w10 // 7
+#endif
+ ldp w11,w12,[x1],#2*4
+ add w21,w21,w17 // h+=Sigma0(a)
+ ror w16,w25,#6
+ add w20,w20,w28 // h+=K[i]
+ eor w13,w25,w25,ror#14
+ and w17,w26,w25
+ bic w28,w27,w25
+ add w20,w20,w10 // h+=X[i]
+ orr w17,w17,w28 // Ch(e,f,g)
+ eor w28,w21,w22 // a^b, b^c in next round
+ eor w16,w16,w13,ror#11 // Sigma1(e)
+ ror w13,w21,#2
+ add w20,w20,w17 // h+=Ch(e,f,g)
+ eor w17,w21,w21,ror#9
+ add w20,w20,w16 // h+=Sigma1(e)
+ and w19,w19,w28 // (b^c)&=(a^b)
+ add w24,w24,w20 // d+=h
+ eor w19,w19,w22 // Maj(a,b,c)
+ eor w17,w13,w17,ror#13 // Sigma0(a)
+ add w20,w20,w19 // h+=Maj(a,b,c)
+ ldr w19,[x30],#4 // *K++, w28 in next round
+ //add w20,w20,w17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev w11,w11 // 8
+#endif
+ add w20,w20,w17 // h+=Sigma0(a)
+ ror w16,w24,#6
+ add w27,w27,w19 // h+=K[i]
+ eor w14,w24,w24,ror#14
+ and w17,w25,w24
+ bic w19,w26,w24
+ add w27,w27,w11 // h+=X[i]
+ orr w17,w17,w19 // Ch(e,f,g)
+ eor w19,w20,w21 // a^b, b^c in next round
+ eor w16,w16,w14,ror#11 // Sigma1(e)
+ ror w14,w20,#2
+ add w27,w27,w17 // h+=Ch(e,f,g)
+ eor w17,w20,w20,ror#9
+ add w27,w27,w16 // h+=Sigma1(e)
+ and w28,w28,w19 // (b^c)&=(a^b)
+ add w23,w23,w27 // d+=h
+ eor w28,w28,w21 // Maj(a,b,c)
+ eor w17,w14,w17,ror#13 // Sigma0(a)
+ add w27,w27,w28 // h+=Maj(a,b,c)
+ ldr w28,[x30],#4 // *K++, w19 in next round
+ //add w27,w27,w17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev w12,w12 // 9
+#endif
+ ldp w13,w14,[x1],#2*4
+ add w27,w27,w17 // h+=Sigma0(a)
+ ror w16,w23,#6
+ add w26,w26,w28 // h+=K[i]
+ eor w15,w23,w23,ror#14
+ and w17,w24,w23
+ bic w28,w25,w23
+ add w26,w26,w12 // h+=X[i]
+ orr w17,w17,w28 // Ch(e,f,g)
+ eor w28,w27,w20 // a^b, b^c in next round
+ eor w16,w16,w15,ror#11 // Sigma1(e)
+ ror w15,w27,#2
+ add w26,w26,w17 // h+=Ch(e,f,g)
+ eor w17,w27,w27,ror#9
+ add w26,w26,w16 // h+=Sigma1(e)
+ and w19,w19,w28 // (b^c)&=(a^b)
+ add w22,w22,w26 // d+=h
+ eor w19,w19,w20 // Maj(a,b,c)
+ eor w17,w15,w17,ror#13 // Sigma0(a)
+ add w26,w26,w19 // h+=Maj(a,b,c)
+ ldr w19,[x30],#4 // *K++, w28 in next round
+ //add w26,w26,w17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev w13,w13 // 10
+#endif
+ add w26,w26,w17 // h+=Sigma0(a)
+ ror w16,w22,#6
+ add w25,w25,w19 // h+=K[i]
+ eor w0,w22,w22,ror#14
+ and w17,w23,w22
+ bic w19,w24,w22
+ add w25,w25,w13 // h+=X[i]
+ orr w17,w17,w19 // Ch(e,f,g)
+ eor w19,w26,w27 // a^b, b^c in next round
+ eor w16,w16,w0,ror#11 // Sigma1(e)
+ ror w0,w26,#2
+ add w25,w25,w17 // h+=Ch(e,f,g)
+ eor w17,w26,w26,ror#9
+ add w25,w25,w16 // h+=Sigma1(e)
+ and w28,w28,w19 // (b^c)&=(a^b)
+ add w21,w21,w25 // d+=h
+ eor w28,w28,w27 // Maj(a,b,c)
+ eor w17,w0,w17,ror#13 // Sigma0(a)
+ add w25,w25,w28 // h+=Maj(a,b,c)
+ ldr w28,[x30],#4 // *K++, w19 in next round
+ //add w25,w25,w17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev w14,w14 // 11
+#endif
+ ldp w15,w0,[x1],#2*4
+ add w25,w25,w17 // h+=Sigma0(a)
+ str w6,[sp,#12]
+ ror w16,w21,#6
+ add w24,w24,w28 // h+=K[i]
+ eor w6,w21,w21,ror#14
+ and w17,w22,w21
+ bic w28,w23,w21
+ add w24,w24,w14 // h+=X[i]
+ orr w17,w17,w28 // Ch(e,f,g)
+ eor w28,w25,w26 // a^b, b^c in next round
+ eor w16,w16,w6,ror#11 // Sigma1(e)
+ ror w6,w25,#2
+ add w24,w24,w17 // h+=Ch(e,f,g)
+ eor w17,w25,w25,ror#9
+ add w24,w24,w16 // h+=Sigma1(e)
+ and w19,w19,w28 // (b^c)&=(a^b)
+ add w20,w20,w24 // d+=h
+ eor w19,w19,w26 // Maj(a,b,c)
+ eor w17,w6,w17,ror#13 // Sigma0(a)
+ add w24,w24,w19 // h+=Maj(a,b,c)
+ ldr w19,[x30],#4 // *K++, w28 in next round
+ //add w24,w24,w17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev w15,w15 // 12
+#endif
+ add w24,w24,w17 // h+=Sigma0(a)
+ str w7,[sp,#0]
+ ror w16,w20,#6
+ add w23,w23,w19 // h+=K[i]
+ eor w7,w20,w20,ror#14
+ and w17,w21,w20
+ bic w19,w22,w20
+ add w23,w23,w15 // h+=X[i]
+ orr w17,w17,w19 // Ch(e,f,g)
+ eor w19,w24,w25 // a^b, b^c in next round
+ eor w16,w16,w7,ror#11 // Sigma1(e)
+ ror w7,w24,#2
+ add w23,w23,w17 // h+=Ch(e,f,g)
+ eor w17,w24,w24,ror#9
+ add w23,w23,w16 // h+=Sigma1(e)
+ and w28,w28,w19 // (b^c)&=(a^b)
+ add w27,w27,w23 // d+=h
+ eor w28,w28,w25 // Maj(a,b,c)
+ eor w17,w7,w17,ror#13 // Sigma0(a)
+ add w23,w23,w28 // h+=Maj(a,b,c)
+ ldr w28,[x30],#4 // *K++, w19 in next round
+ //add w23,w23,w17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev w0,w0 // 13
+#endif
+ ldp w1,w2,[x1]
+ add w23,w23,w17 // h+=Sigma0(a)
+ str w8,[sp,#4]
+ ror w16,w27,#6
+ add w22,w22,w28 // h+=K[i]
+ eor w8,w27,w27,ror#14
+ and w17,w20,w27
+ bic w28,w21,w27
+ add w22,w22,w0 // h+=X[i]
+ orr w17,w17,w28 // Ch(e,f,g)
+ eor w28,w23,w24 // a^b, b^c in next round
+ eor w16,w16,w8,ror#11 // Sigma1(e)
+ ror w8,w23,#2
+ add w22,w22,w17 // h+=Ch(e,f,g)
+ eor w17,w23,w23,ror#9
+ add w22,w22,w16 // h+=Sigma1(e)
+ and w19,w19,w28 // (b^c)&=(a^b)
+ add w26,w26,w22 // d+=h
+ eor w19,w19,w24 // Maj(a,b,c)
+ eor w17,w8,w17,ror#13 // Sigma0(a)
+ add w22,w22,w19 // h+=Maj(a,b,c)
+ ldr w19,[x30],#4 // *K++, w28 in next round
+ //add w22,w22,w17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev w1,w1 // 14
+#endif
+ ldr w6,[sp,#12]
+ add w22,w22,w17 // h+=Sigma0(a)
+ str w9,[sp,#8]
+ ror w16,w26,#6
+ add w21,w21,w19 // h+=K[i]
+ eor w9,w26,w26,ror#14
+ and w17,w27,w26
+ bic w19,w20,w26
+ add w21,w21,w1 // h+=X[i]
+ orr w17,w17,w19 // Ch(e,f,g)
+ eor w19,w22,w23 // a^b, b^c in next round
+ eor w16,w16,w9,ror#11 // Sigma1(e)
+ ror w9,w22,#2
+ add w21,w21,w17 // h+=Ch(e,f,g)
+ eor w17,w22,w22,ror#9
+ add w21,w21,w16 // h+=Sigma1(e)
+ and w28,w28,w19 // (b^c)&=(a^b)
+ add w25,w25,w21 // d+=h
+ eor w28,w28,w23 // Maj(a,b,c)
+ eor w17,w9,w17,ror#13 // Sigma0(a)
+ add w21,w21,w28 // h+=Maj(a,b,c)
+ ldr w28,[x30],#4 // *K++, w19 in next round
+ //add w21,w21,w17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev w2,w2 // 15
+#endif
+ ldr w7,[sp,#0]
+ add w21,w21,w17 // h+=Sigma0(a)
+ str w10,[sp,#12]
+ ror w16,w25,#6
+ add w20,w20,w28 // h+=K[i]
+ ror w9,w4,#7
+ and w17,w26,w25
+ ror w8,w1,#17
+ bic w28,w27,w25
+ ror w10,w21,#2
+ add w20,w20,w2 // h+=X[i]
+ eor w16,w16,w25,ror#11
+ eor w9,w9,w4,ror#18
+ orr w17,w17,w28 // Ch(e,f,g)
+ eor w28,w21,w22 // a^b, b^c in next round
+ eor w16,w16,w25,ror#25 // Sigma1(e)
+ eor w10,w10,w21,ror#13
+ add w20,w20,w17 // h+=Ch(e,f,g)
+ and w19,w19,w28 // (b^c)&=(a^b)
+ eor w8,w8,w1,ror#19
+ eor w9,w9,w4,lsr#3 // sigma0(X[i+1])
+ add w20,w20,w16 // h+=Sigma1(e)
+ eor w19,w19,w22 // Maj(a,b,c)
+ eor w17,w10,w21,ror#22 // Sigma0(a)
+ eor w8,w8,w1,lsr#10 // sigma1(X[i+14])
+ add w3,w3,w12
+ add w24,w24,w20 // d+=h
+ add w20,w20,w19 // h+=Maj(a,b,c)
+ ldr w19,[x30],#4 // *K++, w28 in next round
+ add w3,w3,w9
+ add w20,w20,w17 // h+=Sigma0(a)
+ add w3,w3,w8
+.Loop_16_xx:
+ ldr w8,[sp,#4]
+ str w11,[sp,#0]
+ ror w16,w24,#6
+ add w27,w27,w19 // h+=K[i]
+ ror w10,w5,#7
+ and w17,w25,w24
+ ror w9,w2,#17
+ bic w19,w26,w24
+ ror w11,w20,#2
+ add w27,w27,w3 // h+=X[i]
+ eor w16,w16,w24,ror#11
+ eor w10,w10,w5,ror#18
+ orr w17,w17,w19 // Ch(e,f,g)
+ eor w19,w20,w21 // a^b, b^c in next round
+ eor w16,w16,w24,ror#25 // Sigma1(e)
+ eor w11,w11,w20,ror#13
+ add w27,w27,w17 // h+=Ch(e,f,g)
+ and w28,w28,w19 // (b^c)&=(a^b)
+ eor w9,w9,w2,ror#19
+ eor w10,w10,w5,lsr#3 // sigma0(X[i+1])
+ add w27,w27,w16 // h+=Sigma1(e)
+ eor w28,w28,w21 // Maj(a,b,c)
+ eor w17,w11,w20,ror#22 // Sigma0(a)
+ eor w9,w9,w2,lsr#10 // sigma1(X[i+14])
+ add w4,w4,w13
+ add w23,w23,w27 // d+=h
+ add w27,w27,w28 // h+=Maj(a,b,c)
+ ldr w28,[x30],#4 // *K++, w19 in next round
+ add w4,w4,w10
+ add w27,w27,w17 // h+=Sigma0(a)
+ add w4,w4,w9
+ ldr w9,[sp,#8]
+ str w12,[sp,#4]
+ ror w16,w23,#6
+ add w26,w26,w28 // h+=K[i]
+ ror w11,w6,#7
+ and w17,w24,w23
+ ror w10,w3,#17
+ bic w28,w25,w23
+ ror w12,w27,#2
+ add w26,w26,w4 // h+=X[i]
+ eor w16,w16,w23,ror#11
+ eor w11,w11,w6,ror#18
+ orr w17,w17,w28 // Ch(e,f,g)
+ eor w28,w27,w20 // a^b, b^c in next round
+ eor w16,w16,w23,ror#25 // Sigma1(e)
+ eor w12,w12,w27,ror#13
+ add w26,w26,w17 // h+=Ch(e,f,g)
+ and w19,w19,w28 // (b^c)&=(a^b)
+ eor w10,w10,w3,ror#19
+ eor w11,w11,w6,lsr#3 // sigma0(X[i+1])
+ add w26,w26,w16 // h+=Sigma1(e)
+ eor w19,w19,w20 // Maj(a,b,c)
+ eor w17,w12,w27,ror#22 // Sigma0(a)
+ eor w10,w10,w3,lsr#10 // sigma1(X[i+14])
+ add w5,w5,w14
+ add w22,w22,w26 // d+=h
+ add w26,w26,w19 // h+=Maj(a,b,c)
+ ldr w19,[x30],#4 // *K++, w28 in next round
+ add w5,w5,w11
+ add w26,w26,w17 // h+=Sigma0(a)
+ add w5,w5,w10
+ ldr w10,[sp,#12]
+ str w13,[sp,#8]
+ ror w16,w22,#6
+ add w25,w25,w19 // h+=K[i]
+ ror w12,w7,#7
+ and w17,w23,w22
+ ror w11,w4,#17
+ bic w19,w24,w22
+ ror w13,w26,#2
+ add w25,w25,w5 // h+=X[i]
+ eor w16,w16,w22,ror#11
+ eor w12,w12,w7,ror#18
+ orr w17,w17,w19 // Ch(e,f,g)
+ eor w19,w26,w27 // a^b, b^c in next round
+ eor w16,w16,w22,ror#25 // Sigma1(e)
+ eor w13,w13,w26,ror#13
+ add w25,w25,w17 // h+=Ch(e,f,g)
+ and w28,w28,w19 // (b^c)&=(a^b)
+ eor w11,w11,w4,ror#19
+ eor w12,w12,w7,lsr#3 // sigma0(X[i+1])
+ add w25,w25,w16 // h+=Sigma1(e)
+ eor w28,w28,w27 // Maj(a,b,c)
+ eor w17,w13,w26,ror#22 // Sigma0(a)
+ eor w11,w11,w4,lsr#10 // sigma1(X[i+14])
+ add w6,w6,w15
+ add w21,w21,w25 // d+=h
+ add w25,w25,w28 // h+=Maj(a,b,c)
+ ldr w28,[x30],#4 // *K++, w19 in next round
+ add w6,w6,w12
+ add w25,w25,w17 // h+=Sigma0(a)
+ add w6,w6,w11
+ ldr w11,[sp,#0]
+ str w14,[sp,#12]
+ ror w16,w21,#6
+ add w24,w24,w28 // h+=K[i]
+ ror w13,w8,#7
+ and w17,w22,w21
+ ror w12,w5,#17
+ bic w28,w23,w21
+ ror w14,w25,#2
+ add w24,w24,w6 // h+=X[i]
+ eor w16,w16,w21,ror#11
+ eor w13,w13,w8,ror#18
+ orr w17,w17,w28 // Ch(e,f,g)
+ eor w28,w25,w26 // a^b, b^c in next round
+ eor w16,w16,w21,ror#25 // Sigma1(e)
+ eor w14,w14,w25,ror#13
+ add w24,w24,w17 // h+=Ch(e,f,g)
+ and w19,w19,w28 // (b^c)&=(a^b)
+ eor w12,w12,w5,ror#19
+ eor w13,w13,w8,lsr#3 // sigma0(X[i+1])
+ add w24,w24,w16 // h+=Sigma1(e)
+ eor w19,w19,w26 // Maj(a,b,c)
+ eor w17,w14,w25,ror#22 // Sigma0(a)
+ eor w12,w12,w5,lsr#10 // sigma1(X[i+14])
+ add w7,w7,w0
+ add w20,w20,w24 // d+=h
+ add w24,w24,w19 // h+=Maj(a,b,c)
+ ldr w19,[x30],#4 // *K++, w28 in next round
+ add w7,w7,w13
+ add w24,w24,w17 // h+=Sigma0(a)
+ add w7,w7,w12
+ ldr w12,[sp,#4]
+ str w15,[sp,#0]
+ ror w16,w20,#6
+ add w23,w23,w19 // h+=K[i]
+ ror w14,w9,#7
+ and w17,w21,w20
+ ror w13,w6,#17
+ bic w19,w22,w20
+ ror w15,w24,#2
+ add w23,w23,w7 // h+=X[i]
+ eor w16,w16,w20,ror#11
+ eor w14,w14,w9,ror#18
+ orr w17,w17,w19 // Ch(e,f,g)
+ eor w19,w24,w25 // a^b, b^c in next round
+ eor w16,w16,w20,ror#25 // Sigma1(e)
+ eor w15,w15,w24,ror#13
+ add w23,w23,w17 // h+=Ch(e,f,g)
+ and w28,w28,w19 // (b^c)&=(a^b)
+ eor w13,w13,w6,ror#19
+ eor w14,w14,w9,lsr#3 // sigma0(X[i+1])
+ add w23,w23,w16 // h+=Sigma1(e)
+ eor w28,w28,w25 // Maj(a,b,c)
+ eor w17,w15,w24,ror#22 // Sigma0(a)
+ eor w13,w13,w6,lsr#10 // sigma1(X[i+14])
+ add w8,w8,w1
+ add w27,w27,w23 // d+=h
+ add w23,w23,w28 // h+=Maj(a,b,c)
+ ldr w28,[x30],#4 // *K++, w19 in next round
+ add w8,w8,w14
+ add w23,w23,w17 // h+=Sigma0(a)
+ add w8,w8,w13
+ ldr w13,[sp,#8]
+ str w0,[sp,#4]
+ ror w16,w27,#6
+ add w22,w22,w28 // h+=K[i]
+ ror w15,w10,#7
+ and w17,w20,w27
+ ror w14,w7,#17
+ bic w28,w21,w27
+ ror w0,w23,#2
+ add w22,w22,w8 // h+=X[i]
+ eor w16,w16,w27,ror#11
+ eor w15,w15,w10,ror#18
+ orr w17,w17,w28 // Ch(e,f,g)
+ eor w28,w23,w24 // a^b, b^c in next round
+ eor w16,w16,w27,ror#25 // Sigma1(e)
+ eor w0,w0,w23,ror#13
+ add w22,w22,w17 // h+=Ch(e,f,g)
+ and w19,w19,w28 // (b^c)&=(a^b)
+ eor w14,w14,w7,ror#19
+ eor w15,w15,w10,lsr#3 // sigma0(X[i+1])
+ add w22,w22,w16 // h+=Sigma1(e)
+ eor w19,w19,w24 // Maj(a,b,c)
+ eor w17,w0,w23,ror#22 // Sigma0(a)
+ eor w14,w14,w7,lsr#10 // sigma1(X[i+14])
+ add w9,w9,w2
+ add w26,w26,w22 // d+=h
+ add w22,w22,w19 // h+=Maj(a,b,c)
+ ldr w19,[x30],#4 // *K++, w28 in next round
+ add w9,w9,w15
+ add w22,w22,w17 // h+=Sigma0(a)
+ add w9,w9,w14
+ ldr w14,[sp,#12]
+ str w1,[sp,#8]
+ ror w16,w26,#6
+ add w21,w21,w19 // h+=K[i]
+ ror w0,w11,#7
+ and w17,w27,w26
+ ror w15,w8,#17
+ bic w19,w20,w26
+ ror w1,w22,#2
+ add w21,w21,w9 // h+=X[i]
+ eor w16,w16,w26,ror#11
+ eor w0,w0,w11,ror#18
+ orr w17,w17,w19 // Ch(e,f,g)
+ eor w19,w22,w23 // a^b, b^c in next round
+ eor w16,w16,w26,ror#25 // Sigma1(e)
+ eor w1,w1,w22,ror#13
+ add w21,w21,w17 // h+=Ch(e,f,g)
+ and w28,w28,w19 // (b^c)&=(a^b)
+ eor w15,w15,w8,ror#19
+ eor w0,w0,w11,lsr#3 // sigma0(X[i+1])
+ add w21,w21,w16 // h+=Sigma1(e)
+ eor w28,w28,w23 // Maj(a,b,c)
+ eor w17,w1,w22,ror#22 // Sigma0(a)
+ eor w15,w15,w8,lsr#10 // sigma1(X[i+14])
+ add w10,w10,w3
+ add w25,w25,w21 // d+=h
+ add w21,w21,w28 // h+=Maj(a,b,c)
+ ldr w28,[x30],#4 // *K++, w19 in next round
+ add w10,w10,w0
+ add w21,w21,w17 // h+=Sigma0(a)
+ add w10,w10,w15
+ ldr w15,[sp,#0]
+ str w2,[sp,#12]
+ ror w16,w25,#6
+ add w20,w20,w28 // h+=K[i]
+ ror w1,w12,#7
+ and w17,w26,w25
+ ror w0,w9,#17
+ bic w28,w27,w25
+ ror w2,w21,#2
+ add w20,w20,w10 // h+=X[i]
+ eor w16,w16,w25,ror#11
+ eor w1,w1,w12,ror#18
+ orr w17,w17,w28 // Ch(e,f,g)
+ eor w28,w21,w22 // a^b, b^c in next round
+ eor w16,w16,w25,ror#25 // Sigma1(e)
+ eor w2,w2,w21,ror#13
+ add w20,w20,w17 // h+=Ch(e,f,g)
+ and w19,w19,w28 // (b^c)&=(a^b)
+ eor w0,w0,w9,ror#19
+ eor w1,w1,w12,lsr#3 // sigma0(X[i+1])
+ add w20,w20,w16 // h+=Sigma1(e)
+ eor w19,w19,w22 // Maj(a,b,c)
+ eor w17,w2,w21,ror#22 // Sigma0(a)
+ eor w0,w0,w9,lsr#10 // sigma1(X[i+14])
+ add w11,w11,w4
+ add w24,w24,w20 // d+=h
+ add w20,w20,w19 // h+=Maj(a,b,c)
+ ldr w19,[x30],#4 // *K++, w28 in next round
+ add w11,w11,w1
+ add w20,w20,w17 // h+=Sigma0(a)
+ add w11,w11,w0
+ ldr w0,[sp,#4]
+ str w3,[sp,#0]
+ ror w16,w24,#6
+ add w27,w27,w19 // h+=K[i]
+ ror w2,w13,#7
+ and w17,w25,w24
+ ror w1,w10,#17
+ bic w19,w26,w24
+ ror w3,w20,#2
+ add w27,w27,w11 // h+=X[i]
+ eor w16,w16,w24,ror#11
+ eor w2,w2,w13,ror#18
+ orr w17,w17,w19 // Ch(e,f,g)
+ eor w19,w20,w21 // a^b, b^c in next round
+ eor w16,w16,w24,ror#25 // Sigma1(e)
+ eor w3,w3,w20,ror#13
+ add w27,w27,w17 // h+=Ch(e,f,g)
+ and w28,w28,w19 // (b^c)&=(a^b)
+ eor w1,w1,w10,ror#19
+ eor w2,w2,w13,lsr#3 // sigma0(X[i+1])
+ add w27,w27,w16 // h+=Sigma1(e)
+ eor w28,w28,w21 // Maj(a,b,c)
+ eor w17,w3,w20,ror#22 // Sigma0(a)
+ eor w1,w1,w10,lsr#10 // sigma1(X[i+14])
+ add w12,w12,w5
+ add w23,w23,w27 // d+=h
+ add w27,w27,w28 // h+=Maj(a,b,c)
+ ldr w28,[x30],#4 // *K++, w19 in next round
+ add w12,w12,w2
+ add w27,w27,w17 // h+=Sigma0(a)
+ add w12,w12,w1
+ ldr w1,[sp,#8]
+ str w4,[sp,#4]
+ ror w16,w23,#6
+ add w26,w26,w28 // h+=K[i]
+ ror w3,w14,#7
+ and w17,w24,w23
+ ror w2,w11,#17
+ bic w28,w25,w23
+ ror w4,w27,#2
+ add w26,w26,w12 // h+=X[i]
+ eor w16,w16,w23,ror#11
+ eor w3,w3,w14,ror#18
+ orr w17,w17,w28 // Ch(e,f,g)
+ eor w28,w27,w20 // a^b, b^c in next round
+ eor w16,w16,w23,ror#25 // Sigma1(e)
+ eor w4,w4,w27,ror#13
+ add w26,w26,w17 // h+=Ch(e,f,g)
+ and w19,w19,w28 // (b^c)&=(a^b)
+ eor w2,w2,w11,ror#19
+ eor w3,w3,w14,lsr#3 // sigma0(X[i+1])
+ add w26,w26,w16 // h+=Sigma1(e)
+ eor w19,w19,w20 // Maj(a,b,c)
+ eor w17,w4,w27,ror#22 // Sigma0(a)
+ eor w2,w2,w11,lsr#10 // sigma1(X[i+14])
+ add w13,w13,w6
+ add w22,w22,w26 // d+=h
+ add w26,w26,w19 // h+=Maj(a,b,c)
+ ldr w19,[x30],#4 // *K++, w28 in next round
+ add w13,w13,w3
+ add w26,w26,w17 // h+=Sigma0(a)
+ add w13,w13,w2
+ ldr w2,[sp,#12]
+ str w5,[sp,#8]
+ ror w16,w22,#6
+ add w25,w25,w19 // h+=K[i]
+ ror w4,w15,#7
+ and w17,w23,w22
+ ror w3,w12,#17
+ bic w19,w24,w22
+ ror w5,w26,#2
+ add w25,w25,w13 // h+=X[i]
+ eor w16,w16,w22,ror#11
+ eor w4,w4,w15,ror#18
+ orr w17,w17,w19 // Ch(e,f,g)
+ eor w19,w26,w27 // a^b, b^c in next round
+ eor w16,w16,w22,ror#25 // Sigma1(e)
+ eor w5,w5,w26,ror#13
+ add w25,w25,w17 // h+=Ch(e,f,g)
+ and w28,w28,w19 // (b^c)&=(a^b)
+ eor w3,w3,w12,ror#19
+ eor w4,w4,w15,lsr#3 // sigma0(X[i+1])
+ add w25,w25,w16 // h+=Sigma1(e)
+ eor w28,w28,w27 // Maj(a,b,c)
+ eor w17,w5,w26,ror#22 // Sigma0(a)
+ eor w3,w3,w12,lsr#10 // sigma1(X[i+14])
+ add w14,w14,w7
+ add w21,w21,w25 // d+=h
+ add w25,w25,w28 // h+=Maj(a,b,c)
+ ldr w28,[x30],#4 // *K++, w19 in next round
+ add w14,w14,w4
+ add w25,w25,w17 // h+=Sigma0(a)
+ add w14,w14,w3
+ ldr w3,[sp,#0]
+ str w6,[sp,#12]
+ ror w16,w21,#6
+ add w24,w24,w28 // h+=K[i]
+ ror w5,w0,#7
+ and w17,w22,w21
+ ror w4,w13,#17
+ bic w28,w23,w21
+ ror w6,w25,#2
+ add w24,w24,w14 // h+=X[i]
+ eor w16,w16,w21,ror#11
+ eor w5,w5,w0,ror#18
+ orr w17,w17,w28 // Ch(e,f,g)
+ eor w28,w25,w26 // a^b, b^c in next round
+ eor w16,w16,w21,ror#25 // Sigma1(e)
+ eor w6,w6,w25,ror#13
+ add w24,w24,w17 // h+=Ch(e,f,g)
+ and w19,w19,w28 // (b^c)&=(a^b)
+ eor w4,w4,w13,ror#19
+ eor w5,w5,w0,lsr#3 // sigma0(X[i+1])
+ add w24,w24,w16 // h+=Sigma1(e)
+ eor w19,w19,w26 // Maj(a,b,c)
+ eor w17,w6,w25,ror#22 // Sigma0(a)
+ eor w4,w4,w13,lsr#10 // sigma1(X[i+14])
+ add w15,w15,w8
+ add w20,w20,w24 // d+=h
+ add w24,w24,w19 // h+=Maj(a,b,c)
+ ldr w19,[x30],#4 // *K++, w28 in next round
+ add w15,w15,w5
+ add w24,w24,w17 // h+=Sigma0(a)
+ add w15,w15,w4
+ ldr w4,[sp,#4]
+ str w7,[sp,#0]
+ ror w16,w20,#6
+ add w23,w23,w19 // h+=K[i]
+ ror w6,w1,#7
+ and w17,w21,w20
+ ror w5,w14,#17
+ bic w19,w22,w20
+ ror w7,w24,#2
+ add w23,w23,w15 // h+=X[i]
+ eor w16,w16,w20,ror#11
+ eor w6,w6,w1,ror#18
+ orr w17,w17,w19 // Ch(e,f,g)
+ eor w19,w24,w25 // a^b, b^c in next round
+ eor w16,w16,w20,ror#25 // Sigma1(e)
+ eor w7,w7,w24,ror#13
+ add w23,w23,w17 // h+=Ch(e,f,g)
+ and w28,w28,w19 // (b^c)&=(a^b)
+ eor w5,w5,w14,ror#19
+ eor w6,w6,w1,lsr#3 // sigma0(X[i+1])
+ add w23,w23,w16 // h+=Sigma1(e)
+ eor w28,w28,w25 // Maj(a,b,c)
+ eor w17,w7,w24,ror#22 // Sigma0(a)
+ eor w5,w5,w14,lsr#10 // sigma1(X[i+14])
+ add w0,w0,w9
+ add w27,w27,w23 // d+=h
+ add w23,w23,w28 // h+=Maj(a,b,c)
+ ldr w28,[x30],#4 // *K++, w19 in next round
+ add w0,w0,w6
+ add w23,w23,w17 // h+=Sigma0(a)
+ add w0,w0,w5
+ ldr w5,[sp,#8]
+ str w8,[sp,#4]
+ ror w16,w27,#6
+ add w22,w22,w28 // h+=K[i]
+ ror w7,w2,#7
+ and w17,w20,w27
+ ror w6,w15,#17
+ bic w28,w21,w27
+ ror w8,w23,#2
+ add w22,w22,w0 // h+=X[i]
+ eor w16,w16,w27,ror#11
+ eor w7,w7,w2,ror#18
+ orr w17,w17,w28 // Ch(e,f,g)
+ eor w28,w23,w24 // a^b, b^c in next round
+ eor w16,w16,w27,ror#25 // Sigma1(e)
+ eor w8,w8,w23,ror#13
+ add w22,w22,w17 // h+=Ch(e,f,g)
+ and w19,w19,w28 // (b^c)&=(a^b)
+ eor w6,w6,w15,ror#19
+ eor w7,w7,w2,lsr#3 // sigma0(X[i+1])
+ add w22,w22,w16 // h+=Sigma1(e)
+ eor w19,w19,w24 // Maj(a,b,c)
+ eor w17,w8,w23,ror#22 // Sigma0(a)
+ eor w6,w6,w15,lsr#10 // sigma1(X[i+14])
+ add w1,w1,w10
+ add w26,w26,w22 // d+=h
+ add w22,w22,w19 // h+=Maj(a,b,c)
+ ldr w19,[x30],#4 // *K++, w28 in next round
+ add w1,w1,w7
+ add w22,w22,w17 // h+=Sigma0(a)
+ add w1,w1,w6
+ ldr w6,[sp,#12]
+ str w9,[sp,#8]
+ ror w16,w26,#6
+ add w21,w21,w19 // h+=K[i]
+ ror w8,w3,#7
+ and w17,w27,w26
+ ror w7,w0,#17
+ bic w19,w20,w26
+ ror w9,w22,#2
+ add w21,w21,w1 // h+=X[i]
+ eor w16,w16,w26,ror#11
+ eor w8,w8,w3,ror#18
+ orr w17,w17,w19 // Ch(e,f,g)
+ eor w19,w22,w23 // a^b, b^c in next round
+ eor w16,w16,w26,ror#25 // Sigma1(e)
+ eor w9,w9,w22,ror#13
+ add w21,w21,w17 // h+=Ch(e,f,g)
+ and w28,w28,w19 // (b^c)&=(a^b)
+ eor w7,w7,w0,ror#19
+ eor w8,w8,w3,lsr#3 // sigma0(X[i+1])
+ add w21,w21,w16 // h+=Sigma1(e)
+ eor w28,w28,w23 // Maj(a,b,c)
+ eor w17,w9,w22,ror#22 // Sigma0(a)
+ eor w7,w7,w0,lsr#10 // sigma1(X[i+14])
+ add w2,w2,w11
+ add w25,w25,w21 // d+=h
+ add w21,w21,w28 // h+=Maj(a,b,c)
+ ldr w28,[x30],#4 // *K++, w19 in next round
+ add w2,w2,w8
+ add w21,w21,w17 // h+=Sigma0(a)
+ add w2,w2,w7
+ ldr w7,[sp,#0]
+ str w10,[sp,#12]
+ ror w16,w25,#6
+ add w20,w20,w28 // h+=K[i]
+ ror w9,w4,#7
+ and w17,w26,w25
+ ror w8,w1,#17
+ bic w28,w27,w25
+ ror w10,w21,#2
+ add w20,w20,w2 // h+=X[i]
+ eor w16,w16,w25,ror#11
+ eor w9,w9,w4,ror#18
+ orr w17,w17,w28 // Ch(e,f,g)
+ eor w28,w21,w22 // a^b, b^c in next round
+ eor w16,w16,w25,ror#25 // Sigma1(e)
+ eor w10,w10,w21,ror#13
+ add w20,w20,w17 // h+=Ch(e,f,g)
+ and w19,w19,w28 // (b^c)&=(a^b)
+ eor w8,w8,w1,ror#19
+ eor w9,w9,w4,lsr#3 // sigma0(X[i+1])
+ add w20,w20,w16 // h+=Sigma1(e)
+ eor w19,w19,w22 // Maj(a,b,c)
+ eor w17,w10,w21,ror#22 // Sigma0(a)
+ eor w8,w8,w1,lsr#10 // sigma1(X[i+14])
+ add w3,w3,w12
+ add w24,w24,w20 // d+=h
+ add w20,w20,w19 // h+=Maj(a,b,c)
+ ldr w19,[x30],#4 // *K++, w28 in next round
+ add w3,w3,w9
+ add w20,w20,w17 // h+=Sigma0(a)
+ add w3,w3,w8
+ cbnz w19,.Loop_16_xx
+
+ ldp x0,x2,[x29,#96]
+ ldr x1,[x29,#112]
+ sub x30,x30,#260 // rewind
+
+ ldp w3,w4,[x0]
+ ldp w5,w6,[x0,#2*4]
+ add x1,x1,#14*4 // advance input pointer
+ ldp w7,w8,[x0,#4*4]
+ add w20,w20,w3
+ ldp w9,w10,[x0,#6*4]
+ add w21,w21,w4
+ add w22,w22,w5
+ add w23,w23,w6
+ stp w20,w21,[x0]
+ add w24,w24,w7
+ add w25,w25,w8
+ stp w22,w23,[x0,#2*4]
+ add w26,w26,w9
+ add w27,w27,w10
+ cmp x1,x2
+ stp w24,w25,[x0,#4*4]
+ stp w26,w27,[x0,#6*4]
+ b.ne .Loop
+
+ ldp x19,x20,[x29,#16]
+ add sp,sp,#4*4
+ ldp x21,x22,[x29,#32]
+ ldp x23,x24,[x29,#48]
+ ldp x25,x26,[x29,#64]
+ ldp x27,x28,[x29,#80]
+ ldp x29,x30,[sp],#128
+ ret
+.size sha256_block_data_order,.-sha256_block_data_order
+
+.align 6
+.type K256,%object
+K256:
+ .long 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
+ .long 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
+ .long 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
+ .long 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
+ .long 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
+ .long 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
+ .long 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
+ .long 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
+ .long 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
+ .long 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
+ .long 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
+ .long 0xd192e819,0xd6990624,0xf40e3585,0x106aa070
+ .long 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
+ .long 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
+ .long 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
+ .long 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
+ .long 0 //terminator
+.size K256,.-K256
+.align 3
+.LOPENSSL_armcap_P:
+ .quad OPENSSL_armcap_P-.
+.asciz "SHA256 block transform for ARMv8, CRYPTOGAMS by <appro@openssl.org>"
+.align 2
+.type sha256_block_armv8,%function
+.align 6
+sha256_block_armv8:
+.Lv8_entry:
+ stp x29,x30,[sp,#-16]!
+ add x29,sp,#0
+
+ ld1 {v0.4s,v1.4s},[x0]
+ adr x3,K256
+
+.Loop_hw:
+ ld1 {v4.16b-v7.16b},[x1],#64
+ sub x2,x2,#1
+ ld1 {v16.4s},[x3],#16
+ rev32 v4.16b,v4.16b
+ rev32 v5.16b,v5.16b
+ rev32 v6.16b,v6.16b
+ rev32 v7.16b,v7.16b
+ orr v18.16b,v0.16b,v0.16b // offload
+ orr v19.16b,v1.16b,v1.16b
+ ld1 {v17.4s},[x3],#16
+ add v16.4s,v16.4s,v4.4s
+ .inst 0x5e2828a4 //sha256su0 v4.16b,v5.16b
+ orr v2.16b,v0.16b,v0.16b
+ .inst 0x5e104020 //sha256h v0.16b,v1.16b,v16.4s
+ .inst 0x5e105041 //sha256h2 v1.16b,v2.16b,v16.4s
+ .inst 0x5e0760c4 //sha256su1 v4.16b,v6.16b,v7.16b
+ ld1 {v16.4s},[x3],#16
+ add v17.4s,v17.4s,v5.4s
+ .inst 0x5e2828c5 //sha256su0 v5.16b,v6.16b
+ orr v2.16b,v0.16b,v0.16b
+ .inst 0x5e114020 //sha256h v0.16b,v1.16b,v17.4s
+ .inst 0x5e115041 //sha256h2 v1.16b,v2.16b,v17.4s
+ .inst 0x5e0460e5 //sha256su1 v5.16b,v7.16b,v4.16b
+ ld1 {v17.4s},[x3],#16
+ add v16.4s,v16.4s,v6.4s
+ .inst 0x5e2828e6 //sha256su0 v6.16b,v7.16b
+ orr v2.16b,v0.16b,v0.16b
+ .inst 0x5e104020 //sha256h v0.16b,v1.16b,v16.4s
+ .inst 0x5e105041 //sha256h2 v1.16b,v2.16b,v16.4s
+ .inst 0x5e056086 //sha256su1 v6.16b,v4.16b,v5.16b
+ ld1 {v16.4s},[x3],#16
+ add v17.4s,v17.4s,v7.4s
+ .inst 0x5e282887 //sha256su0 v7.16b,v4.16b
+ orr v2.16b,v0.16b,v0.16b
+ .inst 0x5e114020 //sha256h v0.16b,v1.16b,v17.4s
+ .inst 0x5e115041 //sha256h2 v1.16b,v2.16b,v17.4s
+ .inst 0x5e0660a7 //sha256su1 v7.16b,v5.16b,v6.16b
+ ld1 {v17.4s},[x3],#16
+ add v16.4s,v16.4s,v4.4s
+ .inst 0x5e2828a4 //sha256su0 v4.16b,v5.16b
+ orr v2.16b,v0.16b,v0.16b
+ .inst 0x5e104020 //sha256h v0.16b,v1.16b,v16.4s
+ .inst 0x5e105041 //sha256h2 v1.16b,v2.16b,v16.4s
+ .inst 0x5e0760c4 //sha256su1 v4.16b,v6.16b,v7.16b
+ ld1 {v16.4s},[x3],#16
+ add v17.4s,v17.4s,v5.4s
+ .inst 0x5e2828c5 //sha256su0 v5.16b,v6.16b
+ orr v2.16b,v0.16b,v0.16b
+ .inst 0x5e114020 //sha256h v0.16b,v1.16b,v17.4s
+ .inst 0x5e115041 //sha256h2 v1.16b,v2.16b,v17.4s
+ .inst 0x5e0460e5 //sha256su1 v5.16b,v7.16b,v4.16b
+ ld1 {v17.4s},[x3],#16
+ add v16.4s,v16.4s,v6.4s
+ .inst 0x5e2828e6 //sha256su0 v6.16b,v7.16b
+ orr v2.16b,v0.16b,v0.16b
+ .inst 0x5e104020 //sha256h v0.16b,v1.16b,v16.4s
+ .inst 0x5e105041 //sha256h2 v1.16b,v2.16b,v16.4s
+ .inst 0x5e056086 //sha256su1 v6.16b,v4.16b,v5.16b
+ ld1 {v16.4s},[x3],#16
+ add v17.4s,v17.4s,v7.4s
+ .inst 0x5e282887 //sha256su0 v7.16b,v4.16b
+ orr v2.16b,v0.16b,v0.16b
+ .inst 0x5e114020 //sha256h v0.16b,v1.16b,v17.4s
+ .inst 0x5e115041 //sha256h2 v1.16b,v2.16b,v17.4s
+ .inst 0x5e0660a7 //sha256su1 v7.16b,v5.16b,v6.16b
+ ld1 {v17.4s},[x3],#16
+ add v16.4s,v16.4s,v4.4s
+ .inst 0x5e2828a4 //sha256su0 v4.16b,v5.16b
+ orr v2.16b,v0.16b,v0.16b
+ .inst 0x5e104020 //sha256h v0.16b,v1.16b,v16.4s
+ .inst 0x5e105041 //sha256h2 v1.16b,v2.16b,v16.4s
+ .inst 0x5e0760c4 //sha256su1 v4.16b,v6.16b,v7.16b
+ ld1 {v16.4s},[x3],#16
+ add v17.4s,v17.4s,v5.4s
+ .inst 0x5e2828c5 //sha256su0 v5.16b,v6.16b
+ orr v2.16b,v0.16b,v0.16b
+ .inst 0x5e114020 //sha256h v0.16b,v1.16b,v17.4s
+ .inst 0x5e115041 //sha256h2 v1.16b,v2.16b,v17.4s
+ .inst 0x5e0460e5 //sha256su1 v5.16b,v7.16b,v4.16b
+ ld1 {v17.4s},[x3],#16
+ add v16.4s,v16.4s,v6.4s
+ .inst 0x5e2828e6 //sha256su0 v6.16b,v7.16b
+ orr v2.16b,v0.16b,v0.16b
+ .inst 0x5e104020 //sha256h v0.16b,v1.16b,v16.4s
+ .inst 0x5e105041 //sha256h2 v1.16b,v2.16b,v16.4s
+ .inst 0x5e056086 //sha256su1 v6.16b,v4.16b,v5.16b
+ ld1 {v16.4s},[x3],#16
+ add v17.4s,v17.4s,v7.4s
+ .inst 0x5e282887 //sha256su0 v7.16b,v4.16b
+ orr v2.16b,v0.16b,v0.16b
+ .inst 0x5e114020 //sha256h v0.16b,v1.16b,v17.4s
+ .inst 0x5e115041 //sha256h2 v1.16b,v2.16b,v17.4s
+ .inst 0x5e0660a7 //sha256su1 v7.16b,v5.16b,v6.16b
+ ld1 {v17.4s},[x3],#16
+ add v16.4s,v16.4s,v4.4s
+ orr v2.16b,v0.16b,v0.16b
+ .inst 0x5e104020 //sha256h v0.16b,v1.16b,v16.4s
+ .inst 0x5e105041 //sha256h2 v1.16b,v2.16b,v16.4s
+
+ ld1 {v16.4s},[x3],#16
+ add v17.4s,v17.4s,v5.4s
+ orr v2.16b,v0.16b,v0.16b
+ .inst 0x5e114020 //sha256h v0.16b,v1.16b,v17.4s
+ .inst 0x5e115041 //sha256h2 v1.16b,v2.16b,v17.4s
+
+ ld1 {v17.4s},[x3]
+ add v16.4s,v16.4s,v6.4s
+ sub x3,x3,#64*4-16 // rewind
+ orr v2.16b,v0.16b,v0.16b
+ .inst 0x5e104020 //sha256h v0.16b,v1.16b,v16.4s
+ .inst 0x5e105041 //sha256h2 v1.16b,v2.16b,v16.4s
+
+ add v17.4s,v17.4s,v7.4s
+ orr v2.16b,v0.16b,v0.16b
+ .inst 0x5e114020 //sha256h v0.16b,v1.16b,v17.4s
+ .inst 0x5e115041 //sha256h2 v1.16b,v2.16b,v17.4s
+
+ add v0.4s,v0.4s,v18.4s
+ add v1.4s,v1.4s,v19.4s
+
+ cbnz x2,.Loop_hw
+
+ st1 {v0.4s,v1.4s},[x0]
+
+ ldr x29,[sp],#16
+ ret
+.size sha256_block_armv8,.-sha256_block_armv8
+.comm OPENSSL_armcap_P,4,4
diff --git a/third_party/boringssl/linux-aarch64/crypto/sha/sha512-armv8.S b/third_party/boringssl/linux-aarch64/crypto/sha/sha512-armv8.S
new file mode 100644
index 0000000..6b0d194
--- /dev/null
+++ b/third_party/boringssl/linux-aarch64/crypto/sha/sha512-armv8.S
@@ -0,0 +1,1021 @@
+#include "arm_arch.h"
+
+.text
+
+.globl sha512_block_data_order
+.type sha512_block_data_order,%function
+.align 6
+sha512_block_data_order:
+ stp x29,x30,[sp,#-128]!
+ add x29,sp,#0
+
+ stp x19,x20,[sp,#16]
+ stp x21,x22,[sp,#32]
+ stp x23,x24,[sp,#48]
+ stp x25,x26,[sp,#64]
+ stp x27,x28,[sp,#80]
+ sub sp,sp,#4*8
+
+ ldp x20,x21,[x0] // load context
+ ldp x22,x23,[x0,#2*8]
+ ldp x24,x25,[x0,#4*8]
+ add x2,x1,x2,lsl#7 // end of input
+ ldp x26,x27,[x0,#6*8]
+ adr x30,K512
+ stp x0,x2,[x29,#96]
+
+.Loop:
+ ldp x3,x4,[x1],#2*8
+ ldr x19,[x30],#8 // *K++
+ eor x28,x21,x22 // magic seed
+ str x1,[x29,#112]
+#ifndef __ARMEB__
+ rev x3,x3 // 0
+#endif
+ ror x16,x24,#14
+ add x27,x27,x19 // h+=K[i]
+ eor x6,x24,x24,ror#23
+ and x17,x25,x24
+ bic x19,x26,x24
+ add x27,x27,x3 // h+=X[i]
+ orr x17,x17,x19 // Ch(e,f,g)
+ eor x19,x20,x21 // a^b, b^c in next round
+ eor x16,x16,x6,ror#18 // Sigma1(e)
+ ror x6,x20,#28
+ add x27,x27,x17 // h+=Ch(e,f,g)
+ eor x17,x20,x20,ror#5
+ add x27,x27,x16 // h+=Sigma1(e)
+ and x28,x28,x19 // (b^c)&=(a^b)
+ add x23,x23,x27 // d+=h
+ eor x28,x28,x21 // Maj(a,b,c)
+ eor x17,x6,x17,ror#34 // Sigma0(a)
+ add x27,x27,x28 // h+=Maj(a,b,c)
+ ldr x28,[x30],#8 // *K++, x19 in next round
+ //add x27,x27,x17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev x4,x4 // 1
+#endif
+ ldp x5,x6,[x1],#2*8
+ add x27,x27,x17 // h+=Sigma0(a)
+ ror x16,x23,#14
+ add x26,x26,x28 // h+=K[i]
+ eor x7,x23,x23,ror#23
+ and x17,x24,x23
+ bic x28,x25,x23
+ add x26,x26,x4 // h+=X[i]
+ orr x17,x17,x28 // Ch(e,f,g)
+ eor x28,x27,x20 // a^b, b^c in next round
+ eor x16,x16,x7,ror#18 // Sigma1(e)
+ ror x7,x27,#28
+ add x26,x26,x17 // h+=Ch(e,f,g)
+ eor x17,x27,x27,ror#5
+ add x26,x26,x16 // h+=Sigma1(e)
+ and x19,x19,x28 // (b^c)&=(a^b)
+ add x22,x22,x26 // d+=h
+ eor x19,x19,x20 // Maj(a,b,c)
+ eor x17,x7,x17,ror#34 // Sigma0(a)
+ add x26,x26,x19 // h+=Maj(a,b,c)
+ ldr x19,[x30],#8 // *K++, x28 in next round
+ //add x26,x26,x17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev x5,x5 // 2
+#endif
+ add x26,x26,x17 // h+=Sigma0(a)
+ ror x16,x22,#14
+ add x25,x25,x19 // h+=K[i]
+ eor x8,x22,x22,ror#23
+ and x17,x23,x22
+ bic x19,x24,x22
+ add x25,x25,x5 // h+=X[i]
+ orr x17,x17,x19 // Ch(e,f,g)
+ eor x19,x26,x27 // a^b, b^c in next round
+ eor x16,x16,x8,ror#18 // Sigma1(e)
+ ror x8,x26,#28
+ add x25,x25,x17 // h+=Ch(e,f,g)
+ eor x17,x26,x26,ror#5
+ add x25,x25,x16 // h+=Sigma1(e)
+ and x28,x28,x19 // (b^c)&=(a^b)
+ add x21,x21,x25 // d+=h
+ eor x28,x28,x27 // Maj(a,b,c)
+ eor x17,x8,x17,ror#34 // Sigma0(a)
+ add x25,x25,x28 // h+=Maj(a,b,c)
+ ldr x28,[x30],#8 // *K++, x19 in next round
+ //add x25,x25,x17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev x6,x6 // 3
+#endif
+ ldp x7,x8,[x1],#2*8
+ add x25,x25,x17 // h+=Sigma0(a)
+ ror x16,x21,#14
+ add x24,x24,x28 // h+=K[i]
+ eor x9,x21,x21,ror#23
+ and x17,x22,x21
+ bic x28,x23,x21
+ add x24,x24,x6 // h+=X[i]
+ orr x17,x17,x28 // Ch(e,f,g)
+ eor x28,x25,x26 // a^b, b^c in next round
+ eor x16,x16,x9,ror#18 // Sigma1(e)
+ ror x9,x25,#28
+ add x24,x24,x17 // h+=Ch(e,f,g)
+ eor x17,x25,x25,ror#5
+ add x24,x24,x16 // h+=Sigma1(e)
+ and x19,x19,x28 // (b^c)&=(a^b)
+ add x20,x20,x24 // d+=h
+ eor x19,x19,x26 // Maj(a,b,c)
+ eor x17,x9,x17,ror#34 // Sigma0(a)
+ add x24,x24,x19 // h+=Maj(a,b,c)
+ ldr x19,[x30],#8 // *K++, x28 in next round
+ //add x24,x24,x17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev x7,x7 // 4
+#endif
+ add x24,x24,x17 // h+=Sigma0(a)
+ ror x16,x20,#14
+ add x23,x23,x19 // h+=K[i]
+ eor x10,x20,x20,ror#23
+ and x17,x21,x20
+ bic x19,x22,x20
+ add x23,x23,x7 // h+=X[i]
+ orr x17,x17,x19 // Ch(e,f,g)
+ eor x19,x24,x25 // a^b, b^c in next round
+ eor x16,x16,x10,ror#18 // Sigma1(e)
+ ror x10,x24,#28
+ add x23,x23,x17 // h+=Ch(e,f,g)
+ eor x17,x24,x24,ror#5
+ add x23,x23,x16 // h+=Sigma1(e)
+ and x28,x28,x19 // (b^c)&=(a^b)
+ add x27,x27,x23 // d+=h
+ eor x28,x28,x25 // Maj(a,b,c)
+ eor x17,x10,x17,ror#34 // Sigma0(a)
+ add x23,x23,x28 // h+=Maj(a,b,c)
+ ldr x28,[x30],#8 // *K++, x19 in next round
+ //add x23,x23,x17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev x8,x8 // 5
+#endif
+ ldp x9,x10,[x1],#2*8
+ add x23,x23,x17 // h+=Sigma0(a)
+ ror x16,x27,#14
+ add x22,x22,x28 // h+=K[i]
+ eor x11,x27,x27,ror#23
+ and x17,x20,x27
+ bic x28,x21,x27
+ add x22,x22,x8 // h+=X[i]
+ orr x17,x17,x28 // Ch(e,f,g)
+ eor x28,x23,x24 // a^b, b^c in next round
+ eor x16,x16,x11,ror#18 // Sigma1(e)
+ ror x11,x23,#28
+ add x22,x22,x17 // h+=Ch(e,f,g)
+ eor x17,x23,x23,ror#5
+ add x22,x22,x16 // h+=Sigma1(e)
+ and x19,x19,x28 // (b^c)&=(a^b)
+ add x26,x26,x22 // d+=h
+ eor x19,x19,x24 // Maj(a,b,c)
+ eor x17,x11,x17,ror#34 // Sigma0(a)
+ add x22,x22,x19 // h+=Maj(a,b,c)
+ ldr x19,[x30],#8 // *K++, x28 in next round
+ //add x22,x22,x17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev x9,x9 // 6
+#endif
+ add x22,x22,x17 // h+=Sigma0(a)
+ ror x16,x26,#14
+ add x21,x21,x19 // h+=K[i]
+ eor x12,x26,x26,ror#23
+ and x17,x27,x26
+ bic x19,x20,x26
+ add x21,x21,x9 // h+=X[i]
+ orr x17,x17,x19 // Ch(e,f,g)
+ eor x19,x22,x23 // a^b, b^c in next round
+ eor x16,x16,x12,ror#18 // Sigma1(e)
+ ror x12,x22,#28
+ add x21,x21,x17 // h+=Ch(e,f,g)
+ eor x17,x22,x22,ror#5
+ add x21,x21,x16 // h+=Sigma1(e)
+ and x28,x28,x19 // (b^c)&=(a^b)
+ add x25,x25,x21 // d+=h
+ eor x28,x28,x23 // Maj(a,b,c)
+ eor x17,x12,x17,ror#34 // Sigma0(a)
+ add x21,x21,x28 // h+=Maj(a,b,c)
+ ldr x28,[x30],#8 // *K++, x19 in next round
+ //add x21,x21,x17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev x10,x10 // 7
+#endif
+ ldp x11,x12,[x1],#2*8
+ add x21,x21,x17 // h+=Sigma0(a)
+ ror x16,x25,#14
+ add x20,x20,x28 // h+=K[i]
+ eor x13,x25,x25,ror#23
+ and x17,x26,x25
+ bic x28,x27,x25
+ add x20,x20,x10 // h+=X[i]
+ orr x17,x17,x28 // Ch(e,f,g)
+ eor x28,x21,x22 // a^b, b^c in next round
+ eor x16,x16,x13,ror#18 // Sigma1(e)
+ ror x13,x21,#28
+ add x20,x20,x17 // h+=Ch(e,f,g)
+ eor x17,x21,x21,ror#5
+ add x20,x20,x16 // h+=Sigma1(e)
+ and x19,x19,x28 // (b^c)&=(a^b)
+ add x24,x24,x20 // d+=h
+ eor x19,x19,x22 // Maj(a,b,c)
+ eor x17,x13,x17,ror#34 // Sigma0(a)
+ add x20,x20,x19 // h+=Maj(a,b,c)
+ ldr x19,[x30],#8 // *K++, x28 in next round
+ //add x20,x20,x17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev x11,x11 // 8
+#endif
+ add x20,x20,x17 // h+=Sigma0(a)
+ ror x16,x24,#14
+ add x27,x27,x19 // h+=K[i]
+ eor x14,x24,x24,ror#23
+ and x17,x25,x24
+ bic x19,x26,x24
+ add x27,x27,x11 // h+=X[i]
+ orr x17,x17,x19 // Ch(e,f,g)
+ eor x19,x20,x21 // a^b, b^c in next round
+ eor x16,x16,x14,ror#18 // Sigma1(e)
+ ror x14,x20,#28
+ add x27,x27,x17 // h+=Ch(e,f,g)
+ eor x17,x20,x20,ror#5
+ add x27,x27,x16 // h+=Sigma1(e)
+ and x28,x28,x19 // (b^c)&=(a^b)
+ add x23,x23,x27 // d+=h
+ eor x28,x28,x21 // Maj(a,b,c)
+ eor x17,x14,x17,ror#34 // Sigma0(a)
+ add x27,x27,x28 // h+=Maj(a,b,c)
+ ldr x28,[x30],#8 // *K++, x19 in next round
+ //add x27,x27,x17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev x12,x12 // 9
+#endif
+ ldp x13,x14,[x1],#2*8
+ add x27,x27,x17 // h+=Sigma0(a)
+ ror x16,x23,#14
+ add x26,x26,x28 // h+=K[i]
+ eor x15,x23,x23,ror#23
+ and x17,x24,x23
+ bic x28,x25,x23
+ add x26,x26,x12 // h+=X[i]
+ orr x17,x17,x28 // Ch(e,f,g)
+ eor x28,x27,x20 // a^b, b^c in next round
+ eor x16,x16,x15,ror#18 // Sigma1(e)
+ ror x15,x27,#28
+ add x26,x26,x17 // h+=Ch(e,f,g)
+ eor x17,x27,x27,ror#5
+ add x26,x26,x16 // h+=Sigma1(e)
+ and x19,x19,x28 // (b^c)&=(a^b)
+ add x22,x22,x26 // d+=h
+ eor x19,x19,x20 // Maj(a,b,c)
+ eor x17,x15,x17,ror#34 // Sigma0(a)
+ add x26,x26,x19 // h+=Maj(a,b,c)
+ ldr x19,[x30],#8 // *K++, x28 in next round
+ //add x26,x26,x17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev x13,x13 // 10
+#endif
+ add x26,x26,x17 // h+=Sigma0(a)
+ ror x16,x22,#14
+ add x25,x25,x19 // h+=K[i]
+ eor x0,x22,x22,ror#23
+ and x17,x23,x22
+ bic x19,x24,x22
+ add x25,x25,x13 // h+=X[i]
+ orr x17,x17,x19 // Ch(e,f,g)
+ eor x19,x26,x27 // a^b, b^c in next round
+ eor x16,x16,x0,ror#18 // Sigma1(e)
+ ror x0,x26,#28
+ add x25,x25,x17 // h+=Ch(e,f,g)
+ eor x17,x26,x26,ror#5
+ add x25,x25,x16 // h+=Sigma1(e)
+ and x28,x28,x19 // (b^c)&=(a^b)
+ add x21,x21,x25 // d+=h
+ eor x28,x28,x27 // Maj(a,b,c)
+ eor x17,x0,x17,ror#34 // Sigma0(a)
+ add x25,x25,x28 // h+=Maj(a,b,c)
+ ldr x28,[x30],#8 // *K++, x19 in next round
+ //add x25,x25,x17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev x14,x14 // 11
+#endif
+ ldp x15,x0,[x1],#2*8
+ add x25,x25,x17 // h+=Sigma0(a)
+ str x6,[sp,#24]
+ ror x16,x21,#14
+ add x24,x24,x28 // h+=K[i]
+ eor x6,x21,x21,ror#23
+ and x17,x22,x21
+ bic x28,x23,x21
+ add x24,x24,x14 // h+=X[i]
+ orr x17,x17,x28 // Ch(e,f,g)
+ eor x28,x25,x26 // a^b, b^c in next round
+ eor x16,x16,x6,ror#18 // Sigma1(e)
+ ror x6,x25,#28
+ add x24,x24,x17 // h+=Ch(e,f,g)
+ eor x17,x25,x25,ror#5
+ add x24,x24,x16 // h+=Sigma1(e)
+ and x19,x19,x28 // (b^c)&=(a^b)
+ add x20,x20,x24 // d+=h
+ eor x19,x19,x26 // Maj(a,b,c)
+ eor x17,x6,x17,ror#34 // Sigma0(a)
+ add x24,x24,x19 // h+=Maj(a,b,c)
+ ldr x19,[x30],#8 // *K++, x28 in next round
+ //add x24,x24,x17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev x15,x15 // 12
+#endif
+ add x24,x24,x17 // h+=Sigma0(a)
+ str x7,[sp,#0]
+ ror x16,x20,#14
+ add x23,x23,x19 // h+=K[i]
+ eor x7,x20,x20,ror#23
+ and x17,x21,x20
+ bic x19,x22,x20
+ add x23,x23,x15 // h+=X[i]
+ orr x17,x17,x19 // Ch(e,f,g)
+ eor x19,x24,x25 // a^b, b^c in next round
+ eor x16,x16,x7,ror#18 // Sigma1(e)
+ ror x7,x24,#28
+ add x23,x23,x17 // h+=Ch(e,f,g)
+ eor x17,x24,x24,ror#5
+ add x23,x23,x16 // h+=Sigma1(e)
+ and x28,x28,x19 // (b^c)&=(a^b)
+ add x27,x27,x23 // d+=h
+ eor x28,x28,x25 // Maj(a,b,c)
+ eor x17,x7,x17,ror#34 // Sigma0(a)
+ add x23,x23,x28 // h+=Maj(a,b,c)
+ ldr x28,[x30],#8 // *K++, x19 in next round
+ //add x23,x23,x17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev x0,x0 // 13
+#endif
+ ldp x1,x2,[x1]
+ add x23,x23,x17 // h+=Sigma0(a)
+ str x8,[sp,#8]
+ ror x16,x27,#14
+ add x22,x22,x28 // h+=K[i]
+ eor x8,x27,x27,ror#23
+ and x17,x20,x27
+ bic x28,x21,x27
+ add x22,x22,x0 // h+=X[i]
+ orr x17,x17,x28 // Ch(e,f,g)
+ eor x28,x23,x24 // a^b, b^c in next round
+ eor x16,x16,x8,ror#18 // Sigma1(e)
+ ror x8,x23,#28
+ add x22,x22,x17 // h+=Ch(e,f,g)
+ eor x17,x23,x23,ror#5
+ add x22,x22,x16 // h+=Sigma1(e)
+ and x19,x19,x28 // (b^c)&=(a^b)
+ add x26,x26,x22 // d+=h
+ eor x19,x19,x24 // Maj(a,b,c)
+ eor x17,x8,x17,ror#34 // Sigma0(a)
+ add x22,x22,x19 // h+=Maj(a,b,c)
+ ldr x19,[x30],#8 // *K++, x28 in next round
+ //add x22,x22,x17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev x1,x1 // 14
+#endif
+ ldr x6,[sp,#24]
+ add x22,x22,x17 // h+=Sigma0(a)
+ str x9,[sp,#16]
+ ror x16,x26,#14
+ add x21,x21,x19 // h+=K[i]
+ eor x9,x26,x26,ror#23
+ and x17,x27,x26
+ bic x19,x20,x26
+ add x21,x21,x1 // h+=X[i]
+ orr x17,x17,x19 // Ch(e,f,g)
+ eor x19,x22,x23 // a^b, b^c in next round
+ eor x16,x16,x9,ror#18 // Sigma1(e)
+ ror x9,x22,#28
+ add x21,x21,x17 // h+=Ch(e,f,g)
+ eor x17,x22,x22,ror#5
+ add x21,x21,x16 // h+=Sigma1(e)
+ and x28,x28,x19 // (b^c)&=(a^b)
+ add x25,x25,x21 // d+=h
+ eor x28,x28,x23 // Maj(a,b,c)
+ eor x17,x9,x17,ror#34 // Sigma0(a)
+ add x21,x21,x28 // h+=Maj(a,b,c)
+ ldr x28,[x30],#8 // *K++, x19 in next round
+ //add x21,x21,x17 // h+=Sigma0(a)
+#ifndef __ARMEB__
+ rev x2,x2 // 15
+#endif
+ ldr x7,[sp,#0]
+ add x21,x21,x17 // h+=Sigma0(a)
+ str x10,[sp,#24]
+ ror x16,x25,#14
+ add x20,x20,x28 // h+=K[i]
+ ror x9,x4,#1
+ and x17,x26,x25
+ ror x8,x1,#19
+ bic x28,x27,x25
+ ror x10,x21,#28
+ add x20,x20,x2 // h+=X[i]
+ eor x16,x16,x25,ror#18
+ eor x9,x9,x4,ror#8
+ orr x17,x17,x28 // Ch(e,f,g)
+ eor x28,x21,x22 // a^b, b^c in next round
+ eor x16,x16,x25,ror#41 // Sigma1(e)
+ eor x10,x10,x21,ror#34
+ add x20,x20,x17 // h+=Ch(e,f,g)
+ and x19,x19,x28 // (b^c)&=(a^b)
+ eor x8,x8,x1,ror#61
+ eor x9,x9,x4,lsr#7 // sigma0(X[i+1])
+ add x20,x20,x16 // h+=Sigma1(e)
+ eor x19,x19,x22 // Maj(a,b,c)
+ eor x17,x10,x21,ror#39 // Sigma0(a)
+ eor x8,x8,x1,lsr#6 // sigma1(X[i+14])
+ add x3,x3,x12
+ add x24,x24,x20 // d+=h
+ add x20,x20,x19 // h+=Maj(a,b,c)
+ ldr x19,[x30],#8 // *K++, x28 in next round
+ add x3,x3,x9
+ add x20,x20,x17 // h+=Sigma0(a)
+ add x3,x3,x8
+.Loop_16_xx:
+ ldr x8,[sp,#8]
+ str x11,[sp,#0]
+ ror x16,x24,#14
+ add x27,x27,x19 // h+=K[i]
+ ror x10,x5,#1
+ and x17,x25,x24
+ ror x9,x2,#19
+ bic x19,x26,x24
+ ror x11,x20,#28
+ add x27,x27,x3 // h+=X[i]
+ eor x16,x16,x24,ror#18
+ eor x10,x10,x5,ror#8
+ orr x17,x17,x19 // Ch(e,f,g)
+ eor x19,x20,x21 // a^b, b^c in next round
+ eor x16,x16,x24,ror#41 // Sigma1(e)
+ eor x11,x11,x20,ror#34
+ add x27,x27,x17 // h+=Ch(e,f,g)
+ and x28,x28,x19 // (b^c)&=(a^b)
+ eor x9,x9,x2,ror#61
+ eor x10,x10,x5,lsr#7 // sigma0(X[i+1])
+ add x27,x27,x16 // h+=Sigma1(e)
+ eor x28,x28,x21 // Maj(a,b,c)
+ eor x17,x11,x20,ror#39 // Sigma0(a)
+ eor x9,x9,x2,lsr#6 // sigma1(X[i+14])
+ add x4,x4,x13
+ add x23,x23,x27 // d+=h
+ add x27,x27,x28 // h+=Maj(a,b,c)
+ ldr x28,[x30],#8 // *K++, x19 in next round
+ add x4,x4,x10
+ add x27,x27,x17 // h+=Sigma0(a)
+ add x4,x4,x9
+ ldr x9,[sp,#16]
+ str x12,[sp,#8]
+ ror x16,x23,#14
+ add x26,x26,x28 // h+=K[i]
+ ror x11,x6,#1
+ and x17,x24,x23
+ ror x10,x3,#19
+ bic x28,x25,x23
+ ror x12,x27,#28
+ add x26,x26,x4 // h+=X[i]
+ eor x16,x16,x23,ror#18
+ eor x11,x11,x6,ror#8
+ orr x17,x17,x28 // Ch(e,f,g)
+ eor x28,x27,x20 // a^b, b^c in next round
+ eor x16,x16,x23,ror#41 // Sigma1(e)
+ eor x12,x12,x27,ror#34
+ add x26,x26,x17 // h+=Ch(e,f,g)
+ and x19,x19,x28 // (b^c)&=(a^b)
+ eor x10,x10,x3,ror#61
+ eor x11,x11,x6,lsr#7 // sigma0(X[i+1])
+ add x26,x26,x16 // h+=Sigma1(e)
+ eor x19,x19,x20 // Maj(a,b,c)
+ eor x17,x12,x27,ror#39 // Sigma0(a)
+ eor x10,x10,x3,lsr#6 // sigma1(X[i+14])
+ add x5,x5,x14
+ add x22,x22,x26 // d+=h
+ add x26,x26,x19 // h+=Maj(a,b,c)
+ ldr x19,[x30],#8 // *K++, x28 in next round
+ add x5,x5,x11
+ add x26,x26,x17 // h+=Sigma0(a)
+ add x5,x5,x10
+ ldr x10,[sp,#24]
+ str x13,[sp,#16]
+ ror x16,x22,#14
+ add x25,x25,x19 // h+=K[i]
+ ror x12,x7,#1
+ and x17,x23,x22
+ ror x11,x4,#19
+ bic x19,x24,x22
+ ror x13,x26,#28
+ add x25,x25,x5 // h+=X[i]
+ eor x16,x16,x22,ror#18
+ eor x12,x12,x7,ror#8
+ orr x17,x17,x19 // Ch(e,f,g)
+ eor x19,x26,x27 // a^b, b^c in next round
+ eor x16,x16,x22,ror#41 // Sigma1(e)
+ eor x13,x13,x26,ror#34
+ add x25,x25,x17 // h+=Ch(e,f,g)
+ and x28,x28,x19 // (b^c)&=(a^b)
+ eor x11,x11,x4,ror#61
+ eor x12,x12,x7,lsr#7 // sigma0(X[i+1])
+ add x25,x25,x16 // h+=Sigma1(e)
+ eor x28,x28,x27 // Maj(a,b,c)
+ eor x17,x13,x26,ror#39 // Sigma0(a)
+ eor x11,x11,x4,lsr#6 // sigma1(X[i+14])
+ add x6,x6,x15
+ add x21,x21,x25 // d+=h
+ add x25,x25,x28 // h+=Maj(a,b,c)
+ ldr x28,[x30],#8 // *K++, x19 in next round
+ add x6,x6,x12
+ add x25,x25,x17 // h+=Sigma0(a)
+ add x6,x6,x11
+ ldr x11,[sp,#0]
+ str x14,[sp,#24]
+ ror x16,x21,#14
+ add x24,x24,x28 // h+=K[i]
+ ror x13,x8,#1
+ and x17,x22,x21
+ ror x12,x5,#19
+ bic x28,x23,x21
+ ror x14,x25,#28
+ add x24,x24,x6 // h+=X[i]
+ eor x16,x16,x21,ror#18
+ eor x13,x13,x8,ror#8
+ orr x17,x17,x28 // Ch(e,f,g)
+ eor x28,x25,x26 // a^b, b^c in next round
+ eor x16,x16,x21,ror#41 // Sigma1(e)
+ eor x14,x14,x25,ror#34
+ add x24,x24,x17 // h+=Ch(e,f,g)
+ and x19,x19,x28 // (b^c)&=(a^b)
+ eor x12,x12,x5,ror#61
+ eor x13,x13,x8,lsr#7 // sigma0(X[i+1])
+ add x24,x24,x16 // h+=Sigma1(e)
+ eor x19,x19,x26 // Maj(a,b,c)
+ eor x17,x14,x25,ror#39 // Sigma0(a)
+ eor x12,x12,x5,lsr#6 // sigma1(X[i+14])
+ add x7,x7,x0
+ add x20,x20,x24 // d+=h
+ add x24,x24,x19 // h+=Maj(a,b,c)
+ ldr x19,[x30],#8 // *K++, x28 in next round
+ add x7,x7,x13
+ add x24,x24,x17 // h+=Sigma0(a)
+ add x7,x7,x12
+ ldr x12,[sp,#8]
+ str x15,[sp,#0]
+ ror x16,x20,#14
+ add x23,x23,x19 // h+=K[i]
+ ror x14,x9,#1
+ and x17,x21,x20
+ ror x13,x6,#19
+ bic x19,x22,x20
+ ror x15,x24,#28
+ add x23,x23,x7 // h+=X[i]
+ eor x16,x16,x20,ror#18
+ eor x14,x14,x9,ror#8
+ orr x17,x17,x19 // Ch(e,f,g)
+ eor x19,x24,x25 // a^b, b^c in next round
+ eor x16,x16,x20,ror#41 // Sigma1(e)
+ eor x15,x15,x24,ror#34
+ add x23,x23,x17 // h+=Ch(e,f,g)
+ and x28,x28,x19 // (b^c)&=(a^b)
+ eor x13,x13,x6,ror#61
+ eor x14,x14,x9,lsr#7 // sigma0(X[i+1])
+ add x23,x23,x16 // h+=Sigma1(e)
+ eor x28,x28,x25 // Maj(a,b,c)
+ eor x17,x15,x24,ror#39 // Sigma0(a)
+ eor x13,x13,x6,lsr#6 // sigma1(X[i+14])
+ add x8,x8,x1
+ add x27,x27,x23 // d+=h
+ add x23,x23,x28 // h+=Maj(a,b,c)
+ ldr x28,[x30],#8 // *K++, x19 in next round
+ add x8,x8,x14
+ add x23,x23,x17 // h+=Sigma0(a)
+ add x8,x8,x13
+ ldr x13,[sp,#16]
+ str x0,[sp,#8]
+ ror x16,x27,#14
+ add x22,x22,x28 // h+=K[i]
+ ror x15,x10,#1
+ and x17,x20,x27
+ ror x14,x7,#19
+ bic x28,x21,x27
+ ror x0,x23,#28
+ add x22,x22,x8 // h+=X[i]
+ eor x16,x16,x27,ror#18
+ eor x15,x15,x10,ror#8
+ orr x17,x17,x28 // Ch(e,f,g)
+ eor x28,x23,x24 // a^b, b^c in next round
+ eor x16,x16,x27,ror#41 // Sigma1(e)
+ eor x0,x0,x23,ror#34
+ add x22,x22,x17 // h+=Ch(e,f,g)
+ and x19,x19,x28 // (b^c)&=(a^b)
+ eor x14,x14,x7,ror#61
+ eor x15,x15,x10,lsr#7 // sigma0(X[i+1])
+ add x22,x22,x16 // h+=Sigma1(e)
+ eor x19,x19,x24 // Maj(a,b,c)
+ eor x17,x0,x23,ror#39 // Sigma0(a)
+ eor x14,x14,x7,lsr#6 // sigma1(X[i+14])
+ add x9,x9,x2
+ add x26,x26,x22 // d+=h
+ add x22,x22,x19 // h+=Maj(a,b,c)
+ ldr x19,[x30],#8 // *K++, x28 in next round
+ add x9,x9,x15
+ add x22,x22,x17 // h+=Sigma0(a)
+ add x9,x9,x14
+ ldr x14,[sp,#24]
+ str x1,[sp,#16]
+ ror x16,x26,#14
+ add x21,x21,x19 // h+=K[i]
+ ror x0,x11,#1
+ and x17,x27,x26
+ ror x15,x8,#19
+ bic x19,x20,x26
+ ror x1,x22,#28
+ add x21,x21,x9 // h+=X[i]
+ eor x16,x16,x26,ror#18
+ eor x0,x0,x11,ror#8
+ orr x17,x17,x19 // Ch(e,f,g)
+ eor x19,x22,x23 // a^b, b^c in next round
+ eor x16,x16,x26,ror#41 // Sigma1(e)
+ eor x1,x1,x22,ror#34
+ add x21,x21,x17 // h+=Ch(e,f,g)
+ and x28,x28,x19 // (b^c)&=(a^b)
+ eor x15,x15,x8,ror#61
+ eor x0,x0,x11,lsr#7 // sigma0(X[i+1])
+ add x21,x21,x16 // h+=Sigma1(e)
+ eor x28,x28,x23 // Maj(a,b,c)
+ eor x17,x1,x22,ror#39 // Sigma0(a)
+ eor x15,x15,x8,lsr#6 // sigma1(X[i+14])
+ add x10,x10,x3
+ add x25,x25,x21 // d+=h
+ add x21,x21,x28 // h+=Maj(a,b,c)
+ ldr x28,[x30],#8 // *K++, x19 in next round
+ add x10,x10,x0
+ add x21,x21,x17 // h+=Sigma0(a)
+ add x10,x10,x15
+ ldr x15,[sp,#0]
+ str x2,[sp,#24]
+ ror x16,x25,#14
+ add x20,x20,x28 // h+=K[i]
+ ror x1,x12,#1
+ and x17,x26,x25
+ ror x0,x9,#19
+ bic x28,x27,x25
+ ror x2,x21,#28
+ add x20,x20,x10 // h+=X[i]
+ eor x16,x16,x25,ror#18
+ eor x1,x1,x12,ror#8
+ orr x17,x17,x28 // Ch(e,f,g)
+ eor x28,x21,x22 // a^b, b^c in next round
+ eor x16,x16,x25,ror#41 // Sigma1(e)
+ eor x2,x2,x21,ror#34
+ add x20,x20,x17 // h+=Ch(e,f,g)
+ and x19,x19,x28 // (b^c)&=(a^b)
+ eor x0,x0,x9,ror#61
+ eor x1,x1,x12,lsr#7 // sigma0(X[i+1])
+ add x20,x20,x16 // h+=Sigma1(e)
+ eor x19,x19,x22 // Maj(a,b,c)
+ eor x17,x2,x21,ror#39 // Sigma0(a)
+ eor x0,x0,x9,lsr#6 // sigma1(X[i+14])
+ add x11,x11,x4
+ add x24,x24,x20 // d+=h
+ add x20,x20,x19 // h+=Maj(a,b,c)
+ ldr x19,[x30],#8 // *K++, x28 in next round
+ add x11,x11,x1
+ add x20,x20,x17 // h+=Sigma0(a)
+ add x11,x11,x0
+ ldr x0,[sp,#8]
+ str x3,[sp,#0]
+ ror x16,x24,#14
+ add x27,x27,x19 // h+=K[i]
+ ror x2,x13,#1
+ and x17,x25,x24
+ ror x1,x10,#19
+ bic x19,x26,x24
+ ror x3,x20,#28
+ add x27,x27,x11 // h+=X[i]
+ eor x16,x16,x24,ror#18
+ eor x2,x2,x13,ror#8
+ orr x17,x17,x19 // Ch(e,f,g)
+ eor x19,x20,x21 // a^b, b^c in next round
+ eor x16,x16,x24,ror#41 // Sigma1(e)
+ eor x3,x3,x20,ror#34
+ add x27,x27,x17 // h+=Ch(e,f,g)
+ and x28,x28,x19 // (b^c)&=(a^b)
+ eor x1,x1,x10,ror#61
+ eor x2,x2,x13,lsr#7 // sigma0(X[i+1])
+ add x27,x27,x16 // h+=Sigma1(e)
+ eor x28,x28,x21 // Maj(a,b,c)
+ eor x17,x3,x20,ror#39 // Sigma0(a)
+ eor x1,x1,x10,lsr#6 // sigma1(X[i+14])
+ add x12,x12,x5
+ add x23,x23,x27 // d+=h
+ add x27,x27,x28 // h+=Maj(a,b,c)
+ ldr x28,[x30],#8 // *K++, x19 in next round
+ add x12,x12,x2
+ add x27,x27,x17 // h+=Sigma0(a)
+ add x12,x12,x1
+ ldr x1,[sp,#16]
+ str x4,[sp,#8]
+ ror x16,x23,#14
+ add x26,x26,x28 // h+=K[i]
+ ror x3,x14,#1
+ and x17,x24,x23
+ ror x2,x11,#19
+ bic x28,x25,x23
+ ror x4,x27,#28
+ add x26,x26,x12 // h+=X[i]
+ eor x16,x16,x23,ror#18
+ eor x3,x3,x14,ror#8
+ orr x17,x17,x28 // Ch(e,f,g)
+ eor x28,x27,x20 // a^b, b^c in next round
+ eor x16,x16,x23,ror#41 // Sigma1(e)
+ eor x4,x4,x27,ror#34
+ add x26,x26,x17 // h+=Ch(e,f,g)
+ and x19,x19,x28 // (b^c)&=(a^b)
+ eor x2,x2,x11,ror#61
+ eor x3,x3,x14,lsr#7 // sigma0(X[i+1])
+ add x26,x26,x16 // h+=Sigma1(e)
+ eor x19,x19,x20 // Maj(a,b,c)
+ eor x17,x4,x27,ror#39 // Sigma0(a)
+ eor x2,x2,x11,lsr#6 // sigma1(X[i+14])
+ add x13,x13,x6
+ add x22,x22,x26 // d+=h
+ add x26,x26,x19 // h+=Maj(a,b,c)
+ ldr x19,[x30],#8 // *K++, x28 in next round
+ add x13,x13,x3
+ add x26,x26,x17 // h+=Sigma0(a)
+ add x13,x13,x2
+ ldr x2,[sp,#24]
+ str x5,[sp,#16]
+ ror x16,x22,#14
+ add x25,x25,x19 // h+=K[i]
+ ror x4,x15,#1
+ and x17,x23,x22
+ ror x3,x12,#19
+ bic x19,x24,x22
+ ror x5,x26,#28
+ add x25,x25,x13 // h+=X[i]
+ eor x16,x16,x22,ror#18
+ eor x4,x4,x15,ror#8
+ orr x17,x17,x19 // Ch(e,f,g)
+ eor x19,x26,x27 // a^b, b^c in next round
+ eor x16,x16,x22,ror#41 // Sigma1(e)
+ eor x5,x5,x26,ror#34
+ add x25,x25,x17 // h+=Ch(e,f,g)
+ and x28,x28,x19 // (b^c)&=(a^b)
+ eor x3,x3,x12,ror#61
+ eor x4,x4,x15,lsr#7 // sigma0(X[i+1])
+ add x25,x25,x16 // h+=Sigma1(e)
+ eor x28,x28,x27 // Maj(a,b,c)
+ eor x17,x5,x26,ror#39 // Sigma0(a)
+ eor x3,x3,x12,lsr#6 // sigma1(X[i+14])
+ add x14,x14,x7
+ add x21,x21,x25 // d+=h
+ add x25,x25,x28 // h+=Maj(a,b,c)
+ ldr x28,[x30],#8 // *K++, x19 in next round
+ add x14,x14,x4
+ add x25,x25,x17 // h+=Sigma0(a)
+ add x14,x14,x3
+ ldr x3,[sp,#0]
+ str x6,[sp,#24]
+ ror x16,x21,#14
+ add x24,x24,x28 // h+=K[i]
+ ror x5,x0,#1
+ and x17,x22,x21
+ ror x4,x13,#19
+ bic x28,x23,x21
+ ror x6,x25,#28
+ add x24,x24,x14 // h+=X[i]
+ eor x16,x16,x21,ror#18
+ eor x5,x5,x0,ror#8
+ orr x17,x17,x28 // Ch(e,f,g)
+ eor x28,x25,x26 // a^b, b^c in next round
+ eor x16,x16,x21,ror#41 // Sigma1(e)
+ eor x6,x6,x25,ror#34
+ add x24,x24,x17 // h+=Ch(e,f,g)
+ and x19,x19,x28 // (b^c)&=(a^b)
+ eor x4,x4,x13,ror#61
+ eor x5,x5,x0,lsr#7 // sigma0(X[i+1])
+ add x24,x24,x16 // h+=Sigma1(e)
+ eor x19,x19,x26 // Maj(a,b,c)
+ eor x17,x6,x25,ror#39 // Sigma0(a)
+ eor x4,x4,x13,lsr#6 // sigma1(X[i+14])
+ add x15,x15,x8
+ add x20,x20,x24 // d+=h
+ add x24,x24,x19 // h+=Maj(a,b,c)
+ ldr x19,[x30],#8 // *K++, x28 in next round
+ add x15,x15,x5
+ add x24,x24,x17 // h+=Sigma0(a)
+ add x15,x15,x4
+ ldr x4,[sp,#8]
+ str x7,[sp,#0]
+ ror x16,x20,#14
+ add x23,x23,x19 // h+=K[i]
+ ror x6,x1,#1
+ and x17,x21,x20
+ ror x5,x14,#19
+ bic x19,x22,x20
+ ror x7,x24,#28
+ add x23,x23,x15 // h+=X[i]
+ eor x16,x16,x20,ror#18
+ eor x6,x6,x1,ror#8
+ orr x17,x17,x19 // Ch(e,f,g)
+ eor x19,x24,x25 // a^b, b^c in next round
+ eor x16,x16,x20,ror#41 // Sigma1(e)
+ eor x7,x7,x24,ror#34
+ add x23,x23,x17 // h+=Ch(e,f,g)
+ and x28,x28,x19 // (b^c)&=(a^b)
+ eor x5,x5,x14,ror#61
+ eor x6,x6,x1,lsr#7 // sigma0(X[i+1])
+ add x23,x23,x16 // h+=Sigma1(e)
+ eor x28,x28,x25 // Maj(a,b,c)
+ eor x17,x7,x24,ror#39 // Sigma0(a)
+ eor x5,x5,x14,lsr#6 // sigma1(X[i+14])
+ add x0,x0,x9
+ add x27,x27,x23 // d+=h
+ add x23,x23,x28 // h+=Maj(a,b,c)
+ ldr x28,[x30],#8 // *K++, x19 in next round
+ add x0,x0,x6
+ add x23,x23,x17 // h+=Sigma0(a)
+ add x0,x0,x5
+ ldr x5,[sp,#16]
+ str x8,[sp,#8]
+ ror x16,x27,#14
+ add x22,x22,x28 // h+=K[i]
+ ror x7,x2,#1
+ and x17,x20,x27
+ ror x6,x15,#19
+ bic x28,x21,x27
+ ror x8,x23,#28
+ add x22,x22,x0 // h+=X[i]
+ eor x16,x16,x27,ror#18
+ eor x7,x7,x2,ror#8
+ orr x17,x17,x28 // Ch(e,f,g)
+ eor x28,x23,x24 // a^b, b^c in next round
+ eor x16,x16,x27,ror#41 // Sigma1(e)
+ eor x8,x8,x23,ror#34
+ add x22,x22,x17 // h+=Ch(e,f,g)
+ and x19,x19,x28 // (b^c)&=(a^b)
+ eor x6,x6,x15,ror#61
+ eor x7,x7,x2,lsr#7 // sigma0(X[i+1])
+ add x22,x22,x16 // h+=Sigma1(e)
+ eor x19,x19,x24 // Maj(a,b,c)
+ eor x17,x8,x23,ror#39 // Sigma0(a)
+ eor x6,x6,x15,lsr#6 // sigma1(X[i+14])
+ add x1,x1,x10
+ add x26,x26,x22 // d+=h
+ add x22,x22,x19 // h+=Maj(a,b,c)
+ ldr x19,[x30],#8 // *K++, x28 in next round
+ add x1,x1,x7
+ add x22,x22,x17 // h+=Sigma0(a)
+ add x1,x1,x6
+ ldr x6,[sp,#24]
+ str x9,[sp,#16]
+ ror x16,x26,#14
+ add x21,x21,x19 // h+=K[i]
+ ror x8,x3,#1
+ and x17,x27,x26
+ ror x7,x0,#19
+ bic x19,x20,x26
+ ror x9,x22,#28
+ add x21,x21,x1 // h+=X[i]
+ eor x16,x16,x26,ror#18
+ eor x8,x8,x3,ror#8
+ orr x17,x17,x19 // Ch(e,f,g)
+ eor x19,x22,x23 // a^b, b^c in next round
+ eor x16,x16,x26,ror#41 // Sigma1(e)
+ eor x9,x9,x22,ror#34
+ add x21,x21,x17 // h+=Ch(e,f,g)
+ and x28,x28,x19 // (b^c)&=(a^b)
+ eor x7,x7,x0,ror#61
+ eor x8,x8,x3,lsr#7 // sigma0(X[i+1])
+ add x21,x21,x16 // h+=Sigma1(e)
+ eor x28,x28,x23 // Maj(a,b,c)
+ eor x17,x9,x22,ror#39 // Sigma0(a)
+ eor x7,x7,x0,lsr#6 // sigma1(X[i+14])
+ add x2,x2,x11
+ add x25,x25,x21 // d+=h
+ add x21,x21,x28 // h+=Maj(a,b,c)
+ ldr x28,[x30],#8 // *K++, x19 in next round
+ add x2,x2,x8
+ add x21,x21,x17 // h+=Sigma0(a)
+ add x2,x2,x7
+ ldr x7,[sp,#0]
+ str x10,[sp,#24]
+ ror x16,x25,#14
+ add x20,x20,x28 // h+=K[i]
+ ror x9,x4,#1
+ and x17,x26,x25
+ ror x8,x1,#19
+ bic x28,x27,x25
+ ror x10,x21,#28
+ add x20,x20,x2 // h+=X[i]
+ eor x16,x16,x25,ror#18
+ eor x9,x9,x4,ror#8
+ orr x17,x17,x28 // Ch(e,f,g)
+ eor x28,x21,x22 // a^b, b^c in next round
+ eor x16,x16,x25,ror#41 // Sigma1(e)
+ eor x10,x10,x21,ror#34
+ add x20,x20,x17 // h+=Ch(e,f,g)
+ and x19,x19,x28 // (b^c)&=(a^b)
+ eor x8,x8,x1,ror#61
+ eor x9,x9,x4,lsr#7 // sigma0(X[i+1])
+ add x20,x20,x16 // h+=Sigma1(e)
+ eor x19,x19,x22 // Maj(a,b,c)
+ eor x17,x10,x21,ror#39 // Sigma0(a)
+ eor x8,x8,x1,lsr#6 // sigma1(X[i+14])
+ add x3,x3,x12
+ add x24,x24,x20 // d+=h
+ add x20,x20,x19 // h+=Maj(a,b,c)
+ ldr x19,[x30],#8 // *K++, x28 in next round
+ add x3,x3,x9
+ add x20,x20,x17 // h+=Sigma0(a)
+ add x3,x3,x8
+ cbnz x19,.Loop_16_xx
+
+ ldp x0,x2,[x29,#96]
+ ldr x1,[x29,#112]
+ sub x30,x30,#648 // rewind
+
+ ldp x3,x4,[x0]
+ ldp x5,x6,[x0,#2*8]
+ add x1,x1,#14*8 // advance input pointer
+ ldp x7,x8,[x0,#4*8]
+ add x20,x20,x3
+ ldp x9,x10,[x0,#6*8]
+ add x21,x21,x4
+ add x22,x22,x5
+ add x23,x23,x6
+ stp x20,x21,[x0]
+ add x24,x24,x7
+ add x25,x25,x8
+ stp x22,x23,[x0,#2*8]
+ add x26,x26,x9
+ add x27,x27,x10
+ cmp x1,x2
+ stp x24,x25,[x0,#4*8]
+ stp x26,x27,[x0,#6*8]
+ b.ne .Loop
+
+ ldp x19,x20,[x29,#16]
+ add sp,sp,#4*8
+ ldp x21,x22,[x29,#32]
+ ldp x23,x24,[x29,#48]
+ ldp x25,x26,[x29,#64]
+ ldp x27,x28,[x29,#80]
+ ldp x29,x30,[sp],#128
+ ret
+.size sha512_block_data_order,.-sha512_block_data_order
+
+.align 6
+.type K512,%object
+K512:
+ .quad 0x428a2f98d728ae22,0x7137449123ef65cd
+ .quad 0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc
+ .quad 0x3956c25bf348b538,0x59f111f1b605d019
+ .quad 0x923f82a4af194f9b,0xab1c5ed5da6d8118
+ .quad 0xd807aa98a3030242,0x12835b0145706fbe
+ .quad 0x243185be4ee4b28c,0x550c7dc3d5ffb4e2
+ .quad 0x72be5d74f27b896f,0x80deb1fe3b1696b1
+ .quad 0x9bdc06a725c71235,0xc19bf174cf692694
+ .quad 0xe49b69c19ef14ad2,0xefbe4786384f25e3
+ .quad 0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65
+ .quad 0x2de92c6f592b0275,0x4a7484aa6ea6e483
+ .quad 0x5cb0a9dcbd41fbd4,0x76f988da831153b5
+ .quad 0x983e5152ee66dfab,0xa831c66d2db43210
+ .quad 0xb00327c898fb213f,0xbf597fc7beef0ee4
+ .quad 0xc6e00bf33da88fc2,0xd5a79147930aa725
+ .quad 0x06ca6351e003826f,0x142929670a0e6e70
+ .quad 0x27b70a8546d22ffc,0x2e1b21385c26c926
+ .quad 0x4d2c6dfc5ac42aed,0x53380d139d95b3df
+ .quad 0x650a73548baf63de,0x766a0abb3c77b2a8
+ .quad 0x81c2c92e47edaee6,0x92722c851482353b
+ .quad 0xa2bfe8a14cf10364,0xa81a664bbc423001
+ .quad 0xc24b8b70d0f89791,0xc76c51a30654be30
+ .quad 0xd192e819d6ef5218,0xd69906245565a910
+ .quad 0xf40e35855771202a,0x106aa07032bbd1b8
+ .quad 0x19a4c116b8d2d0c8,0x1e376c085141ab53
+ .quad 0x2748774cdf8eeb99,0x34b0bcb5e19b48a8
+ .quad 0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb
+ .quad 0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3
+ .quad 0x748f82ee5defb2fc,0x78a5636f43172f60
+ .quad 0x84c87814a1f0ab72,0x8cc702081a6439ec
+ .quad 0x90befffa23631e28,0xa4506cebde82bde9
+ .quad 0xbef9a3f7b2c67915,0xc67178f2e372532b
+ .quad 0xca273eceea26619c,0xd186b8c721c0c207
+ .quad 0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178
+ .quad 0x06f067aa72176fba,0x0a637dc5a2c898a6
+ .quad 0x113f9804bef90dae,0x1b710b35131c471b
+ .quad 0x28db77f523047d84,0x32caab7b40c72493
+ .quad 0x3c9ebe0a15c9bebc,0x431d67c49c100d4c
+ .quad 0x4cc5d4becb3e42b6,0x597f299cfc657e2a
+ .quad 0x5fcb6fab3ad6faec,0x6c44198c4a475817
+ .quad 0 // terminator
+.size K512,.-K512
+.align 3
+.LOPENSSL_armcap_P:
+ .quad OPENSSL_armcap_P-.
+.asciz "SHA512 block transform for ARMv8, CRYPTOGAMS by <appro@openssl.org>"
+.align 2
+.comm OPENSSL_armcap_P,4,4
diff --git a/third_party/boringssl/linux-arm/crypto/aes/aesv8-armx.S b/third_party/boringssl/linux-arm/crypto/aes/aesv8-armx.S
new file mode 100644
index 0000000..fede6ed
--- /dev/null
+++ b/third_party/boringssl/linux-arm/crypto/aes/aesv8-armx.S
@@ -0,0 +1,732 @@
+#include "arm_arch.h"
+
+#if __ARM_MAX_ARCH__>=7
+.text
+.arch armv7-a
+.fpu neon
+.code 32
+.align 5
+rcon:
+.long 0x01,0x01,0x01,0x01
+.long 0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d @ rotate-n-splat
+.long 0x1b,0x1b,0x1b,0x1b
+
+.globl aes_v8_set_encrypt_key
+.type aes_v8_set_encrypt_key,%function
+.align 5
+aes_v8_set_encrypt_key:
+.Lenc_key:
+ mov r3,#-1
+ cmp r0,#0
+ beq .Lenc_key_abort
+ cmp r2,#0
+ beq .Lenc_key_abort
+ mov r3,#-2
+ cmp r1,#128
+ blt .Lenc_key_abort
+ cmp r1,#256
+ bgt .Lenc_key_abort
+ tst r1,#0x3f
+ bne .Lenc_key_abort
+
+ adr r3,rcon
+ cmp r1,#192
+
+ veor q0,q0,q0
+ vld1.8 {q3},[r0]!
+ mov r1,#8 @ reuse r1
+ vld1.32 {q1,q2},[r3]!
+
+ blt .Loop128
+ beq .L192
+ b .L256
+
+.align 4
+.Loop128:
+ vtbl.8 d20,{q3},d4
+ vtbl.8 d21,{q3},d5
+ vext.8 q9,q0,q3,#12
+ vst1.32 {q3},[r2]!
+ .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0
+ subs r1,r1,#1
+
+ veor q3,q3,q9
+ vext.8 q9,q0,q9,#12
+ veor q3,q3,q9
+ vext.8 q9,q0,q9,#12
+ veor q10,q10,q1
+ veor q3,q3,q9
+ vshl.u8 q1,q1,#1
+ veor q3,q3,q10
+ bne .Loop128
+
+ vld1.32 {q1},[r3]
+
+ vtbl.8 d20,{q3},d4
+ vtbl.8 d21,{q3},d5
+ vext.8 q9,q0,q3,#12
+ vst1.32 {q3},[r2]!
+ .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0
+
+ veor q3,q3,q9
+ vext.8 q9,q0,q9,#12
+ veor q3,q3,q9
+ vext.8 q9,q0,q9,#12
+ veor q10,q10,q1
+ veor q3,q3,q9
+ vshl.u8 q1,q1,#1
+ veor q3,q3,q10
+
+ vtbl.8 d20,{q3},d4
+ vtbl.8 d21,{q3},d5
+ vext.8 q9,q0,q3,#12
+ vst1.32 {q3},[r2]!
+ .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0
+
+ veor q3,q3,q9
+ vext.8 q9,q0,q9,#12
+ veor q3,q3,q9
+ vext.8 q9,q0,q9,#12
+ veor q10,q10,q1
+ veor q3,q3,q9
+ veor q3,q3,q10
+ vst1.32 {q3},[r2]
+ add r2,r2,#0x50
+
+ mov r12,#10
+ b .Ldone
+
+.align 4
+.L192:
+ vld1.8 {d16},[r0]!
+ vmov.i8 q10,#8 @ borrow q10
+ vst1.32 {q3},[r2]!
+ vsub.i8 q2,q2,q10 @ adjust the mask
+
+.Loop192:
+ vtbl.8 d20,{q8},d4
+ vtbl.8 d21,{q8},d5
+ vext.8 q9,q0,q3,#12
+ vst1.32 {d16},[r2]!
+ .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0
+ subs r1,r1,#1
+
+ veor q3,q3,q9
+ vext.8 q9,q0,q9,#12
+ veor q3,q3,q9
+ vext.8 q9,q0,q9,#12
+ veor q3,q3,q9
+
+ vdup.32 q9,d7[1]
+ veor q9,q9,q8
+ veor q10,q10,q1
+ vext.8 q8,q0,q8,#12
+ vshl.u8 q1,q1,#1
+ veor q8,q8,q9
+ veor q3,q3,q10
+ veor q8,q8,q10
+ vst1.32 {q3},[r2]!
+ bne .Loop192
+
+ mov r12,#12
+ add r2,r2,#0x20
+ b .Ldone
+
+.align 4
+.L256:
+ vld1.8 {q8},[r0]
+ mov r1,#7
+ mov r12,#14
+ vst1.32 {q3},[r2]!
+
+.Loop256:
+ vtbl.8 d20,{q8},d4
+ vtbl.8 d21,{q8},d5
+ vext.8 q9,q0,q3,#12
+ vst1.32 {q8},[r2]!
+ .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0
+ subs r1,r1,#1
+
+ veor q3,q3,q9
+ vext.8 q9,q0,q9,#12
+ veor q3,q3,q9
+ vext.8 q9,q0,q9,#12
+ veor q10,q10,q1
+ veor q3,q3,q9
+ vshl.u8 q1,q1,#1
+ veor q3,q3,q10
+ vst1.32 {q3},[r2]!
+ beq .Ldone
+
+ vdup.32 q10,d7[1]
+ vext.8 q9,q0,q8,#12
+ .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0
+
+ veor q8,q8,q9
+ vext.8 q9,q0,q9,#12
+ veor q8,q8,q9
+ vext.8 q9,q0,q9,#12
+ veor q8,q8,q9
+
+ veor q8,q8,q10
+ b .Loop256
+
+.Ldone:
+ str r12,[r2]
+ mov r3,#0
+
+.Lenc_key_abort:
+ mov r0,r3 @ return value
+
+ bx lr
+.size aes_v8_set_encrypt_key,.-aes_v8_set_encrypt_key
+
+.globl aes_v8_set_decrypt_key
+.type aes_v8_set_decrypt_key,%function
+.align 5
+aes_v8_set_decrypt_key:
+ stmdb sp!,{r4,lr}
+ bl .Lenc_key
+
+ cmp r0,#0
+ bne .Ldec_key_abort
+
+ sub r2,r2,#240 @ restore original r2
+ mov r4,#-16
+ add r0,r2,r12,lsl#4 @ end of key schedule
+
+ vld1.32 {q0},[r2]
+ vld1.32 {q1},[r0]
+ vst1.32 {q0},[r0],r4
+ vst1.32 {q1},[r2]!
+
+.Loop_imc:
+ vld1.32 {q0},[r2]
+ vld1.32 {q1},[r0]
+ .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0
+ .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1
+ vst1.32 {q0},[r0],r4
+ vst1.32 {q1},[r2]!
+ cmp r0,r2
+ bhi .Loop_imc
+
+ vld1.32 {q0},[r2]
+ .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0
+ vst1.32 {q0},[r0]
+
+ eor r0,r0,r0 @ return value
+.Ldec_key_abort:
+ ldmia sp!,{r4,pc}
+.size aes_v8_set_decrypt_key,.-aes_v8_set_decrypt_key
+.globl aes_v8_encrypt
+.type aes_v8_encrypt,%function
+.align 5
+aes_v8_encrypt:
+ ldr r3,[r2,#240]
+ vld1.32 {q0},[r2]!
+ vld1.8 {q2},[r0]
+ sub r3,r3,#2
+ vld1.32 {q1},[r2]!
+
+.Loop_enc:
+ .byte 0x00,0x43,0xb0,0xf3 @ aese q2,q0
+ vld1.32 {q0},[r2]!
+ .byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2
+ subs r3,r3,#2
+ .byte 0x02,0x43,0xb0,0xf3 @ aese q2,q1
+ vld1.32 {q1},[r2]!
+ .byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2
+ bgt .Loop_enc
+
+ .byte 0x00,0x43,0xb0,0xf3 @ aese q2,q0
+ vld1.32 {q0},[r2]
+ .byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2
+ .byte 0x02,0x43,0xb0,0xf3 @ aese q2,q1
+ veor q2,q2,q0
+
+ vst1.8 {q2},[r1]
+ bx lr
+.size aes_v8_encrypt,.-aes_v8_encrypt
+.globl aes_v8_decrypt
+.type aes_v8_decrypt,%function
+.align 5
+aes_v8_decrypt:
+ ldr r3,[r2,#240]
+ vld1.32 {q0},[r2]!
+ vld1.8 {q2},[r0]
+ sub r3,r3,#2
+ vld1.32 {q1},[r2]!
+
+.Loop_dec:
+ .byte 0x40,0x43,0xb0,0xf3 @ aesd q2,q0
+ vld1.32 {q0},[r2]!
+ .byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2
+ subs r3,r3,#2
+ .byte 0x42,0x43,0xb0,0xf3 @ aesd q2,q1
+ vld1.32 {q1},[r2]!
+ .byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2
+ bgt .Loop_dec
+
+ .byte 0x40,0x43,0xb0,0xf3 @ aesd q2,q0
+ vld1.32 {q0},[r2]
+ .byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2
+ .byte 0x42,0x43,0xb0,0xf3 @ aesd q2,q1
+ veor q2,q2,q0
+
+ vst1.8 {q2},[r1]
+ bx lr
+.size aes_v8_decrypt,.-aes_v8_decrypt
+.globl aes_v8_cbc_encrypt
+.type aes_v8_cbc_encrypt,%function
+.align 5
+aes_v8_cbc_encrypt:
+ mov ip,sp
+ stmdb sp!,{r4-r8,lr}
+ vstmdb sp!,{d8-d15} @ ABI specification says so
+ ldmia ip,{r4-r5} @ load remaining args
+ subs r2,r2,#16
+ mov r8,#16
+ blo .Lcbc_abort
+ moveq r8,#0
+
+ cmp r5,#0 @ en- or decrypting?
+ ldr r5,[r3,#240]
+ and r2,r2,#-16
+ vld1.8 {q6},[r4]
+ vld1.8 {q0},[r0],r8
+
+ vld1.32 {q8-q9},[r3] @ load key schedule...
+ sub r5,r5,#6
+ add r7,r3,r5,lsl#4 @ pointer to last 7 round keys
+ sub r5,r5,#2
+ vld1.32 {q10-q11},[r7]!
+ vld1.32 {q12-q13},[r7]!
+ vld1.32 {q14-q15},[r7]!
+ vld1.32 {q7},[r7]
+
+ add r7,r3,#32
+ mov r6,r5
+ beq .Lcbc_dec
+
+ cmp r5,#2
+ veor q0,q0,q6
+ veor q5,q8,q7
+ beq .Lcbc_enc128
+
+.Loop_cbc_enc:
+ .byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8
+ vld1.32 {q8},[r7]!
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ subs r6,r6,#2
+ .byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9
+ vld1.32 {q9},[r7]!
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ bgt .Loop_cbc_enc
+
+ .byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ subs r2,r2,#16
+ .byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ moveq r8,#0
+ .byte 0x24,0x03,0xb0,0xf3 @ aese q0,q10
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ add r7,r3,#16
+ .byte 0x26,0x03,0xb0,0xf3 @ aese q0,q11
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ vld1.8 {q8},[r0],r8
+ .byte 0x28,0x03,0xb0,0xf3 @ aese q0,q12
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ veor q8,q8,q5
+ .byte 0x2a,0x03,0xb0,0xf3 @ aese q0,q13
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ vld1.32 {q9},[r7]! @ re-pre-load rndkey[1]
+ .byte 0x2c,0x03,0xb0,0xf3 @ aese q0,q14
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ .byte 0x2e,0x03,0xb0,0xf3 @ aese q0,q15
+
+ mov r6,r5
+ veor q6,q0,q7
+ vst1.8 {q6},[r1]!
+ bhs .Loop_cbc_enc
+
+ b .Lcbc_done
+
+.align 5
+.Lcbc_enc128:
+ vld1.32 {q2-q3},[r7]
+ .byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ b .Lenter_cbc_enc128
+.Loop_cbc_enc128:
+ .byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ vst1.8 {q6},[r1]!
+.Lenter_cbc_enc128:
+ .byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ subs r2,r2,#16
+ .byte 0x04,0x03,0xb0,0xf3 @ aese q0,q2
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ moveq r8,#0
+ .byte 0x06,0x03,0xb0,0xf3 @ aese q0,q3
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ .byte 0x24,0x03,0xb0,0xf3 @ aese q0,q10
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ .byte 0x26,0x03,0xb0,0xf3 @ aese q0,q11
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ vld1.8 {q8},[r0],r8
+ .byte 0x28,0x03,0xb0,0xf3 @ aese q0,q12
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ .byte 0x2a,0x03,0xb0,0xf3 @ aese q0,q13
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ .byte 0x2c,0x03,0xb0,0xf3 @ aese q0,q14
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ veor q8,q8,q5
+ .byte 0x2e,0x03,0xb0,0xf3 @ aese q0,q15
+ veor q6,q0,q7
+ bhs .Loop_cbc_enc128
+
+ vst1.8 {q6},[r1]!
+ b .Lcbc_done
+.align 5
+.Lcbc_dec:
+ vld1.8 {q10},[r0]!
+ subs r2,r2,#32 @ bias
+ add r6,r5,#2
+ vorr q3,q0,q0
+ vorr q1,q0,q0
+ vorr q11,q10,q10
+ blo .Lcbc_dec_tail
+
+ vorr q1,q10,q10
+ vld1.8 {q10},[r0]!
+ vorr q2,q0,q0
+ vorr q3,q1,q1
+ vorr q11,q10,q10
+
+.Loop3x_cbc_dec:
+ .byte 0x60,0x03,0xb0,0xf3 @ aesd q0,q8
+ .byte 0x60,0x23,0xb0,0xf3 @ aesd q1,q8
+ .byte 0x60,0x43,0xf0,0xf3 @ aesd q10,q8
+ vld1.32 {q8},[r7]!
+ .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0
+ .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1
+ .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10
+ subs r6,r6,#2
+ .byte 0x62,0x03,0xb0,0xf3 @ aesd q0,q9
+ .byte 0x62,0x23,0xb0,0xf3 @ aesd q1,q9
+ .byte 0x62,0x43,0xf0,0xf3 @ aesd q10,q9
+ vld1.32 {q9},[r7]!
+ .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0
+ .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1
+ .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10
+ bgt .Loop3x_cbc_dec
+
+ .byte 0x60,0x03,0xb0,0xf3 @ aesd q0,q8
+ .byte 0x60,0x23,0xb0,0xf3 @ aesd q1,q8
+ .byte 0x60,0x43,0xf0,0xf3 @ aesd q10,q8
+ veor q4,q6,q7
+ .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0
+ .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1
+ .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10
+ veor q5,q2,q7
+ .byte 0x62,0x03,0xb0,0xf3 @ aesd q0,q9
+ .byte 0x62,0x23,0xb0,0xf3 @ aesd q1,q9
+ .byte 0x62,0x43,0xf0,0xf3 @ aesd q10,q9
+ veor q9,q3,q7
+ subs r2,r2,#0x30
+ .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0
+ .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1
+ .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10
+ vorr q6,q11,q11
+ movlo r6,r2 @ r6, r6, is zero at this point
+ .byte 0x68,0x03,0xb0,0xf3 @ aesd q0,q12
+ .byte 0x68,0x23,0xb0,0xf3 @ aesd q1,q12
+ .byte 0x68,0x43,0xf0,0xf3 @ aesd q10,q12
+ add r0,r0,r6 @ r0 is adjusted in such way that
+ @ at exit from the loop q1-q10
+ @ are loaded with last "words"
+ .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0
+ .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1
+ .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10
+ mov r7,r3
+ .byte 0x6a,0x03,0xb0,0xf3 @ aesd q0,q13
+ .byte 0x6a,0x23,0xb0,0xf3 @ aesd q1,q13
+ .byte 0x6a,0x43,0xf0,0xf3 @ aesd q10,q13
+ vld1.8 {q2},[r0]!
+ .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0
+ .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1
+ .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10
+ vld1.8 {q3},[r0]!
+ .byte 0x6c,0x03,0xb0,0xf3 @ aesd q0,q14
+ .byte 0x6c,0x23,0xb0,0xf3 @ aesd q1,q14
+ .byte 0x6c,0x43,0xf0,0xf3 @ aesd q10,q14
+ vld1.8 {q11},[r0]!
+ .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0
+ .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1
+ .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10
+ vld1.32 {q8},[r7]! @ re-pre-load rndkey[0]
+ .byte 0x6e,0x03,0xb0,0xf3 @ aesd q0,q15
+ .byte 0x6e,0x23,0xb0,0xf3 @ aesd q1,q15
+ .byte 0x6e,0x43,0xf0,0xf3 @ aesd q10,q15
+
+ add r6,r5,#2
+ veor q4,q4,q0
+ veor q5,q5,q1
+ veor q10,q10,q9
+ vld1.32 {q9},[r7]! @ re-pre-load rndkey[1]
+ vorr q0,q2,q2
+ vst1.8 {q4},[r1]!
+ vorr q1,q3,q3
+ vst1.8 {q5},[r1]!
+ vst1.8 {q10},[r1]!
+ vorr q10,q11,q11
+ bhs .Loop3x_cbc_dec
+
+ cmn r2,#0x30
+ beq .Lcbc_done
+ nop
+
+.Lcbc_dec_tail:
+ .byte 0x60,0x23,0xb0,0xf3 @ aesd q1,q8
+ .byte 0x60,0x43,0xf0,0xf3 @ aesd q10,q8
+ vld1.32 {q8},[r7]!
+ .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1
+ .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10
+ subs r6,r6,#2
+ .byte 0x62,0x23,0xb0,0xf3 @ aesd q1,q9
+ .byte 0x62,0x43,0xf0,0xf3 @ aesd q10,q9
+ vld1.32 {q9},[r7]!
+ .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1
+ .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10
+ bgt .Lcbc_dec_tail
+
+ .byte 0x60,0x23,0xb0,0xf3 @ aesd q1,q8
+ .byte 0x60,0x43,0xf0,0xf3 @ aesd q10,q8
+ .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1
+ .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10
+ .byte 0x62,0x23,0xb0,0xf3 @ aesd q1,q9
+ .byte 0x62,0x43,0xf0,0xf3 @ aesd q10,q9
+ .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1
+ .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10
+ .byte 0x68,0x23,0xb0,0xf3 @ aesd q1,q12
+ .byte 0x68,0x43,0xf0,0xf3 @ aesd q10,q12
+ .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1
+ .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10
+ cmn r2,#0x20
+ .byte 0x6a,0x23,0xb0,0xf3 @ aesd q1,q13
+ .byte 0x6a,0x43,0xf0,0xf3 @ aesd q10,q13
+ .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1
+ .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10
+ veor q5,q6,q7
+ .byte 0x6c,0x23,0xb0,0xf3 @ aesd q1,q14
+ .byte 0x6c,0x43,0xf0,0xf3 @ aesd q10,q14
+ .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1
+ .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10
+ veor q9,q3,q7
+ .byte 0x6e,0x23,0xb0,0xf3 @ aesd q1,q15
+ .byte 0x6e,0x43,0xf0,0xf3 @ aesd q10,q15
+ beq .Lcbc_dec_one
+ veor q5,q5,q1
+ veor q9,q9,q10
+ vorr q6,q11,q11
+ vst1.8 {q5},[r1]!
+ vst1.8 {q9},[r1]!
+ b .Lcbc_done
+
+.Lcbc_dec_one:
+ veor q5,q5,q10
+ vorr q6,q11,q11
+ vst1.8 {q5},[r1]!
+
+.Lcbc_done:
+ vst1.8 {q6},[r4]
+.Lcbc_abort:
+ vldmia sp!,{d8-d15}
+ ldmia sp!,{r4-r8,pc}
+.size aes_v8_cbc_encrypt,.-aes_v8_cbc_encrypt
+.globl aes_v8_ctr32_encrypt_blocks
+.type aes_v8_ctr32_encrypt_blocks,%function
+.align 5
+aes_v8_ctr32_encrypt_blocks:
+ mov ip,sp
+ stmdb sp!,{r4-r10,lr}
+ vstmdb sp!,{d8-d15} @ ABI specification says so
+ ldr r4, [ip] @ load remaining arg
+ ldr r5,[r3,#240]
+
+ ldr r8, [r4, #12]
+ vld1.32 {q0},[r4]
+
+ vld1.32 {q8-q9},[r3] @ load key schedule...
+ sub r5,r5,#4
+ mov r12,#16
+ cmp r2,#2
+ add r7,r3,r5,lsl#4 @ pointer to last 5 round keys
+ sub r5,r5,#2
+ vld1.32 {q12-q13},[r7]!
+ vld1.32 {q14-q15},[r7]!
+ vld1.32 {q7},[r7]
+ add r7,r3,#32
+ mov r6,r5
+ movlo r12,#0
+#ifndef __ARMEB__
+ rev r8, r8
+#endif
+ vorr q1,q0,q0
+ add r10, r8, #1
+ vorr q10,q0,q0
+ add r8, r8, #2
+ vorr q6,q0,q0
+ rev r10, r10
+ vmov.32 d3[1],r10
+ bls .Lctr32_tail
+ rev r12, r8
+ sub r2,r2,#3 @ bias
+ vmov.32 d21[1],r12
+ b .Loop3x_ctr32
+
+.align 4
+.Loop3x_ctr32:
+ .byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8
+ .byte 0x20,0x23,0xb0,0xf3 @ aese q1,q8
+ .byte 0x20,0x43,0xf0,0xf3 @ aese q10,q8
+ vld1.32 {q8},[r7]!
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ .byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1
+ .byte 0xa4,0x43,0xf0,0xf3 @ aesmc q10,q10
+ subs r6,r6,#2
+ .byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9
+ .byte 0x22,0x23,0xb0,0xf3 @ aese q1,q9
+ .byte 0x22,0x43,0xf0,0xf3 @ aese q10,q9
+ vld1.32 {q9},[r7]!
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ .byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1
+ .byte 0xa4,0x43,0xf0,0xf3 @ aesmc q10,q10
+ bgt .Loop3x_ctr32
+
+ .byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8
+ .byte 0x20,0x23,0xb0,0xf3 @ aese q1,q8
+ .byte 0x20,0x43,0xf0,0xf3 @ aese q10,q8
+ mov r7,r3
+ .byte 0x80,0x83,0xb0,0xf3 @ aesmc q4,q0
+ vld1.8 {q2},[r0]!
+ .byte 0x82,0xa3,0xb0,0xf3 @ aesmc q5,q1
+ .byte 0xa4,0x43,0xf0,0xf3 @ aesmc q10,q10
+ vorr q0,q6,q6
+ .byte 0x22,0x83,0xb0,0xf3 @ aese q4,q9
+ vld1.8 {q3},[r0]!
+ .byte 0x22,0xa3,0xb0,0xf3 @ aese q5,q9
+ .byte 0x22,0x43,0xf0,0xf3 @ aese q10,q9
+ vorr q1,q6,q6
+ .byte 0x88,0x83,0xb0,0xf3 @ aesmc q4,q4
+ vld1.8 {q11},[r0]!
+ .byte 0x8a,0xa3,0xb0,0xf3 @ aesmc q5,q5
+ .byte 0xa4,0x23,0xf0,0xf3 @ aesmc q9,q10
+ vorr q10,q6,q6
+ add r9,r8,#1
+ .byte 0x28,0x83,0xb0,0xf3 @ aese q4,q12
+ .byte 0x28,0xa3,0xb0,0xf3 @ aese q5,q12
+ .byte 0x28,0x23,0xf0,0xf3 @ aese q9,q12
+ veor q2,q2,q7
+ add r10,r8,#2
+ .byte 0x88,0x83,0xb0,0xf3 @ aesmc q4,q4
+ .byte 0x8a,0xa3,0xb0,0xf3 @ aesmc q5,q5
+ .byte 0xa2,0x23,0xf0,0xf3 @ aesmc q9,q9
+ veor q3,q3,q7
+ add r8,r8,#3
+ .byte 0x2a,0x83,0xb0,0xf3 @ aese q4,q13
+ .byte 0x2a,0xa3,0xb0,0xf3 @ aese q5,q13
+ .byte 0x2a,0x23,0xf0,0xf3 @ aese q9,q13
+ veor q11,q11,q7
+ rev r9,r9
+ .byte 0x88,0x83,0xb0,0xf3 @ aesmc q4,q4
+ vld1.32 {q8},[r7]! @ re-pre-load rndkey[0]
+ .byte 0x8a,0xa3,0xb0,0xf3 @ aesmc q5,q5
+ .byte 0xa2,0x23,0xf0,0xf3 @ aesmc q9,q9
+ vmov.32 d1[1], r9
+ rev r10,r10
+ .byte 0x2c,0x83,0xb0,0xf3 @ aese q4,q14
+ .byte 0x2c,0xa3,0xb0,0xf3 @ aese q5,q14
+ .byte 0x2c,0x23,0xf0,0xf3 @ aese q9,q14
+ vmov.32 d3[1], r10
+ rev r12,r8
+ .byte 0x88,0x83,0xb0,0xf3 @ aesmc q4,q4
+ .byte 0x8a,0xa3,0xb0,0xf3 @ aesmc q5,q5
+ .byte 0xa2,0x23,0xf0,0xf3 @ aesmc q9,q9
+ vmov.32 d21[1], r12
+ subs r2,r2,#3
+ .byte 0x2e,0x83,0xb0,0xf3 @ aese q4,q15
+ .byte 0x2e,0xa3,0xb0,0xf3 @ aese q5,q15
+ .byte 0x2e,0x23,0xf0,0xf3 @ aese q9,q15
+
+ mov r6,r5
+ veor q2,q2,q4
+ veor q3,q3,q5
+ veor q11,q11,q9
+ vld1.32 {q9},[r7]! @ re-pre-load rndkey[1]
+ vst1.8 {q2},[r1]!
+ vst1.8 {q3},[r1]!
+ vst1.8 {q11},[r1]!
+ bhs .Loop3x_ctr32
+
+ adds r2,r2,#3
+ beq .Lctr32_done
+ cmp r2,#1
+ mov r12,#16
+ moveq r12,#0
+
+.Lctr32_tail:
+ .byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8
+ .byte 0x20,0x23,0xb0,0xf3 @ aese q1,q8
+ vld1.32 {q8},[r7]!
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ .byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1
+ subs r6,r6,#2
+ .byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9
+ .byte 0x22,0x23,0xb0,0xf3 @ aese q1,q9
+ vld1.32 {q9},[r7]!
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ .byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1
+ bgt .Lctr32_tail
+
+ .byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8
+ .byte 0x20,0x23,0xb0,0xf3 @ aese q1,q8
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ .byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1
+ .byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9
+ .byte 0x22,0x23,0xb0,0xf3 @ aese q1,q9
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ .byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1
+ vld1.8 {q2},[r0],r12
+ .byte 0x28,0x03,0xb0,0xf3 @ aese q0,q12
+ .byte 0x28,0x23,0xb0,0xf3 @ aese q1,q12
+ vld1.8 {q3},[r0]
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ .byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1
+ .byte 0x2a,0x03,0xb0,0xf3 @ aese q0,q13
+ .byte 0x2a,0x23,0xb0,0xf3 @ aese q1,q13
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ .byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1
+ .byte 0x2c,0x03,0xb0,0xf3 @ aese q0,q14
+ .byte 0x2c,0x23,0xb0,0xf3 @ aese q1,q14
+ veor q2,q2,q7
+ .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0
+ .byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1
+ veor q3,q3,q7
+ .byte 0x2e,0x03,0xb0,0xf3 @ aese q0,q15
+ .byte 0x2e,0x23,0xb0,0xf3 @ aese q1,q15
+
+ cmp r2,#1
+ veor q2,q2,q0
+ veor q3,q3,q1
+ vst1.8 {q2},[r1]!
+ beq .Lctr32_done
+ vst1.8 {q3},[r1]
+
+.Lctr32_done:
+ vldmia sp!,{d8-d15}
+ ldmia sp!,{r4-r10,pc}
+.size aes_v8_ctr32_encrypt_blocks,.-aes_v8_ctr32_encrypt_blocks
+#endif
diff --git a/third_party/boringssl/linux-arm/crypto/modes/ghashv8-armx.S b/third_party/boringssl/linux-arm/crypto/modes/ghashv8-armx.S
new file mode 100644
index 0000000..570d917
--- /dev/null
+++ b/third_party/boringssl/linux-arm/crypto/modes/ghashv8-armx.S
@@ -0,0 +1,116 @@
+#include "arm_arch.h"
+
+.text
+.fpu neon
+.code 32
+.global gcm_init_v8
+.type gcm_init_v8,%function
+.align 4
+gcm_init_v8:
+ vld1.64 {q9},[r1] @ load H
+ vmov.i8 q8,#0xe1
+ vext.8 q3,q9,q9,#8
+ vshl.i64 q8,q8,#57
+ vshr.u64 q10,q8,#63
+ vext.8 q8,q10,q8,#8 @ t0=0xc2....01
+ vdup.32 q9,d18[1]
+ vshr.u64 q11,q3,#63
+ vshr.s32 q9,q9,#31 @ broadcast carry bit
+ vand q11,q11,q8
+ vshl.i64 q3,q3,#1
+ vext.8 q11,q11,q11,#8
+ vand q8,q8,q9
+ vorr q3,q3,q11 @ H<<<=1
+ veor q3,q3,q8 @ twisted H
+ vst1.64 {q3},[r0]
+
+ bx lr
+.size gcm_init_v8,.-gcm_init_v8
+
+.global gcm_gmult_v8
+.type gcm_gmult_v8,%function
+.align 4
+gcm_gmult_v8:
+ vld1.64 {q9},[r0] @ load Xi
+ vmov.i8 q11,#0xe1
+ vld1.64 {q12},[r1] @ load twisted H
+ vshl.u64 q11,q11,#57
+#ifndef __ARMEB__
+ vrev64.8 q9,q9
+#endif
+ vext.8 q13,q12,q12,#8
+ mov r3,#0
+ vext.8 q3,q9,q9,#8
+ mov r12,#0
+ veor q13,q13,q12 @ Karatsuba pre-processing
+ mov r2,r0
+ b .Lgmult_v8
+.size gcm_gmult_v8,.-gcm_gmult_v8
+
+.global gcm_ghash_v8
+.type gcm_ghash_v8,%function
+.align 4
+gcm_ghash_v8:
+ vld1.64 {q0},[r0] @ load [rotated] Xi
+ subs r3,r3,#16
+ vmov.i8 q11,#0xe1
+ mov r12,#16
+ vld1.64 {q12},[r1] @ load twisted H
+ moveq r12,#0
+ vext.8 q0,q0,q0,#8
+ vshl.u64 q11,q11,#57
+ vld1.64 {q9},[r2],r12 @ load [rotated] inp
+ vext.8 q13,q12,q12,#8
+#ifndef __ARMEB__
+ vrev64.8 q0,q0
+ vrev64.8 q9,q9
+#endif
+ veor q13,q13,q12 @ Karatsuba pre-processing
+ vext.8 q3,q9,q9,#8
+ b .Loop_v8
+
+.align 4
+.Loop_v8:
+ vext.8 q10,q0,q0,#8
+ veor q3,q3,q0 @ inp^=Xi
+ veor q9,q9,q10 @ q9 is rotated inp^Xi
+
+.Lgmult_v8:
+ .byte 0x86,0x0e,0xa8,0xf2 @ pmull q0,q12,q3 @ H.lo·Xi.lo
+ veor q9,q9,q3 @ Karatsuba pre-processing
+ .byte 0x87,0x4e,0xa9,0xf2 @ pmull2 q2,q12,q3 @ H.hi·Xi.hi
+ subs r3,r3,#16
+ .byte 0xa2,0x2e,0xaa,0xf2 @ pmull q1,q13,q9 @ (H.lo+H.hi)·(Xi.lo+Xi.hi)
+ moveq r12,#0
+
+ vext.8 q9,q0,q2,#8 @ Karatsuba post-processing
+ veor q10,q0,q2
+ veor q1,q1,q9
+ vld1.64 {q9},[r2],r12 @ load [rotated] inp
+ veor q1,q1,q10
+ .byte 0x26,0x4e,0xe0,0xf2 @ pmull q10,q0,q11 @ 1st phase
+
+ vmov d4,d3 @ Xh|Xm - 256-bit result
+ vmov d3,d0 @ Xm is rotated Xl
+#ifndef __ARMEB__
+ vrev64.8 q9,q9
+#endif
+ veor q0,q1,q10
+ vext.8 q3,q9,q9,#8
+
+ vext.8 q10,q0,q0,#8 @ 2nd phase
+ .byte 0x26,0x0e,0xa0,0xf2 @ pmull q0,q0,q11
+ veor q10,q10,q2
+ veor q0,q0,q10
+ bhs .Loop_v8
+
+#ifndef __ARMEB__
+ vrev64.8 q0,q0
+#endif
+ vext.8 q0,q0,q0,#8
+ vst1.64 {q0},[r0] @ write out Xi
+
+ bx lr
+.size gcm_ghash_v8,.-gcm_ghash_v8
+.asciz "GHASH for ARMv8, CRYPTOGAMS by <appro@openssl.org>"
+.align 2
diff --git a/third_party/boringssl/linux-arm/crypto/sha/sha1-armv4-large.S b/third_party/boringssl/linux-arm/crypto/sha/sha1-armv4-large.S
index 0979cfe..b089335 100644
--- a/third_party/boringssl/linux-arm/crypto/sha/sha1-armv4-large.S
+++ b/third_party/boringssl/linux-arm/crypto/sha/sha1-armv4-large.S
@@ -1,14 +1,22 @@
-#if defined(__arm__)
#include "arm_arch.h"
.text
+.code 32
.global sha1_block_data_order
-.hidden sha1_block_data_order
.type sha1_block_data_order,%function
-.align 2
+.align 5
sha1_block_data_order:
+#if __ARM_MAX_ARCH__>=7
+ sub r3,pc,#8 @ sha1_block_data_order
+ ldr r12,.LOPENSSL_armcap
+ ldr r12,[r3,r12] @ OPENSSL_armcap_P
+ tst r12,#ARMV8_SHA1
+ bne .LARMv8
+ tst r12,#ARMV7_NEON
+ bne .LNEON
+#endif
stmdb sp!,{r4-r12,lr}
add r2,r1,r2,lsl#6 @ r2 to point at the end of r1
ldmia r0,{r3,r4,r5,r6,r7}
@@ -444,13 +452,1004 @@
moveq pc,lr @ be binary compatible with V4, yet
.word 0xe12fff1e @ interoperable with Thumb ISA:-)
#endif
-.align 2
+.size sha1_block_data_order,.-sha1_block_data_order
+
+.align 5
.LK_00_19: .word 0x5a827999
.LK_20_39: .word 0x6ed9eba1
.LK_40_59: .word 0x8f1bbcdc
.LK_60_79: .word 0xca62c1d6
-.size sha1_block_data_order,.-sha1_block_data_order
-.asciz "SHA1 block transform for ARMv4, CRYPTOGAMS by <appro@openssl.org>"
-.align 2
+#if __ARM_MAX_ARCH__>=7
+.LOPENSSL_armcap:
+.word OPENSSL_armcap_P-sha1_block_data_order
+#endif
+.asciz "SHA1 block transform for ARMv4/NEON/ARMv8, CRYPTOGAMS by <appro@openssl.org>"
+.align 5
+#if __ARM_MAX_ARCH__>=7
+.arch armv7-a
+.fpu neon
+.type sha1_block_data_order_neon,%function
+.align 4
+sha1_block_data_order_neon:
+.LNEON:
+ stmdb sp!,{r4-r12,lr}
+ add r2,r1,r2,lsl#6 @ r2 to point at the end of r1
+ @ dmb @ errata #451034 on early Cortex A8
+ @ vstmdb sp!,{d8-d15} @ ABI specification says so
+ mov r14,sp
+ sub sp,sp,#64 @ alloca
+ adr r8,.LK_00_19
+ bic sp,sp,#15 @ align for 128-bit stores
+
+ ldmia r0,{r3,r4,r5,r6,r7} @ load context
+ mov r12,sp
+
+ vld1.8 {q0-q1},[r1]! @ handles unaligned
+ veor q15,q15,q15
+ vld1.8 {q2-q3},[r1]!
+ vld1.32 {d28[],d29[]},[r8,:32]! @ load K_00_19
+ vrev32.8 q0,q0 @ yes, even on
+ vrev32.8 q1,q1 @ big-endian...
+ vrev32.8 q2,q2
+ vadd.i32 q8,q0,q14
+ vrev32.8 q3,q3
+ vadd.i32 q9,q1,q14
+ vst1.32 {q8},[r12,:128]!
+ vadd.i32 q10,q2,q14
+ vst1.32 {q9},[r12,:128]!
+ vst1.32 {q10},[r12,:128]!
+ ldr r9,[sp] @ big RAW stall
+
+.Loop_neon:
+ vext.8 q8,q0,q1,#8
+ bic r10,r6,r4
+ add r7,r7,r9
+ and r11,r5,r4
+ vadd.i32 q13,q3,q14
+ ldr r9,[sp,#4]
+ add r7,r7,r3,ror#27
+ vext.8 q12,q3,q15,#4
+ eor r11,r11,r10
+ mov r4,r4,ror#2
+ add r7,r7,r11
+ veor q8,q8,q0
+ bic r10,r5,r3
+ add r6,r6,r9
+ veor q12,q12,q2
+ and r11,r4,r3
+ ldr r9,[sp,#8]
+ veor q12,q12,q8
+ add r6,r6,r7,ror#27
+ eor r11,r11,r10
+ vst1.32 {q13},[r12,:128]!
+ sub r12,r12,#64
+ mov r3,r3,ror#2
+ add r6,r6,r11
+ vext.8 q13,q15,q12,#4
+ bic r10,r4,r7
+ add r5,r5,r9
+ vadd.i32 q8,q12,q12
+ and r11,r3,r7
+ ldr r9,[sp,#12]
+ vsri.32 q8,q12,#31
+ add r5,r5,r6,ror#27
+ eor r11,r11,r10
+ mov r7,r7,ror#2
+ vshr.u32 q12,q13,#30
+ add r5,r5,r11
+ bic r10,r3,r6
+ vshl.u32 q13,q13,#2
+ add r4,r4,r9
+ and r11,r7,r6
+ veor q8,q8,q12
+ ldr r9,[sp,#16]
+ add r4,r4,r5,ror#27
+ veor q8,q8,q13
+ eor r11,r11,r10
+ mov r6,r6,ror#2
+ add r4,r4,r11
+ vext.8 q9,q1,q2,#8
+ bic r10,r7,r5
+ add r3,r3,r9
+ and r11,r6,r5
+ vadd.i32 q13,q8,q14
+ ldr r9,[sp,#20]
+ vld1.32 {d28[],d29[]},[r8,:32]!
+ add r3,r3,r4,ror#27
+ vext.8 q12,q8,q15,#4
+ eor r11,r11,r10
+ mov r5,r5,ror#2
+ add r3,r3,r11
+ veor q9,q9,q1
+ bic r10,r6,r4
+ add r7,r7,r9
+ veor q12,q12,q3
+ and r11,r5,r4
+ ldr r9,[sp,#24]
+ veor q12,q12,q9
+ add r7,r7,r3,ror#27
+ eor r11,r11,r10
+ vst1.32 {q13},[r12,:128]!
+ mov r4,r4,ror#2
+ add r7,r7,r11
+ vext.8 q13,q15,q12,#4
+ bic r10,r5,r3
+ add r6,r6,r9
+ vadd.i32 q9,q12,q12
+ and r11,r4,r3
+ ldr r9,[sp,#28]
+ vsri.32 q9,q12,#31
+ add r6,r6,r7,ror#27
+ eor r11,r11,r10
+ mov r3,r3,ror#2
+ vshr.u32 q12,q13,#30
+ add r6,r6,r11
+ bic r10,r4,r7
+ vshl.u32 q13,q13,#2
+ add r5,r5,r9
+ and r11,r3,r7
+ veor q9,q9,q12
+ ldr r9,[sp,#32]
+ add r5,r5,r6,ror#27
+ veor q9,q9,q13
+ eor r11,r11,r10
+ mov r7,r7,ror#2
+ add r5,r5,r11
+ vext.8 q10,q2,q3,#8
+ bic r10,r3,r6
+ add r4,r4,r9
+ and r11,r7,r6
+ vadd.i32 q13,q9,q14
+ ldr r9,[sp,#36]
+ add r4,r4,r5,ror#27
+ vext.8 q12,q9,q15,#4
+ eor r11,r11,r10
+ mov r6,r6,ror#2
+ add r4,r4,r11
+ veor q10,q10,q2
+ bic r10,r7,r5
+ add r3,r3,r9
+ veor q12,q12,q8
+ and r11,r6,r5
+ ldr r9,[sp,#40]
+ veor q12,q12,q10
+ add r3,r3,r4,ror#27
+ eor r11,r11,r10
+ vst1.32 {q13},[r12,:128]!
+ mov r5,r5,ror#2
+ add r3,r3,r11
+ vext.8 q13,q15,q12,#4
+ bic r10,r6,r4
+ add r7,r7,r9
+ vadd.i32 q10,q12,q12
+ and r11,r5,r4
+ ldr r9,[sp,#44]
+ vsri.32 q10,q12,#31
+ add r7,r7,r3,ror#27
+ eor r11,r11,r10
+ mov r4,r4,ror#2
+ vshr.u32 q12,q13,#30
+ add r7,r7,r11
+ bic r10,r5,r3
+ vshl.u32 q13,q13,#2
+ add r6,r6,r9
+ and r11,r4,r3
+ veor q10,q10,q12
+ ldr r9,[sp,#48]
+ add r6,r6,r7,ror#27
+ veor q10,q10,q13
+ eor r11,r11,r10
+ mov r3,r3,ror#2
+ add r6,r6,r11
+ vext.8 q11,q3,q8,#8
+ bic r10,r4,r7
+ add r5,r5,r9
+ and r11,r3,r7
+ vadd.i32 q13,q10,q14
+ ldr r9,[sp,#52]
+ add r5,r5,r6,ror#27
+ vext.8 q12,q10,q15,#4
+ eor r11,r11,r10
+ mov r7,r7,ror#2
+ add r5,r5,r11
+ veor q11,q11,q3
+ bic r10,r3,r6
+ add r4,r4,r9
+ veor q12,q12,q9
+ and r11,r7,r6
+ ldr r9,[sp,#56]
+ veor q12,q12,q11
+ add r4,r4,r5,ror#27
+ eor r11,r11,r10
+ vst1.32 {q13},[r12,:128]!
+ mov r6,r6,ror#2
+ add r4,r4,r11
+ vext.8 q13,q15,q12,#4
+ bic r10,r7,r5
+ add r3,r3,r9
+ vadd.i32 q11,q12,q12
+ and r11,r6,r5
+ ldr r9,[sp,#60]
+ vsri.32 q11,q12,#31
+ add r3,r3,r4,ror#27
+ eor r11,r11,r10
+ mov r5,r5,ror#2
+ vshr.u32 q12,q13,#30
+ add r3,r3,r11
+ bic r10,r6,r4
+ vshl.u32 q13,q13,#2
+ add r7,r7,r9
+ and r11,r5,r4
+ veor q11,q11,q12
+ ldr r9,[sp,#0]
+ add r7,r7,r3,ror#27
+ veor q11,q11,q13
+ eor r11,r11,r10
+ mov r4,r4,ror#2
+ add r7,r7,r11
+ vext.8 q12,q10,q11,#8
+ bic r10,r5,r3
+ add r6,r6,r9
+ and r11,r4,r3
+ veor q0,q0,q8
+ ldr r9,[sp,#4]
+ add r6,r6,r7,ror#27
+ veor q0,q0,q1
+ eor r11,r11,r10
+ mov r3,r3,ror#2
+ vadd.i32 q13,q11,q14
+ add r6,r6,r11
+ bic r10,r4,r7
+ veor q12,q12,q0
+ add r5,r5,r9
+ and r11,r3,r7
+ vshr.u32 q0,q12,#30
+ ldr r9,[sp,#8]
+ add r5,r5,r6,ror#27
+ vst1.32 {q13},[r12,:128]!
+ sub r12,r12,#64
+ eor r11,r11,r10
+ mov r7,r7,ror#2
+ vsli.32 q0,q12,#2
+ add r5,r5,r11
+ bic r10,r3,r6
+ add r4,r4,r9
+ and r11,r7,r6
+ ldr r9,[sp,#12]
+ add r4,r4,r5,ror#27
+ eor r11,r11,r10
+ mov r6,r6,ror#2
+ add r4,r4,r11
+ bic r10,r7,r5
+ add r3,r3,r9
+ and r11,r6,r5
+ ldr r9,[sp,#16]
+ add r3,r3,r4,ror#27
+ eor r11,r11,r10
+ mov r5,r5,ror#2
+ add r3,r3,r11
+ vext.8 q12,q11,q0,#8
+ eor r10,r4,r6
+ add r7,r7,r9
+ ldr r9,[sp,#20]
+ veor q1,q1,q9
+ eor r11,r10,r5
+ add r7,r7,r3,ror#27
+ veor q1,q1,q2
+ mov r4,r4,ror#2
+ add r7,r7,r11
+ vadd.i32 q13,q0,q14
+ eor r10,r3,r5
+ add r6,r6,r9
+ veor q12,q12,q1
+ ldr r9,[sp,#24]
+ eor r11,r10,r4
+ vshr.u32 q1,q12,#30
+ add r6,r6,r7,ror#27
+ mov r3,r3,ror#2
+ vst1.32 {q13},[r12,:128]!
+ add r6,r6,r11
+ eor r10,r7,r4
+ vsli.32 q1,q12,#2
+ add r5,r5,r9
+ ldr r9,[sp,#28]
+ eor r11,r10,r3
+ add r5,r5,r6,ror#27
+ mov r7,r7,ror#2
+ add r5,r5,r11
+ eor r10,r6,r3
+ add r4,r4,r9
+ ldr r9,[sp,#32]
+ eor r11,r10,r7
+ add r4,r4,r5,ror#27
+ mov r6,r6,ror#2
+ add r4,r4,r11
+ vext.8 q12,q0,q1,#8
+ eor r10,r5,r7
+ add r3,r3,r9
+ ldr r9,[sp,#36]
+ veor q2,q2,q10
+ eor r11,r10,r6
+ add r3,r3,r4,ror#27
+ veor q2,q2,q3
+ mov r5,r5,ror#2
+ add r3,r3,r11
+ vadd.i32 q13,q1,q14
+ eor r10,r4,r6
+ vld1.32 {d28[],d29[]},[r8,:32]!
+ add r7,r7,r9
+ veor q12,q12,q2
+ ldr r9,[sp,#40]
+ eor r11,r10,r5
+ vshr.u32 q2,q12,#30
+ add r7,r7,r3,ror#27
+ mov r4,r4,ror#2
+ vst1.32 {q13},[r12,:128]!
+ add r7,r7,r11
+ eor r10,r3,r5
+ vsli.32 q2,q12,#2
+ add r6,r6,r9
+ ldr r9,[sp,#44]
+ eor r11,r10,r4
+ add r6,r6,r7,ror#27
+ mov r3,r3,ror#2
+ add r6,r6,r11
+ eor r10,r7,r4
+ add r5,r5,r9
+ ldr r9,[sp,#48]
+ eor r11,r10,r3
+ add r5,r5,r6,ror#27
+ mov r7,r7,ror#2
+ add r5,r5,r11
+ vext.8 q12,q1,q2,#8
+ eor r10,r6,r3
+ add r4,r4,r9
+ ldr r9,[sp,#52]
+ veor q3,q3,q11
+ eor r11,r10,r7
+ add r4,r4,r5,ror#27
+ veor q3,q3,q8
+ mov r6,r6,ror#2
+ add r4,r4,r11
+ vadd.i32 q13,q2,q14
+ eor r10,r5,r7
+ add r3,r3,r9
+ veor q12,q12,q3
+ ldr r9,[sp,#56]
+ eor r11,r10,r6
+ vshr.u32 q3,q12,#30
+ add r3,r3,r4,ror#27
+ mov r5,r5,ror#2
+ vst1.32 {q13},[r12,:128]!
+ add r3,r3,r11
+ eor r10,r4,r6
+ vsli.32 q3,q12,#2
+ add r7,r7,r9
+ ldr r9,[sp,#60]
+ eor r11,r10,r5
+ add r7,r7,r3,ror#27
+ mov r4,r4,ror#2
+ add r7,r7,r11
+ eor r10,r3,r5
+ add r6,r6,r9
+ ldr r9,[sp,#0]
+ eor r11,r10,r4
+ add r6,r6,r7,ror#27
+ mov r3,r3,ror#2
+ add r6,r6,r11
+ vext.8 q12,q2,q3,#8
+ eor r10,r7,r4
+ add r5,r5,r9
+ ldr r9,[sp,#4]
+ veor q8,q8,q0
+ eor r11,r10,r3
+ add r5,r5,r6,ror#27
+ veor q8,q8,q9
+ mov r7,r7,ror#2
+ add r5,r5,r11
+ vadd.i32 q13,q3,q14
+ eor r10,r6,r3
+ add r4,r4,r9
+ veor q12,q12,q8
+ ldr r9,[sp,#8]
+ eor r11,r10,r7
+ vshr.u32 q8,q12,#30
+ add r4,r4,r5,ror#27
+ mov r6,r6,ror#2
+ vst1.32 {q13},[r12,:128]!
+ sub r12,r12,#64
+ add r4,r4,r11
+ eor r10,r5,r7
+ vsli.32 q8,q12,#2
+ add r3,r3,r9
+ ldr r9,[sp,#12]
+ eor r11,r10,r6
+ add r3,r3,r4,ror#27
+ mov r5,r5,ror#2
+ add r3,r3,r11
+ eor r10,r4,r6
+ add r7,r7,r9
+ ldr r9,[sp,#16]
+ eor r11,r10,r5
+ add r7,r7,r3,ror#27
+ mov r4,r4,ror#2
+ add r7,r7,r11
+ vext.8 q12,q3,q8,#8
+ eor r10,r3,r5
+ add r6,r6,r9
+ ldr r9,[sp,#20]
+ veor q9,q9,q1
+ eor r11,r10,r4
+ add r6,r6,r7,ror#27
+ veor q9,q9,q10
+ mov r3,r3,ror#2
+ add r6,r6,r11
+ vadd.i32 q13,q8,q14
+ eor r10,r7,r4
+ add r5,r5,r9
+ veor q12,q12,q9
+ ldr r9,[sp,#24]
+ eor r11,r10,r3
+ vshr.u32 q9,q12,#30
+ add r5,r5,r6,ror#27
+ mov r7,r7,ror#2
+ vst1.32 {q13},[r12,:128]!
+ add r5,r5,r11
+ eor r10,r6,r3
+ vsli.32 q9,q12,#2
+ add r4,r4,r9
+ ldr r9,[sp,#28]
+ eor r11,r10,r7
+ add r4,r4,r5,ror#27
+ mov r6,r6,ror#2
+ add r4,r4,r11
+ eor r10,r5,r7
+ add r3,r3,r9
+ ldr r9,[sp,#32]
+ eor r11,r10,r6
+ add r3,r3,r4,ror#27
+ mov r5,r5,ror#2
+ add r3,r3,r11
+ vext.8 q12,q8,q9,#8
+ add r7,r7,r9
+ and r10,r5,r6
+ ldr r9,[sp,#36]
+ veor q10,q10,q2
+ add r7,r7,r3,ror#27
+ eor r11,r5,r6
+ veor q10,q10,q11
+ add r7,r7,r10
+ and r11,r11,r4
+ vadd.i32 q13,q9,q14
+ mov r4,r4,ror#2
+ add r7,r7,r11
+ veor q12,q12,q10
+ add r6,r6,r9
+ and r10,r4,r5
+ vshr.u32 q10,q12,#30
+ ldr r9,[sp,#40]
+ add r6,r6,r7,ror#27
+ vst1.32 {q13},[r12,:128]!
+ eor r11,r4,r5
+ add r6,r6,r10
+ vsli.32 q10,q12,#2
+ and r11,r11,r3
+ mov r3,r3,ror#2
+ add r6,r6,r11
+ add r5,r5,r9
+ and r10,r3,r4
+ ldr r9,[sp,#44]
+ add r5,r5,r6,ror#27
+ eor r11,r3,r4
+ add r5,r5,r10
+ and r11,r11,r7
+ mov r7,r7,ror#2
+ add r5,r5,r11
+ add r4,r4,r9
+ and r10,r7,r3
+ ldr r9,[sp,#48]
+ add r4,r4,r5,ror#27
+ eor r11,r7,r3
+ add r4,r4,r10
+ and r11,r11,r6
+ mov r6,r6,ror#2
+ add r4,r4,r11
+ vext.8 q12,q9,q10,#8
+ add r3,r3,r9
+ and r10,r6,r7
+ ldr r9,[sp,#52]
+ veor q11,q11,q3
+ add r3,r3,r4,ror#27
+ eor r11,r6,r7
+ veor q11,q11,q0
+ add r3,r3,r10
+ and r11,r11,r5
+ vadd.i32 q13,q10,q14
+ mov r5,r5,ror#2
+ vld1.32 {d28[],d29[]},[r8,:32]!
+ add r3,r3,r11
+ veor q12,q12,q11
+ add r7,r7,r9
+ and r10,r5,r6
+ vshr.u32 q11,q12,#30
+ ldr r9,[sp,#56]
+ add r7,r7,r3,ror#27
+ vst1.32 {q13},[r12,:128]!
+ eor r11,r5,r6
+ add r7,r7,r10
+ vsli.32 q11,q12,#2
+ and r11,r11,r4
+ mov r4,r4,ror#2
+ add r7,r7,r11
+ add r6,r6,r9
+ and r10,r4,r5
+ ldr r9,[sp,#60]
+ add r6,r6,r7,ror#27
+ eor r11,r4,r5
+ add r6,r6,r10
+ and r11,r11,r3
+ mov r3,r3,ror#2
+ add r6,r6,r11
+ add r5,r5,r9
+ and r10,r3,r4
+ ldr r9,[sp,#0]
+ add r5,r5,r6,ror#27
+ eor r11,r3,r4
+ add r5,r5,r10
+ and r11,r11,r7
+ mov r7,r7,ror#2
+ add r5,r5,r11
+ vext.8 q12,q10,q11,#8
+ add r4,r4,r9
+ and r10,r7,r3
+ ldr r9,[sp,#4]
+ veor q0,q0,q8
+ add r4,r4,r5,ror#27
+ eor r11,r7,r3
+ veor q0,q0,q1
+ add r4,r4,r10
+ and r11,r11,r6
+ vadd.i32 q13,q11,q14
+ mov r6,r6,ror#2
+ add r4,r4,r11
+ veor q12,q12,q0
+ add r3,r3,r9
+ and r10,r6,r7
+ vshr.u32 q0,q12,#30
+ ldr r9,[sp,#8]
+ add r3,r3,r4,ror#27
+ vst1.32 {q13},[r12,:128]!
+ sub r12,r12,#64
+ eor r11,r6,r7
+ add r3,r3,r10
+ vsli.32 q0,q12,#2
+ and r11,r11,r5
+ mov r5,r5,ror#2
+ add r3,r3,r11
+ add r7,r7,r9
+ and r10,r5,r6
+ ldr r9,[sp,#12]
+ add r7,r7,r3,ror#27
+ eor r11,r5,r6
+ add r7,r7,r10
+ and r11,r11,r4
+ mov r4,r4,ror#2
+ add r7,r7,r11
+ add r6,r6,r9
+ and r10,r4,r5
+ ldr r9,[sp,#16]
+ add r6,r6,r7,ror#27
+ eor r11,r4,r5
+ add r6,r6,r10
+ and r11,r11,r3
+ mov r3,r3,ror#2
+ add r6,r6,r11
+ vext.8 q12,q11,q0,#8
+ add r5,r5,r9
+ and r10,r3,r4
+ ldr r9,[sp,#20]
+ veor q1,q1,q9
+ add r5,r5,r6,ror#27
+ eor r11,r3,r4
+ veor q1,q1,q2
+ add r5,r5,r10
+ and r11,r11,r7
+ vadd.i32 q13,q0,q14
+ mov r7,r7,ror#2
+ add r5,r5,r11
+ veor q12,q12,q1
+ add r4,r4,r9
+ and r10,r7,r3
+ vshr.u32 q1,q12,#30
+ ldr r9,[sp,#24]
+ add r4,r4,r5,ror#27
+ vst1.32 {q13},[r12,:128]!
+ eor r11,r7,r3
+ add r4,r4,r10
+ vsli.32 q1,q12,#2
+ and r11,r11,r6
+ mov r6,r6,ror#2
+ add r4,r4,r11
+ add r3,r3,r9
+ and r10,r6,r7
+ ldr r9,[sp,#28]
+ add r3,r3,r4,ror#27
+ eor r11,r6,r7
+ add r3,r3,r10
+ and r11,r11,r5
+ mov r5,r5,ror#2
+ add r3,r3,r11
+ add r7,r7,r9
+ and r10,r5,r6
+ ldr r9,[sp,#32]
+ add r7,r7,r3,ror#27
+ eor r11,r5,r6
+ add r7,r7,r10
+ and r11,r11,r4
+ mov r4,r4,ror#2
+ add r7,r7,r11
+ vext.8 q12,q0,q1,#8
+ add r6,r6,r9
+ and r10,r4,r5
+ ldr r9,[sp,#36]
+ veor q2,q2,q10
+ add r6,r6,r7,ror#27
+ eor r11,r4,r5
+ veor q2,q2,q3
+ add r6,r6,r10
+ and r11,r11,r3
+ vadd.i32 q13,q1,q14
+ mov r3,r3,ror#2
+ add r6,r6,r11
+ veor q12,q12,q2
+ add r5,r5,r9
+ and r10,r3,r4
+ vshr.u32 q2,q12,#30
+ ldr r9,[sp,#40]
+ add r5,r5,r6,ror#27
+ vst1.32 {q13},[r12,:128]!
+ eor r11,r3,r4
+ add r5,r5,r10
+ vsli.32 q2,q12,#2
+ and r11,r11,r7
+ mov r7,r7,ror#2
+ add r5,r5,r11
+ add r4,r4,r9
+ and r10,r7,r3
+ ldr r9,[sp,#44]
+ add r4,r4,r5,ror#27
+ eor r11,r7,r3
+ add r4,r4,r10
+ and r11,r11,r6
+ mov r6,r6,ror#2
+ add r4,r4,r11
+ add r3,r3,r9
+ and r10,r6,r7
+ ldr r9,[sp,#48]
+ add r3,r3,r4,ror#27
+ eor r11,r6,r7
+ add r3,r3,r10
+ and r11,r11,r5
+ mov r5,r5,ror#2
+ add r3,r3,r11
+ vext.8 q12,q1,q2,#8
+ eor r10,r4,r6
+ add r7,r7,r9
+ ldr r9,[sp,#52]
+ veor q3,q3,q11
+ eor r11,r10,r5
+ add r7,r7,r3,ror#27
+ veor q3,q3,q8
+ mov r4,r4,ror#2
+ add r7,r7,r11
+ vadd.i32 q13,q2,q14
+ eor r10,r3,r5
+ add r6,r6,r9
+ veor q12,q12,q3
+ ldr r9,[sp,#56]
+ eor r11,r10,r4
+ vshr.u32 q3,q12,#30
+ add r6,r6,r7,ror#27
+ mov r3,r3,ror#2
+ vst1.32 {q13},[r12,:128]!
+ add r6,r6,r11
+ eor r10,r7,r4
+ vsli.32 q3,q12,#2
+ add r5,r5,r9
+ ldr r9,[sp,#60]
+ eor r11,r10,r3
+ add r5,r5,r6,ror#27
+ mov r7,r7,ror#2
+ add r5,r5,r11
+ eor r10,r6,r3
+ add r4,r4,r9
+ ldr r9,[sp,#0]
+ eor r11,r10,r7
+ add r4,r4,r5,ror#27
+ mov r6,r6,ror#2
+ add r4,r4,r11
+ vadd.i32 q13,q3,q14
+ eor r10,r5,r7
+ add r3,r3,r9
+ vst1.32 {q13},[r12,:128]!
+ sub r12,r12,#64
+ teq r1,r2
+ sub r8,r8,#16
+ subeq r1,r1,#64
+ vld1.8 {q0-q1},[r1]!
+ ldr r9,[sp,#4]
+ eor r11,r10,r6
+ vld1.8 {q2-q3},[r1]!
+ add r3,r3,r4,ror#27
+ mov r5,r5,ror#2
+ vld1.32 {d28[],d29[]},[r8,:32]!
+ add r3,r3,r11
+ eor r10,r4,r6
+ vrev32.8 q0,q0
+ add r7,r7,r9
+ ldr r9,[sp,#8]
+ eor r11,r10,r5
+ add r7,r7,r3,ror#27
+ mov r4,r4,ror#2
+ add r7,r7,r11
+ eor r10,r3,r5
+ add r6,r6,r9
+ ldr r9,[sp,#12]
+ eor r11,r10,r4
+ add r6,r6,r7,ror#27
+ mov r3,r3,ror#2
+ add r6,r6,r11
+ eor r10,r7,r4
+ add r5,r5,r9
+ ldr r9,[sp,#16]
+ eor r11,r10,r3
+ add r5,r5,r6,ror#27
+ mov r7,r7,ror#2
+ add r5,r5,r11
+ vrev32.8 q1,q1
+ eor r10,r6,r3
+ add r4,r4,r9
+ vadd.i32 q8,q0,q14
+ ldr r9,[sp,#20]
+ eor r11,r10,r7
+ vst1.32 {q8},[r12,:128]!
+ add r4,r4,r5,ror#27
+ mov r6,r6,ror#2
+ add r4,r4,r11
+ eor r10,r5,r7
+ add r3,r3,r9
+ ldr r9,[sp,#24]
+ eor r11,r10,r6
+ add r3,r3,r4,ror#27
+ mov r5,r5,ror#2
+ add r3,r3,r11
+ eor r10,r4,r6
+ add r7,r7,r9
+ ldr r9,[sp,#28]
+ eor r11,r10,r5
+ add r7,r7,r3,ror#27
+ mov r4,r4,ror#2
+ add r7,r7,r11
+ eor r10,r3,r5
+ add r6,r6,r9
+ ldr r9,[sp,#32]
+ eor r11,r10,r4
+ add r6,r6,r7,ror#27
+ mov r3,r3,ror#2
+ add r6,r6,r11
+ vrev32.8 q2,q2
+ eor r10,r7,r4
+ add r5,r5,r9
+ vadd.i32 q9,q1,q14
+ ldr r9,[sp,#36]
+ eor r11,r10,r3
+ vst1.32 {q9},[r12,:128]!
+ add r5,r5,r6,ror#27
+ mov r7,r7,ror#2
+ add r5,r5,r11
+ eor r10,r6,r3
+ add r4,r4,r9
+ ldr r9,[sp,#40]
+ eor r11,r10,r7
+ add r4,r4,r5,ror#27
+ mov r6,r6,ror#2
+ add r4,r4,r11
+ eor r10,r5,r7
+ add r3,r3,r9
+ ldr r9,[sp,#44]
+ eor r11,r10,r6
+ add r3,r3,r4,ror#27
+ mov r5,r5,ror#2
+ add r3,r3,r11
+ eor r10,r4,r6
+ add r7,r7,r9
+ ldr r9,[sp,#48]
+ eor r11,r10,r5
+ add r7,r7,r3,ror#27
+ mov r4,r4,ror#2
+ add r7,r7,r11
+ vrev32.8 q3,q3
+ eor r10,r3,r5
+ add r6,r6,r9
+ vadd.i32 q10,q2,q14
+ ldr r9,[sp,#52]
+ eor r11,r10,r4
+ vst1.32 {q10},[r12,:128]!
+ add r6,r6,r7,ror#27
+ mov r3,r3,ror#2
+ add r6,r6,r11
+ eor r10,r7,r4
+ add r5,r5,r9
+ ldr r9,[sp,#56]
+ eor r11,r10,r3
+ add r5,r5,r6,ror#27
+ mov r7,r7,ror#2
+ add r5,r5,r11
+ eor r10,r6,r3
+ add r4,r4,r9
+ ldr r9,[sp,#60]
+ eor r11,r10,r7
+ add r4,r4,r5,ror#27
+ mov r6,r6,ror#2
+ add r4,r4,r11
+ eor r10,r5,r7
+ add r3,r3,r9
+ eor r11,r10,r6
+ add r3,r3,r4,ror#27
+ mov r5,r5,ror#2
+ add r3,r3,r11
+ ldmia r0,{r9,r10,r11,r12} @ accumulate context
+ add r3,r3,r9
+ ldr r9,[r0,#16]
+ add r4,r4,r10
+ add r5,r5,r11
+ add r6,r6,r12
+ moveq sp,r14
+ add r7,r7,r9
+ ldrne r9,[sp]
+ stmia r0,{r3,r4,r5,r6,r7}
+ addne r12,sp,#3*16
+ bne .Loop_neon
+
+ @ vldmia sp!,{d8-d15}
+ ldmia sp!,{r4-r12,pc}
+.size sha1_block_data_order_neon,.-sha1_block_data_order_neon
+#endif
+#if __ARM_MAX_ARCH__>=7
+.type sha1_block_data_order_armv8,%function
+.align 5
+sha1_block_data_order_armv8:
+.LARMv8:
+ vstmdb sp!,{d8-d15} @ ABI specification says so
+
+ veor q1,q1,q1
+ adr r3,.LK_00_19
+ vld1.32 {q0},[r0]!
+ vld1.32 {d2[0]},[r0]
+ sub r0,r0,#16
+ vld1.32 {d16[],d17[]},[r3,:32]!
+ vld1.32 {d18[],d19[]},[r3,:32]!
+ vld1.32 {d20[],d21[]},[r3,:32]!
+ vld1.32 {d22[],d23[]},[r3,:32]
+
+.Loop_v8:
+ vld1.8 {q4-q5},[r1]!
+ vld1.8 {q6-q7},[r1]!
+ vrev32.8 q4,q4
+ vrev32.8 q5,q5
+
+ vadd.i32 q12,q8,q4
+ vrev32.8 q6,q6
+ vmov q14,q0 @ offload
+ subs r2,r2,#1
+
+ vadd.i32 q13,q8,q5
+ vrev32.8 q7,q7
+ .byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 0
+ .byte 0x68,0x0c,0x02,0xf2 @ sha1c q0,q1,q12
+ vadd.i32 q12,q8,q6
+ .byte 0x4c,0x8c,0x3a,0xf2 @ sha1su0 q4,q5,q6
+ .byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 1
+ .byte 0x6a,0x0c,0x06,0xf2 @ sha1c q0,q3,q13
+ vadd.i32 q13,q8,q7
+ .byte 0x8e,0x83,0xba,0xf3 @ sha1su1 q4,q7
+ .byte 0x4e,0xac,0x3c,0xf2 @ sha1su0 q5,q6,q7
+ .byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 2
+ .byte 0x68,0x0c,0x04,0xf2 @ sha1c q0,q2,q12
+ vadd.i32 q12,q8,q4
+ .byte 0x88,0xa3,0xba,0xf3 @ sha1su1 q5,q4
+ .byte 0x48,0xcc,0x3e,0xf2 @ sha1su0 q6,q7,q4
+ .byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 3
+ .byte 0x6a,0x0c,0x06,0xf2 @ sha1c q0,q3,q13
+ vadd.i32 q13,q9,q5
+ .byte 0x8a,0xc3,0xba,0xf3 @ sha1su1 q6,q5
+ .byte 0x4a,0xec,0x38,0xf2 @ sha1su0 q7,q4,q5
+ .byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 4
+ .byte 0x68,0x0c,0x04,0xf2 @ sha1c q0,q2,q12
+ vadd.i32 q12,q9,q6
+ .byte 0x8c,0xe3,0xba,0xf3 @ sha1su1 q7,q6
+ .byte 0x4c,0x8c,0x3a,0xf2 @ sha1su0 q4,q5,q6
+ .byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 5
+ .byte 0x6a,0x0c,0x16,0xf2 @ sha1p q0,q3,q13
+ vadd.i32 q13,q9,q7
+ .byte 0x8e,0x83,0xba,0xf3 @ sha1su1 q4,q7
+ .byte 0x4e,0xac,0x3c,0xf2 @ sha1su0 q5,q6,q7
+ .byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 6
+ .byte 0x68,0x0c,0x14,0xf2 @ sha1p q0,q2,q12
+ vadd.i32 q12,q9,q4
+ .byte 0x88,0xa3,0xba,0xf3 @ sha1su1 q5,q4
+ .byte 0x48,0xcc,0x3e,0xf2 @ sha1su0 q6,q7,q4
+ .byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 7
+ .byte 0x6a,0x0c,0x16,0xf2 @ sha1p q0,q3,q13
+ vadd.i32 q13,q9,q5
+ .byte 0x8a,0xc3,0xba,0xf3 @ sha1su1 q6,q5
+ .byte 0x4a,0xec,0x38,0xf2 @ sha1su0 q7,q4,q5
+ .byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 8
+ .byte 0x68,0x0c,0x14,0xf2 @ sha1p q0,q2,q12
+ vadd.i32 q12,q10,q6
+ .byte 0x8c,0xe3,0xba,0xf3 @ sha1su1 q7,q6
+ .byte 0x4c,0x8c,0x3a,0xf2 @ sha1su0 q4,q5,q6
+ .byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 9
+ .byte 0x6a,0x0c,0x16,0xf2 @ sha1p q0,q3,q13
+ vadd.i32 q13,q10,q7
+ .byte 0x8e,0x83,0xba,0xf3 @ sha1su1 q4,q7
+ .byte 0x4e,0xac,0x3c,0xf2 @ sha1su0 q5,q6,q7
+ .byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 10
+ .byte 0x68,0x0c,0x24,0xf2 @ sha1m q0,q2,q12
+ vadd.i32 q12,q10,q4
+ .byte 0x88,0xa3,0xba,0xf3 @ sha1su1 q5,q4
+ .byte 0x48,0xcc,0x3e,0xf2 @ sha1su0 q6,q7,q4
+ .byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 11
+ .byte 0x6a,0x0c,0x26,0xf2 @ sha1m q0,q3,q13
+ vadd.i32 q13,q10,q5
+ .byte 0x8a,0xc3,0xba,0xf3 @ sha1su1 q6,q5
+ .byte 0x4a,0xec,0x38,0xf2 @ sha1su0 q7,q4,q5
+ .byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 12
+ .byte 0x68,0x0c,0x24,0xf2 @ sha1m q0,q2,q12
+ vadd.i32 q12,q10,q6
+ .byte 0x8c,0xe3,0xba,0xf3 @ sha1su1 q7,q6
+ .byte 0x4c,0x8c,0x3a,0xf2 @ sha1su0 q4,q5,q6
+ .byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 13
+ .byte 0x6a,0x0c,0x26,0xf2 @ sha1m q0,q3,q13
+ vadd.i32 q13,q11,q7
+ .byte 0x8e,0x83,0xba,0xf3 @ sha1su1 q4,q7
+ .byte 0x4e,0xac,0x3c,0xf2 @ sha1su0 q5,q6,q7
+ .byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 14
+ .byte 0x68,0x0c,0x24,0xf2 @ sha1m q0,q2,q12
+ vadd.i32 q12,q11,q4
+ .byte 0x88,0xa3,0xba,0xf3 @ sha1su1 q5,q4
+ .byte 0x48,0xcc,0x3e,0xf2 @ sha1su0 q6,q7,q4
+ .byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 15
+ .byte 0x6a,0x0c,0x16,0xf2 @ sha1p q0,q3,q13
+ vadd.i32 q13,q11,q5
+ .byte 0x8a,0xc3,0xba,0xf3 @ sha1su1 q6,q5
+ .byte 0x4a,0xec,0x38,0xf2 @ sha1su0 q7,q4,q5
+ .byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 16
+ .byte 0x68,0x0c,0x14,0xf2 @ sha1p q0,q2,q12
+ vadd.i32 q12,q11,q6
+ .byte 0x8c,0xe3,0xba,0xf3 @ sha1su1 q7,q6
+ .byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 17
+ .byte 0x6a,0x0c,0x16,0xf2 @ sha1p q0,q3,q13
+ vadd.i32 q13,q11,q7
+
+ .byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 18
+ .byte 0x68,0x0c,0x14,0xf2 @ sha1p q0,q2,q12
+
+ .byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 19
+ .byte 0x6a,0x0c,0x16,0xf2 @ sha1p q0,q3,q13
+
+ vadd.i32 q1,q1,q2
+ vadd.i32 q0,q0,q14
+ bne .Loop_v8
+
+ vst1.32 {q0},[r0]!
+ vst1.32 {d2[0]},[r0]
+
+ vldmia sp!,{d8-d15}
+ bx lr @ bx lr
+.size sha1_block_data_order_armv8,.-sha1_block_data_order_armv8
+#endif
+#if __ARM_MAX_ARCH__>=7
+.comm OPENSSL_armcap_P,4,4
#endif
diff --git a/third_party/boringssl/linux-arm/crypto/sha/sha256-armv4.S b/third_party/boringssl/linux-arm/crypto/sha/sha256-armv4.S
index c105f51..289b58f 100644
--- a/third_party/boringssl/linux-arm/crypto/sha/sha256-armv4.S
+++ b/third_party/boringssl/linux-arm/crypto/sha/sha256-armv4.S
@@ -1,4 +1,3 @@
-#if defined(__arm__)
#include "arm_arch.h"
.text
@@ -25,20 +24,23 @@
.word 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
.size K256,.-K256
.word 0 @ terminator
+#if __ARM_MAX_ARCH__>=7
.LOPENSSL_armcap:
.word OPENSSL_armcap_P-sha256_block_data_order
+#endif
.align 5
.global sha256_block_data_order
-.hidden sha256_block_data_order
.type sha256_block_data_order,%function
sha256_block_data_order:
sub r3,pc,#8 @ sha256_block_data_order
add r2,r1,r2,lsl#6 @ len to point at the end of inp
-#if __ARM_ARCH__>=7
+#if __ARM_MAX_ARCH__>=7
ldr r12,.LOPENSSL_armcap
ldr r12,[r3,r12] @ OPENSSL_armcap_P
- tst r12,#1
+ tst r12,#ARMV8_SHA256
+ bne .LARMv8
+ tst r12,#ARMV7_NEON
bne .LNEON
#endif
stmdb sp!,{r0,r1,r2,r4-r11,lr}
@@ -1770,9 +1772,14 @@
moveq pc,lr @ be binary compatible with V4, yet
.word 0xe12fff1e @ interoperable with Thumb ISA:-)
#endif
-#if __ARM_ARCH__>=7
+.size sha256_block_data_order,.-sha256_block_data_order
+#if __ARM_MAX_ARCH__>=7
+.arch armv7-a
.fpu neon
+
+.type sha256_block_data_order_neon,%function
.align 4
+sha256_block_data_order_neon:
.LNEON:
stmdb sp!,{r4-r12,lr}
@@ -2543,10 +2550,146 @@
bne .L_00_48
ldmia sp!,{r4-r12,pc}
+.size sha256_block_data_order_neon,.-sha256_block_data_order_neon
#endif
-.size sha256_block_data_order,.-sha256_block_data_order
-.asciz "SHA256 block transform for ARMv4/NEON, CRYPTOGAMS by <appro@openssl.org>"
-.align 2
-.comm OPENSSL_armcap_P,4,4
+#if __ARM_MAX_ARCH__>=7
+.type sha256_block_data_order_armv8,%function
+.align 5
+sha256_block_data_order_armv8:
+.LARMv8:
+ vld1.32 {q0,q1},[r0]
+ sub r3,r3,#sha256_block_data_order-K256
+.Loop_v8:
+ vld1.8 {q8-q9},[r1]!
+ vld1.8 {q10-q11},[r1]!
+ vld1.32 {q12},[r3]!
+ vrev32.8 q8,q8
+ vrev32.8 q9,q9
+ vrev32.8 q10,q10
+ vrev32.8 q11,q11
+ vmov q14,q0 @ offload
+ vmov q15,q1
+ teq r1,r2
+ vld1.32 {q13},[r3]!
+ vadd.i32 q12,q12,q8
+ .byte 0xe2,0x03,0xfa,0xf3 @ sha256su0 q8,q9
+ vmov q2,q0
+ .byte 0x68,0x0c,0x02,0xf3 @ sha256h q0,q1,q12
+ .byte 0x68,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q12
+ .byte 0xe6,0x0c,0x64,0xf3 @ sha256su1 q8,q10,q11
+ vld1.32 {q12},[r3]!
+ vadd.i32 q13,q13,q9
+ .byte 0xe4,0x23,0xfa,0xf3 @ sha256su0 q9,q10
+ vmov q2,q0
+ .byte 0x6a,0x0c,0x02,0xf3 @ sha256h q0,q1,q13
+ .byte 0x6a,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q13
+ .byte 0xe0,0x2c,0x66,0xf3 @ sha256su1 q9,q11,q8
+ vld1.32 {q13},[r3]!
+ vadd.i32 q12,q12,q10
+ .byte 0xe6,0x43,0xfa,0xf3 @ sha256su0 q10,q11
+ vmov q2,q0
+ .byte 0x68,0x0c,0x02,0xf3 @ sha256h q0,q1,q12
+ .byte 0x68,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q12
+ .byte 0xe2,0x4c,0x60,0xf3 @ sha256su1 q10,q8,q9
+ vld1.32 {q12},[r3]!
+ vadd.i32 q13,q13,q11
+ .byte 0xe0,0x63,0xfa,0xf3 @ sha256su0 q11,q8
+ vmov q2,q0
+ .byte 0x6a,0x0c,0x02,0xf3 @ sha256h q0,q1,q13
+ .byte 0x6a,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q13
+ .byte 0xe4,0x6c,0x62,0xf3 @ sha256su1 q11,q9,q10
+ vld1.32 {q13},[r3]!
+ vadd.i32 q12,q12,q8
+ .byte 0xe2,0x03,0xfa,0xf3 @ sha256su0 q8,q9
+ vmov q2,q0
+ .byte 0x68,0x0c,0x02,0xf3 @ sha256h q0,q1,q12
+ .byte 0x68,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q12
+ .byte 0xe6,0x0c,0x64,0xf3 @ sha256su1 q8,q10,q11
+ vld1.32 {q12},[r3]!
+ vadd.i32 q13,q13,q9
+ .byte 0xe4,0x23,0xfa,0xf3 @ sha256su0 q9,q10
+ vmov q2,q0
+ .byte 0x6a,0x0c,0x02,0xf3 @ sha256h q0,q1,q13
+ .byte 0x6a,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q13
+ .byte 0xe0,0x2c,0x66,0xf3 @ sha256su1 q9,q11,q8
+ vld1.32 {q13},[r3]!
+ vadd.i32 q12,q12,q10
+ .byte 0xe6,0x43,0xfa,0xf3 @ sha256su0 q10,q11
+ vmov q2,q0
+ .byte 0x68,0x0c,0x02,0xf3 @ sha256h q0,q1,q12
+ .byte 0x68,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q12
+ .byte 0xe2,0x4c,0x60,0xf3 @ sha256su1 q10,q8,q9
+ vld1.32 {q12},[r3]!
+ vadd.i32 q13,q13,q11
+ .byte 0xe0,0x63,0xfa,0xf3 @ sha256su0 q11,q8
+ vmov q2,q0
+ .byte 0x6a,0x0c,0x02,0xf3 @ sha256h q0,q1,q13
+ .byte 0x6a,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q13
+ .byte 0xe4,0x6c,0x62,0xf3 @ sha256su1 q11,q9,q10
+ vld1.32 {q13},[r3]!
+ vadd.i32 q12,q12,q8
+ .byte 0xe2,0x03,0xfa,0xf3 @ sha256su0 q8,q9
+ vmov q2,q0
+ .byte 0x68,0x0c,0x02,0xf3 @ sha256h q0,q1,q12
+ .byte 0x68,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q12
+ .byte 0xe6,0x0c,0x64,0xf3 @ sha256su1 q8,q10,q11
+ vld1.32 {q12},[r3]!
+ vadd.i32 q13,q13,q9
+ .byte 0xe4,0x23,0xfa,0xf3 @ sha256su0 q9,q10
+ vmov q2,q0
+ .byte 0x6a,0x0c,0x02,0xf3 @ sha256h q0,q1,q13
+ .byte 0x6a,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q13
+ .byte 0xe0,0x2c,0x66,0xf3 @ sha256su1 q9,q11,q8
+ vld1.32 {q13},[r3]!
+ vadd.i32 q12,q12,q10
+ .byte 0xe6,0x43,0xfa,0xf3 @ sha256su0 q10,q11
+ vmov q2,q0
+ .byte 0x68,0x0c,0x02,0xf3 @ sha256h q0,q1,q12
+ .byte 0x68,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q12
+ .byte 0xe2,0x4c,0x60,0xf3 @ sha256su1 q10,q8,q9
+ vld1.32 {q12},[r3]!
+ vadd.i32 q13,q13,q11
+ .byte 0xe0,0x63,0xfa,0xf3 @ sha256su0 q11,q8
+ vmov q2,q0
+ .byte 0x6a,0x0c,0x02,0xf3 @ sha256h q0,q1,q13
+ .byte 0x6a,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q13
+ .byte 0xe4,0x6c,0x62,0xf3 @ sha256su1 q11,q9,q10
+ vld1.32 {q13},[r3]!
+ vadd.i32 q12,q12,q8
+ vmov q2,q0
+ .byte 0x68,0x0c,0x02,0xf3 @ sha256h q0,q1,q12
+ .byte 0x68,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q12
+
+ vld1.32 {q12},[r3]!
+ vadd.i32 q13,q13,q9
+ vmov q2,q0
+ .byte 0x6a,0x0c,0x02,0xf3 @ sha256h q0,q1,q13
+ .byte 0x6a,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q13
+
+ vld1.32 {q13},[r3]
+ vadd.i32 q12,q12,q10
+ sub r3,r3,#256-16 @ rewind
+ vmov q2,q0
+ .byte 0x68,0x0c,0x02,0xf3 @ sha256h q0,q1,q12
+ .byte 0x68,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q12
+
+ vadd.i32 q13,q13,q11
+ vmov q2,q0
+ .byte 0x6a,0x0c,0x02,0xf3 @ sha256h q0,q1,q13
+ .byte 0x6a,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q13
+
+ vadd.i32 q0,q0,q14
+ vadd.i32 q1,q1,q15
+ bne .Loop_v8
+
+ vst1.32 {q0,q1},[r0]
+
+ bx lr @ bx lr
+.size sha256_block_data_order_armv8,.-sha256_block_data_order_armv8
+#endif
+.asciz "SHA256 block transform for ARMv4/NEON/ARMv8, CRYPTOGAMS by <appro@openssl.org>"
+.align 2
+#if __ARM_MARCH_ARCH__>=7
+.comm OPENSSL_armcap_P,4,4
#endif
diff --git a/third_party/boringssl/linux-arm/crypto/sha/sha512-armv4.S b/third_party/boringssl/linux-arm/crypto/sha/sha512-armv4.S
index 45d8bd5..1889fc7 100644
--- a/third_party/boringssl/linux-arm/crypto/sha/sha512-armv4.S
+++ b/third_party/boringssl/linux-arm/crypto/sha/sha512-armv4.S
@@ -1,4 +1,3 @@
-#if defined(__arm__)
#include "arm_arch.h"
#ifdef __ARMEL__
# define LO 0
@@ -56,17 +55,20 @@
WORD64(0x4cc5d4be,0xcb3e42b6, 0x597f299c,0xfc657e2a)
WORD64(0x5fcb6fab,0x3ad6faec, 0x6c44198c,0x4a475817)
.size K512,.-K512
+#if __ARM_MAX_ARCH__>=7
.LOPENSSL_armcap:
.word OPENSSL_armcap_P-sha512_block_data_order
.skip 32-4
+#else
+.skip 32
+#endif
.global sha512_block_data_order
-.hidden sha512_block_data_order
.type sha512_block_data_order,%function
sha512_block_data_order:
sub r3,pc,#8 @ sha512_block_data_order
add r2,r1,r2,lsl#7 @ len to point at the end of inp
-#if __ARM_ARCH__>=7
+#if __ARM_MAX_ARCH__>=7
ldr r12,.LOPENSSL_armcap
ldr r12,[r3,r12] @ OPENSSL_armcap_P
tst r12,#1
@@ -439,7 +441,8 @@
moveq pc,lr @ be binary compatible with V4, yet
.word 0xe12fff1e @ interoperable with Thumb ISA:-)
#endif
-#if __ARM_ARCH__>=7
+#if __ARM_MAX_ARCH__>=7
+.arch armv7-a
.fpu neon
.align 4
@@ -1762,11 +1765,11 @@
bne .Loop_neon
vldmia sp!,{d8-d15} @ epilogue
- .word 0xe12fff1e
+ bx lr @ .word 0xe12fff1e
#endif
.size sha512_block_data_order,.-sha512_block_data_order
.asciz "SHA512 block transform for ARMv4/NEON, CRYPTOGAMS by <appro@openssl.org>"
.align 2
+#if __ARM_MAX_ARCH__>=7
.comm OPENSSL_armcap_P,4,4
-
#endif
diff --git a/third_party/boringssl/update_gypi_and_asm.py b/third_party/boringssl/update_gypi_and_asm.py
index 751b2db..476e42f 100644
--- a/third_party/boringssl/update_gypi_and_asm.py
+++ b/third_party/boringssl/update_gypi_and_asm.py
@@ -14,6 +14,7 @@
# that platform and the extension used by asm files.
OS_ARCH_COMBOS = [
('linux', 'arm', 'elf', [''], 'S'),
+ ('linux', 'aarch64', 'linux64', [''], 'S'),
('linux', 'x86', 'elf', ['-fPIC'], 'S'),
('linux', 'x86_64', 'elf', [''], 'S'),
('mac', 'x86', 'macosx', ['-fPIC'], 'S'),
@@ -134,15 +135,19 @@
def ArchForAsmFilename(filename):
- """Returns the architecture that a given asm file should be compiled for
+ """Returns the architectures that a given asm file should be compiled for
based on substrings in the filename."""
if 'x86_64' in filename or 'avx2' in filename:
- return 'x86_64'
+ return ['x86_64']
elif ('x86' in filename and 'x86_64' not in filename) or '586' in filename:
- return 'x86'
+ return ['x86']
+ elif 'armx' in filename:
+ return ['arm', 'aarch64']
+ elif 'armv8' in filename:
+ return ['aarch64']
elif 'arm' in filename:
- return 'arm'
+ return ['arm']
else:
raise ValueError('Unknown arch for asm filename: ' + filename)
@@ -165,7 +170,7 @@
output = os.path.join(outDir, output[4:])
output = output.replace('${ASM_EXT}', asm_ext)
- if arch == ArchForAsmFilename(filename):
+ if arch in ArchForAsmFilename(filename):
PerlAsm(output, perlasm['input'], perlasm_style,
perlasm['extra_args'] + extra_args)
asmfiles.setdefault(key, []).append(output)
diff --git a/third_party/mesa/mesa.gyp b/third_party/mesa/mesa.gyp
index 3db0d4c..bf2afcd 100644
--- a/third_party/mesa/mesa.gyp
+++ b/third_party/mesa/mesa.gyp
@@ -682,6 +682,15 @@
'KEYWORD2=GLAPIENTRY',
],
}],
+ ['OS=="linux"', {
+ 'link_settings': {
+ 'libraries': [
+ '-ldl',
+ '-lm',
+ '-lstdc++',
+ ],
+ },
+ }],
],
'include_dirs': [
'src/src/mapi',
diff --git a/third_party/qcms/OWNERS b/third_party/qcms/OWNERS
new file mode 100644
index 0000000..f1e3d4f
--- /dev/null
+++ b/third_party/qcms/OWNERS
@@ -0,0 +1 @@
+noel@chromium.org
diff --git a/third_party/qcms/README.chromium b/third_party/qcms/README.chromium
index 7a7f965..8ad0d7e 100644
--- a/third_party/qcms/README.chromium
+++ b/third_party/qcms/README.chromium
@@ -41,9 +41,11 @@
- https://bugzilla.mozilla.org/show_bug.cgi?id=701348
- Add qcms_profile_match api
- https://code.google.com/p/chromium/issues/detail?id=401971
- - Add qcms_profile_get_decription api
+ - Add qcms_profile_get_description api
- https://code.google.com/p/chromium/issues/detail?id=401971
- - Convert MLUC profile description embedded nulls to '.'
+ - Convert MLUC profile description embedded nulls to '.'
+ - https://code.google.com/p/chromium/issues/detail?id=401971
+ - [APPLE port] Use en-localized profile description names
- https://code.google.com/p/chromium/issues/detail?id=401971
To regenerate google.patch:
git diff b8456f38 src > google.patch
diff --git a/third_party/qcms/src/iccread.c b/third_party/qcms/src/iccread.c
index 7790c07..2e86aa8 100644
--- a/third_party/qcms/src/iccread.c
+++ b/third_party/qcms/src/iccread.c
@@ -403,6 +403,67 @@
return false;
}
+#if defined(__APPLE__)
+
+#define TAG_dscm 0x6473636D // 'dscm'
+
+// Use dscm tag to change profile description "Display" to its more specific en-localized monitor name, if any.
+static bool read_tag_dscmType(qcms_profile *profile, struct mem_source *src, struct tag_index index, uint32_t tag_id)
+{
+ if (strcmp(profile->description, "Display") != 0)
+ return true;
+
+ struct tag *tag = find_tag(index, tag_id);
+ if (tag) {
+ uint32_t offset = tag->offset;
+ uint32_t type = read_u32(src, offset);
+ uint32_t records = read_u32(src, offset+8);
+
+ if (!src->valid || !records || type != MLUC_TYPE)
+ goto invalid_dscm_tag;
+ if (read_u32(src, offset+12) != 12) // MLUC record size: bytes
+ goto invalid_dscm_tag;
+
+ for (uint32_t i = 0; i < records; ++i) {
+ const uint32_t limit = sizeof profile->description;
+ const uint16_t isoen = 0x656E; // ISO-3166-1 language 'en'
+
+ uint16_t language = read_u16(src, offset + 16 + (i * 12) + 0);
+ uint32_t length = read_u32(src, offset + 16 + (i * 12) + 4);
+ uint32_t description_offset = read_u32(src, offset + 16 + (i * 12) + 8);
+
+ if (!src->valid || !length || (length & 1))
+ goto invalid_dscm_tag;
+ if (language != isoen)
+ continue;
+
+ // Use a prefix to identify the display description source
+ strcpy(profile->description, "dscm:");
+ length += 5;
+
+ if (length >= limit)
+ length = limit - 1;
+ for (uint32_t j = 5; j < length; ++j) {
+ uint8_t value = read_u8(src, offset + description_offset + j - 5);
+ if (!src->valid)
+ goto invalid_dscm_tag;
+ profile->description[j] = value ? value : '.';
+ }
+ profile->description[length] = 0;
+ break;
+ }
+ }
+
+ if (src->valid)
+ return true;
+
+invalid_dscm_tag:
+ invalid_source(src, "invalid dscm tag");
+ return false;
+}
+
+#endif // __APPLE__
+
#define XYZ_TYPE 0x58595a20 // 'XYZ '
#define CURVE_TYPE 0x63757276 // 'curv'
#define PARAMETRIC_CURVE_TYPE 0x70617261 // 'para'
@@ -1099,6 +1160,10 @@
if (!read_tag_descType(profile, src, index, TAG_desc))
goto invalid_tag_table;
+#if defined(__APPLE__)
+ if (!read_tag_dscmType(profile, src, index, TAG_dscm))
+ goto invalid_tag_table;
+#endif // __APPLE__
if (find_tag(index, TAG_CHAD)) {
profile->chromaticAdaption = read_tag_s15Fixed16ArrayType(src, index, TAG_CHAD);
diff --git a/tools/android/checkstyle/checkstyle.py b/tools/android/checkstyle/checkstyle.py
index 0c260bb..99a9fc9 100644
--- a/tools/android/checkstyle/checkstyle.py
+++ b/tools/android/checkstyle/checkstyle.py
@@ -16,14 +16,15 @@
'checkstyle-6.1-all.jar')
-def RunCheckstyle(input_api, output_api, style_file):
+def RunCheckstyle(input_api, output_api, style_file, black_list=None):
if not os.path.exists(style_file):
file_error = (' Java checkstyle configuration file is missing: '
+ style_file)
return [output_api.PresubmitError(file_error)]
# Filter out non-Java files and files that were deleted.
- java_files = [x.LocalPath() for x in input_api.AffectedFiles(False, False)
+ java_files = [x.AbsoluteLocalPath() for x in input_api.AffectedSourceFiles(
+ lambda f: input_api.FilterSourceFile(f, black_list=black_list))
if os.path.splitext(x.LocalPath())[1] == '.java']
if not java_files:
return []
@@ -36,7 +37,7 @@
CHECKSTYLE_ROOT,
'com.puppycrawl.tools.checkstyle.Main', '-c',
style_file, '-f', 'xml'] + java_files,
- stdout=subprocess.PIPE, env=checkstyle_env)
+ stdout=subprocess.PIPE, env=checkstyle_env)
stdout, _ = check.communicate()
except OSError as e:
import errno
diff --git a/tools/android/findbugs_plugin/test/expected_result.txt b/tools/android/findbugs_plugin/test/expected_result.txt
deleted file mode 100644
index 076b007..0000000
--- a/tools/android/findbugs_plugin/test/expected_result.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At SimpleSynchronizedMethod.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At SimpleSynchronizedStaticMethod.java
-M C CST: Shouldn't use synchronized(this), please narrow down the synchronization scope. At SimpleSynchronizedThis.java
diff --git a/tools/android/findbugs_plugin/test/run_findbugs_plugin_tests.py b/tools/android/findbugs_plugin/test/run_findbugs_plugin_tests.py
index c2e1531..a570cdb 100755
--- a/tools/android/findbugs_plugin/test/run_findbugs_plugin_tests.py
+++ b/tools/android/findbugs_plugin/test/run_findbugs_plugin_tests.py
@@ -35,9 +35,18 @@
options.known_bugs = os.path.join(constants.DIR_SOURCE_ROOT, 'tools',
'android', 'findbugs_plugin', 'test',
'expected_result.txt')
+
if not options.only_analyze:
options.only_analyze = 'org.chromium.tools.findbugs.plugin.*'
+ # crbug.com/449101
+ # Temporary workaround to have the Android Clang Builder (dbg) bot
+ # pass the findbugs_tests step.
+ if not options.exclude:
+ options.exclude = os.path.join(constants.DIR_SOURCE_ROOT, 'build',
+ 'android', 'findbugs_filter',
+ 'findbugs_exclude.xml')
+
return findbugs.Run(options)
if __name__ == '__main__':
diff --git a/tools/clang/plugins/ChromeClassTester.cpp b/tools/clang/plugins/ChromeClassTester.cpp
index 7e36653..9cbc84a 100644
--- a/tools/clang/plugins/ChromeClassTester.cpp
+++ b/tools/clang/plugins/ChromeClassTester.cpp
@@ -62,15 +62,6 @@
// information instead of just parsing information.
if (CXXRecordDecl* record = dyn_cast<CXXRecordDecl>(tag)) {
- // If this is a POD or a class template or a type dependent on a
- // templated class, assume there's no ctor/dtor/virtual method
- // optimization that we can do.
- if (record->isPOD() ||
- record->getDescribedClassTemplate() ||
- record->getTemplateSpecializationKind() ||
- record->isDependentType())
- return;
-
if (InBannedNamespace(record))
return;
diff --git a/tools/clang/plugins/FindBadConstructsAction.cpp b/tools/clang/plugins/FindBadConstructsAction.cpp
index 7563c21..f302fd1 100644
--- a/tools/clang/plugins/FindBadConstructsAction.cpp
+++ b/tools/clang/plugins/FindBadConstructsAction.cpp
@@ -49,9 +49,6 @@
if (args[i] == "check-base-classes") {
// TODO(rsleevi): Remove this once http://crbug.com/123295 is fixed.
options_.check_base_classes = true;
- } else if (args[i] == "check-weak-ptr-factory-order") {
- // TODO(dmichael): Remove this once http://crbug.com/303818 is fixed.
- options_.check_weak_ptr_factory_order = true;
} else if (args[i] == "check-enum-last-value") {
// TODO(tsepez): Enable this by default once http://crbug.com/356815
// and http://crbug.com/356816 are fixed.
@@ -60,6 +57,8 @@
options_.strict_virtual_specifiers = true;
} else if (args[i] == "with-ast-visitor") {
options_.with_ast_visitor = true;
+ } else if (args[i] == "check-templates") {
+ options_.check_templates = true;
} else {
parsed = false;
llvm::errs() << "Unknown clang plugin argument: " << args[i] << "\n";
diff --git a/tools/clang/plugins/FindBadConstructsConsumer.cpp b/tools/clang/plugins/FindBadConstructsConsumer.cpp
index 4f281f1..46e1df8 100644
--- a/tools/clang/plugins/FindBadConstructsConsumer.cpp
+++ b/tools/clang/plugins/FindBadConstructsConsumer.cpp
@@ -89,6 +89,13 @@
return FixItHint::CreateRemoval(range);
}
+bool IsPodOrTemplateType(const CXXRecordDecl& record) {
+ return record.isPOD() ||
+ record.getDescribedClassTemplate() ||
+ record.getTemplateSpecializationKind() ||
+ record.isDependentType();
+}
+
} // namespace
FindBadConstructsConsumer::FindBadConstructsConsumer(CompilerInstance& instance,
@@ -136,23 +143,38 @@
void FindBadConstructsConsumer::CheckChromeClass(SourceLocation record_location,
CXXRecordDecl* record) {
+ // By default, the clang checker doesn't check some types (templates, etc).
+ // That was only a mistake; once Chromium code passes these checks, we should
+ // remove the "check-templates" option and remove this code.
+ // See crbug.com/441916
+ if (!options_.check_templates && IsPodOrTemplateType(*record))
+ return;
+
bool implementation_file = InImplementationFile(record_location);
if (!implementation_file) {
// Only check for "heavy" constructors/destructors in header files;
// within implementation files, there is no performance cost.
- CheckCtorDtorWeight(record_location, record);
+
+ // If this is a POD or a class template or a type dependent on a
+ // templated class, assume there's no ctor/dtor/virtual method
+ // optimization that we should do.
+ if (!IsPodOrTemplateType(*record))
+ CheckCtorDtorWeight(record_location, record);
}
bool warn_on_inline_bodies = !implementation_file;
-
// Check that all virtual methods are annotated with override or final.
- CheckVirtualMethods(record_location, record, warn_on_inline_bodies);
+ // Note this could also apply to templates, but for some reason Clang
+ // does not always see the "override", so we get false positives.
+ // See http://llvm.org/bugs/show_bug.cgi?id=18440 and
+ // http://llvm.org/bugs/show_bug.cgi?id=21942
+ if (!IsPodOrTemplateType(*record))
+ CheckVirtualMethods(record_location, record, warn_on_inline_bodies);
CheckRefCountedDtors(record_location, record);
- if (options_.check_weak_ptr_factory_order)
- CheckWeakPtrFactoryMembers(record_location, record);
+ CheckWeakPtrFactoryMembers(record_location, record);
}
void FindBadConstructsConsumer::CheckChromeEnum(SourceLocation enum_location,
diff --git a/tools/clang/plugins/Options.h b/tools/clang/plugins/Options.h
index 5611ca8..5ef4977 100644
--- a/tools/clang/plugins/Options.h
+++ b/tools/clang/plugins/Options.h
@@ -10,16 +10,16 @@
struct Options {
Options()
: check_base_classes(false),
- check_weak_ptr_factory_order(false),
check_enum_last_value(false),
strict_virtual_specifiers(false),
- with_ast_visitor(false) {}
+ with_ast_visitor(false),
+ check_templates(false) {}
bool check_base_classes;
- bool check_weak_ptr_factory_order;
bool check_enum_last_value;
bool strict_virtual_specifiers;
bool with_ast_visitor;
+ bool check_templates;
};
} // namespace chrome_checker
diff --git a/tools/clang/plugins/tests/weak_ptr_factory.cpp b/tools/clang/plugins/tests/weak_ptr_factory.cpp
index 50de97c..e9e6dd5 100644
--- a/tools/clang/plugins/tests/weak_ptr_factory.cpp
+++ b/tools/clang/plugins/tests/weak_ptr_factory.cpp
@@ -35,6 +35,17 @@
base::WeakPtrFactory<TwoFactories> factory2_;
};
+template <class T>
+class ClassTemplate {
+ public:
+ ClassTemplate() : factory_(this) {}
+ private:
+ bool bool_member_;
+ base::WeakPtrFactory<ClassTemplate> factory_;
+};
+// Make sure the template gets instantiated:
+ClassTemplate<int> g_instance;
+
} // namespace should_succeed
namespace should_fail {
@@ -57,6 +68,17 @@
base::WeakPtrFactory<TwoFactoriesOneBad> factory2_;
};
+template <class T>
+class ClassTemplate {
+ public:
+ ClassTemplate() : factory_(this) {}
+ private:
+ base::WeakPtrFactory<ClassTemplate> factory_;
+ bool bool_member_;
+};
+// Make sure the template gets instantiated:
+ClassTemplate<int> g_instance;
+
} // namespace should_fail
int main() {
diff --git a/tools/clang/plugins/tests/weak_ptr_factory.flags b/tools/clang/plugins/tests/weak_ptr_factory.flags
index e865249..7d9476e 100644
--- a/tools/clang/plugins/tests/weak_ptr_factory.flags
+++ b/tools/clang/plugins/tests/weak_ptr_factory.flags
@@ -1 +1 @@
--Xclang -plugin-arg-find-bad-constructs -Xclang check-weak-ptr-factory-order
+-Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang check-weak-ptr-factory-order
diff --git a/tools/clang/plugins/tests/weak_ptr_factory.txt b/tools/clang/plugins/tests/weak_ptr_factory.txt
index 820b7db..53bfd58 100644
--- a/tools/clang/plugins/tests/weak_ptr_factory.txt
+++ b/tools/clang/plugins/tests/weak_ptr_factory.txt
@@ -1,10 +1,13 @@
-weak_ptr_factory.cpp:43:38: warning: [chromium-style] WeakPtrFactory members which refer to their outer class must be the last member in the outer class definition.
+weak_ptr_factory.cpp:54:38: warning: [chromium-style] WeakPtrFactory members which refer to their outer class must be the last member in the outer class definition.
base::WeakPtrFactory<FactoryFirst> factory_;
^
-weak_ptr_factory.cpp:49:39: warning: [chromium-style] WeakPtrFactory members which refer to their outer class must be the last member in the outer class definition.
+weak_ptr_factory.cpp:60:39: warning: [chromium-style] WeakPtrFactory members which refer to their outer class must be the last member in the outer class definition.
base::WeakPtrFactory<FactoryMiddle> factory_;
^
-weak_ptr_factory.cpp:55:44: warning: [chromium-style] WeakPtrFactory members which refer to their outer class must be the last member in the outer class definition.
+weak_ptr_factory.cpp:66:44: warning: [chromium-style] WeakPtrFactory members which refer to their outer class must be the last member in the outer class definition.
base::WeakPtrFactory<TwoFactoriesOneBad> factory1_;
^
-3 warnings generated.
+weak_ptr_factory.cpp:76:39: warning: [chromium-style] WeakPtrFactory members which refer to their outer class must be the last member in the outer class definition.
+ base::WeakPtrFactory<ClassTemplate> factory_;
+ ^
+4 warnings generated.
diff --git a/tools/clang/scripts/plugin_flags.sh b/tools/clang/scripts/plugin_flags.sh
index 41c25c8..76a82c5 100755
--- a/tools/clang/scripts/plugin_flags.sh
+++ b/tools/clang/scripts/plugin_flags.sh
@@ -17,4 +17,5 @@
fi
echo -Xclang -load -Xclang $CLANG_LIB_PATH/libFindBadConstructs.$LIBSUFFIX \
- -Xclang -add-plugin -Xclang find-bad-constructs
+ -Xclang -add-plugin -Xclang find-bad-constructs -Xclang \
+ -plugin-arg-find-bad-constructs -Xclang check-weak-ptr-factory-order
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index 8502b1c..118df42 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -24,7 +24,7 @@
# in bringup. Use a pinned revision to make it slightly more stable.
if (re.search(r'\b(asan)=1', os.environ.get('GYP_DEFINES', '')) and
not 'LLVM_FORCE_HEAD_REVISION' in os.environ):
- LLVM_WIN_REVISION = '225621'
+ LLVM_WIN_REVISION = '226270'
# Path constants. (All of these should be absolute paths.)
THIS_DIR = os.path.abspath(os.path.dirname(__file__))
@@ -37,6 +37,7 @@
LLD_DIR = os.path.join(LLVM_DIR, 'tools', 'lld')
COMPILER_RT_DIR = os.path.join(LLVM_DIR, 'projects', 'compiler-rt')
STAMP_FILE = os.path.join(LLVM_BUILD_DIR, 'cr_build_revision')
+VERSION = '3.7.0'
LLVM_REPO_URL='https://llvm.org/svn/llvm-project'
if 'LLVM_REPO_URL' in os.environ:
@@ -218,18 +219,11 @@
# TODO(hans): Make this (and the .gypi file) version number independent.
asan_rt_lib_src_dir = os.path.join(COMPILER_RT_BUILD_DIR, 'lib', 'clang',
- '3.6.0', 'lib', 'windows')
+ VERSION, 'lib', 'windows')
asan_rt_lib_dst_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang',
- '3.6.0', 'lib', 'windows')
+ VERSION, 'lib', 'windows')
CopyDirectoryContents(asan_rt_lib_src_dir, asan_rt_lib_dst_dir,
r'^.*-i386\.lib$')
-
- # TODO(hans): Remove when LLVM_WIN_REVISION is updated.
- # Old versions of compiler-rt will leave the asan dll in bin/
- asan_rt_bin_src_dir = os.path.join(COMPILER_RT_BUILD_DIR, 'bin')
- CopyDirectoryContents(asan_rt_bin_src_dir, asan_rt_lib_dst_dir,
- r'^.*-i386\.dll$')
-
CopyDirectoryContents(asan_rt_lib_src_dir, asan_rt_lib_dst_dir,
r'^.*-i386\.dll$')
@@ -238,10 +232,10 @@
# Make an extra copy of the sanitizer headers, to be put on the include path
# of the fallback compiler.
- sanitizer_include_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang', '3.6.0',
+ sanitizer_include_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang', VERSION,
'include', 'sanitizer')
aux_sanitizer_include_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang',
- '3.6.0', 'include_sanitizer',
+ VERSION, 'include_sanitizer',
'sanitizer')
if not os.path.exists(aux_sanitizer_include_dir):
os.makedirs(aux_sanitizer_include_dir)
diff --git a/tools/clang/translation_unit/TranslationUnitGenerator.cpp b/tools/clang/translation_unit/TranslationUnitGenerator.cpp
index df9eaeb..5db8d64 100644
--- a/tools/clang/translation_unit/TranslationUnitGenerator.cpp
+++ b/tools/clang/translation_unit/TranslationUnitGenerator.cpp
@@ -18,6 +18,7 @@
#include <string>
#include <vector>
+#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Frontend/CompilerInstance.h"
@@ -136,7 +137,13 @@
// file, and append the relative path.
last_inclusion_directive_ = parent + "/" + relative_path.str();
} else if (!search_path.empty()) {
- last_inclusion_directive_ = string(search_path) + "/" + relative_path.str();
+ // We want to be able to extract the search path relative to which the
+ // include statement is defined. Therefore if search_path is an absolute
+ // path (indicating it is most likely a system header) we use "//" as a
+ // separator between the search path and the relative path.
+ last_inclusion_directive_ = search_path.str() +
+ (llvm::sys::path::is_absolute(search_path) ? "//" : "/") +
+ relative_path.str();
} else {
last_inclusion_directive_ = file_name.str();
}
@@ -184,7 +191,7 @@
&getCompilerInstance().getSourceManager(),
&main_source_file_,
&source_file_paths_));
- preprocessor.IgnorePragmas();
+ preprocessor.getDiagnostics().setIgnoreAllWarnings(true);
preprocessor.SetSuppressIncludeNotFoundError(true);
preprocessor.EnterMainSourceFile();
clang::Token token;
diff --git a/tools/clang/translation_unit/test_files/test.cc b/tools/clang/translation_unit/test_files/test.cc
index e735f55..1ddc520 100644
--- a/tools/clang/translation_unit/test_files/test.cc
+++ b/tools/clang/translation_unit/test_files/test.cc
@@ -4,6 +4,8 @@
#include "test.h"
+#include <bits/wchar.h>
+
#include "binomial.h"
// Notice that "binomial.h" is included both here and in the "test.h" file.
diff --git a/tools/clang/translation_unit/test_files/test.cc.filepaths.expected b/tools/clang/translation_unit/test_files/test.cc.filepaths.expected
index 3dc4421..5933c1f 100644
--- a/tools/clang/translation_unit/test_files/test.cc.filepaths.expected
+++ b/tools/clang/translation_unit/test_files/test.cc.filepaths.expected
@@ -1,3 +1,4 @@
+bits/wchar.h
./binomial.h
./test.cc
./test.h
diff --git a/tools/clang/translation_unit/test_translation_unit.py b/tools/clang/translation_unit/test_translation_unit.py
index eb5cce8..a8e8f68 100755
--- a/tools/clang/translation_unit/test_translation_unit.py
+++ b/tools/clang/translation_unit/test_translation_unit.py
@@ -68,9 +68,16 @@
actual_output = f.readlines()
has_same_filepaths = True
for expected_line, actual_line in zip(expected_output, actual_output):
+ if '//' in actual_output:
+ if actual_output.split('//')[1] != expected_output:
+ sys.stdout.write('expected: %s' % expected_output)
+ sys.stdout.write('actual: %s' % actual_output.split('//')[1])
+ break
+ else:
+ continue
if ntpath.basename(expected_line) != ntpath.basename(actual_line):
- sys.stdout.write(ntpath.basename(expected_line))
- sys.stdout.write(ntpath.basename(actual_line))
+ sys.stdout.write('expected: %s' % ntpath.basename(expected_line))
+ sys.stdout.write('actual: %s' % ntpath.basename(actual_line))
has_same_filepaths = False
break
if not has_same_filepaths:
diff --git a/tools/gdb/gdb_chrome.py b/tools/gdb/gdb_chrome.py
index 2d2bfa6..2ba7ce8 100644
--- a/tools/gdb/gdb_chrome.py
+++ b/tools/gdb/gdb_chrome.py
@@ -283,9 +283,6 @@
yield ('browsing_instance_', self.val['browsing_instance_']['ptr_'])
if self.val['process_']:
yield ('process_', typed_ptr(self.val['process_']))
- if self.val['render_process_host_factory_']:
- yield ('render_process_host_factory_',
- self.val['render_process_host_factory_'])
pp_set.add_printer('content::SiteInstanceImpl', '^content::SiteInstanceImpl$',
SiteInstanceImplPrinter)
diff --git a/tools/gritsettings/resource_ids b/tools/gritsettings/resource_ids
index 31e33d4..efd5760 100644
--- a/tools/gritsettings/resource_ids
+++ b/tools/gritsettings/resource_ids
@@ -248,6 +248,7 @@
"android_webview/java/strings/android_webview_strings.grd": {},
"chrome/android/java/strings/android_chrome_strings.grd": {},
"content/public/android/java/strings/android_content_strings.grd": {},
+ "ui/accessibility/extensions/strings/accessibility_extensions_strings.grd": {},
"ui/android/java/strings/android_ui_strings.grd": {},
# Resource ids starting at 31000 are reserved for projects built on Chromium.
diff --git a/tools/idl_parser/idl_parser.py b/tools/idl_parser/idl_parser.py
index af0bd05..0fa9b61 100755
--- a/tools/idl_parser/idl_parser.py
+++ b/tools/idl_parser/idl_parser.py
@@ -324,8 +324,12 @@
# [17]
def p_DefaultValue(self, p):
"""DefaultValue : ConstValue
- | string"""
- if type(p[1]) == str:
+ | string
+ | '[' ']'"""
+ if len(p) == 3:
+ p[0] = ListFromConcat(self.BuildAttribute('TYPE', 'sequence'),
+ self.BuildAttribute('VALUE', '[]'))
+ elif type(p[1]) == str:
p[0] = ListFromConcat(self.BuildAttribute('TYPE', 'DOMString'),
self.BuildAttribute('NAME', p[1]))
else:
diff --git a/tools/idl_parser/test_parser/interface_web.idl b/tools/idl_parser/test_parser/interface_web.idl
index e42075b..cff2cd0 100644
--- a/tools/idl_parser/test_parser/interface_web.idl
+++ b/tools/idl_parser/test_parser/interface_web.idl
@@ -75,6 +75,23 @@
};
/* TREE
+ *Interface(MyIfaceEmptySequenceDefalutValue)
+ * Operation(foo)
+ * Arguments()
+ * Argument(arg)
+ * Type()
+ * Sequence()
+ * Type()
+ * PrimitiveType(DOMString)
+ * Default()
+ * Type()
+ * PrimitiveType(void)
+ */
+interface MyIfaceEmptySequenceDefalutValue {
+ void foo(optional sequence<DOMString> arg = []);
+};
+
+/* TREE
*Interface(MyIFaceBig2)
* Const(nullValue)
* PrimitiveType(DOMString)
diff --git a/tools/relocation_packer/BUILD.gn b/tools/relocation_packer/BUILD.gn
index cbbc6fd..0b29c91 100644
--- a/tools/relocation_packer/BUILD.gn
+++ b/tools/relocation_packer/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("config.gni")
+import("//testing/test.gni")
assert(relocation_packing_supported)
diff --git a/tools/valgrind/asan/asan_symbolize.py b/tools/valgrind/asan/asan_symbolize.py
index 9e7d504..cd61dae 100755
--- a/tools/valgrind/asan/asan_symbolize.py
+++ b/tools/valgrind/asan/asan_symbolize.py
@@ -6,6 +6,9 @@
from third_party import asan_symbolize
+import argparse
+import base64
+import json
import os
import sys
@@ -90,14 +93,96 @@
return [result]
+# We want our output to match base::EscapeJSONString(), which produces
+# doubly-escaped strings. The first escaping pass is handled by this class. The
+# second pass happens when JSON data is dumped to file.
+class StringEncoder(json.JSONEncoder):
+ def __init__(self):
+ json.JSONEncoder.__init__(self)
+
+ def encode(self, s):
+ assert(isinstance(s, basestring))
+ encoded = json.JSONEncoder.encode(self, s)
+ assert(len(encoded) >= 2)
+ assert(encoded[0] == '"')
+ assert(encoded[-1] == '"')
+ encoded = encoded[1:-1]
+ # Special case from base::EscapeJSONString().
+ encoded = encoded.replace('<', '\u003C')
+ return encoded
+
+
+class JSONTestRunSymbolizer(object):
+ def __init__(self, symbolization_loop):
+ self.string_encoder = StringEncoder()
+ self.symbolization_loop = symbolization_loop
+
+ def symbolize_snippet(self, snippet):
+ symbolized_lines = []
+ for line in snippet.split('\n'):
+ symbolized_lines += self.symbolization_loop.process_line(line)
+ return '\n'.join(symbolized_lines)
+
+ def symbolize(self, test_run):
+ original_snippet = base64.b64decode(test_run['output_snippet_base64'])
+ symbolized_snippet = self.symbolize_snippet(original_snippet)
+ if symbolized_snippet == original_snippet:
+ # No sanitizer reports in snippet.
+ return
+
+ test_run['original_output_snippet'] = test_run['output_snippet']
+ test_run['original_output_snippet_base64'] = \
+ test_run['output_snippet_base64']
+
+ escaped_snippet = StringEncoder().encode(symbolized_snippet)
+ test_run['output_snippet'] = escaped_snippet
+ test_run['output_snippet_base64'] = \
+ base64.b64encode(symbolized_snippet)
+ test_run['snippet_processed_by'] = 'asan_symbolize.py'
+ # Originally, "lossless" refers to "no Unicode data lost while encoding the
+ # string". However, since we're applying another kind of transformation
+ # (symbolization), it doesn't seem right to consider the snippet lossless.
+ test_run['losless_snippet'] = False
+
+
+def symbolize_snippets_in_json(filename, symbolization_loop):
+ with open(filename, 'r') as f:
+ json_data = json.load(f)
+
+ test_run_symbolizer = JSONTestRunSymbolizer(symbolization_loop)
+ for iteration_data in json_data['per_iteration_data']:
+ for test_name, test_runs in iteration_data.iteritems():
+ for test_run in test_runs:
+ test_run_symbolizer.symbolize(test_run)
+
+ with open(filename, 'w') as f:
+ json.dump(json_data, f, indent=3, sort_keys=True)
+
+
def main():
+ parser = argparse.ArgumentParser(description='Symbolize sanitizer reports.')
+ parser.add_argument('--test-summary-json-file',
+ help='Path to a JSON file produced by the test launcher. The script will '
+ 'ignore stdandard input and instead symbolize the output stnippets '
+ 'inside the JSON file. The result will be written back to the JSON '
+ 'file.')
+ parser.add_argument('strip_path_prefix', nargs='*',
+ help='When printing source file names, the longest prefix ending in one '
+ 'of these substrings will be stripped. E.g.: "Release/../../".')
+ args = parser.parse_args()
+
disable_buffering()
set_symbolizer_path()
asan_symbolize.demangle = True
- asan_symbolize.fix_filename_patterns = sys.argv[1:]
- asan_symbolize.logfile = sys.stdin
+ asan_symbolize.fix_filename_patterns = args.strip_path_prefix
loop = asan_symbolize.SymbolizationLoop(dsym_hint_producer=chrome_dsym_hints)
- loop.process_logfile()
+
+ if args.test_summary_json_file:
+ symbolize_snippets_in_json(args.test_summary_json_file, loop)
+ else:
+ # Process stdin.
+ asan_symbolize.logfile = sys.stdin
+ loop.process_logfile()
if __name__ == '__main__':
main()
diff --git a/tools/valgrind/drmemory/suppressions.txt b/tools/valgrind/drmemory/suppressions.txt
index 3b1eaad..f9a0d36 100644
--- a/tools/valgrind/drmemory/suppressions.txt
+++ b/tools/valgrind/drmemory/suppressions.txt
@@ -705,19 +705,14 @@
base.dll!scoped_refptr<>::Release
base.dll!base::internal::CallbackBase::~CallbackBase
-UNADDRESSABLE ACCESS
-name=https://crbug.com/447788
+HANDLE LEAK
+name=http://crbug.com/449989
+system call NtOpenProcess
+KERNELBASE.dll!OpenProcess
+base.dll!base::Process::OpenWithExtraPriviles
+content.dll!content::BrowserMessageFilter::Internal::OnChannelConnected
...
-*!gpu::gles2::GLES2ImplementationTest_TexImage3DSingleCommand_Test::TestBody
-
-UNADDRESSABLE ACCESS
-name=https://crbug.com/448189
-aura.dll!aura::GetDeviceScaleFactorFromDisplay
-aura.dll!aura::WindowTreeHost::InitCompositor
-aura.dll!aura::WindowTreeHost::InitHost
-ash.dll!ash::DisplayController::AddWindowTreeHostForDisplay
-ash.dll!ash::DisplayController::CreatePrimaryHost
-ash.dll!ash::Shell::Init
-ash.dll!ash::Shell::CreateInstance
-*!ash::test::AshTestHelper::SetUp
-*!ash::test::AshTestBase::SetUp
+ipc.dll!IPC::ChannelWin::HandleInternalMessage
+ipc.dll!IPC::internal::ChannelReader::DispatchInputData
+ipc.dll!IPC::internal::ChannelReader::AsyncReadComplete
+ipc.dll!IPC::ChannelWin::OnIOCompleted
diff --git a/tools/valgrind/drmemory/suppressions_full.txt b/tools/valgrind/drmemory/suppressions_full.txt
index f9d510a..a0da41c 100644
--- a/tools/valgrind/drmemory/suppressions_full.txt
+++ b/tools/valgrind/drmemory/suppressions_full.txt
@@ -1889,7 +1889,3 @@
*!ash::test::ShelfViewTest_OverflowBubbleSize_Test::TestBody
*!testing::internal::HandleExceptionsInMethodIfSupported<>
-UNINITIALIZED READ
-name=bug_447788
-...
-*!gpu::gles2::GLES2ImplementationTest_TexImage3DSingleCommand_Test::TestBody
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 425b359..31474ef 100644
--- a/tools/valgrind/gtest_exclude/browser_tests.gtest-drmemory_win32.txt
+++ b/tools/valgrind/gtest_exclude/browser_tests.gtest-drmemory_win32.txt
@@ -6,6 +6,9 @@
# test case if any of its tests failed.
*FLAKY*
+# http://crbug.com/450221
+ProfileChooserViewExtensionsTest.LockProfileNoBlockOtherProfileExtensions
+
# 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 bdc0e84..2a84488 100644
--- a/tools/valgrind/gtest_exclude/cc_unittests.gtest-drmemory_win32.txt
+++ b/tools/valgrind/gtest_exclude/cc_unittests.gtest-drmemory_win32.txt
@@ -26,3 +26,6 @@
PixelResourceTest/LayerTreeHostMasksPixelTest.MaskOfReplica/6
PixelResourceTest/LayerTreeHostMasksPixelTest.MaskOfReplicaOfClippedLayer/5
PixelResourceTest/LayerTreeHostMasksPixelTest.MaskOfReplicaOfClippedLayer/6
+
+# http://crbug.com/450216
+LayerTreeHostAnimationTestScrollOffsetAnimationRemoval.*_ImplSidePaint
diff --git a/tools/valgrind/gtest_exclude/content_browsertests.gtest-drmemory_win32.txt b/tools/valgrind/gtest_exclude/content_browsertests.gtest-drmemory_win32.txt
index fc6ee7f..664400d 100644
--- a/tools/valgrind/gtest_exclude/content_browsertests.gtest-drmemory_win32.txt
+++ b/tools/valgrind/gtest_exclude/content_browsertests.gtest-drmemory_win32.txt
@@ -1,6 +1,12 @@
# crbug.com/389132
WebRtcAecDumpBrowserTest.*WithAecDump*
+# crbug.com/448876
+ScreenOrientationBrowserTest.LockSmoke
+
+# crbug.com/450217
+DumpAccessibilityTreeTest.AccessibilityIframeCoordinates
+
# https://github.com/DynamoRIO/drmemory/issues/1528
# Un-analyzed test failures:
DeviceInertialSensorBrowserTest.MotionNullTestWithAlert
diff --git a/tools/valgrind/gtest_exclude/content_unittests.gtest.txt b/tools/valgrind/gtest_exclude/content_unittests.gtest.txt
index 3376b22..b55b8ac 100644
--- a/tools/valgrind/gtest_exclude/content_unittests.gtest.txt
+++ b/tools/valgrind/gtest_exclude/content_unittests.gtest.txt
@@ -10,3 +10,6 @@
# http://crbug.com/430391
WebDataConsumerHandleImplTest.*
+
+# https://crbug.com/449103
+WebInputEventAuraTest.TestMakeWebKeyboardEventWindowsKeyCode
diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt
index 0637422..9ce34df 100644
--- a/tools/valgrind/memcheck/suppressions.txt
+++ b/tools/valgrind/memcheck/suppressions.txt
@@ -2768,7 +2768,7 @@
bug_369843
Memcheck:Leak
fun:_Znw*
- fun:_ZN7content27ServiceWorkerContextWrapper12InitInternalERKN4base8FilePathEPNS1_19SequencedTaskRunnerEPN5quota17QuotaManagerProxyE
+ fun:_ZN7content27ServiceWorkerContextWrapper12InitInternalE*
}
{
bug_371844
@@ -2836,12 +2836,6 @@
fun:_ZN7content5Shell7LoadURLERK4GURL
}
{
- bug_372832
- Memcheck:Leak
- fun:_Znw*
- fun:_ZN7content27ServiceWorkerContextWrapper12InitInternalERKN4base8FilePathEPNS1_19SequencedTaskRunnerEPNS1_16MessageLoopProxyEPN5quota17QuotaManagerProxyE
-}
-{
bug_379943
Memcheck:Leak
fun:_Znw*
@@ -3298,12 +3292,12 @@
fun:_ZNK5blink6MemberINS_38PlatformSpeechSynthesisUtteranceClientEEcvPS1_Ev
fun:_ZNK5blink32PlatformSpeechSynthesisUtterance6clientEv
fun:_ZN5blink15SpeechSynthesis17didFinishSpeakingEPNS_32PlatformSpeechSynthesisUtteranceE
+ ...
fun:_ZN5blink29PlatformSpeechSynthesizerMock16speakingFinishedEPNS_5TimerIS0_EE
fun:_ZN5blink5TimerINS_29PlatformSpeechSynthesizerMockEE5firedEv
fun:_ZN5blink12ThreadTimers24sharedTimerFiredInternalEv
fun:_ZN5blink12ThreadTimers16sharedTimerFiredEv
- fun:_ZN5blink9Scheduler15tickSharedTimerEv
- fun:_ZN5blink9Scheduler18sharedTimerAdapterEv
+ ...
fun:_ZN7content17BlinkPlatformImpl9DoTimeoutEv
}
{
@@ -3525,8 +3519,105 @@
fun:avcodec_decode_*
}
{
- bug_447788
- Memcheck:Unaddressable
+ bug_448700_a
+ Memcheck:Leak
+ fun:_Znw*
...
- fun:_ZN3gpu5gles252GLES2ImplementationTest_TexImage3DSingleCommand_Test8TestBodyEv
+ fun:_ZN10extensions11ApiTestBase15RegisterModulesEv
+ fun:_ZN10extensions11ApiTestBase5SetUpEv
+}
+{
+ bug_448700_b
+ Memcheck:Leak
+ fun:_Znw*
+ ...
+ fun:_ZN10extensions12_GLOBAL__N_111TestNatives24GetObjectTemplateBuilderEPN2v87IsolateE
+ fun:_ZN3gin13WrappableBase14GetWrapperImplEPN2v87IsolateEPNS_11WrapperInfoE
+ fun:_ZN3gin9WrappableIN10extensions12_GLOBAL__N_111TestNativesEE10GetWrapperEPN2v87IsolateE
+ fun:_ZN3gin12CreateHandleIN10extensions12_GLOBAL__N_111TestNativesEEENS_6HandleIT_EEPN2v87IsolateEPS5_
+ fun:_ZN10extensions12_GLOBAL__N_111TestNatives6CreateEPN2v87IsolateERKN4base8CallbackIFvvEEE
+ fun:_ZN10extensions11ApiTestBase7RunTestERKSsS2_
+ fun:_ZN10extensions30MojoPrivateApiTest_Define_Test8TestBodyEv
+}
+{
+ bug_449156_a
+ Memcheck:Leak
+ fun:_Znw*
+ ...
+ fun:_ZN7leveldb2DB4OpenERKNS_7OptionsERKSsPPS0_
+ fun:_ZN7storage21SandboxOriginDatabase4InitENS0_10InitOptionENS0_14RecoveryOptionE
+ fun:_ZN7storage21SandboxOriginDatabase16GetPathForOriginERKSsPN4base8FilePathE
+ fun:_ZN7storage32SandboxPrioritizedOriginDatabase16GetPathForOriginERKSsPN4base8FilePathE
+ fun:_ZN7storage18ObfuscatedFileUtil21GetDirectoryForOriginERK4GURLbPN4base4File5ErrorE
+ fun:_ZN7storage18ObfuscatedFileUtil28GetDirectoryForOriginAndTypeERK4GURLRKSsbPN4base4File5ErrorE
+ fun:_ZN7storage12_GLOBAL__N_130OpenFileSystemOnFileTaskRunnerEPNS_18ObfuscatedFileUtilERK4GURLNS_14FileSystemTypeENS_18OpenFileSystemModeEPN4base4File5ErrorE
+}
+{
+ bug_449156_b
+ Memcheck:Leak
+ fun:_Znw*
+ fun:_ZN7storage18ObfuscatedFileUtil8MarkUsedEv
+ fun:_ZN7storage18ObfuscatedFileUtil20GetDirectoryDatabaseERKNS_13FileSystemURLEb
+}
+{
+ bug_449175_a
+ Memcheck:Leak
+ fun:_Zna*
+ fun:_ZN4mojo6system17UserPointerReaderIKjE4InitEPS2_mb
+ fun:_ZN4mojo6system17UserPointerReaderIKjEC2ENS0_11UserPointerIS2_EEm
+ fun:_ZN4mojo6system4Core8WaitManyENS0_11UserPointerIKjEES4_jmNS2_IjEENS2_I22MojoHandleSignalsStateEE
+ fun:MojoWaitMany
+ fun:_ZN4mojo8WaitManyI*
+ fun:_ZN4mojo6common15MessagePumpMojo14DoInternalWorkERKNS1_8RunStateEb
+ fun:_ZN4mojo6common15MessagePumpMojo9DoRunLoopEPNS1_8RunStateEPN4base11MessagePump8DelegateE
+ fun:_ZN4mojo6common15MessagePumpMojo3RunEPN4base11MessagePump8DelegateE
+ fun:_ZN4base11MessageLoop10RunHandlerEv
+ fun:_ZN4base7RunLoop3RunEv
+ fun:_ZN4base11MessageLoop3RunEv
+ fun:_ZN4base6Thread3RunEPNS_11MessageLoopE
+ fun:_ZN4base6Thread10ThreadMainEv
+ fun:_ZN4base12_GLOBAL__N_110ThreadFuncEPv
+}
+{
+ bug_449175_b
+ Memcheck:Leak
+ fun:calloc
+ fun:pthread_setspecific
+ fun:_ZN4base8internal19ThreadLocalPlatform14SetValueInSlotEjPv
+ fun:_ZN4base18ThreadLocalPointerIN4mojo6common15MessagePumpMojoEE3SetEPS3_
+ fun:_ZN4mojo6common15MessagePumpMojoC1Ev
+ fun:_ZN4mojo6common15MessagePumpMojo6CreateEv
+}
+{
+ bug_449551
+ Memcheck:Leak
+ fun:_Znw*
+ ...
+ fun:_ZN8app_list4test17SearchHistoryTest5SetUpEv
+}
+{
+ bug_450226
+ Memcheck:Leak
+ fun:_Znw*
+ ...
+ fun:_ZN7content19VideoCaptureManager16QueueStartDeviceEiPNS0_11DeviceEntryERKN5media18VideoCaptureParamsE
+ fun:_ZN7content19VideoCaptureManager21StartCaptureForClientEiRKN5media18VideoCaptureParamsEiNS_24VideoCaptureControllerIDEPNS_34VideoCaptureControllerEventHandlerERKN4base8CallbackIFvRKNS8_7WeakPtrINS_22VideoCaptureControllerEEEEEE
+ fun:_ZN7content16VideoCaptureHost14OnStartCaptureEiiRKN5media18VideoCaptureParamsE
+ fun:_ZN7content20VideoCaptureHostTest16StartStopCaptureEv
+ fun:_ZN7content47VideoCaptureHostTest_StopWhileStartPending_Test8TestBodyEv
+}
+{
+ bug_450228
+ Memcheck:Leak
+ fun:_Znw*
+ fun:_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKi10linked_ptrIN4base19SequencedWorkerPool6WorkerEEEEE8allocateEmPKv
+ fun:_ZNSt8_Rb_treeIiSt4pairIKi10linked_ptrIN4base19SequencedWorkerPool6WorkerEEESt10_Select1stIS7_ESt4lessIiESaIS7_EE11_M_get_nodeEv
+ fun:_ZNSt8_Rb_treeIiSt4pairIKi10linked_ptrIN4base19SequencedWorkerPool6WorkerEEESt10_Select1stIS7_ESt4lessIiESaIS7_EE14_M_create_nodeIJS0_IiS6_EEEEPSt13_Rb_tree_nodeIS7_EDpOT_
+ fun:_ZNSt8_Rb_treeIiSt4pairIKi10linked_ptrIN4base19SequencedWorkerPool6WorkerEEESt10_Select1stIS7_ESt4lessIiESaIS7_EE10_M_insert_IS0_IiS6_EEESt17_Rb_tree_iteratorIS7_EPKSt18_Rb_tree_node_baseSK_OT_
+ fun:_ZNSt8_Rb_treeIiSt4pairIKi10linked_ptrIN4base19SequencedWorkerPool6WorkerEEESt10_Select1stIS7_ESt4lessIiESaIS7_EE16_M_insert_uniqueIS0_IiS6_EEES0_ISt17_Rb_tree_iteratorIS7_EbEOT_
+ fun:_ZNSt3mapIi10linked_ptrIN4base19SequencedWorkerPool6WorkerEESt4lessIiESaISt4pairIKiS4_EEE6insertIS7_IiS4_EvEES7_ISt17_Rb_tree_iteratorIS9_EbEOT_
+ fun:_ZN4base19SequencedWorkerPool5Inner10ThreadLoopEPNS0_6WorkerE
+ fun:_ZN4base19SequencedWorkerPool6Worker3RunEv
+ fun:_ZN4base12SimpleThread10ThreadMainEv
+ fun:_ZN4base12_GLOBAL__N_110ThreadFuncEPv
}
diff --git a/tools/valgrind/memcheck/suppressions_mac.txt b/tools/valgrind/memcheck/suppressions_mac.txt
index dc9850b..2d484d0 100644
--- a/tools/valgrind/memcheck/suppressions_mac.txt
+++ b/tools/valgrind/memcheck/suppressions_mac.txt
@@ -23,7 +23,7 @@
bug_9351
Memcheck:Leak
...
- fun:_ZN12HALCADClient19AddPropertyListenerEmPK26AudioObjectPropertyAddressPFlmmS2_PvES3_
+ fun:_ZN12HALCADClient19AddPropertyListenerE*26AudioObjectPropertyAddressP*
...
fun:_ZN9HALSystem16CheckOutInstanceEv
...
@@ -105,6 +105,30 @@
fun:CoreCursorSet
fun:-[NSCursor set]
}
+{
+ bug_379331
+ Memcheck:Uninitialized
+ fun:x_zone_size
+ fun:find_registered_purgeable_zone
+ fun:malloc_make_purgeable
+ ...
+ fun:setCursorFromBundle
+ fun:CoreCursorSet
+ fun:-[NSCursor set]
+ fun:_ZN12_GLOBAL__N_116ForceSystemLeaksEv
+}
+{
+ FIXME initImagePng leaks from an unknown module
+ Memcheck:Leak
+ fun:malloc_zone_malloc
+ fun:_CFRuntimeCreateInstance
+ fun:CFNumberCreate
+ fun:get_colorspace
+ fun:initImagePng
+ obj:*
+ obj:/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
+ obj:/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
+}
# 2. Intentional unit test errors, stuff that is somehow a false positive
# in our own code, or stuff that is so trivial it's not worth fixing.
@@ -198,9 +222,9 @@
Memcheck:Leak
fun:calloc
fun:_internal_class_createInstanceFromZone
- fun:_internal_class_createInstance
+ ...
fun:NSAllocateObject
- fun:+[NSObject(NSObject) alloc]
+ ...
fun:-[VideoCaptureDeviceQTKit initWithFrameReceiver:]
fun:_ZN5media21VideoCaptureDeviceMac4InitENS_18VideoCaptureDevice4Name14CaptureApiTypeE
fun:_ZN5media28VideoCaptureDeviceFactoryMac6CreateERKNS_18VideoCaptureDevice4NameE
diff --git a/tools/vim/chromium.ycm_extra_conf.py b/tools/vim/chromium.ycm_extra_conf.py
index c0de648..2901c54 100644
--- a/tools/vim/chromium.ycm_extra_conf.py
+++ b/tools/vim/chromium.ycm_extra_conf.py
@@ -39,10 +39,39 @@
import os
import os.path
+import re
import subprocess
import sys
+def SystemIncludeDirectoryFlags():
+ """Determines compile flags to include the system include directories.
+
+ Use as a workaround for https://github.com/Valloric/YouCompleteMe/issues/303
+
+ Returns:
+ (List of Strings) Compile flags to append.
+ """
+ try:
+ with open(os.devnull, 'rb') as DEVNULL:
+ output = subprocess.check_output(['clang', '-v', '-E', '-x', 'c++', '-'],
+ stdin=DEVNULL, stderr=subprocess.STDOUT)
+ except (FileNotFoundError, subprocess.CalledProcessError):
+ return []
+ includes_regex = r'#include <\.\.\.> search starts here:\s*' \
+ r'(.*?)End of search list\.'
+ includes = re.search(includes_regex, output.decode(), re.DOTALL).group(1)
+ flags = []
+ for path in includes.splitlines():
+ path = path.strip()
+ if os.path.isdir(path):
+ flags.append('-isystem')
+ flags.append(path)
+ return flags
+
+
+_system_include_flags = SystemIncludeDirectoryFlags()
+
# Flags from YCM's default config.
flags = [
'-DUSE_CLANG_COMPLETER',
@@ -68,14 +97,15 @@
(String) Path of 'src/', or None if unable to find.
"""
curdir = os.path.normpath(os.path.dirname(filename))
- while not (PathExists(curdir, 'src') and PathExists(curdir, 'src', 'DEPS')
- and (PathExists(curdir, '.gclient')
- or PathExists(curdir, 'src', '.git'))):
+ while not (os.path.basename(os.path.realpath(curdir)) == 'src'
+ and PathExists(curdir, 'DEPS')
+ and (PathExists(curdir, '..', '.gclient')
+ or PathExists(curdir, '.git'))):
nextdir = os.path.normpath(os.path.join(curdir, '..'))
if nextdir == curdir:
return None
curdir = nextdir
- return os.path.join(curdir, 'src')
+ return curdir
def GetClangCommandFromNinjaForFilename(chrome_root, filename):
@@ -195,7 +225,7 @@
chrome_root = FindChromeSrcFromFilename(filename)
chrome_flags = GetClangCommandFromNinjaForFilename(chrome_root,
filename)
- final_flags = flags + chrome_flags
+ final_flags = flags + chrome_flags + _system_include_flags
return {
'flags': final_flags,
diff --git a/tools/xdisplaycheck/xdisplaycheck.cc b/tools/xdisplaycheck/xdisplaycheck.cc
index a5a447c..6623153 100644
--- a/tools/xdisplaycheck/xdisplaycheck.cc
+++ b/tools/xdisplaycheck/xdisplaycheck.cc
@@ -16,6 +16,10 @@
#include <time.h>
#include <X11/Xlib.h>
+#if defined(USE_AURA)
+#include <X11/extensions/XInput2.h>
+#endif
+
void Sleep(int duration_ms) {
struct timespec sleep_time, remaining;
@@ -73,6 +77,33 @@
fprintf(stderr, "Connected after %d retries\n", tries);
+#if defined(USE_AURA)
+ // Check for XInput2
+ int opcode, event, err;
+ if (!XQueryExtension(scoped_display.display(), "XInputExtension", &opcode,
+ &event, &err)) {
+ fprintf(stderr,
+ "Failed to get XInputExtension on %s.\n", XDisplayName(NULL));
+ return -2;
+ }
+
+ int major = 2, minor = 0;
+ if (XIQueryVersion(scoped_display.display(), &major, &minor) == BadRequest) {
+ fprintf(stderr,
+ "Server does not have XInput2 on %s.\n", XDisplayName(NULL));
+ return -3;
+ }
+
+ // Ask for the list of devices. This can cause some Xvfb to crash.
+ int count = 0;
+ XIDeviceInfo* devices =
+ XIQueryDevice(scoped_display.display(), XIAllDevices, &count);
+ if (devices)
+ XIFreeDeviceInfo(devices);
+
+ fprintf(stderr,
+ "XInput2 verified initially sane on %s.\n", XDisplayName(NULL));
+#endif
return 0;
}
diff --git a/ui/events/BUILD.gn b/ui/events/BUILD.gn
index 5ba2e19..1e841ee 100644
--- a/ui/events/BUILD.gn
+++ b/ui/events/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/ui.gni")
+import("//testing/test.gni")
static_library("dom4_keycode_converter") {
sources = [
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
index 34a1d79..c866268 100644
--- a/ui/gfx/BUILD.gn
+++ b/ui/gfx/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/ui.gni")
+import("//testing/test.gni")
if (is_android) {
import("//build/config/android/config.gni")
diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn
index ea1ea98..bdd7c98 100644
--- a/ui/gl/BUILD.gn
+++ b/ui/gl/BUILD.gn
@@ -8,16 +8,10 @@
import("//build/config/android/rules.gni")
}
-gl_binding_output_dir = target_gen_dir
-
config("gl_config") {
if (use_x11) {
defines = [ "GL_GLEXT_PROTOTYPES" ]
}
-
- # TODO(brettw) this should be removed and the the files using the generated
- # GL bindings should use the path inside the gen directory.
- include_dirs = [ gl_binding_output_dir ]
}
component("gl") {
@@ -33,6 +27,10 @@
"android/surface_texture_listener.cc",
"android/surface_texture_listener.h",
"gl_bindings.h",
+ "gl_bindings_autogen_gl.cc",
+ "gl_bindings_autogen_gl.h",
+ "gl_bindings_autogen_osmesa.cc",
+ "gl_bindings_autogen_osmesa.h",
"gl_bindings_skia_in_process.cc",
"gl_bindings_skia_in_process.h",
"gl_context.cc",
@@ -46,6 +44,9 @@
"gl_context_stub_with_extensions.cc",
"gl_context_stub_with_extensions.h",
"gl_context_win.cc",
+ "gl_enums.cc",
+ "gl_enums.h",
+ "gl_enums_implementation_autogen.h",
"gl_export.h",
"gl_fence.cc",
"gl_fence.h",
@@ -96,10 +97,6 @@
"scoped_make_current.h",
"sync_control_vsync_provider.cc",
"sync_control_vsync_provider.h",
- "$gl_binding_output_dir/gl_bindings_autogen_gl.cc",
- "$gl_binding_output_dir/gl_bindings_autogen_gl.h",
- "$gl_binding_output_dir/gl_bindings_autogen_osmesa.cc",
- "$gl_binding_output_dir/gl_bindings_autogen_osmesa.h",
]
defines = [ "GL_IMPLEMENTATION" ]
@@ -108,13 +105,11 @@
"//third_party/switfshader/include",
"//third_party/khronos",
"//third_party/mesa/src/include",
- gl_binding_output_dir,
]
all_dependent_configs = [ ":gl_config" ]
deps = [
- ":generate_gl_bindings",
"//base/third_party/dynamic_annotations",
"//gpu/command_buffer/common",
"//skia",
@@ -131,6 +126,8 @@
sources += [
"egl_util.cc",
"egl_util.h",
+ "gl_bindings_autogen_egl.cc",
+ "gl_bindings_autogen_egl.h",
"gl_context_egl.cc",
"gl_context_egl.h",
"gl_fence_egl.cc",
@@ -139,8 +136,6 @@
"gl_image_egl.h",
"gl_surface_egl.cc",
"gl_surface_egl.h",
- "$gl_binding_output_dir/gl_bindings_autogen_egl.cc",
- "$gl_binding_output_dir/gl_bindings_autogen_egl.h",
]
}
if (is_android || is_linux) {
@@ -158,6 +153,8 @@
}
if (use_x11) {
sources += [
+ "gl_bindings_autogen_glx.cc",
+ "gl_bindings_autogen_glx.h",
"gl_context_glx.cc",
"gl_context_glx.h",
"gl_context_x11.cc",
@@ -171,8 +168,6 @@
"gl_surface_x11.cc",
"gl_egl_api_implementation.cc",
"gl_egl_api_implementation.h",
- "$gl_binding_output_dir/gl_bindings_autogen_glx.cc",
- "$gl_binding_output_dir/gl_bindings_autogen_glx.h",
]
configs += [
@@ -185,6 +180,8 @@
}
if (is_win) {
sources += [
+ "gl_bindings_autogen_wgl.cc",
+ "gl_bindings_autogen_wgl.h",
"gl_context_wgl.cc",
"gl_context_wgl.h",
"gl_egl_api_implementation.cc",
@@ -193,8 +190,6 @@
"gl_surface_wgl.h",
"gl_wgl_api_implementation.cc",
"gl_wgl_api_implementation.h",
- "$gl_binding_output_dir/gl_bindings_autogen_wgl.cc",
- "$gl_binding_output_dir/gl_bindings_autogen_wgl.h",
]
libs = [ "dwmapi.lib" ]
@@ -234,81 +229,36 @@
deps += [ ":gl_jni_headers" ]
}
+ if (use_ozone) {
+ sources += [
+ "gl_context_ozone.cc",
+ "gl_egl_api_implementation.cc",
+ "gl_egl_api_implementation.h",
+ "gl_implementation_ozone.cc",
+ "gl_surface_ozone.cc",
+ ]
+ deps += [
+ "//ui/ozone",
+ "//ui/ozone:ozone_base",
+ ]
+ }
if (is_android && !is_android_webview_build) {
deps += [ "//ui/android:ui_java" ]
}
}
-action("generate_gl_bindings") {
- visibility = [ ":*" ] # Only targets in this file can see this.
-
- script = "generate_bindings.py"
-
- # TODO(brettw) make this dynamic. The GYP version calls "generate_bindings.py
- # --inputs" to get the list here. What should happen is that the script
- # should generate a .d file, which we should declare here. That will
- # eliminate the need bot both hardcoding the list here or calling the script
- # during GN-time.
- inputs = [
- "EGL/eglextchromium.h",
- "GL/glextchromium.h",
- "//third_party/mesa/src/include/GL/glext.h",
- "//third_party/khronos/GLES2/gl2ext.h",
- "//gpu/GLES2/gl2chromium.h",
- "//gpu/GLES2/gl2extchromium.h",
- "//third_party/khronos/EGL/eglext.h",
- "//third_party/mesa/src/include/GL/wglext.h",
- "//third_party/mesa/src/include/GL/glx.h",
- "//third_party/mesa/src/include/GL/glxext.h",
- ]
-
- outputs = [
- "$gl_binding_output_dir/gl_bindings_autogen_egl.cc",
- "$gl_binding_output_dir/gl_bindings_autogen_egl.h",
- "$gl_binding_output_dir/gl_bindings_api_autogen_egl.h",
- "$gl_binding_output_dir/gl_bindings_autogen_gl.cc",
- "$gl_binding_output_dir/gl_bindings_autogen_gl.h",
- "$gl_binding_output_dir/gl_bindings_api_autogen_gl.h",
- "$gl_binding_output_dir/gl_bindings_autogen_glx.cc",
- "$gl_binding_output_dir/gl_bindings_autogen_glx.h",
- "$gl_binding_output_dir/gl_bindings_api_autogen_glx.h",
- "$gl_binding_output_dir/gl_bindings_autogen_mock.cc",
- "$gl_binding_output_dir/gl_bindings_autogen_mock.h",
- "$gl_binding_output_dir/gl_bindings_autogen_osmesa.cc",
- "$gl_binding_output_dir/gl_bindings_autogen_osmesa.h",
- "$gl_binding_output_dir/gl_bindings_api_autogen_osmesa.h",
- "$gl_binding_output_dir/gl_bindings_autogen_wgl.cc",
- "$gl_binding_output_dir/gl_bindings_autogen_wgl.h",
- "$gl_binding_output_dir/gl_bindings_api_autogen_wgl.h",
- "$gl_binding_output_dir/gl_mock_autogen_gl.h",
- ]
-
- args = [
- "--header-paths=" + rebase_path("//third_party/khronos", root_build_dir) +
- ":" + rebase_path("//third_party/mesa/src/include", root_build_dir) +
- ":" + rebase_path("//ui/gl", root_build_dir) + ":" +
- rebase_path("//gpu", root_build_dir),
- rebase_path(gl_binding_output_dir, root_build_dir),
- ]
-}
-
-config("gl_unittest_utils_config") {
- include_dirs = [ gl_binding_output_dir ]
-}
-
source_set("gl_unittest_utils") {
testonly = true
sources = [
+ "gl_bindings_autogen_mock.cc",
+ "gl_bindings_autogen_mock.h",
+ "gl_mock_autogen_gl.h",
"gl_mock.h",
"gl_mock.cc",
- "$gl_binding_output_dir/gl_bindings_autogen_mock.cc",
- "$gl_binding_output_dir/gl_bindings_autogen_mock.h",
- "$gl_binding_output_dir/gl_mock_autogen_gl.h",
]
configs += [ "//third_party/khronos:khronos_headers" ]
- public_configs = [ ":gl_unittest_utils_config" ]
deps = [
":gl",
diff --git a/ui/gl/generate_bindings.py b/ui/gl/generate_bindings.py
index af1bdc8..7a339b6 100755
--- a/ui/gl/generate_bindings.py
+++ b/ui/gl/generate_bindings.py
@@ -9,7 +9,16 @@
import os
import collections
import re
+import platform
import sys
+from subprocess import call
+
+HEADER_PATHS = [
+ '../../third_party/khronos',
+ '../../third_party/mesa/src/include',
+ '.',
+ '../../gpu',
+]
"""In case there are multiple versions of the same function, one that's listed
first takes priority if its conditions are met. If the function is an extension
@@ -149,7 +158,7 @@
'glCheckFramebufferStatus'],
'arguments': 'GLenum target',
'logging_code': """
- GL_SERVICE_LOG("GL_RESULT: " << GLES2Util::GetStringEnum(result));
+ GL_SERVICE_LOG("GL_RESULT: " << GLEnums::GetStringEnum(result));
""", },
{ 'return_type': 'void',
'names': ['glClear'],
@@ -521,7 +530,7 @@
'names': ['glGetError'],
'arguments': 'void',
'logging_code': """
- GL_SERVICE_LOG("GL_RESULT: " << GLES2Util::GetStringError(result));
+ GL_SERVICE_LOG("GL_RESULT: " << GLEnums::GetStringError(result));
""", },
{ 'return_type': 'void',
'names': ['glGetFenceivNV'],
@@ -1688,17 +1697,35 @@
[GLX_FUNCTIONS, 'glx', ['GL/glx.h', 'GL/glxext.h'], []],
]
+GLES2_HEADERS_WITH_ENUMS = [
+ 'GLES2/gl2.h',
+ 'GLES2/gl2ext.h',
+ 'GLES2/gl2chromium.h',
+ 'GLES2/gl2extchromium.h',
+ 'GLES3/gl3.h',
+]
+
+SELF_LOCATION = os.path.dirname(os.path.abspath(__file__))
+
+LICENSE_AND_HEADER = """\
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+"""
def GenerateHeader(file, functions, set_name, used_extensions):
"""Generates gl_bindings_autogen_x.h"""
# Write file header.
- file.write(
-"""// Copyright (c) 2012 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.
-
-// This file is automatically generated.
+ file.write(LICENSE_AND_HEADER +
+"""
#ifndef UI_GFX_GL_GL_BINDINGS_AUTOGEN_%(name)s_H_
#define UI_GFX_GL_GL_BINDINGS_AUTOGEN_%(name)s_H_
@@ -1763,14 +1790,7 @@
"""Generates gl_bindings_api_autogen_x.h"""
# Write file header.
- file.write(
-"""// Copyright (c) 2012 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.
-
-// This file is automatically generated.
-
-""" % {'name': set_name.upper()})
+ file.write(LICENSE_AND_HEADER)
# Write API declaration.
for func in functions:
@@ -1784,14 +1804,7 @@
"""Generates gl_mock_autogen_x.h"""
# Write file header.
- file.write(
-"""// Copyright (c) 2012 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.
-
-// This file is automatically generated.
-
-""" % {'name': set_name.upper()})
+ file.write(LICENSE_AND_HEADER)
# Write API declaration.
for func in functions:
@@ -1810,27 +1823,27 @@
def GenerateSource(file, functions, set_name, used_extensions):
"""Generates gl_bindings_autogen_x.cc"""
- # Write file header.
- file.write(
-"""// Copyright (c) 2011 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.
+ set_header_name = "ui/gl/gl_" + set_name.lower() + "_api_implementation.h"
+ include_list = [ 'base/debug/trace_event.h',
+ 'ui/gl/gl_enums.h',
+ 'ui/gl/gl_bindings.h',
+ 'ui/gl/gl_context.h',
+ 'ui/gl/gl_implementation.h',
+ 'ui/gl/gl_version_info.h',
+ set_header_name ]
+ includes_string = "\n".join(["#include \"{0}\"".format(h)
+ for h in sorted(include_list)])
-// This file is automatically generated.
+ # Write file header.
+ file.write(LICENSE_AND_HEADER +
+"""
#include <string>
-#include "base/debug/trace_event.h"
-#include "gpu/command_buffer/common/gles2_cmd_utils.h"
-#include "ui/gl/gl_bindings.h"
-#include "ui/gl/gl_context.h"
-#include "ui/gl/gl_implementation.h"
-#include "ui/gl/gl_version_info.h"
-#include "ui/gl/gl_%s_api_implementation.h"
-using gpu::gles2::GLES2Util;
+%s
namespace gfx {
-""" % set_name.lower())
+""" % includes_string)
file.write('\n')
file.write('static bool g_debugBindingsInitialized;\n')
@@ -1945,12 +1958,13 @@
# http://crbug.com/325668
if cond != '' and not last_version:
if not first_version:
- file.write(' if (!fn.%sFn && (%s))\n ' % (known_as, cond))
+ file.write(' if (!fn.%sFn && (%s)) {\n ' % (known_as, cond))
else:
- file.write(' if (%s)\n ' % cond)
+ file.write(' if (%s) {\n ' % cond)
elif not first_version:
- file.write(' if (!fn.%sFn)\n ' % known_as)
+ file.write(' if (!fn.%sFn) {\n ' % known_as)
WriteFuncBinding(file, known_as, version['name'])
+ file.write('}\n')
i += 1
first_version = False
@@ -2002,10 +2016,10 @@
log_argument_names = re.sub(
r'CONSTCHAR_([a-zA-Z0-9_]+)', r'\1', log_argument_names)
log_argument_names = re.sub(
- r'GLenum_([a-zA-Z0-9_]+)', r'GLES2Util::GetStringEnum(\1)',
+ r'GLenum_([a-zA-Z0-9_]+)', r'GLEnums::GetStringEnum(\1)',
log_argument_names)
log_argument_names = re.sub(
- r'GLboolean_([a-zA-Z0-9_]+)', r'GLES2Util::GetStringBool(\1)',
+ r'GLboolean_([a-zA-Z0-9_]+)', r'GLEnums::GetStringBool(\1)',
log_argument_names)
log_argument_names = log_argument_names.replace(',', ' << ", " <<')
if argument_names == 'void' or argument_names == '':
@@ -2151,14 +2165,7 @@
def GenerateMockBindingsHeader(file, functions):
"""Headers for functions that invoke MockGLInterface members"""
- file.write(
-"""// Copyright (c) 2014 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.
-
-// This file is automatically generated.
-
-""")
+ file.write(LICENSE_AND_HEADER)
uniquely_named_functions = GetUniquelyNamedFunctions(functions)
for key in sorted(uniquely_named_functions.iterkeys()):
@@ -2171,12 +2178,8 @@
"""Generates functions that invoke MockGLInterface members and a
GetGLProcAddress function that returns addresses to those functions."""
- file.write(
-"""// Copyright (c) 2011 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.
-
-// This file is automatically generated.
+ file.write(LICENSE_AND_HEADER +
+"""
#include <string.h>
@@ -2238,6 +2241,39 @@
file.write('\n')
file.write('} // namespace gfx\n')
+def GenerateEnumUtils(out_file, input_filenames):
+ enum_re = re.compile(r'\#define\s+(GL_[a-zA-Z0-9_]+)\s+([0-9A-Fa-fx]+)')
+ dict = {}
+ for fname in input_filenames:
+ lines = open(fname).readlines()
+ for line in lines:
+ m = enum_re.match(line)
+ if m:
+ name = m.group(1)
+ value = m.group(2)
+ if len(value) <= 10:
+ if not value in dict:
+ dict[value] = name
+ # check our own _CHROMIUM macro conflicts with khronos GL headers.
+ elif dict[value] != name and (name.endswith('_CHROMIUM') or
+ dict[value].endswith('_CHROMIUM')):
+ raise RunTimeError("code collision: %s and %s have the same code %s"
+ % (dict[value], name, value))
+
+ out_file.write(LICENSE_AND_HEADER)
+ out_file.write("static const GLEnums::EnumToString "
+ "enum_to_string_table[] = {\n")
+ for value in dict:
+ out_file.write(' { %s, "%s", },\n' % (value, dict[value]))
+ out_file.write("""};
+
+const GLEnums::EnumToString* const GLEnums::enum_to_string_table_ =
+ enum_to_string_table;
+const size_t GLEnums::enum_to_string_table_len_ =
+ sizeof(enum_to_string_table) / sizeof(enum_to_string_table[0]);
+
+""")
+
def ParseExtensionFunctionsFromHeader(header_file):
"""Parse a C extension header file and return a map from extension names to
@@ -2358,12 +2394,10 @@
def ResolveHeader(header, header_paths):
- paths = header_paths.split(':')
-
- for path in paths:
+ for path in header_paths:
result = os.path.join(path, header)
if not os.path.isabs(path):
- result = os.path.relpath(os.path.join(os.getcwd(), result), os.getcwd())
+ result = os.path.abspath(os.path.join(SELF_LOCATION, result))
if os.path.exists(result):
# Always use forward slashes as path separators. Otherwise backslashes
# may be incorrectly interpreted as escape characters.
@@ -2377,7 +2411,6 @@
parser = optparse.OptionParser()
parser.add_option('--inputs', action='store_true')
- parser.add_option('--header-paths')
parser.add_option('--verify-order', action='store_true')
options, args = parser.parse_args(argv)
@@ -2385,13 +2418,19 @@
if options.inputs:
for [_, _, headers, _] in FUNCTION_SETS:
for header in headers:
- print ResolveHeader(header, options.header_paths)
+ print ResolveHeader(header, HEADER_PATHS)
return 0
- directory = '.'
+ directory = SELF_LOCATION
if len(args) >= 1:
directory = args[0]
+ def ClangFormat(filename):
+ formatter = "clang-format"
+ if platform.system() == "Windows":
+ formatter += ".bat"
+ call([formatter, "-i", "-style=chromium", filename])
+
for [functions, set_name, extension_headers, extensions] in FUNCTION_SETS:
# Function names can be specified in two ways (list of unique names or list
# of versions with different binding conditions). Fill in the data to the
@@ -2417,7 +2456,7 @@
if options.verify_order:
continue
- extension_headers = [ResolveHeader(h, options.header_paths)
+ extension_headers = [ResolveHeader(h, HEADER_PATHS)
for h in extension_headers]
used_extensions = FillExtensionsFromHeaders(
functions, extension_headers, extensions)
@@ -2426,33 +2465,48 @@
os.path.join(directory, 'gl_bindings_autogen_%s.h' % set_name), 'wb')
GenerateHeader(header_file, functions, set_name, used_extensions)
header_file.close()
+ ClangFormat(header_file.name)
header_file = open(
os.path.join(directory, 'gl_bindings_api_autogen_%s.h' % set_name),
'wb')
GenerateAPIHeader(header_file, functions, set_name)
header_file.close()
+ ClangFormat(header_file.name)
source_file = open(
os.path.join(directory, 'gl_bindings_autogen_%s.cc' % set_name), 'wb')
GenerateSource(source_file, functions, set_name, used_extensions)
source_file.close()
+ ClangFormat(source_file.name)
if not options.verify_order:
header_file = open(
os.path.join(directory, 'gl_mock_autogen_gl.h'), 'wb')
GenerateMockHeader(header_file, GL_FUNCTIONS, 'gl')
header_file.close()
+ ClangFormat(header_file.name)
header_file = open(os.path.join(directory, 'gl_bindings_autogen_mock.h'),
'wb')
GenerateMockBindingsHeader(header_file, GL_FUNCTIONS)
header_file.close()
+ ClangFormat(header_file.name)
source_file = open(os.path.join(directory, 'gl_bindings_autogen_mock.cc'),
'wb')
GenerateMockBindingsSource(source_file, GL_FUNCTIONS)
source_file.close()
+ ClangFormat(source_file.name)
+
+ enum_header_filenames = [ResolveHeader(h, HEADER_PATHS)
+ for h in GLES2_HEADERS_WITH_ENUMS]
+ header_file = open(os.path.join(directory,
+ 'gl_enums_implementation_autogen.h'),
+ 'wb')
+ GenerateEnumUtils(header_file, enum_header_filenames)
+ header_file.close()
+ ClangFormat(header_file.name)
return 0
diff --git a/ui/gl/gl.gyp b/ui/gl/gl.gyp
index f11f40c..93c4d2b 100644
--- a/ui/gl/gl.gyp
+++ b/ui/gl/gl.gyp
@@ -21,22 +21,13 @@
'<(DEPTH)/ui/gfx/gfx.gyp:gfx',
'<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
],
- 'variables': {
- 'gl_binding_output_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/gl',
- },
'defines': [
'GL_IMPLEMENTATION',
],
'include_dirs': [
'<(DEPTH)/third_party/swiftshader/include',
'<(DEPTH)/third_party/khronos',
- '<(gl_binding_output_dir)',
],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(gl_binding_output_dir)',
- ],
- },
'export_dependent_settings': [
'<(DEPTH)/third_party/mesa/mesa.gyp:mesa_headers',
],
@@ -50,12 +41,17 @@
'android/surface_texture_listener.cc',
'android/surface_texture_listener.h',
'gl_bindings.h',
+ 'gl_bindings_autogen_gl.cc',
+ 'gl_bindings_autogen_gl.h',
+ 'gl_bindings_autogen_osmesa.cc',
+ 'gl_bindings_autogen_osmesa.h',
'gl_bindings_skia_in_process.cc',
'gl_bindings_skia_in_process.h',
'gl_context.cc',
'gl_context.h',
'gl_context_android.cc',
'gl_context_mac.mm',
+ 'gl_context_ozone.cc',
'gl_context_osmesa.cc',
'gl_context_osmesa.h',
'gl_context_stub.cc',
@@ -64,6 +60,9 @@
'gl_context_stub_with_extensions.h',
'gl_context_win.cc',
'gl_context_x11.cc',
+ 'gl_enums.cc',
+ 'gl_enums.h',
+ 'gl_enums_implementation_autogen.h',
'gl_export.h',
'gl_fence.cc',
'gl_fence.h',
@@ -85,6 +84,7 @@
'gl_implementation.cc',
'gl_implementation.h',
'gl_implementation_android.cc',
+ 'gl_implementation_ozone.cc',
'gl_implementation_mac.cc',
'gl_implementation_win.cc',
'gl_implementation_x11.cc',
@@ -104,6 +104,7 @@
'gl_surface_x11.cc',
'gl_surface_osmesa.cc',
'gl_surface_osmesa.h',
+ 'gl_surface_ozone.cc',
'gl_switches.cc',
'gl_switches.h',
'gl_version_info.cc',
@@ -117,61 +118,14 @@
'scoped_make_current.h',
'sync_control_vsync_provider.cc',
'sync_control_vsync_provider.h',
- '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc',
- '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h',
- '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc',
- '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h',
- ],
- # hard_dependency is necessary for this target because it has actions
- # that generate header files included by dependent targets. The header
- # files must be generated before the dependents are compiled. The usual
- # semantics are to allow the two targets to build concurrently.
- 'hard_dependency': 1,
- 'actions': [
- {
- 'action_name': 'generate_gl_bindings',
- 'variables': {
- 'generator_path': 'generate_bindings.py',
- # Prefer khronos EGL/GLES headers by listing that path first.
- 'header_paths': '../../third_party/khronos:../../third_party/mesa/src/include:.:../../gpu',
- },
- 'inputs': [
- '<(generator_path)',
- '<!@(python <(generator_path) --header-paths=<(header_paths) --inputs)',
- ],
- 'outputs': [
- '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc',
- '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h',
- '<(gl_binding_output_dir)/gl_bindings_api_autogen_egl.h',
- '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc',
- '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h',
- '<(gl_binding_output_dir)/gl_bindings_api_autogen_gl.h',
- '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc',
- '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h',
- '<(gl_binding_output_dir)/gl_bindings_api_autogen_glx.h',
- '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc',
- '<(gl_binding_output_dir)/gl_bindings_autogen_mock.h',
- '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc',
- '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h',
- '<(gl_binding_output_dir)/gl_bindings_api_autogen_osmesa.h',
- '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc',
- '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h',
- '<(gl_binding_output_dir)/gl_bindings_api_autogen_wgl.h',
- '<(gl_binding_output_dir)/gl_mock_autogen_gl.h',
- ],
- 'action': [
- 'python',
- '<(generator_path)',
- '--header-paths=<(header_paths)',
- '<(gl_binding_output_dir)',
- ],
- },
],
'conditions': [
['OS in ("win", "android", "linux")', {
'sources': [
'egl_util.cc',
'egl_util.h',
+ 'gl_bindings_autogen_egl.cc',
+ 'gl_bindings_autogen_egl.h',
'gl_context_egl.cc',
'gl_context_egl.h',
'gl_fence_egl.cc',
@@ -182,8 +136,6 @@
'gl_surface_egl.h',
'gl_egl_api_implementation.cc',
'gl_egl_api_implementation.h',
- '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc',
- '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h',
],
'include_dirs': [
'<(DEPTH)/third_party/khronos',
@@ -203,6 +155,8 @@
}],
['use_x11 == 1', {
'sources': [
+ 'gl_bindings_autogen_glx.cc',
+ 'gl_bindings_autogen_glx.h',
'gl_context_glx.cc',
'gl_context_glx.h',
'gl_glx_api_implementation.cc',
@@ -213,8 +167,6 @@
'gl_surface_glx.h',
'gl_egl_api_implementation.cc',
'gl_egl_api_implementation.h',
- '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc',
- '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h',
],
'all_dependent_settings': {
'defines': [
@@ -231,6 +183,8 @@
}],
['OS=="win"', {
'sources': [
+ 'gl_bindings_autogen_wgl.cc',
+ 'gl_bindings_autogen_wgl.h',
'gl_context_wgl.cc',
'gl_context_wgl.h',
'gl_egl_api_implementation.cc',
@@ -239,8 +193,6 @@
'gl_surface_wgl.h',
'gl_wgl_api_implementation.cc',
'gl_wgl_api_implementation.h',
- '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc',
- '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h',
],
'msvs_settings': {
'VCLinkerTool': {
@@ -300,6 +252,12 @@
['OS!="android"', {
'sources/': [ ['exclude', '^android/'] ],
}],
+ ['use_ozone==1', {
+ 'dependencies': [
+ '../ozone/ozone.gyp:ozone',
+ '../ozone/ozone.gyp:ozone_base',
+ ],
+ }],
['OS=="android" and android_webview_build==0', {
'dependencies': [
'../android/ui_android.gyp:ui_java',
@@ -310,29 +268,20 @@
{
'target_name': 'gl_unittest_utils',
'type': 'static_library',
- 'variables': {
- 'gl_binding_output_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/gl',
- },
'dependencies': [
'../../testing/gmock.gyp:gmock',
'../../third_party/khronos/khronos.gyp:khronos_headers',
'gl',
],
'include_dirs': [
- '<(gl_binding_output_dir)',
'../..',
],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(gl_binding_output_dir)',
- ],
- },
'sources': [
+ 'gl_bindings_autogen_mock.cc',
+ 'gl_bindings_autogen_mock.h',
+ 'gl_mock_autogen_gl.h',
'gl_mock.h',
'gl_mock.cc',
- '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc',
- '<(gl_binding_output_dir)/gl_bindings_autogen_mock.h',
- '<(gl_binding_output_dir)/gl_mock_autogen_gl.h',
],
},
],
diff --git a/ui/gl/gl_bindings_api_autogen_egl.h b/ui/gl/gl_bindings_api_autogen_egl.h
new file mode 100644
index 0000000..43337be
--- /dev/null
+++ b/ui/gl/gl_bindings_api_autogen_egl.h
@@ -0,0 +1,128 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+EGLBoolean eglBindAPIFn(EGLenum api) override;
+EGLBoolean eglBindTexImageFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint buffer) override;
+EGLBoolean eglChooseConfigFn(EGLDisplay dpy,
+ const EGLint* attrib_list,
+ EGLConfig* configs,
+ EGLint config_size,
+ EGLint* num_config) override;
+EGLint eglClientWaitSyncKHRFn(EGLDisplay dpy,
+ EGLSyncKHR sync,
+ EGLint flags,
+ EGLTimeKHR timeout) override;
+EGLBoolean eglCopyBuffersFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLNativePixmapType target) override;
+EGLContext eglCreateContextFn(EGLDisplay dpy,
+ EGLConfig config,
+ EGLContext share_context,
+ const EGLint* attrib_list) override;
+EGLImageKHR eglCreateImageKHRFn(EGLDisplay dpy,
+ EGLContext ctx,
+ EGLenum target,
+ EGLClientBuffer buffer,
+ const EGLint* attrib_list) override;
+EGLSurface eglCreatePbufferFromClientBufferFn(
+ EGLDisplay dpy,
+ EGLenum buftype,
+ void* buffer,
+ EGLConfig config,
+ const EGLint* attrib_list) override;
+EGLSurface eglCreatePbufferSurfaceFn(EGLDisplay dpy,
+ EGLConfig config,
+ const EGLint* attrib_list) override;
+EGLSurface eglCreatePixmapSurfaceFn(EGLDisplay dpy,
+ EGLConfig config,
+ EGLNativePixmapType pixmap,
+ const EGLint* attrib_list) override;
+EGLSyncKHR eglCreateSyncKHRFn(EGLDisplay dpy,
+ EGLenum type,
+ const EGLint* attrib_list) override;
+EGLSurface eglCreateWindowSurfaceFn(EGLDisplay dpy,
+ EGLConfig config,
+ EGLNativeWindowType win,
+ const EGLint* attrib_list) override;
+EGLBoolean eglDestroyContextFn(EGLDisplay dpy, EGLContext ctx) override;
+EGLBoolean eglDestroyImageKHRFn(EGLDisplay dpy, EGLImageKHR image) override;
+EGLBoolean eglDestroySurfaceFn(EGLDisplay dpy, EGLSurface surface) override;
+EGLBoolean eglDestroySyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync) override;
+EGLBoolean eglGetConfigAttribFn(EGLDisplay dpy,
+ EGLConfig config,
+ EGLint attribute,
+ EGLint* value) override;
+EGLBoolean eglGetConfigsFn(EGLDisplay dpy,
+ EGLConfig* configs,
+ EGLint config_size,
+ EGLint* num_config) override;
+EGLContext eglGetCurrentContextFn(void) override;
+EGLDisplay eglGetCurrentDisplayFn(void) override;
+EGLSurface eglGetCurrentSurfaceFn(EGLint readdraw) override;
+EGLDisplay eglGetDisplayFn(EGLNativeDisplayType display_id) override;
+EGLint eglGetErrorFn(void) override;
+EGLDisplay eglGetPlatformDisplayEXTFn(EGLenum platform,
+ void* native_display,
+ const EGLint* attrib_list) override;
+__eglMustCastToProperFunctionPointerType eglGetProcAddressFn(
+ const char* procname) override;
+EGLBoolean eglGetSyncAttribKHRFn(EGLDisplay dpy,
+ EGLSyncKHR sync,
+ EGLint attribute,
+ EGLint* value) override;
+EGLBoolean eglGetSyncValuesCHROMIUMFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLuint64CHROMIUM* ust,
+ EGLuint64CHROMIUM* msc,
+ EGLuint64CHROMIUM* sbc) override;
+EGLBoolean eglInitializeFn(EGLDisplay dpy,
+ EGLint* major,
+ EGLint* minor) override;
+EGLBoolean eglMakeCurrentFn(EGLDisplay dpy,
+ EGLSurface draw,
+ EGLSurface read,
+ EGLContext ctx) override;
+EGLBoolean eglPostSubBufferNVFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint x,
+ EGLint y,
+ EGLint width,
+ EGLint height) override;
+EGLenum eglQueryAPIFn(void) override;
+EGLBoolean eglQueryContextFn(EGLDisplay dpy,
+ EGLContext ctx,
+ EGLint attribute,
+ EGLint* value) override;
+const char* eglQueryStringFn(EGLDisplay dpy, EGLint name) override;
+EGLBoolean eglQuerySurfaceFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ EGLint* value) override;
+EGLBoolean eglQuerySurfacePointerANGLEFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ void** value) override;
+EGLBoolean eglReleaseTexImageFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint buffer) override;
+EGLBoolean eglReleaseThreadFn(void) override;
+EGLBoolean eglSurfaceAttribFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ EGLint value) override;
+EGLBoolean eglSwapBuffersFn(EGLDisplay dpy, EGLSurface surface) override;
+EGLBoolean eglSwapIntervalFn(EGLDisplay dpy, EGLint interval) override;
+EGLBoolean eglTerminateFn(EGLDisplay dpy) override;
+EGLBoolean eglWaitClientFn(void) override;
+EGLBoolean eglWaitGLFn(void) override;
+EGLBoolean eglWaitNativeFn(EGLint engine) override;
+EGLint eglWaitSyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags) override;
diff --git a/ui/gl/gl_bindings_api_autogen_gl.h b/ui/gl/gl_bindings_api_autogen_gl.h
new file mode 100644
index 0000000..5aac77c
--- /dev/null
+++ b/ui/gl/gl_bindings_api_autogen_gl.h
@@ -0,0 +1,703 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+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,
+ const char* name) override;
+void glBindBufferFn(GLenum target, GLuint buffer) override;
+void glBindBufferBaseFn(GLenum target, GLuint index, GLuint buffer) override;
+void glBindBufferRangeFn(GLenum target,
+ GLuint index,
+ GLuint buffer,
+ GLintptr offset,
+ GLsizeiptr size) override;
+void glBindFragDataLocationFn(GLuint program,
+ GLuint colorNumber,
+ const char* name) override;
+void glBindFragDataLocationIndexedFn(GLuint program,
+ GLuint colorNumber,
+ GLuint index,
+ const char* name) override;
+void glBindFramebufferEXTFn(GLenum target, GLuint framebuffer) override;
+void glBindRenderbufferEXTFn(GLenum target, GLuint renderbuffer) override;
+void glBindSamplerFn(GLuint unit, GLuint sampler) override;
+void glBindTextureFn(GLenum target, GLuint texture) override;
+void glBindTransformFeedbackFn(GLenum target, GLuint id) override;
+void glBindVertexArrayOESFn(GLuint array) override;
+void glBlendBarrierKHRFn(void) override;
+void glBlendColorFn(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) override;
+void glBlendEquationFn(GLenum mode) override;
+void glBlendEquationSeparateFn(GLenum modeRGB, GLenum modeAlpha) override;
+void glBlendFuncFn(GLenum sfactor, GLenum dfactor) override;
+void glBlendFuncSeparateFn(GLenum srcRGB,
+ GLenum dstRGB,
+ GLenum srcAlpha,
+ GLenum dstAlpha) override;
+void glBlitFramebufferFn(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) override;
+void glBlitFramebufferANGLEFn(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) override;
+void glBlitFramebufferEXTFn(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) override;
+void glBufferDataFn(GLenum target,
+ GLsizeiptr size,
+ const void* data,
+ GLenum usage) override;
+void glBufferSubDataFn(GLenum target,
+ GLintptr offset,
+ GLsizeiptr size,
+ const void* data) override;
+GLenum glCheckFramebufferStatusEXTFn(GLenum target) override;
+void glClearFn(GLbitfield mask) override;
+void glClearBufferfiFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat depth,
+ GLint stencil) override;
+void glClearBufferfvFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat* value) override;
+void glClearBufferivFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLint* value) override;
+void glClearBufferuivFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLuint* value) override;
+void glClearColorFn(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) override;
+void glClearDepthFn(GLclampd depth) override;
+void glClearDepthfFn(GLclampf depth) override;
+void glClearStencilFn(GLint s) override;
+GLenum glClientWaitSyncFn(GLsync sync,
+ GLbitfield flags,
+ GLuint64 timeout) override;
+void glColorMaskFn(GLboolean red,
+ GLboolean green,
+ GLboolean blue,
+ GLboolean alpha) override;
+void glCompileShaderFn(GLuint shader) override;
+void glCompressedTexImage2DFn(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) override;
+void glCompressedTexImage3DFn(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) override;
+void glCompressedTexSubImage2DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLsizei imageSize,
+ const void* data) override;
+void glCopyBufferSubDataFn(GLenum readTarget,
+ GLenum writeTarget,
+ GLintptr readOffset,
+ GLintptr writeOffset,
+ GLsizeiptr size) override;
+void glCopyTexImage2DFn(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLint border) override;
+void glCopyTexSubImage2DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) override;
+void glCopyTexSubImage3DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint zoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) override;
+GLuint glCreateProgramFn(void) override;
+GLuint glCreateShaderFn(GLenum type) override;
+void glCullFaceFn(GLenum mode) override;
+void glDeleteBuffersARBFn(GLsizei n, const GLuint* buffers) override;
+void glDeleteFencesAPPLEFn(GLsizei n, const GLuint* fences) override;
+void glDeleteFencesNVFn(GLsizei n, const GLuint* fences) override;
+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;
+void glDeleteShaderFn(GLuint shader) override;
+void glDeleteSyncFn(GLsync sync) override;
+void glDeleteTexturesFn(GLsizei n, const GLuint* textures) override;
+void glDeleteTransformFeedbacksFn(GLsizei n, const GLuint* ids) override;
+void glDeleteVertexArraysOESFn(GLsizei n, const GLuint* arrays) override;
+void glDepthFuncFn(GLenum func) override;
+void glDepthMaskFn(GLboolean flag) override;
+void glDepthRangeFn(GLclampd zNear, GLclampd zFar) override;
+void glDepthRangefFn(GLclampf zNear, GLclampf zFar) override;
+void glDetachShaderFn(GLuint program, GLuint shader) override;
+void glDisableFn(GLenum cap) override;
+void glDisableVertexAttribArrayFn(GLuint index) override;
+void glDiscardFramebufferEXTFn(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments) override;
+void glDrawArraysFn(GLenum mode, GLint first, GLsizei count) override;
+void glDrawArraysInstancedANGLEFn(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount) override;
+void glDrawBufferFn(GLenum mode) override;
+void glDrawBuffersARBFn(GLsizei n, const GLenum* bufs) override;
+void glDrawElementsFn(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices) override;
+void glDrawElementsInstancedANGLEFn(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount) override;
+void glDrawRangeElementsFn(GLenum mode,
+ GLuint start,
+ GLuint end,
+ GLsizei count,
+ GLenum type,
+ const void* indices) override;
+void glEGLImageTargetRenderbufferStorageOESFn(GLenum target,
+ GLeglImageOES image) override;
+void glEGLImageTargetTexture2DOESFn(GLenum target,
+ GLeglImageOES image) override;
+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;
+void glFinishFenceAPPLEFn(GLuint fence) override;
+void glFinishFenceNVFn(GLuint fence) override;
+void glFlushFn(void) override;
+void glFlushMappedBufferRangeFn(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length) override;
+void glFramebufferRenderbufferEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer) override;
+void glFramebufferTexture2DEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level) override;
+void glFramebufferTexture2DMultisampleEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) override;
+void glFramebufferTexture2DMultisampleIMGFn(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) override;
+void glFramebufferTextureLayerFn(GLenum target,
+ GLenum attachment,
+ GLuint texture,
+ GLint level,
+ GLint layer) override;
+void glFrontFaceFn(GLenum mode) override;
+void glGenBuffersARBFn(GLsizei n, GLuint* buffers) override;
+void glGenerateMipmapEXTFn(GLenum target) override;
+void glGenFencesAPPLEFn(GLsizei n, GLuint* fences) override;
+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;
+void glGenTransformFeedbacksFn(GLsizei n, GLuint* ids) override;
+void glGenVertexArraysOESFn(GLsizei n, GLuint* arrays) override;
+void glGetActiveAttribFn(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) override;
+void glGetActiveUniformFn(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) override;
+void glGetActiveUniformBlockivFn(GLuint program,
+ GLuint uniformBlockIndex,
+ GLenum pname,
+ GLint* params) override;
+void glGetActiveUniformBlockNameFn(GLuint program,
+ GLuint uniformBlockIndex,
+ GLsizei bufSize,
+ GLsizei* length,
+ char* uniformBlockName) override;
+void glGetActiveUniformsivFn(GLuint program,
+ GLsizei uniformCount,
+ const GLuint* uniformIndices,
+ GLenum pname,
+ GLint* params) override;
+void glGetAttachedShadersFn(GLuint program,
+ GLsizei maxcount,
+ GLsizei* count,
+ GLuint* shaders) override;
+GLint glGetAttribLocationFn(GLuint program, const char* name) override;
+void glGetBooleanvFn(GLenum pname, GLboolean* params) override;
+void glGetBufferParameterivFn(GLenum target,
+ GLenum pname,
+ GLint* params) override;
+GLenum glGetErrorFn(void) override;
+void glGetFenceivNVFn(GLuint fence, GLenum pname, GLint* params) override;
+void glGetFloatvFn(GLenum pname, GLfloat* params) override;
+GLint glGetFragDataLocationFn(GLuint program, const char* name) override;
+void glGetFramebufferAttachmentParameterivEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* params) override;
+GLenum glGetGraphicsResetStatusARBFn(void) override;
+void glGetInteger64i_vFn(GLenum target, GLuint index, GLint64* data) override;
+void glGetInteger64vFn(GLenum pname, GLint64* params) override;
+void glGetIntegeri_vFn(GLenum target, GLuint index, GLint* data) override;
+void glGetIntegervFn(GLenum pname, GLint* params) override;
+void glGetInternalformativFn(GLenum target,
+ GLenum internalformat,
+ GLenum pname,
+ GLsizei bufSize,
+ GLint* params) override;
+void glGetProgramBinaryFn(GLuint program,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* binaryFormat,
+ GLvoid* binary) override;
+void glGetProgramInfoLogFn(GLuint program,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) override;
+void glGetProgramivFn(GLuint program, GLenum pname, GLint* params) 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;
+void glGetSamplerParameterfvFn(GLuint sampler,
+ GLenum pname,
+ GLfloat* params) override;
+void glGetSamplerParameterivFn(GLuint sampler,
+ GLenum pname,
+ GLint* params) override;
+void glGetShaderInfoLogFn(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) override;
+void glGetShaderivFn(GLuint shader, GLenum pname, GLint* params) override;
+void glGetShaderPrecisionFormatFn(GLenum shadertype,
+ GLenum precisiontype,
+ GLint* range,
+ GLint* precision) override;
+void glGetShaderSourceFn(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) override;
+const GLubyte* glGetStringFn(GLenum name) override;
+void glGetSyncivFn(GLsync sync,
+ GLenum pname,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLint* values) override;
+void glGetTexLevelParameterfvFn(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLfloat* params) override;
+void glGetTexLevelParameterivFn(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLint* params) override;
+void glGetTexParameterfvFn(GLenum target,
+ GLenum pname,
+ GLfloat* params) override;
+void glGetTexParameterivFn(GLenum target, GLenum pname, GLint* params) override;
+void glGetTransformFeedbackVaryingFn(GLuint program,
+ GLuint index,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* type,
+ char* name) override;
+void glGetTranslatedShaderSourceANGLEFn(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) override;
+GLuint glGetUniformBlockIndexFn(GLuint program,
+ const char* uniformBlockName) override;
+void glGetUniformfvFn(GLuint program, GLint location, GLfloat* params) override;
+void glGetUniformIndicesFn(GLuint program,
+ GLsizei uniformCount,
+ const char* const* uniformNames,
+ GLuint* uniformIndices) override;
+void glGetUniformivFn(GLuint program, GLint location, GLint* params) override;
+GLint glGetUniformLocationFn(GLuint program, const char* name) override;
+void glGetVertexAttribfvFn(GLuint index,
+ GLenum pname,
+ GLfloat* params) override;
+void glGetVertexAttribivFn(GLuint index, GLenum pname, GLint* params) override;
+void glGetVertexAttribPointervFn(GLuint index,
+ GLenum pname,
+ void** pointer) override;
+void glHintFn(GLenum target, GLenum mode) override;
+void glInsertEventMarkerEXTFn(GLsizei length, const char* marker) override;
+void glInvalidateFramebufferFn(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments) override;
+void glInvalidateSubFramebufferFn(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments,
+ GLint x,
+ GLint y,
+ GLint width,
+ GLint height) override;
+GLboolean glIsBufferFn(GLuint buffer) override;
+GLboolean glIsEnabledFn(GLenum cap) override;
+GLboolean glIsFenceAPPLEFn(GLuint fence) override;
+GLboolean glIsFenceNVFn(GLuint fence) override;
+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;
+GLboolean glIsSyncFn(GLsync sync) override;
+GLboolean glIsTextureFn(GLuint texture) override;
+GLboolean glIsTransformFeedbackFn(GLuint id) override;
+GLboolean glIsVertexArrayOESFn(GLuint array) override;
+void glLineWidthFn(GLfloat width) override;
+void glLinkProgramFn(GLuint program) override;
+void* glMapBufferFn(GLenum target, GLenum access) override;
+void* glMapBufferRangeFn(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length,
+ GLbitfield access) override;
+void glMatrixLoadfEXTFn(GLenum matrixMode, const GLfloat* m) override;
+void glMatrixLoadIdentityEXTFn(GLenum matrixMode) override;
+void glPauseTransformFeedbackFn(void) override;
+void glPixelStoreiFn(GLenum pname, GLint param) override;
+void glPointParameteriFn(GLenum pname, GLint param) override;
+void glPolygonOffsetFn(GLfloat factor, GLfloat units) override;
+void glPopGroupMarkerEXTFn(void) override;
+void glProgramBinaryFn(GLuint program,
+ GLenum binaryFormat,
+ const GLvoid* binary,
+ GLsizei length) override;
+void glProgramParameteriFn(GLuint program, GLenum pname, GLint value) override;
+void glPushGroupMarkerEXTFn(GLsizei length, const char* marker) override;
+void glQueryCounterFn(GLuint id, GLenum target) override;
+void glReadBufferFn(GLenum src) override;
+void glReadPixelsFn(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ void* pixels) override;
+void glReleaseShaderCompilerFn(void) override;
+void glRenderbufferStorageEXTFn(GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
+void glRenderbufferStorageMultisampleFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
+void glRenderbufferStorageMultisampleANGLEFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
+void glRenderbufferStorageMultisampleEXTFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
+void glRenderbufferStorageMultisampleIMGFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
+void glResumeTransformFeedbackFn(void) override;
+void glSampleCoverageFn(GLclampf value, GLboolean invert) override;
+void glSamplerParameterfFn(GLuint sampler,
+ GLenum pname,
+ GLfloat param) override;
+void glSamplerParameterfvFn(GLuint sampler,
+ GLenum pname,
+ const GLfloat* params) override;
+void glSamplerParameteriFn(GLuint sampler, GLenum pname, GLint param) override;
+void glSamplerParameterivFn(GLuint sampler,
+ GLenum pname,
+ const GLint* params) override;
+void glScissorFn(GLint x, GLint y, GLsizei width, GLsizei height) override;
+void glSetFenceAPPLEFn(GLuint fence) override;
+void glSetFenceNVFn(GLuint fence, GLenum condition) override;
+void glShaderBinaryFn(GLsizei n,
+ const GLuint* shaders,
+ GLenum binaryformat,
+ const void* binary,
+ GLsizei length) override;
+void glShaderSourceFn(GLuint shader,
+ GLsizei count,
+ const char* const* str,
+ const GLint* length) override;
+void glStencilFuncFn(GLenum func, GLint ref, GLuint mask) override;
+void glStencilFuncSeparateFn(GLenum face,
+ GLenum func,
+ GLint ref,
+ GLuint mask) override;
+void glStencilMaskFn(GLuint mask) override;
+void glStencilMaskSeparateFn(GLenum face, GLuint mask) override;
+void glStencilOpFn(GLenum fail, GLenum zfail, GLenum zpass) override;
+void glStencilOpSeparateFn(GLenum face,
+ GLenum fail,
+ GLenum zfail,
+ GLenum zpass) override;
+GLboolean glTestFenceAPPLEFn(GLuint fence) override;
+GLboolean glTestFenceNVFn(GLuint fence) override;
+void glTexImage2DFn(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
+void glTexImage3DFn(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
+void glTexParameterfFn(GLenum target, GLenum pname, GLfloat param) override;
+void glTexParameterfvFn(GLenum target,
+ GLenum pname,
+ const GLfloat* params) override;
+void glTexParameteriFn(GLenum target, GLenum pname, GLint param) override;
+void glTexParameterivFn(GLenum target,
+ GLenum pname,
+ const GLint* params) override;
+void glTexStorage2DEXTFn(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) override;
+void glTexStorage3DFn(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth) override;
+void glTexSubImage2DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels) override;
+void glTransformFeedbackVaryingsFn(GLuint program,
+ GLsizei count,
+ const char* const* varyings,
+ GLenum bufferMode) override;
+void glUniform1fFn(GLint location, GLfloat x) override;
+void glUniform1fvFn(GLint location, GLsizei count, const GLfloat* v) override;
+void glUniform1iFn(GLint location, GLint x) override;
+void glUniform1ivFn(GLint location, GLsizei count, const GLint* v) override;
+void glUniform1uiFn(GLint location, GLuint v0) override;
+void glUniform1uivFn(GLint location, GLsizei count, const GLuint* v) override;
+void glUniform2fFn(GLint location, GLfloat x, GLfloat y) override;
+void glUniform2fvFn(GLint location, GLsizei count, const GLfloat* v) override;
+void glUniform2iFn(GLint location, GLint x, GLint y) override;
+void glUniform2ivFn(GLint location, GLsizei count, const GLint* v) override;
+void glUniform2uiFn(GLint location, GLuint v0, GLuint v1) override;
+void glUniform2uivFn(GLint location, GLsizei count, const GLuint* v) override;
+void glUniform3fFn(GLint location, GLfloat x, GLfloat y, GLfloat z) override;
+void glUniform3fvFn(GLint location, GLsizei count, const GLfloat* v) override;
+void glUniform3iFn(GLint location, GLint x, GLint y, GLint z) override;
+void glUniform3ivFn(GLint location, GLsizei count, const GLint* v) override;
+void glUniform3uiFn(GLint location, GLuint v0, GLuint v1, GLuint v2) override;
+void glUniform3uivFn(GLint location, GLsizei count, const GLuint* v) override;
+void glUniform4fFn(GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) override;
+void glUniform4fvFn(GLint location, GLsizei count, const GLfloat* v) override;
+void glUniform4iFn(GLint location, GLint x, GLint y, GLint z, GLint w) override;
+void glUniform4ivFn(GLint location, GLsizei count, const GLint* v) override;
+void glUniform4uiFn(GLint location,
+ GLuint v0,
+ GLuint v1,
+ GLuint v2,
+ GLuint v3) override;
+void glUniform4uivFn(GLint location, GLsizei count, const GLuint* v) override;
+void glUniformBlockBindingFn(GLuint program,
+ GLuint uniformBlockIndex,
+ GLuint uniformBlockBinding) override;
+void glUniformMatrix2fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+void glUniformMatrix2x3fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+void glUniformMatrix2x4fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+void glUniformMatrix3fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+void glUniformMatrix3x2fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+void glUniformMatrix3x4fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+void glUniformMatrix4fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+void glUniformMatrix4x2fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+void glUniformMatrix4x3fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) override;
+GLboolean glUnmapBufferFn(GLenum target) override;
+void glUseProgramFn(GLuint program) override;
+void glValidateProgramFn(GLuint program) override;
+void glVertexAttrib1fFn(GLuint indx, GLfloat x) override;
+void glVertexAttrib1fvFn(GLuint indx, const GLfloat* values) override;
+void glVertexAttrib2fFn(GLuint indx, GLfloat x, GLfloat y) override;
+void glVertexAttrib2fvFn(GLuint indx, const GLfloat* values) override;
+void glVertexAttrib3fFn(GLuint indx, GLfloat x, GLfloat y, GLfloat z) override;
+void glVertexAttrib3fvFn(GLuint indx, const GLfloat* values) override;
+void glVertexAttrib4fFn(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) override;
+void glVertexAttrib4fvFn(GLuint indx, const GLfloat* values) override;
+void glVertexAttribDivisorANGLEFn(GLuint index, GLuint divisor) override;
+void glVertexAttribI4iFn(GLuint indx,
+ GLint x,
+ GLint y,
+ GLint z,
+ GLint w) override;
+void glVertexAttribI4ivFn(GLuint indx, const GLint* values) override;
+void glVertexAttribI4uiFn(GLuint indx,
+ GLuint x,
+ GLuint y,
+ GLuint z,
+ GLuint w) override;
+void glVertexAttribI4uivFn(GLuint indx, const GLuint* values) override;
+void glVertexAttribIPointerFn(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLsizei stride,
+ const void* ptr) override;
+void glVertexAttribPointerFn(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLboolean normalized,
+ GLsizei stride,
+ const void* ptr) override;
+void glViewportFn(GLint x, GLint y, GLsizei width, GLsizei height) override;
+GLenum glWaitSyncFn(GLsync sync, GLbitfield flags, GLuint64 timeout) override;
diff --git a/ui/gl/gl_bindings_api_autogen_glx.h b/ui/gl/gl_bindings_api_autogen_glx.h
new file mode 100644
index 0000000..7efbae1
--- /dev/null
+++ b/ui/gl/gl_bindings_api_autogen_glx.h
@@ -0,0 +1,133 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+void glXBindTexImageEXTFn(Display* dpy,
+ GLXDrawable drawable,
+ int buffer,
+ int* attribList) override;
+GLXFBConfig* glXChooseFBConfigFn(Display* dpy,
+ int screen,
+ const int* attribList,
+ int* nitems) override;
+XVisualInfo* glXChooseVisualFn(Display* dpy,
+ int screen,
+ int* attribList) override;
+void glXCopyContextFn(Display* dpy,
+ GLXContext src,
+ GLXContext dst,
+ unsigned long mask) override;
+void glXCopySubBufferMESAFn(Display* dpy,
+ GLXDrawable drawable,
+ int x,
+ int y,
+ int width,
+ int height) override;
+GLXContext glXCreateContextFn(Display* dpy,
+ XVisualInfo* vis,
+ GLXContext shareList,
+ int direct) override;
+GLXContext glXCreateContextAttribsARBFn(Display* dpy,
+ GLXFBConfig config,
+ GLXContext share_context,
+ int direct,
+ const int* attrib_list) override;
+GLXPixmap glXCreateGLXPixmapFn(Display* dpy,
+ XVisualInfo* visual,
+ Pixmap pixmap) override;
+GLXContext glXCreateNewContextFn(Display* dpy,
+ GLXFBConfig config,
+ int renderType,
+ GLXContext shareList,
+ int direct) override;
+GLXPbuffer glXCreatePbufferFn(Display* dpy,
+ GLXFBConfig config,
+ const int* attribList) override;
+GLXPixmap glXCreatePixmapFn(Display* dpy,
+ GLXFBConfig config,
+ Pixmap pixmap,
+ const int* attribList) override;
+GLXWindow glXCreateWindowFn(Display* dpy,
+ GLXFBConfig config,
+ Window win,
+ const int* attribList) override;
+void glXDestroyContextFn(Display* dpy, GLXContext ctx) override;
+void glXDestroyGLXPixmapFn(Display* dpy, GLXPixmap pixmap) override;
+void glXDestroyPbufferFn(Display* dpy, GLXPbuffer pbuf) override;
+void glXDestroyPixmapFn(Display* dpy, GLXPixmap pixmap) override;
+void glXDestroyWindowFn(Display* dpy, GLXWindow window) override;
+const char* glXGetClientStringFn(Display* dpy, int name) override;
+int glXGetConfigFn(Display* dpy,
+ XVisualInfo* visual,
+ int attrib,
+ int* value) override;
+GLXContext glXGetCurrentContextFn(void) override;
+Display* glXGetCurrentDisplayFn(void) override;
+GLXDrawable glXGetCurrentDrawableFn(void) override;
+GLXDrawable glXGetCurrentReadDrawableFn(void) override;
+int glXGetFBConfigAttribFn(Display* dpy,
+ GLXFBConfig config,
+ int attribute,
+ int* value) override;
+GLXFBConfig glXGetFBConfigFromVisualSGIXFn(Display* dpy,
+ XVisualInfo* visualInfo) override;
+GLXFBConfig* glXGetFBConfigsFn(Display* dpy,
+ int screen,
+ int* nelements) override;
+bool glXGetMscRateOMLFn(Display* dpy,
+ GLXDrawable drawable,
+ int32* numerator,
+ int32* denominator) override;
+void glXGetSelectedEventFn(Display* dpy,
+ GLXDrawable drawable,
+ unsigned long* mask) override;
+bool glXGetSyncValuesOMLFn(Display* dpy,
+ GLXDrawable drawable,
+ int64* ust,
+ int64* msc,
+ int64* sbc) override;
+XVisualInfo* glXGetVisualFromFBConfigFn(Display* dpy,
+ GLXFBConfig config) override;
+int glXIsDirectFn(Display* dpy, GLXContext ctx) override;
+int glXMakeContextCurrentFn(Display* dpy,
+ GLXDrawable draw,
+ GLXDrawable read,
+ GLXContext ctx) override;
+int glXMakeCurrentFn(Display* dpy,
+ GLXDrawable drawable,
+ GLXContext ctx) override;
+int glXQueryContextFn(Display* dpy,
+ GLXContext ctx,
+ int attribute,
+ int* value) override;
+void glXQueryDrawableFn(Display* dpy,
+ GLXDrawable draw,
+ int attribute,
+ unsigned int* value) override;
+int glXQueryExtensionFn(Display* dpy, int* errorb, int* event) override;
+const char* glXQueryExtensionsStringFn(Display* dpy, int screen) override;
+const char* glXQueryServerStringFn(Display* dpy, int screen, int name) override;
+int glXQueryVersionFn(Display* dpy, int* maj, int* min) override;
+void glXReleaseTexImageEXTFn(Display* dpy,
+ GLXDrawable drawable,
+ int buffer) override;
+void glXSelectEventFn(Display* dpy,
+ GLXDrawable drawable,
+ unsigned long mask) override;
+void glXSwapBuffersFn(Display* dpy, GLXDrawable drawable) override;
+void glXSwapIntervalEXTFn(Display* dpy,
+ GLXDrawable drawable,
+ int interval) override;
+void glXSwapIntervalMESAFn(unsigned int interval) override;
+void glXUseXFontFn(Font font, int first, int count, int list) override;
+void glXWaitGLFn(void) override;
+int glXWaitVideoSyncSGIFn(int divisor,
+ int remainder,
+ unsigned int* count) override;
+void glXWaitXFn(void) override;
diff --git a/ui/gl/gl_bindings_api_autogen_osmesa.h b/ui/gl/gl_bindings_api_autogen_osmesa.h
new file mode 100644
index 0000000..c061275
--- /dev/null
+++ b/ui/gl/gl_bindings_api_autogen_osmesa.h
@@ -0,0 +1,38 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+void OSMesaColorClampFn(GLboolean enable) override;
+OSMesaContext OSMesaCreateContextFn(GLenum format,
+ OSMesaContext sharelist) override;
+OSMesaContext OSMesaCreateContextExtFn(GLenum format,
+ GLint depthBits,
+ GLint stencilBits,
+ GLint accumBits,
+ OSMesaContext sharelist) override;
+void OSMesaDestroyContextFn(OSMesaContext ctx) override;
+GLboolean OSMesaGetColorBufferFn(OSMesaContext c,
+ GLint* width,
+ GLint* height,
+ GLint* format,
+ void** buffer) override;
+OSMesaContext OSMesaGetCurrentContextFn(void) override;
+GLboolean OSMesaGetDepthBufferFn(OSMesaContext c,
+ GLint* width,
+ GLint* height,
+ GLint* bytesPerValue,
+ void** buffer) override;
+void OSMesaGetIntegervFn(GLint pname, GLint* value) override;
+OSMESAproc OSMesaGetProcAddressFn(const char* funcName) override;
+GLboolean OSMesaMakeCurrentFn(OSMesaContext ctx,
+ void* buffer,
+ GLenum type,
+ GLsizei width,
+ GLsizei height) override;
+void OSMesaPixelStoreFn(GLint pname, GLint value) override;
diff --git a/ui/gl/gl_bindings_api_autogen_wgl.h b/ui/gl/gl_bindings_api_autogen_wgl.h
new file mode 100644
index 0000000..18b471d
--- /dev/null
+++ b/ui/gl/gl_bindings_api_autogen_wgl.h
@@ -0,0 +1,39 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+BOOL wglChoosePixelFormatARBFn(HDC dc,
+ const int* int_attrib_list,
+ const float* float_attrib_list,
+ UINT max_formats,
+ int* formats,
+ UINT* num_formats) override;
+BOOL wglCopyContextFn(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) override;
+HGLRC wglCreateContextFn(HDC hdc) override;
+HGLRC wglCreateLayerContextFn(HDC hdc, int iLayerPlane) override;
+HPBUFFERARB wglCreatePbufferARBFn(HDC hDC,
+ int iPixelFormat,
+ int iWidth,
+ int iHeight,
+ const int* piAttribList) override;
+BOOL wglDeleteContextFn(HGLRC hglrc) override;
+BOOL wglDestroyPbufferARBFn(HPBUFFERARB hPbuffer) override;
+HGLRC wglGetCurrentContextFn() override;
+HDC wglGetCurrentDCFn() override;
+const char* wglGetExtensionsStringARBFn(HDC hDC) override;
+const char* wglGetExtensionsStringEXTFn() override;
+HDC wglGetPbufferDCARBFn(HPBUFFERARB hPbuffer) override;
+BOOL wglMakeCurrentFn(HDC hdc, HGLRC hglrc) override;
+BOOL wglQueryPbufferARBFn(HPBUFFERARB hPbuffer,
+ int iAttribute,
+ int* piValue) override;
+int wglReleasePbufferDCARBFn(HPBUFFERARB hPbuffer, HDC hDC) override;
+BOOL wglShareListsFn(HGLRC hglrc1, HGLRC hglrc2) override;
+BOOL wglSwapIntervalEXTFn(int interval) override;
+BOOL wglSwapLayerBuffersFn(HDC hdc, UINT fuPlanes) override;
diff --git a/ui/gl/gl_bindings_autogen_egl.cc b/ui/gl/gl_bindings_autogen_egl.cc
new file mode 100644
index 0000000..051e1b3
--- /dev/null
+++ b/ui/gl/gl_bindings_autogen_egl.cc
@@ -0,0 +1,1428 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+#include <string>
+
+#include "base/debug/trace_event.h"
+#include "ui/gl/gl_bindings.h"
+#include "ui/gl/gl_context.h"
+#include "ui/gl/gl_egl_api_implementation.h"
+#include "ui/gl/gl_enums.h"
+#include "ui/gl/gl_implementation.h"
+#include "ui/gl/gl_version_info.h"
+
+namespace gfx {
+
+static bool g_debugBindingsInitialized;
+DriverEGL g_driver_egl;
+
+void DriverEGL::InitializeStaticBindings() {
+ fn.eglBindAPIFn =
+ reinterpret_cast<eglBindAPIProc>(GetGLProcAddress("eglBindAPI"));
+ fn.eglBindTexImageFn = reinterpret_cast<eglBindTexImageProc>(
+ GetGLProcAddress("eglBindTexImage"));
+ fn.eglChooseConfigFn = reinterpret_cast<eglChooseConfigProc>(
+ GetGLProcAddress("eglChooseConfig"));
+ fn.eglClientWaitSyncKHRFn = reinterpret_cast<eglClientWaitSyncKHRProc>(
+ GetGLProcAddress("eglClientWaitSyncKHR"));
+ fn.eglCopyBuffersFn =
+ reinterpret_cast<eglCopyBuffersProc>(GetGLProcAddress("eglCopyBuffers"));
+ fn.eglCreateContextFn = reinterpret_cast<eglCreateContextProc>(
+ GetGLProcAddress("eglCreateContext"));
+ fn.eglCreateImageKHRFn = reinterpret_cast<eglCreateImageKHRProc>(
+ GetGLProcAddress("eglCreateImageKHR"));
+ fn.eglCreatePbufferFromClientBufferFn =
+ reinterpret_cast<eglCreatePbufferFromClientBufferProc>(
+ GetGLProcAddress("eglCreatePbufferFromClientBuffer"));
+ fn.eglCreatePbufferSurfaceFn = reinterpret_cast<eglCreatePbufferSurfaceProc>(
+ GetGLProcAddress("eglCreatePbufferSurface"));
+ fn.eglCreatePixmapSurfaceFn = reinterpret_cast<eglCreatePixmapSurfaceProc>(
+ GetGLProcAddress("eglCreatePixmapSurface"));
+ fn.eglCreateSyncKHRFn = reinterpret_cast<eglCreateSyncKHRProc>(
+ GetGLProcAddress("eglCreateSyncKHR"));
+ fn.eglCreateWindowSurfaceFn = reinterpret_cast<eglCreateWindowSurfaceProc>(
+ GetGLProcAddress("eglCreateWindowSurface"));
+ fn.eglDestroyContextFn = reinterpret_cast<eglDestroyContextProc>(
+ GetGLProcAddress("eglDestroyContext"));
+ fn.eglDestroyImageKHRFn = reinterpret_cast<eglDestroyImageKHRProc>(
+ GetGLProcAddress("eglDestroyImageKHR"));
+ fn.eglDestroySurfaceFn = reinterpret_cast<eglDestroySurfaceProc>(
+ GetGLProcAddress("eglDestroySurface"));
+ fn.eglDestroySyncKHRFn = reinterpret_cast<eglDestroySyncKHRProc>(
+ GetGLProcAddress("eglDestroySyncKHR"));
+ fn.eglGetConfigAttribFn = reinterpret_cast<eglGetConfigAttribProc>(
+ GetGLProcAddress("eglGetConfigAttrib"));
+ fn.eglGetConfigsFn =
+ reinterpret_cast<eglGetConfigsProc>(GetGLProcAddress("eglGetConfigs"));
+ fn.eglGetCurrentContextFn = reinterpret_cast<eglGetCurrentContextProc>(
+ GetGLProcAddress("eglGetCurrentContext"));
+ fn.eglGetCurrentDisplayFn = reinterpret_cast<eglGetCurrentDisplayProc>(
+ GetGLProcAddress("eglGetCurrentDisplay"));
+ fn.eglGetCurrentSurfaceFn = reinterpret_cast<eglGetCurrentSurfaceProc>(
+ GetGLProcAddress("eglGetCurrentSurface"));
+ fn.eglGetDisplayFn =
+ reinterpret_cast<eglGetDisplayProc>(GetGLProcAddress("eglGetDisplay"));
+ fn.eglGetErrorFn =
+ reinterpret_cast<eglGetErrorProc>(GetGLProcAddress("eglGetError"));
+ fn.eglGetPlatformDisplayEXTFn =
+ reinterpret_cast<eglGetPlatformDisplayEXTProc>(
+ GetGLProcAddress("eglGetPlatformDisplayEXT"));
+ fn.eglGetProcAddressFn = reinterpret_cast<eglGetProcAddressProc>(
+ GetGLProcAddress("eglGetProcAddress"));
+ fn.eglGetSyncAttribKHRFn = reinterpret_cast<eglGetSyncAttribKHRProc>(
+ GetGLProcAddress("eglGetSyncAttribKHR"));
+ fn.eglGetSyncValuesCHROMIUMFn =
+ reinterpret_cast<eglGetSyncValuesCHROMIUMProc>(
+ GetGLProcAddress("eglGetSyncValuesCHROMIUM"));
+ fn.eglInitializeFn =
+ reinterpret_cast<eglInitializeProc>(GetGLProcAddress("eglInitialize"));
+ fn.eglMakeCurrentFn =
+ reinterpret_cast<eglMakeCurrentProc>(GetGLProcAddress("eglMakeCurrent"));
+ fn.eglPostSubBufferNVFn = reinterpret_cast<eglPostSubBufferNVProc>(
+ GetGLProcAddress("eglPostSubBufferNV"));
+ fn.eglQueryAPIFn =
+ reinterpret_cast<eglQueryAPIProc>(GetGLProcAddress("eglQueryAPI"));
+ fn.eglQueryContextFn = reinterpret_cast<eglQueryContextProc>(
+ GetGLProcAddress("eglQueryContext"));
+ fn.eglQueryStringFn =
+ reinterpret_cast<eglQueryStringProc>(GetGLProcAddress("eglQueryString"));
+ fn.eglQuerySurfaceFn = reinterpret_cast<eglQuerySurfaceProc>(
+ GetGLProcAddress("eglQuerySurface"));
+ fn.eglQuerySurfacePointerANGLEFn =
+ reinterpret_cast<eglQuerySurfacePointerANGLEProc>(
+ GetGLProcAddress("eglQuerySurfacePointerANGLE"));
+ fn.eglReleaseTexImageFn = reinterpret_cast<eglReleaseTexImageProc>(
+ GetGLProcAddress("eglReleaseTexImage"));
+ fn.eglReleaseThreadFn = reinterpret_cast<eglReleaseThreadProc>(
+ GetGLProcAddress("eglReleaseThread"));
+ fn.eglSurfaceAttribFn = reinterpret_cast<eglSurfaceAttribProc>(
+ GetGLProcAddress("eglSurfaceAttrib"));
+ fn.eglSwapBuffersFn =
+ reinterpret_cast<eglSwapBuffersProc>(GetGLProcAddress("eglSwapBuffers"));
+ fn.eglSwapIntervalFn = reinterpret_cast<eglSwapIntervalProc>(
+ GetGLProcAddress("eglSwapInterval"));
+ fn.eglTerminateFn =
+ reinterpret_cast<eglTerminateProc>(GetGLProcAddress("eglTerminate"));
+ fn.eglWaitClientFn =
+ reinterpret_cast<eglWaitClientProc>(GetGLProcAddress("eglWaitClient"));
+ fn.eglWaitGLFn =
+ reinterpret_cast<eglWaitGLProc>(GetGLProcAddress("eglWaitGL"));
+ fn.eglWaitNativeFn =
+ reinterpret_cast<eglWaitNativeProc>(GetGLProcAddress("eglWaitNative"));
+ fn.eglWaitSyncKHRFn =
+ reinterpret_cast<eglWaitSyncKHRProc>(GetGLProcAddress("eglWaitSyncKHR"));
+}
+
+void DriverEGL::InitializeDynamicBindings(GLContext* context) {
+ DCHECK(context && context->IsCurrent(NULL));
+ const GLVersionInfo* ver = context->GetVersionInfo();
+ ALLOW_UNUSED_LOCAL(ver);
+ std::string extensions = context->GetExtensions() + " ";
+ ALLOW_UNUSED_LOCAL(extensions);
+
+ ext.b_EGL_ANGLE_d3d_share_handle_client_buffer =
+ extensions.find("EGL_ANGLE_d3d_share_handle_client_buffer ") !=
+ std::string::npos;
+ ext.b_EGL_ANGLE_platform_angle =
+ extensions.find("EGL_ANGLE_platform_angle ") != std::string::npos;
+ ext.b_EGL_ANGLE_query_surface_pointer =
+ extensions.find("EGL_ANGLE_query_surface_pointer ") != std::string::npos;
+ ext.b_EGL_ANGLE_surface_d3d_texture_2d_share_handle =
+ extensions.find("EGL_ANGLE_surface_d3d_texture_2d_share_handle ") !=
+ std::string::npos;
+ ext.b_EGL_CHROMIUM_sync_control =
+ extensions.find("EGL_CHROMIUM_sync_control ") != std::string::npos;
+ ext.b_EGL_KHR_fence_sync =
+ extensions.find("EGL_KHR_fence_sync ") != std::string::npos;
+ ext.b_EGL_KHR_gl_texture_2D_image =
+ extensions.find("EGL_KHR_gl_texture_2D_image ") != std::string::npos;
+ ext.b_EGL_KHR_image_base =
+ extensions.find("EGL_KHR_image_base ") != std::string::npos;
+ ext.b_EGL_KHR_wait_sync =
+ extensions.find("EGL_KHR_wait_sync ") != std::string::npos;
+ ext.b_EGL_NV_post_sub_buffer =
+ extensions.find("EGL_NV_post_sub_buffer ") != std::string::npos;
+
+ if (g_debugBindingsInitialized)
+ InitializeDebugBindings();
+}
+
+extern "C" {
+
+static EGLBoolean GL_BINDING_CALL Debug_eglBindAPI(EGLenum api) {
+ GL_SERVICE_LOG("eglBindAPI"
+ << "(" << api << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglBindAPIFn(api);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL
+Debug_eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) {
+ GL_SERVICE_LOG("eglBindTexImage"
+ << "(" << dpy << ", " << surface << ", " << buffer << ")");
+ EGLBoolean result =
+ g_driver_egl.debug_fn.eglBindTexImageFn(dpy, surface, buffer);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL
+Debug_eglChooseConfig(EGLDisplay dpy,
+ const EGLint* attrib_list,
+ EGLConfig* configs,
+ EGLint config_size,
+ EGLint* num_config) {
+ GL_SERVICE_LOG("eglChooseConfig"
+ << "(" << dpy << ", " << static_cast<const void*>(attrib_list)
+ << ", " << static_cast<const void*>(configs) << ", "
+ << config_size << ", " << static_cast<const void*>(num_config)
+ << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglChooseConfigFn(
+ dpy, attrib_list, configs, config_size, num_config);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLint GL_BINDING_CALL Debug_eglClientWaitSyncKHR(EGLDisplay dpy,
+ EGLSyncKHR sync,
+ EGLint flags,
+ EGLTimeKHR timeout) {
+ GL_SERVICE_LOG("eglClientWaitSyncKHR"
+ << "(" << dpy << ", " << sync << ", " << flags << ", "
+ << timeout << ")");
+ EGLint result =
+ g_driver_egl.debug_fn.eglClientWaitSyncKHRFn(dpy, sync, flags, timeout);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL
+Debug_eglCopyBuffers(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLNativePixmapType target) {
+ GL_SERVICE_LOG("eglCopyBuffers"
+ << "(" << dpy << ", " << surface << ", " << target << ")");
+ EGLBoolean result =
+ g_driver_egl.debug_fn.eglCopyBuffersFn(dpy, surface, target);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLContext GL_BINDING_CALL
+Debug_eglCreateContext(EGLDisplay dpy,
+ EGLConfig config,
+ EGLContext share_context,
+ const EGLint* attrib_list) {
+ GL_SERVICE_LOG("eglCreateContext"
+ << "(" << dpy << ", " << config << ", " << share_context
+ << ", " << static_cast<const void*>(attrib_list) << ")");
+ EGLContext result = g_driver_egl.debug_fn.eglCreateContextFn(
+ dpy, config, share_context, attrib_list);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLImageKHR GL_BINDING_CALL
+Debug_eglCreateImageKHR(EGLDisplay dpy,
+ EGLContext ctx,
+ EGLenum target,
+ EGLClientBuffer buffer,
+ const EGLint* attrib_list) {
+ GL_SERVICE_LOG("eglCreateImageKHR"
+ << "(" << dpy << ", " << ctx << ", " << target << ", "
+ << buffer << ", " << static_cast<const void*>(attrib_list)
+ << ")");
+ EGLImageKHR result = g_driver_egl.debug_fn.eglCreateImageKHRFn(
+ dpy, ctx, target, buffer, attrib_list);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLSurface GL_BINDING_CALL
+Debug_eglCreatePbufferFromClientBuffer(EGLDisplay dpy,
+ EGLenum buftype,
+ void* buffer,
+ EGLConfig config,
+ const EGLint* attrib_list) {
+ GL_SERVICE_LOG("eglCreatePbufferFromClientBuffer"
+ << "(" << dpy << ", " << buftype << ", "
+ << static_cast<const void*>(buffer) << ", " << config << ", "
+ << static_cast<const void*>(attrib_list) << ")");
+ EGLSurface result = g_driver_egl.debug_fn.eglCreatePbufferFromClientBufferFn(
+ dpy, buftype, buffer, config, attrib_list);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLSurface GL_BINDING_CALL
+Debug_eglCreatePbufferSurface(EGLDisplay dpy,
+ EGLConfig config,
+ const EGLint* attrib_list) {
+ GL_SERVICE_LOG("eglCreatePbufferSurface"
+ << "(" << dpy << ", " << config << ", "
+ << static_cast<const void*>(attrib_list) << ")");
+ EGLSurface result =
+ g_driver_egl.debug_fn.eglCreatePbufferSurfaceFn(dpy, config, attrib_list);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLSurface GL_BINDING_CALL
+Debug_eglCreatePixmapSurface(EGLDisplay dpy,
+ EGLConfig config,
+ EGLNativePixmapType pixmap,
+ const EGLint* attrib_list) {
+ GL_SERVICE_LOG("eglCreatePixmapSurface"
+ << "(" << dpy << ", " << config << ", " << pixmap << ", "
+ << static_cast<const void*>(attrib_list) << ")");
+ EGLSurface result = g_driver_egl.debug_fn.eglCreatePixmapSurfaceFn(
+ dpy, config, pixmap, attrib_list);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLSyncKHR GL_BINDING_CALL
+Debug_eglCreateSyncKHR(EGLDisplay dpy,
+ EGLenum type,
+ const EGLint* attrib_list) {
+ GL_SERVICE_LOG("eglCreateSyncKHR"
+ << "(" << dpy << ", " << type << ", "
+ << static_cast<const void*>(attrib_list) << ")");
+ EGLSyncKHR result =
+ g_driver_egl.debug_fn.eglCreateSyncKHRFn(dpy, type, attrib_list);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLSurface GL_BINDING_CALL
+Debug_eglCreateWindowSurface(EGLDisplay dpy,
+ EGLConfig config,
+ EGLNativeWindowType win,
+ const EGLint* attrib_list) {
+ GL_SERVICE_LOG("eglCreateWindowSurface"
+ << "(" << dpy << ", " << config << ", " << win << ", "
+ << static_cast<const void*>(attrib_list) << ")");
+ EGLSurface result = g_driver_egl.debug_fn.eglCreateWindowSurfaceFn(
+ dpy, config, win, attrib_list);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL
+Debug_eglDestroyContext(EGLDisplay dpy, EGLContext ctx) {
+ GL_SERVICE_LOG("eglDestroyContext"
+ << "(" << dpy << ", " << ctx << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglDestroyContextFn(dpy, ctx);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL
+Debug_eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image) {
+ GL_SERVICE_LOG("eglDestroyImageKHR"
+ << "(" << dpy << ", " << image << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglDestroyImageKHRFn(dpy, image);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL
+Debug_eglDestroySurface(EGLDisplay dpy, EGLSurface surface) {
+ GL_SERVICE_LOG("eglDestroySurface"
+ << "(" << dpy << ", " << surface << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglDestroySurfaceFn(dpy, surface);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL
+Debug_eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync) {
+ GL_SERVICE_LOG("eglDestroySyncKHR"
+ << "(" << dpy << ", " << sync << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglDestroySyncKHRFn(dpy, sync);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL Debug_eglGetConfigAttrib(EGLDisplay dpy,
+ EGLConfig config,
+ EGLint attribute,
+ EGLint* value) {
+ GL_SERVICE_LOG("eglGetConfigAttrib"
+ << "(" << dpy << ", " << config << ", " << attribute << ", "
+ << static_cast<const void*>(value) << ")");
+ EGLBoolean result =
+ g_driver_egl.debug_fn.eglGetConfigAttribFn(dpy, config, attribute, value);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL Debug_eglGetConfigs(EGLDisplay dpy,
+ EGLConfig* configs,
+ EGLint config_size,
+ EGLint* num_config) {
+ GL_SERVICE_LOG("eglGetConfigs"
+ << "(" << dpy << ", " << static_cast<const void*>(configs)
+ << ", " << config_size << ", "
+ << static_cast<const void*>(num_config) << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglGetConfigsFn(
+ dpy, configs, config_size, num_config);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLContext GL_BINDING_CALL Debug_eglGetCurrentContext(void) {
+ GL_SERVICE_LOG("eglGetCurrentContext"
+ << "("
+ << ")");
+ EGLContext result = g_driver_egl.debug_fn.eglGetCurrentContextFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLDisplay GL_BINDING_CALL Debug_eglGetCurrentDisplay(void) {
+ GL_SERVICE_LOG("eglGetCurrentDisplay"
+ << "("
+ << ")");
+ EGLDisplay result = g_driver_egl.debug_fn.eglGetCurrentDisplayFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLSurface GL_BINDING_CALL Debug_eglGetCurrentSurface(EGLint readdraw) {
+ GL_SERVICE_LOG("eglGetCurrentSurface"
+ << "(" << readdraw << ")");
+ EGLSurface result = g_driver_egl.debug_fn.eglGetCurrentSurfaceFn(readdraw);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLDisplay GL_BINDING_CALL
+Debug_eglGetDisplay(EGLNativeDisplayType display_id) {
+ GL_SERVICE_LOG("eglGetDisplay"
+ << "(" << display_id << ")");
+ EGLDisplay result = g_driver_egl.debug_fn.eglGetDisplayFn(display_id);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLint GL_BINDING_CALL Debug_eglGetError(void) {
+ GL_SERVICE_LOG("eglGetError"
+ << "("
+ << ")");
+ EGLint result = g_driver_egl.debug_fn.eglGetErrorFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLDisplay GL_BINDING_CALL
+Debug_eglGetPlatformDisplayEXT(EGLenum platform,
+ void* native_display,
+ const EGLint* attrib_list) {
+ GL_SERVICE_LOG("eglGetPlatformDisplayEXT"
+ << "(" << platform << ", "
+ << static_cast<const void*>(native_display) << ", "
+ << static_cast<const void*>(attrib_list) << ")");
+ EGLDisplay result = g_driver_egl.debug_fn.eglGetPlatformDisplayEXTFn(
+ platform, native_display, attrib_list);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static __eglMustCastToProperFunctionPointerType GL_BINDING_CALL
+Debug_eglGetProcAddress(const char* procname) {
+ GL_SERVICE_LOG("eglGetProcAddress"
+ << "(" << procname << ")");
+ __eglMustCastToProperFunctionPointerType result =
+ g_driver_egl.debug_fn.eglGetProcAddressFn(procname);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL Debug_eglGetSyncAttribKHR(EGLDisplay dpy,
+ EGLSyncKHR sync,
+ EGLint attribute,
+ EGLint* value) {
+ GL_SERVICE_LOG("eglGetSyncAttribKHR"
+ << "(" << dpy << ", " << sync << ", " << attribute << ", "
+ << static_cast<const void*>(value) << ")");
+ EGLBoolean result =
+ g_driver_egl.debug_fn.eglGetSyncAttribKHRFn(dpy, sync, attribute, value);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL
+Debug_eglGetSyncValuesCHROMIUM(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLuint64CHROMIUM* ust,
+ EGLuint64CHROMIUM* msc,
+ EGLuint64CHROMIUM* sbc) {
+ GL_SERVICE_LOG("eglGetSyncValuesCHROMIUM"
+ << "(" << dpy << ", " << surface << ", "
+ << static_cast<const void*>(ust) << ", "
+ << static_cast<const void*>(msc) << ", "
+ << static_cast<const void*>(sbc) << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglGetSyncValuesCHROMIUMFn(
+ dpy, surface, ust, msc, sbc);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL
+Debug_eglInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor) {
+ GL_SERVICE_LOG("eglInitialize"
+ << "(" << dpy << ", " << static_cast<const void*>(major)
+ << ", " << static_cast<const void*>(minor) << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglInitializeFn(dpy, major, minor);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL Debug_eglMakeCurrent(EGLDisplay dpy,
+ EGLSurface draw,
+ EGLSurface read,
+ EGLContext ctx) {
+ GL_SERVICE_LOG("eglMakeCurrent"
+ << "(" << dpy << ", " << draw << ", " << read << ", " << ctx
+ << ")");
+ EGLBoolean result =
+ g_driver_egl.debug_fn.eglMakeCurrentFn(dpy, draw, read, ctx);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL Debug_eglPostSubBufferNV(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint x,
+ EGLint y,
+ EGLint width,
+ EGLint height) {
+ GL_SERVICE_LOG("eglPostSubBufferNV"
+ << "(" << dpy << ", " << surface << ", " << x << ", " << y
+ << ", " << width << ", " << height << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglPostSubBufferNVFn(
+ dpy, surface, x, y, width, height);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLenum GL_BINDING_CALL Debug_eglQueryAPI(void) {
+ GL_SERVICE_LOG("eglQueryAPI"
+ << "("
+ << ")");
+ EGLenum result = g_driver_egl.debug_fn.eglQueryAPIFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL Debug_eglQueryContext(EGLDisplay dpy,
+ EGLContext ctx,
+ EGLint attribute,
+ EGLint* value) {
+ GL_SERVICE_LOG("eglQueryContext"
+ << "(" << dpy << ", " << ctx << ", " << attribute << ", "
+ << static_cast<const void*>(value) << ")");
+ EGLBoolean result =
+ g_driver_egl.debug_fn.eglQueryContextFn(dpy, ctx, attribute, value);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static const char* GL_BINDING_CALL
+Debug_eglQueryString(EGLDisplay dpy, EGLint name) {
+ GL_SERVICE_LOG("eglQueryString"
+ << "(" << dpy << ", " << name << ")");
+ const char* result = g_driver_egl.debug_fn.eglQueryStringFn(dpy, name);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL Debug_eglQuerySurface(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ EGLint* value) {
+ GL_SERVICE_LOG("eglQuerySurface"
+ << "(" << dpy << ", " << surface << ", " << attribute << ", "
+ << static_cast<const void*>(value) << ")");
+ EGLBoolean result =
+ g_driver_egl.debug_fn.eglQuerySurfaceFn(dpy, surface, attribute, value);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL
+Debug_eglQuerySurfacePointerANGLE(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ void** value) {
+ GL_SERVICE_LOG("eglQuerySurfacePointerANGLE"
+ << "(" << dpy << ", " << surface << ", " << attribute << ", "
+ << value << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglQuerySurfacePointerANGLEFn(
+ dpy, surface, attribute, value);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL
+Debug_eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) {
+ GL_SERVICE_LOG("eglReleaseTexImage"
+ << "(" << dpy << ", " << surface << ", " << buffer << ")");
+ EGLBoolean result =
+ g_driver_egl.debug_fn.eglReleaseTexImageFn(dpy, surface, buffer);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL Debug_eglReleaseThread(void) {
+ GL_SERVICE_LOG("eglReleaseThread"
+ << "("
+ << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglReleaseThreadFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL Debug_eglSurfaceAttrib(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ EGLint value) {
+ GL_SERVICE_LOG("eglSurfaceAttrib"
+ << "(" << dpy << ", " << surface << ", " << attribute << ", "
+ << value << ")");
+ EGLBoolean result =
+ g_driver_egl.debug_fn.eglSurfaceAttribFn(dpy, surface, attribute, value);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL
+Debug_eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) {
+ GL_SERVICE_LOG("eglSwapBuffers"
+ << "(" << dpy << ", " << surface << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglSwapBuffersFn(dpy, surface);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL
+Debug_eglSwapInterval(EGLDisplay dpy, EGLint interval) {
+ GL_SERVICE_LOG("eglSwapInterval"
+ << "(" << dpy << ", " << interval << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglSwapIntervalFn(dpy, interval);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL Debug_eglTerminate(EGLDisplay dpy) {
+ GL_SERVICE_LOG("eglTerminate"
+ << "(" << dpy << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglTerminateFn(dpy);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL Debug_eglWaitClient(void) {
+ GL_SERVICE_LOG("eglWaitClient"
+ << "("
+ << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglWaitClientFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL Debug_eglWaitGL(void) {
+ GL_SERVICE_LOG("eglWaitGL"
+ << "("
+ << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglWaitGLFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLBoolean GL_BINDING_CALL Debug_eglWaitNative(EGLint engine) {
+ GL_SERVICE_LOG("eglWaitNative"
+ << "(" << engine << ")");
+ EGLBoolean result = g_driver_egl.debug_fn.eglWaitNativeFn(engine);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static EGLint GL_BINDING_CALL
+Debug_eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags) {
+ GL_SERVICE_LOG("eglWaitSyncKHR"
+ << "(" << dpy << ", " << sync << ", " << flags << ")");
+ EGLint result = g_driver_egl.debug_fn.eglWaitSyncKHRFn(dpy, sync, flags);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+} // extern "C"
+
+void DriverEGL::InitializeDebugBindings() {
+ if (!debug_fn.eglBindAPIFn) {
+ debug_fn.eglBindAPIFn = fn.eglBindAPIFn;
+ fn.eglBindAPIFn = Debug_eglBindAPI;
+ }
+ if (!debug_fn.eglBindTexImageFn) {
+ debug_fn.eglBindTexImageFn = fn.eglBindTexImageFn;
+ fn.eglBindTexImageFn = Debug_eglBindTexImage;
+ }
+ if (!debug_fn.eglChooseConfigFn) {
+ debug_fn.eglChooseConfigFn = fn.eglChooseConfigFn;
+ fn.eglChooseConfigFn = Debug_eglChooseConfig;
+ }
+ if (!debug_fn.eglClientWaitSyncKHRFn) {
+ debug_fn.eglClientWaitSyncKHRFn = fn.eglClientWaitSyncKHRFn;
+ fn.eglClientWaitSyncKHRFn = Debug_eglClientWaitSyncKHR;
+ }
+ if (!debug_fn.eglCopyBuffersFn) {
+ debug_fn.eglCopyBuffersFn = fn.eglCopyBuffersFn;
+ fn.eglCopyBuffersFn = Debug_eglCopyBuffers;
+ }
+ if (!debug_fn.eglCreateContextFn) {
+ debug_fn.eglCreateContextFn = fn.eglCreateContextFn;
+ fn.eglCreateContextFn = Debug_eglCreateContext;
+ }
+ if (!debug_fn.eglCreateImageKHRFn) {
+ debug_fn.eglCreateImageKHRFn = fn.eglCreateImageKHRFn;
+ fn.eglCreateImageKHRFn = Debug_eglCreateImageKHR;
+ }
+ if (!debug_fn.eglCreatePbufferFromClientBufferFn) {
+ debug_fn.eglCreatePbufferFromClientBufferFn =
+ fn.eglCreatePbufferFromClientBufferFn;
+ fn.eglCreatePbufferFromClientBufferFn =
+ Debug_eglCreatePbufferFromClientBuffer;
+ }
+ if (!debug_fn.eglCreatePbufferSurfaceFn) {
+ debug_fn.eglCreatePbufferSurfaceFn = fn.eglCreatePbufferSurfaceFn;
+ fn.eglCreatePbufferSurfaceFn = Debug_eglCreatePbufferSurface;
+ }
+ if (!debug_fn.eglCreatePixmapSurfaceFn) {
+ debug_fn.eglCreatePixmapSurfaceFn = fn.eglCreatePixmapSurfaceFn;
+ fn.eglCreatePixmapSurfaceFn = Debug_eglCreatePixmapSurface;
+ }
+ if (!debug_fn.eglCreateSyncKHRFn) {
+ debug_fn.eglCreateSyncKHRFn = fn.eglCreateSyncKHRFn;
+ fn.eglCreateSyncKHRFn = Debug_eglCreateSyncKHR;
+ }
+ if (!debug_fn.eglCreateWindowSurfaceFn) {
+ debug_fn.eglCreateWindowSurfaceFn = fn.eglCreateWindowSurfaceFn;
+ fn.eglCreateWindowSurfaceFn = Debug_eglCreateWindowSurface;
+ }
+ if (!debug_fn.eglDestroyContextFn) {
+ debug_fn.eglDestroyContextFn = fn.eglDestroyContextFn;
+ fn.eglDestroyContextFn = Debug_eglDestroyContext;
+ }
+ if (!debug_fn.eglDestroyImageKHRFn) {
+ debug_fn.eglDestroyImageKHRFn = fn.eglDestroyImageKHRFn;
+ fn.eglDestroyImageKHRFn = Debug_eglDestroyImageKHR;
+ }
+ if (!debug_fn.eglDestroySurfaceFn) {
+ debug_fn.eglDestroySurfaceFn = fn.eglDestroySurfaceFn;
+ fn.eglDestroySurfaceFn = Debug_eglDestroySurface;
+ }
+ if (!debug_fn.eglDestroySyncKHRFn) {
+ debug_fn.eglDestroySyncKHRFn = fn.eglDestroySyncKHRFn;
+ fn.eglDestroySyncKHRFn = Debug_eglDestroySyncKHR;
+ }
+ if (!debug_fn.eglGetConfigAttribFn) {
+ debug_fn.eglGetConfigAttribFn = fn.eglGetConfigAttribFn;
+ fn.eglGetConfigAttribFn = Debug_eglGetConfigAttrib;
+ }
+ if (!debug_fn.eglGetConfigsFn) {
+ debug_fn.eglGetConfigsFn = fn.eglGetConfigsFn;
+ fn.eglGetConfigsFn = Debug_eglGetConfigs;
+ }
+ if (!debug_fn.eglGetCurrentContextFn) {
+ debug_fn.eglGetCurrentContextFn = fn.eglGetCurrentContextFn;
+ fn.eglGetCurrentContextFn = Debug_eglGetCurrentContext;
+ }
+ if (!debug_fn.eglGetCurrentDisplayFn) {
+ debug_fn.eglGetCurrentDisplayFn = fn.eglGetCurrentDisplayFn;
+ fn.eglGetCurrentDisplayFn = Debug_eglGetCurrentDisplay;
+ }
+ if (!debug_fn.eglGetCurrentSurfaceFn) {
+ debug_fn.eglGetCurrentSurfaceFn = fn.eglGetCurrentSurfaceFn;
+ fn.eglGetCurrentSurfaceFn = Debug_eglGetCurrentSurface;
+ }
+ if (!debug_fn.eglGetDisplayFn) {
+ debug_fn.eglGetDisplayFn = fn.eglGetDisplayFn;
+ fn.eglGetDisplayFn = Debug_eglGetDisplay;
+ }
+ if (!debug_fn.eglGetErrorFn) {
+ debug_fn.eglGetErrorFn = fn.eglGetErrorFn;
+ fn.eglGetErrorFn = Debug_eglGetError;
+ }
+ if (!debug_fn.eglGetPlatformDisplayEXTFn) {
+ debug_fn.eglGetPlatformDisplayEXTFn = fn.eglGetPlatformDisplayEXTFn;
+ fn.eglGetPlatformDisplayEXTFn = Debug_eglGetPlatformDisplayEXT;
+ }
+ if (!debug_fn.eglGetProcAddressFn) {
+ debug_fn.eglGetProcAddressFn = fn.eglGetProcAddressFn;
+ fn.eglGetProcAddressFn = Debug_eglGetProcAddress;
+ }
+ if (!debug_fn.eglGetSyncAttribKHRFn) {
+ debug_fn.eglGetSyncAttribKHRFn = fn.eglGetSyncAttribKHRFn;
+ fn.eglGetSyncAttribKHRFn = Debug_eglGetSyncAttribKHR;
+ }
+ if (!debug_fn.eglGetSyncValuesCHROMIUMFn) {
+ debug_fn.eglGetSyncValuesCHROMIUMFn = fn.eglGetSyncValuesCHROMIUMFn;
+ fn.eglGetSyncValuesCHROMIUMFn = Debug_eglGetSyncValuesCHROMIUM;
+ }
+ if (!debug_fn.eglInitializeFn) {
+ debug_fn.eglInitializeFn = fn.eglInitializeFn;
+ fn.eglInitializeFn = Debug_eglInitialize;
+ }
+ if (!debug_fn.eglMakeCurrentFn) {
+ debug_fn.eglMakeCurrentFn = fn.eglMakeCurrentFn;
+ fn.eglMakeCurrentFn = Debug_eglMakeCurrent;
+ }
+ if (!debug_fn.eglPostSubBufferNVFn) {
+ debug_fn.eglPostSubBufferNVFn = fn.eglPostSubBufferNVFn;
+ fn.eglPostSubBufferNVFn = Debug_eglPostSubBufferNV;
+ }
+ if (!debug_fn.eglQueryAPIFn) {
+ debug_fn.eglQueryAPIFn = fn.eglQueryAPIFn;
+ fn.eglQueryAPIFn = Debug_eglQueryAPI;
+ }
+ if (!debug_fn.eglQueryContextFn) {
+ debug_fn.eglQueryContextFn = fn.eglQueryContextFn;
+ fn.eglQueryContextFn = Debug_eglQueryContext;
+ }
+ if (!debug_fn.eglQueryStringFn) {
+ debug_fn.eglQueryStringFn = fn.eglQueryStringFn;
+ fn.eglQueryStringFn = Debug_eglQueryString;
+ }
+ if (!debug_fn.eglQuerySurfaceFn) {
+ debug_fn.eglQuerySurfaceFn = fn.eglQuerySurfaceFn;
+ fn.eglQuerySurfaceFn = Debug_eglQuerySurface;
+ }
+ if (!debug_fn.eglQuerySurfacePointerANGLEFn) {
+ debug_fn.eglQuerySurfacePointerANGLEFn = fn.eglQuerySurfacePointerANGLEFn;
+ fn.eglQuerySurfacePointerANGLEFn = Debug_eglQuerySurfacePointerANGLE;
+ }
+ if (!debug_fn.eglReleaseTexImageFn) {
+ debug_fn.eglReleaseTexImageFn = fn.eglReleaseTexImageFn;
+ fn.eglReleaseTexImageFn = Debug_eglReleaseTexImage;
+ }
+ if (!debug_fn.eglReleaseThreadFn) {
+ debug_fn.eglReleaseThreadFn = fn.eglReleaseThreadFn;
+ fn.eglReleaseThreadFn = Debug_eglReleaseThread;
+ }
+ if (!debug_fn.eglSurfaceAttribFn) {
+ debug_fn.eglSurfaceAttribFn = fn.eglSurfaceAttribFn;
+ fn.eglSurfaceAttribFn = Debug_eglSurfaceAttrib;
+ }
+ if (!debug_fn.eglSwapBuffersFn) {
+ debug_fn.eglSwapBuffersFn = fn.eglSwapBuffersFn;
+ fn.eglSwapBuffersFn = Debug_eglSwapBuffers;
+ }
+ if (!debug_fn.eglSwapIntervalFn) {
+ debug_fn.eglSwapIntervalFn = fn.eglSwapIntervalFn;
+ fn.eglSwapIntervalFn = Debug_eglSwapInterval;
+ }
+ if (!debug_fn.eglTerminateFn) {
+ debug_fn.eglTerminateFn = fn.eglTerminateFn;
+ fn.eglTerminateFn = Debug_eglTerminate;
+ }
+ if (!debug_fn.eglWaitClientFn) {
+ debug_fn.eglWaitClientFn = fn.eglWaitClientFn;
+ fn.eglWaitClientFn = Debug_eglWaitClient;
+ }
+ if (!debug_fn.eglWaitGLFn) {
+ debug_fn.eglWaitGLFn = fn.eglWaitGLFn;
+ fn.eglWaitGLFn = Debug_eglWaitGL;
+ }
+ if (!debug_fn.eglWaitNativeFn) {
+ debug_fn.eglWaitNativeFn = fn.eglWaitNativeFn;
+ fn.eglWaitNativeFn = Debug_eglWaitNative;
+ }
+ if (!debug_fn.eglWaitSyncKHRFn) {
+ debug_fn.eglWaitSyncKHRFn = fn.eglWaitSyncKHRFn;
+ fn.eglWaitSyncKHRFn = Debug_eglWaitSyncKHR;
+ }
+ g_debugBindingsInitialized = true;
+}
+
+void DriverEGL::ClearBindings() {
+ memset(this, 0, sizeof(*this));
+}
+
+EGLBoolean EGLApiBase::eglBindAPIFn(EGLenum api) {
+ return driver_->fn.eglBindAPIFn(api);
+}
+
+EGLBoolean EGLApiBase::eglBindTexImageFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint buffer) {
+ return driver_->fn.eglBindTexImageFn(dpy, surface, buffer);
+}
+
+EGLBoolean EGLApiBase::eglChooseConfigFn(EGLDisplay dpy,
+ const EGLint* attrib_list,
+ EGLConfig* configs,
+ EGLint config_size,
+ EGLint* num_config) {
+ return driver_->fn.eglChooseConfigFn(dpy, attrib_list, configs, config_size,
+ num_config);
+}
+
+EGLint EGLApiBase::eglClientWaitSyncKHRFn(EGLDisplay dpy,
+ EGLSyncKHR sync,
+ EGLint flags,
+ EGLTimeKHR timeout) {
+ return driver_->fn.eglClientWaitSyncKHRFn(dpy, sync, flags, timeout);
+}
+
+EGLBoolean EGLApiBase::eglCopyBuffersFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLNativePixmapType target) {
+ return driver_->fn.eglCopyBuffersFn(dpy, surface, target);
+}
+
+EGLContext EGLApiBase::eglCreateContextFn(EGLDisplay dpy,
+ EGLConfig config,
+ EGLContext share_context,
+ const EGLint* attrib_list) {
+ return driver_->fn.eglCreateContextFn(dpy, config, share_context,
+ attrib_list);
+}
+
+EGLImageKHR EGLApiBase::eglCreateImageKHRFn(EGLDisplay dpy,
+ EGLContext ctx,
+ EGLenum target,
+ EGLClientBuffer buffer,
+ const EGLint* attrib_list) {
+ return driver_->fn.eglCreateImageKHRFn(dpy, ctx, target, buffer, attrib_list);
+}
+
+EGLSurface EGLApiBase::eglCreatePbufferFromClientBufferFn(
+ EGLDisplay dpy,
+ EGLenum buftype,
+ void* buffer,
+ EGLConfig config,
+ const EGLint* attrib_list) {
+ return driver_->fn.eglCreatePbufferFromClientBufferFn(dpy, buftype, buffer,
+ config, attrib_list);
+}
+
+EGLSurface EGLApiBase::eglCreatePbufferSurfaceFn(EGLDisplay dpy,
+ EGLConfig config,
+ const EGLint* attrib_list) {
+ return driver_->fn.eglCreatePbufferSurfaceFn(dpy, config, attrib_list);
+}
+
+EGLSurface EGLApiBase::eglCreatePixmapSurfaceFn(EGLDisplay dpy,
+ EGLConfig config,
+ EGLNativePixmapType pixmap,
+ const EGLint* attrib_list) {
+ return driver_->fn.eglCreatePixmapSurfaceFn(dpy, config, pixmap, attrib_list);
+}
+
+EGLSyncKHR EGLApiBase::eglCreateSyncKHRFn(EGLDisplay dpy,
+ EGLenum type,
+ const EGLint* attrib_list) {
+ return driver_->fn.eglCreateSyncKHRFn(dpy, type, attrib_list);
+}
+
+EGLSurface EGLApiBase::eglCreateWindowSurfaceFn(EGLDisplay dpy,
+ EGLConfig config,
+ EGLNativeWindowType win,
+ const EGLint* attrib_list) {
+ return driver_->fn.eglCreateWindowSurfaceFn(dpy, config, win, attrib_list);
+}
+
+EGLBoolean EGLApiBase::eglDestroyContextFn(EGLDisplay dpy, EGLContext ctx) {
+ return driver_->fn.eglDestroyContextFn(dpy, ctx);
+}
+
+EGLBoolean EGLApiBase::eglDestroyImageKHRFn(EGLDisplay dpy, EGLImageKHR image) {
+ return driver_->fn.eglDestroyImageKHRFn(dpy, image);
+}
+
+EGLBoolean EGLApiBase::eglDestroySurfaceFn(EGLDisplay dpy, EGLSurface surface) {
+ return driver_->fn.eglDestroySurfaceFn(dpy, surface);
+}
+
+EGLBoolean EGLApiBase::eglDestroySyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync) {
+ return driver_->fn.eglDestroySyncKHRFn(dpy, sync);
+}
+
+EGLBoolean EGLApiBase::eglGetConfigAttribFn(EGLDisplay dpy,
+ EGLConfig config,
+ EGLint attribute,
+ EGLint* value) {
+ return driver_->fn.eglGetConfigAttribFn(dpy, config, attribute, value);
+}
+
+EGLBoolean EGLApiBase::eglGetConfigsFn(EGLDisplay dpy,
+ EGLConfig* configs,
+ EGLint config_size,
+ EGLint* num_config) {
+ return driver_->fn.eglGetConfigsFn(dpy, configs, config_size, num_config);
+}
+
+EGLContext EGLApiBase::eglGetCurrentContextFn(void) {
+ return driver_->fn.eglGetCurrentContextFn();
+}
+
+EGLDisplay EGLApiBase::eglGetCurrentDisplayFn(void) {
+ return driver_->fn.eglGetCurrentDisplayFn();
+}
+
+EGLSurface EGLApiBase::eglGetCurrentSurfaceFn(EGLint readdraw) {
+ return driver_->fn.eglGetCurrentSurfaceFn(readdraw);
+}
+
+EGLDisplay EGLApiBase::eglGetDisplayFn(EGLNativeDisplayType display_id) {
+ return driver_->fn.eglGetDisplayFn(display_id);
+}
+
+EGLint EGLApiBase::eglGetErrorFn(void) {
+ return driver_->fn.eglGetErrorFn();
+}
+
+EGLDisplay EGLApiBase::eglGetPlatformDisplayEXTFn(EGLenum platform,
+ void* native_display,
+ const EGLint* attrib_list) {
+ return driver_->fn.eglGetPlatformDisplayEXTFn(platform, native_display,
+ attrib_list);
+}
+
+__eglMustCastToProperFunctionPointerType EGLApiBase::eglGetProcAddressFn(
+ const char* procname) {
+ return driver_->fn.eglGetProcAddressFn(procname);
+}
+
+EGLBoolean EGLApiBase::eglGetSyncAttribKHRFn(EGLDisplay dpy,
+ EGLSyncKHR sync,
+ EGLint attribute,
+ EGLint* value) {
+ return driver_->fn.eglGetSyncAttribKHRFn(dpy, sync, attribute, value);
+}
+
+EGLBoolean EGLApiBase::eglGetSyncValuesCHROMIUMFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLuint64CHROMIUM* ust,
+ EGLuint64CHROMIUM* msc,
+ EGLuint64CHROMIUM* sbc) {
+ return driver_->fn.eglGetSyncValuesCHROMIUMFn(dpy, surface, ust, msc, sbc);
+}
+
+EGLBoolean EGLApiBase::eglInitializeFn(EGLDisplay dpy,
+ EGLint* major,
+ EGLint* minor) {
+ return driver_->fn.eglInitializeFn(dpy, major, minor);
+}
+
+EGLBoolean EGLApiBase::eglMakeCurrentFn(EGLDisplay dpy,
+ EGLSurface draw,
+ EGLSurface read,
+ EGLContext ctx) {
+ return driver_->fn.eglMakeCurrentFn(dpy, draw, read, ctx);
+}
+
+EGLBoolean EGLApiBase::eglPostSubBufferNVFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint x,
+ EGLint y,
+ EGLint width,
+ EGLint height) {
+ return driver_->fn.eglPostSubBufferNVFn(dpy, surface, x, y, width, height);
+}
+
+EGLenum EGLApiBase::eglQueryAPIFn(void) {
+ return driver_->fn.eglQueryAPIFn();
+}
+
+EGLBoolean EGLApiBase::eglQueryContextFn(EGLDisplay dpy,
+ EGLContext ctx,
+ EGLint attribute,
+ EGLint* value) {
+ return driver_->fn.eglQueryContextFn(dpy, ctx, attribute, value);
+}
+
+const char* EGLApiBase::eglQueryStringFn(EGLDisplay dpy, EGLint name) {
+ return driver_->fn.eglQueryStringFn(dpy, name);
+}
+
+EGLBoolean EGLApiBase::eglQuerySurfaceFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ EGLint* value) {
+ return driver_->fn.eglQuerySurfaceFn(dpy, surface, attribute, value);
+}
+
+EGLBoolean EGLApiBase::eglQuerySurfacePointerANGLEFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ void** value) {
+ return driver_->fn.eglQuerySurfacePointerANGLEFn(dpy, surface, attribute,
+ value);
+}
+
+EGLBoolean EGLApiBase::eglReleaseTexImageFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint buffer) {
+ return driver_->fn.eglReleaseTexImageFn(dpy, surface, buffer);
+}
+
+EGLBoolean EGLApiBase::eglReleaseThreadFn(void) {
+ return driver_->fn.eglReleaseThreadFn();
+}
+
+EGLBoolean EGLApiBase::eglSurfaceAttribFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ EGLint value) {
+ return driver_->fn.eglSurfaceAttribFn(dpy, surface, attribute, value);
+}
+
+EGLBoolean EGLApiBase::eglSwapBuffersFn(EGLDisplay dpy, EGLSurface surface) {
+ return driver_->fn.eglSwapBuffersFn(dpy, surface);
+}
+
+EGLBoolean EGLApiBase::eglSwapIntervalFn(EGLDisplay dpy, EGLint interval) {
+ return driver_->fn.eglSwapIntervalFn(dpy, interval);
+}
+
+EGLBoolean EGLApiBase::eglTerminateFn(EGLDisplay dpy) {
+ return driver_->fn.eglTerminateFn(dpy);
+}
+
+EGLBoolean EGLApiBase::eglWaitClientFn(void) {
+ return driver_->fn.eglWaitClientFn();
+}
+
+EGLBoolean EGLApiBase::eglWaitGLFn(void) {
+ return driver_->fn.eglWaitGLFn();
+}
+
+EGLBoolean EGLApiBase::eglWaitNativeFn(EGLint engine) {
+ return driver_->fn.eglWaitNativeFn(engine);
+}
+
+EGLint EGLApiBase::eglWaitSyncKHRFn(EGLDisplay dpy,
+ EGLSyncKHR sync,
+ EGLint flags) {
+ return driver_->fn.eglWaitSyncKHRFn(dpy, sync, flags);
+}
+
+EGLBoolean TraceEGLApi::eglBindAPIFn(EGLenum api) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglBindAPI")
+ return egl_api_->eglBindAPIFn(api);
+}
+
+EGLBoolean TraceEGLApi::eglBindTexImageFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint buffer) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglBindTexImage")
+ return egl_api_->eglBindTexImageFn(dpy, surface, buffer);
+}
+
+EGLBoolean TraceEGLApi::eglChooseConfigFn(EGLDisplay dpy,
+ const EGLint* attrib_list,
+ EGLConfig* configs,
+ EGLint config_size,
+ EGLint* num_config) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglChooseConfig")
+ return egl_api_->eglChooseConfigFn(dpy, attrib_list, configs, config_size,
+ num_config);
+}
+
+EGLint TraceEGLApi::eglClientWaitSyncKHRFn(EGLDisplay dpy,
+ EGLSyncKHR sync,
+ EGLint flags,
+ EGLTimeKHR timeout) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglClientWaitSyncKHR")
+ return egl_api_->eglClientWaitSyncKHRFn(dpy, sync, flags, timeout);
+}
+
+EGLBoolean TraceEGLApi::eglCopyBuffersFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLNativePixmapType target) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglCopyBuffers")
+ return egl_api_->eglCopyBuffersFn(dpy, surface, target);
+}
+
+EGLContext TraceEGLApi::eglCreateContextFn(EGLDisplay dpy,
+ EGLConfig config,
+ EGLContext share_context,
+ const EGLint* attrib_list) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglCreateContext")
+ return egl_api_->eglCreateContextFn(dpy, config, share_context, attrib_list);
+}
+
+EGLImageKHR TraceEGLApi::eglCreateImageKHRFn(EGLDisplay dpy,
+ EGLContext ctx,
+ EGLenum target,
+ EGLClientBuffer buffer,
+ const EGLint* attrib_list) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglCreateImageKHR")
+ return egl_api_->eglCreateImageKHRFn(dpy, ctx, target, buffer, attrib_list);
+}
+
+EGLSurface TraceEGLApi::eglCreatePbufferFromClientBufferFn(
+ EGLDisplay dpy,
+ EGLenum buftype,
+ void* buffer,
+ EGLConfig config,
+ const EGLint* attrib_list) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu",
+ "TraceGLAPI::eglCreatePbufferFromClientBuffer")
+ return egl_api_->eglCreatePbufferFromClientBufferFn(dpy, buftype, buffer,
+ config, attrib_list);
+}
+
+EGLSurface TraceEGLApi::eglCreatePbufferSurfaceFn(EGLDisplay dpy,
+ EGLConfig config,
+ const EGLint* attrib_list) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglCreatePbufferSurface")
+ return egl_api_->eglCreatePbufferSurfaceFn(dpy, config, attrib_list);
+}
+
+EGLSurface TraceEGLApi::eglCreatePixmapSurfaceFn(EGLDisplay dpy,
+ EGLConfig config,
+ EGLNativePixmapType pixmap,
+ const EGLint* attrib_list) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglCreatePixmapSurface")
+ return egl_api_->eglCreatePixmapSurfaceFn(dpy, config, pixmap, attrib_list);
+}
+
+EGLSyncKHR TraceEGLApi::eglCreateSyncKHRFn(EGLDisplay dpy,
+ EGLenum type,
+ const EGLint* attrib_list) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglCreateSyncKHR")
+ return egl_api_->eglCreateSyncKHRFn(dpy, type, attrib_list);
+}
+
+EGLSurface TraceEGLApi::eglCreateWindowSurfaceFn(EGLDisplay dpy,
+ EGLConfig config,
+ EGLNativeWindowType win,
+ const EGLint* attrib_list) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglCreateWindowSurface")
+ return egl_api_->eglCreateWindowSurfaceFn(dpy, config, win, attrib_list);
+}
+
+EGLBoolean TraceEGLApi::eglDestroyContextFn(EGLDisplay dpy, EGLContext ctx) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglDestroyContext")
+ return egl_api_->eglDestroyContextFn(dpy, ctx);
+}
+
+EGLBoolean TraceEGLApi::eglDestroyImageKHRFn(EGLDisplay dpy,
+ EGLImageKHR image) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglDestroyImageKHR")
+ return egl_api_->eglDestroyImageKHRFn(dpy, image);
+}
+
+EGLBoolean TraceEGLApi::eglDestroySurfaceFn(EGLDisplay dpy,
+ EGLSurface surface) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglDestroySurface")
+ return egl_api_->eglDestroySurfaceFn(dpy, surface);
+}
+
+EGLBoolean TraceEGLApi::eglDestroySyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglDestroySyncKHR")
+ return egl_api_->eglDestroySyncKHRFn(dpy, sync);
+}
+
+EGLBoolean TraceEGLApi::eglGetConfigAttribFn(EGLDisplay dpy,
+ EGLConfig config,
+ EGLint attribute,
+ EGLint* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetConfigAttrib")
+ return egl_api_->eglGetConfigAttribFn(dpy, config, attribute, value);
+}
+
+EGLBoolean TraceEGLApi::eglGetConfigsFn(EGLDisplay dpy,
+ EGLConfig* configs,
+ EGLint config_size,
+ EGLint* num_config) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetConfigs")
+ return egl_api_->eglGetConfigsFn(dpy, configs, config_size, num_config);
+}
+
+EGLContext TraceEGLApi::eglGetCurrentContextFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetCurrentContext")
+ return egl_api_->eglGetCurrentContextFn();
+}
+
+EGLDisplay TraceEGLApi::eglGetCurrentDisplayFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetCurrentDisplay")
+ return egl_api_->eglGetCurrentDisplayFn();
+}
+
+EGLSurface TraceEGLApi::eglGetCurrentSurfaceFn(EGLint readdraw) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetCurrentSurface")
+ return egl_api_->eglGetCurrentSurfaceFn(readdraw);
+}
+
+EGLDisplay TraceEGLApi::eglGetDisplayFn(EGLNativeDisplayType display_id) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetDisplay")
+ return egl_api_->eglGetDisplayFn(display_id);
+}
+
+EGLint TraceEGLApi::eglGetErrorFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetError")
+ return egl_api_->eglGetErrorFn();
+}
+
+EGLDisplay TraceEGLApi::eglGetPlatformDisplayEXTFn(EGLenum platform,
+ void* native_display,
+ const EGLint* attrib_list) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetPlatformDisplayEXT")
+ return egl_api_->eglGetPlatformDisplayEXTFn(platform, native_display,
+ attrib_list);
+}
+
+__eglMustCastToProperFunctionPointerType TraceEGLApi::eglGetProcAddressFn(
+ const char* procname) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetProcAddress")
+ return egl_api_->eglGetProcAddressFn(procname);
+}
+
+EGLBoolean TraceEGLApi::eglGetSyncAttribKHRFn(EGLDisplay dpy,
+ EGLSyncKHR sync,
+ EGLint attribute,
+ EGLint* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetSyncAttribKHR")
+ return egl_api_->eglGetSyncAttribKHRFn(dpy, sync, attribute, value);
+}
+
+EGLBoolean TraceEGLApi::eglGetSyncValuesCHROMIUMFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLuint64CHROMIUM* ust,
+ EGLuint64CHROMIUM* msc,
+ EGLuint64CHROMIUM* sbc) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetSyncValuesCHROMIUM")
+ return egl_api_->eglGetSyncValuesCHROMIUMFn(dpy, surface, ust, msc, sbc);
+}
+
+EGLBoolean TraceEGLApi::eglInitializeFn(EGLDisplay dpy,
+ EGLint* major,
+ EGLint* minor) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglInitialize")
+ return egl_api_->eglInitializeFn(dpy, major, minor);
+}
+
+EGLBoolean TraceEGLApi::eglMakeCurrentFn(EGLDisplay dpy,
+ EGLSurface draw,
+ EGLSurface read,
+ EGLContext ctx) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglMakeCurrent")
+ return egl_api_->eglMakeCurrentFn(dpy, draw, read, ctx);
+}
+
+EGLBoolean TraceEGLApi::eglPostSubBufferNVFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint x,
+ EGLint y,
+ EGLint width,
+ EGLint height) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglPostSubBufferNV")
+ return egl_api_->eglPostSubBufferNVFn(dpy, surface, x, y, width, height);
+}
+
+EGLenum TraceEGLApi::eglQueryAPIFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglQueryAPI")
+ return egl_api_->eglQueryAPIFn();
+}
+
+EGLBoolean TraceEGLApi::eglQueryContextFn(EGLDisplay dpy,
+ EGLContext ctx,
+ EGLint attribute,
+ EGLint* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglQueryContext")
+ return egl_api_->eglQueryContextFn(dpy, ctx, attribute, value);
+}
+
+const char* TraceEGLApi::eglQueryStringFn(EGLDisplay dpy, EGLint name) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglQueryString")
+ return egl_api_->eglQueryStringFn(dpy, name);
+}
+
+EGLBoolean TraceEGLApi::eglQuerySurfaceFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ EGLint* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglQuerySurface")
+ return egl_api_->eglQuerySurfaceFn(dpy, surface, attribute, value);
+}
+
+EGLBoolean TraceEGLApi::eglQuerySurfacePointerANGLEFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ void** value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu",
+ "TraceGLAPI::eglQuerySurfacePointerANGLE")
+ return egl_api_->eglQuerySurfacePointerANGLEFn(dpy, surface, attribute,
+ value);
+}
+
+EGLBoolean TraceEGLApi::eglReleaseTexImageFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint buffer) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglReleaseTexImage")
+ return egl_api_->eglReleaseTexImageFn(dpy, surface, buffer);
+}
+
+EGLBoolean TraceEGLApi::eglReleaseThreadFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglReleaseThread")
+ return egl_api_->eglReleaseThreadFn();
+}
+
+EGLBoolean TraceEGLApi::eglSurfaceAttribFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ EGLint value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglSurfaceAttrib")
+ return egl_api_->eglSurfaceAttribFn(dpy, surface, attribute, value);
+}
+
+EGLBoolean TraceEGLApi::eglSwapBuffersFn(EGLDisplay dpy, EGLSurface surface) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglSwapBuffers")
+ return egl_api_->eglSwapBuffersFn(dpy, surface);
+}
+
+EGLBoolean TraceEGLApi::eglSwapIntervalFn(EGLDisplay dpy, EGLint interval) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglSwapInterval")
+ return egl_api_->eglSwapIntervalFn(dpy, interval);
+}
+
+EGLBoolean TraceEGLApi::eglTerminateFn(EGLDisplay dpy) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglTerminate")
+ return egl_api_->eglTerminateFn(dpy);
+}
+
+EGLBoolean TraceEGLApi::eglWaitClientFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglWaitClient")
+ return egl_api_->eglWaitClientFn();
+}
+
+EGLBoolean TraceEGLApi::eglWaitGLFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglWaitGL")
+ return egl_api_->eglWaitGLFn();
+}
+
+EGLBoolean TraceEGLApi::eglWaitNativeFn(EGLint engine) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglWaitNative")
+ return egl_api_->eglWaitNativeFn(engine);
+}
+
+EGLint TraceEGLApi::eglWaitSyncKHRFn(EGLDisplay dpy,
+ EGLSyncKHR sync,
+ EGLint flags) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglWaitSyncKHR")
+ return egl_api_->eglWaitSyncKHRFn(dpy, sync, flags);
+}
+
+} // namespace gfx
diff --git a/ui/gl/gl_bindings_autogen_egl.h b/ui/gl/gl_bindings_autogen_egl.h
new file mode 100644
index 0000000..a49935e
--- /dev/null
+++ b/ui/gl/gl_bindings_autogen_egl.h
@@ -0,0 +1,407 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+#ifndef UI_GFX_GL_GL_BINDINGS_AUTOGEN_EGL_H_
+#define UI_GFX_GL_GL_BINDINGS_AUTOGEN_EGL_H_
+
+namespace gfx {
+
+class GLContext;
+
+typedef EGLBoolean(GL_BINDING_CALL* eglBindAPIProc)(EGLenum api);
+typedef EGLBoolean(GL_BINDING_CALL* eglBindTexImageProc)(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint buffer);
+typedef EGLBoolean(GL_BINDING_CALL* eglChooseConfigProc)(
+ EGLDisplay dpy,
+ const EGLint* attrib_list,
+ EGLConfig* configs,
+ EGLint config_size,
+ EGLint* num_config);
+typedef EGLint(GL_BINDING_CALL* eglClientWaitSyncKHRProc)(EGLDisplay dpy,
+ EGLSyncKHR sync,
+ EGLint flags,
+ EGLTimeKHR timeout);
+typedef EGLBoolean(GL_BINDING_CALL* eglCopyBuffersProc)(
+ EGLDisplay dpy,
+ EGLSurface surface,
+ EGLNativePixmapType target);
+typedef EGLContext(GL_BINDING_CALL* eglCreateContextProc)(
+ EGLDisplay dpy,
+ EGLConfig config,
+ EGLContext share_context,
+ const EGLint* attrib_list);
+typedef EGLImageKHR(GL_BINDING_CALL* eglCreateImageKHRProc)(
+ EGLDisplay dpy,
+ EGLContext ctx,
+ EGLenum target,
+ EGLClientBuffer buffer,
+ const EGLint* attrib_list);
+typedef EGLSurface(GL_BINDING_CALL* eglCreatePbufferFromClientBufferProc)(
+ EGLDisplay dpy,
+ EGLenum buftype,
+ void* buffer,
+ EGLConfig config,
+ const EGLint* attrib_list);
+typedef EGLSurface(GL_BINDING_CALL* eglCreatePbufferSurfaceProc)(
+ EGLDisplay dpy,
+ EGLConfig config,
+ const EGLint* attrib_list);
+typedef EGLSurface(GL_BINDING_CALL* eglCreatePixmapSurfaceProc)(
+ EGLDisplay dpy,
+ EGLConfig config,
+ EGLNativePixmapType pixmap,
+ const EGLint* attrib_list);
+typedef EGLSyncKHR(GL_BINDING_CALL* eglCreateSyncKHRProc)(
+ EGLDisplay dpy,
+ EGLenum type,
+ const EGLint* attrib_list);
+typedef EGLSurface(GL_BINDING_CALL* eglCreateWindowSurfaceProc)(
+ EGLDisplay dpy,
+ EGLConfig config,
+ EGLNativeWindowType win,
+ const EGLint* attrib_list);
+typedef EGLBoolean(GL_BINDING_CALL* eglDestroyContextProc)(EGLDisplay dpy,
+ EGLContext ctx);
+typedef EGLBoolean(GL_BINDING_CALL* eglDestroyImageKHRProc)(EGLDisplay dpy,
+ EGLImageKHR image);
+typedef EGLBoolean(GL_BINDING_CALL* eglDestroySurfaceProc)(EGLDisplay dpy,
+ EGLSurface surface);
+typedef EGLBoolean(GL_BINDING_CALL* eglDestroySyncKHRProc)(EGLDisplay dpy,
+ EGLSyncKHR sync);
+typedef EGLBoolean(GL_BINDING_CALL* eglGetConfigAttribProc)(EGLDisplay dpy,
+ EGLConfig config,
+ EGLint attribute,
+ EGLint* value);
+typedef EGLBoolean(GL_BINDING_CALL* eglGetConfigsProc)(EGLDisplay dpy,
+ EGLConfig* configs,
+ EGLint config_size,
+ EGLint* num_config);
+typedef EGLContext(GL_BINDING_CALL* eglGetCurrentContextProc)(void);
+typedef EGLDisplay(GL_BINDING_CALL* eglGetCurrentDisplayProc)(void);
+typedef EGLSurface(GL_BINDING_CALL* eglGetCurrentSurfaceProc)(EGLint readdraw);
+typedef EGLDisplay(GL_BINDING_CALL* eglGetDisplayProc)(
+ EGLNativeDisplayType display_id);
+typedef EGLint(GL_BINDING_CALL* eglGetErrorProc)(void);
+typedef EGLDisplay(GL_BINDING_CALL* eglGetPlatformDisplayEXTProc)(
+ EGLenum platform,
+ void* native_display,
+ const EGLint* attrib_list);
+typedef __eglMustCastToProperFunctionPointerType(
+ GL_BINDING_CALL* eglGetProcAddressProc)(const char* procname);
+typedef EGLBoolean(GL_BINDING_CALL* eglGetSyncAttribKHRProc)(EGLDisplay dpy,
+ EGLSyncKHR sync,
+ EGLint attribute,
+ EGLint* value);
+typedef EGLBoolean(GL_BINDING_CALL* eglGetSyncValuesCHROMIUMProc)(
+ EGLDisplay dpy,
+ EGLSurface surface,
+ EGLuint64CHROMIUM* ust,
+ EGLuint64CHROMIUM* msc,
+ EGLuint64CHROMIUM* sbc);
+typedef EGLBoolean(GL_BINDING_CALL* eglInitializeProc)(EGLDisplay dpy,
+ EGLint* major,
+ EGLint* minor);
+typedef EGLBoolean(GL_BINDING_CALL* eglMakeCurrentProc)(EGLDisplay dpy,
+ EGLSurface draw,
+ EGLSurface read,
+ EGLContext ctx);
+typedef EGLBoolean(GL_BINDING_CALL* eglPostSubBufferNVProc)(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint x,
+ EGLint y,
+ EGLint width,
+ EGLint height);
+typedef EGLenum(GL_BINDING_CALL* eglQueryAPIProc)(void);
+typedef EGLBoolean(GL_BINDING_CALL* eglQueryContextProc)(EGLDisplay dpy,
+ EGLContext ctx,
+ EGLint attribute,
+ EGLint* value);
+typedef const char*(GL_BINDING_CALL* eglQueryStringProc)(EGLDisplay dpy,
+ EGLint name);
+typedef EGLBoolean(GL_BINDING_CALL* eglQuerySurfaceProc)(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ EGLint* value);
+typedef EGLBoolean(GL_BINDING_CALL* eglQuerySurfacePointerANGLEProc)(
+ EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ void** value);
+typedef EGLBoolean(GL_BINDING_CALL* eglReleaseTexImageProc)(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint buffer);
+typedef EGLBoolean(GL_BINDING_CALL* eglReleaseThreadProc)(void);
+typedef EGLBoolean(GL_BINDING_CALL* eglSurfaceAttribProc)(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ EGLint value);
+typedef EGLBoolean(GL_BINDING_CALL* eglSwapBuffersProc)(EGLDisplay dpy,
+ EGLSurface surface);
+typedef EGLBoolean(GL_BINDING_CALL* eglSwapIntervalProc)(EGLDisplay dpy,
+ EGLint interval);
+typedef EGLBoolean(GL_BINDING_CALL* eglTerminateProc)(EGLDisplay dpy);
+typedef EGLBoolean(GL_BINDING_CALL* eglWaitClientProc)(void);
+typedef EGLBoolean(GL_BINDING_CALL* eglWaitGLProc)(void);
+typedef EGLBoolean(GL_BINDING_CALL* eglWaitNativeProc)(EGLint engine);
+typedef EGLint(GL_BINDING_CALL* eglWaitSyncKHRProc)(EGLDisplay dpy,
+ EGLSyncKHR sync,
+ EGLint flags);
+
+struct ExtensionsEGL {
+ bool b_EGL_ANGLE_d3d_share_handle_client_buffer;
+ bool b_EGL_ANGLE_platform_angle;
+ bool b_EGL_ANGLE_query_surface_pointer;
+ bool b_EGL_ANGLE_surface_d3d_texture_2d_share_handle;
+ bool b_EGL_CHROMIUM_sync_control;
+ bool b_EGL_KHR_fence_sync;
+ bool b_EGL_KHR_gl_texture_2D_image;
+ bool b_EGL_KHR_image_base;
+ bool b_EGL_KHR_wait_sync;
+ bool b_EGL_NV_post_sub_buffer;
+};
+
+struct ProcsEGL {
+ eglBindAPIProc eglBindAPIFn;
+ eglBindTexImageProc eglBindTexImageFn;
+ eglChooseConfigProc eglChooseConfigFn;
+ eglClientWaitSyncKHRProc eglClientWaitSyncKHRFn;
+ eglCopyBuffersProc eglCopyBuffersFn;
+ eglCreateContextProc eglCreateContextFn;
+ eglCreateImageKHRProc eglCreateImageKHRFn;
+ eglCreatePbufferFromClientBufferProc eglCreatePbufferFromClientBufferFn;
+ eglCreatePbufferSurfaceProc eglCreatePbufferSurfaceFn;
+ eglCreatePixmapSurfaceProc eglCreatePixmapSurfaceFn;
+ eglCreateSyncKHRProc eglCreateSyncKHRFn;
+ eglCreateWindowSurfaceProc eglCreateWindowSurfaceFn;
+ eglDestroyContextProc eglDestroyContextFn;
+ eglDestroyImageKHRProc eglDestroyImageKHRFn;
+ eglDestroySurfaceProc eglDestroySurfaceFn;
+ eglDestroySyncKHRProc eglDestroySyncKHRFn;
+ eglGetConfigAttribProc eglGetConfigAttribFn;
+ eglGetConfigsProc eglGetConfigsFn;
+ eglGetCurrentContextProc eglGetCurrentContextFn;
+ eglGetCurrentDisplayProc eglGetCurrentDisplayFn;
+ eglGetCurrentSurfaceProc eglGetCurrentSurfaceFn;
+ eglGetDisplayProc eglGetDisplayFn;
+ eglGetErrorProc eglGetErrorFn;
+ eglGetPlatformDisplayEXTProc eglGetPlatformDisplayEXTFn;
+ eglGetProcAddressProc eglGetProcAddressFn;
+ eglGetSyncAttribKHRProc eglGetSyncAttribKHRFn;
+ eglGetSyncValuesCHROMIUMProc eglGetSyncValuesCHROMIUMFn;
+ eglInitializeProc eglInitializeFn;
+ eglMakeCurrentProc eglMakeCurrentFn;
+ eglPostSubBufferNVProc eglPostSubBufferNVFn;
+ eglQueryAPIProc eglQueryAPIFn;
+ eglQueryContextProc eglQueryContextFn;
+ eglQueryStringProc eglQueryStringFn;
+ eglQuerySurfaceProc eglQuerySurfaceFn;
+ eglQuerySurfacePointerANGLEProc eglQuerySurfacePointerANGLEFn;
+ eglReleaseTexImageProc eglReleaseTexImageFn;
+ eglReleaseThreadProc eglReleaseThreadFn;
+ eglSurfaceAttribProc eglSurfaceAttribFn;
+ eglSwapBuffersProc eglSwapBuffersFn;
+ eglSwapIntervalProc eglSwapIntervalFn;
+ eglTerminateProc eglTerminateFn;
+ eglWaitClientProc eglWaitClientFn;
+ eglWaitGLProc eglWaitGLFn;
+ eglWaitNativeProc eglWaitNativeFn;
+ eglWaitSyncKHRProc eglWaitSyncKHRFn;
+};
+
+class GL_EXPORT EGLApi {
+ public:
+ EGLApi();
+ virtual ~EGLApi();
+
+ virtual EGLBoolean eglBindAPIFn(EGLenum api) = 0;
+ virtual EGLBoolean eglBindTexImageFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint buffer) = 0;
+ virtual EGLBoolean eglChooseConfigFn(EGLDisplay dpy,
+ const EGLint* attrib_list,
+ EGLConfig* configs,
+ EGLint config_size,
+ EGLint* num_config) = 0;
+ virtual EGLint eglClientWaitSyncKHRFn(EGLDisplay dpy,
+ EGLSyncKHR sync,
+ EGLint flags,
+ EGLTimeKHR timeout) = 0;
+ virtual EGLBoolean eglCopyBuffersFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLNativePixmapType target) = 0;
+ virtual EGLContext eglCreateContextFn(EGLDisplay dpy,
+ EGLConfig config,
+ EGLContext share_context,
+ const EGLint* attrib_list) = 0;
+ virtual EGLImageKHR eglCreateImageKHRFn(EGLDisplay dpy,
+ EGLContext ctx,
+ EGLenum target,
+ EGLClientBuffer buffer,
+ const EGLint* attrib_list) = 0;
+ virtual EGLSurface eglCreatePbufferFromClientBufferFn(
+ EGLDisplay dpy,
+ EGLenum buftype,
+ void* buffer,
+ EGLConfig config,
+ const EGLint* attrib_list) = 0;
+ virtual EGLSurface eglCreatePbufferSurfaceFn(EGLDisplay dpy,
+ EGLConfig config,
+ const EGLint* attrib_list) = 0;
+ virtual EGLSurface eglCreatePixmapSurfaceFn(EGLDisplay dpy,
+ EGLConfig config,
+ EGLNativePixmapType pixmap,
+ const EGLint* attrib_list) = 0;
+ virtual EGLSyncKHR eglCreateSyncKHRFn(EGLDisplay dpy,
+ EGLenum type,
+ const EGLint* attrib_list) = 0;
+ virtual EGLSurface eglCreateWindowSurfaceFn(EGLDisplay dpy,
+ EGLConfig config,
+ EGLNativeWindowType win,
+ const EGLint* attrib_list) = 0;
+ virtual EGLBoolean eglDestroyContextFn(EGLDisplay dpy, EGLContext ctx) = 0;
+ virtual EGLBoolean eglDestroyImageKHRFn(EGLDisplay dpy,
+ EGLImageKHR image) = 0;
+ virtual EGLBoolean eglDestroySurfaceFn(EGLDisplay dpy,
+ EGLSurface surface) = 0;
+ virtual EGLBoolean eglDestroySyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync) = 0;
+ virtual EGLBoolean eglGetConfigAttribFn(EGLDisplay dpy,
+ EGLConfig config,
+ EGLint attribute,
+ EGLint* value) = 0;
+ virtual EGLBoolean eglGetConfigsFn(EGLDisplay dpy,
+ EGLConfig* configs,
+ EGLint config_size,
+ EGLint* num_config) = 0;
+ virtual EGLContext eglGetCurrentContextFn(void) = 0;
+ virtual EGLDisplay eglGetCurrentDisplayFn(void) = 0;
+ virtual EGLSurface eglGetCurrentSurfaceFn(EGLint readdraw) = 0;
+ virtual EGLDisplay eglGetDisplayFn(EGLNativeDisplayType display_id) = 0;
+ virtual EGLint eglGetErrorFn(void) = 0;
+ virtual EGLDisplay eglGetPlatformDisplayEXTFn(EGLenum platform,
+ void* native_display,
+ const EGLint* attrib_list) = 0;
+ virtual __eglMustCastToProperFunctionPointerType eglGetProcAddressFn(
+ const char* procname) = 0;
+ virtual EGLBoolean eglGetSyncAttribKHRFn(EGLDisplay dpy,
+ EGLSyncKHR sync,
+ EGLint attribute,
+ EGLint* value) = 0;
+ virtual EGLBoolean eglGetSyncValuesCHROMIUMFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLuint64CHROMIUM* ust,
+ EGLuint64CHROMIUM* msc,
+ EGLuint64CHROMIUM* sbc) = 0;
+ virtual EGLBoolean eglInitializeFn(EGLDisplay dpy,
+ EGLint* major,
+ EGLint* minor) = 0;
+ virtual EGLBoolean eglMakeCurrentFn(EGLDisplay dpy,
+ EGLSurface draw,
+ EGLSurface read,
+ EGLContext ctx) = 0;
+ virtual EGLBoolean eglPostSubBufferNVFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint x,
+ EGLint y,
+ EGLint width,
+ EGLint height) = 0;
+ virtual EGLenum eglQueryAPIFn(void) = 0;
+ virtual EGLBoolean eglQueryContextFn(EGLDisplay dpy,
+ EGLContext ctx,
+ EGLint attribute,
+ EGLint* value) = 0;
+ virtual const char* eglQueryStringFn(EGLDisplay dpy, EGLint name) = 0;
+ virtual EGLBoolean eglQuerySurfaceFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ EGLint* value) = 0;
+ virtual EGLBoolean eglQuerySurfacePointerANGLEFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ void** value) = 0;
+ virtual EGLBoolean eglReleaseTexImageFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint buffer) = 0;
+ virtual EGLBoolean eglReleaseThreadFn(void) = 0;
+ virtual EGLBoolean eglSurfaceAttribFn(EGLDisplay dpy,
+ EGLSurface surface,
+ EGLint attribute,
+ EGLint value) = 0;
+ virtual EGLBoolean eglSwapBuffersFn(EGLDisplay dpy, EGLSurface surface) = 0;
+ virtual EGLBoolean eglSwapIntervalFn(EGLDisplay dpy, EGLint interval) = 0;
+ virtual EGLBoolean eglTerminateFn(EGLDisplay dpy) = 0;
+ virtual EGLBoolean eglWaitClientFn(void) = 0;
+ virtual EGLBoolean eglWaitGLFn(void) = 0;
+ virtual EGLBoolean eglWaitNativeFn(EGLint engine) = 0;
+ virtual EGLint eglWaitSyncKHRFn(EGLDisplay dpy,
+ EGLSyncKHR sync,
+ EGLint flags) = 0;
+};
+
+} // namespace gfx
+
+#define eglBindAPI ::gfx::g_current_egl_context->eglBindAPIFn
+#define eglBindTexImage ::gfx::g_current_egl_context->eglBindTexImageFn
+#define eglChooseConfig ::gfx::g_current_egl_context->eglChooseConfigFn
+#define eglClientWaitSyncKHR \
+ ::gfx::g_current_egl_context->eglClientWaitSyncKHRFn
+#define eglCopyBuffers ::gfx::g_current_egl_context->eglCopyBuffersFn
+#define eglCreateContext ::gfx::g_current_egl_context->eglCreateContextFn
+#define eglCreateImageKHR ::gfx::g_current_egl_context->eglCreateImageKHRFn
+#define eglCreatePbufferFromClientBuffer \
+ ::gfx::g_current_egl_context->eglCreatePbufferFromClientBufferFn
+#define eglCreatePbufferSurface \
+ ::gfx::g_current_egl_context->eglCreatePbufferSurfaceFn
+#define eglCreatePixmapSurface \
+ ::gfx::g_current_egl_context->eglCreatePixmapSurfaceFn
+#define eglCreateSyncKHR ::gfx::g_current_egl_context->eglCreateSyncKHRFn
+#define eglCreateWindowSurface \
+ ::gfx::g_current_egl_context->eglCreateWindowSurfaceFn
+#define eglDestroyContext ::gfx::g_current_egl_context->eglDestroyContextFn
+#define eglDestroyImageKHR ::gfx::g_current_egl_context->eglDestroyImageKHRFn
+#define eglDestroySurface ::gfx::g_current_egl_context->eglDestroySurfaceFn
+#define eglDestroySyncKHR ::gfx::g_current_egl_context->eglDestroySyncKHRFn
+#define eglGetConfigAttrib ::gfx::g_current_egl_context->eglGetConfigAttribFn
+#define eglGetConfigs ::gfx::g_current_egl_context->eglGetConfigsFn
+#define eglGetCurrentContext \
+ ::gfx::g_current_egl_context->eglGetCurrentContextFn
+#define eglGetCurrentDisplay \
+ ::gfx::g_current_egl_context->eglGetCurrentDisplayFn
+#define eglGetCurrentSurface \
+ ::gfx::g_current_egl_context->eglGetCurrentSurfaceFn
+#define eglGetDisplay ::gfx::g_current_egl_context->eglGetDisplayFn
+#define eglGetError ::gfx::g_current_egl_context->eglGetErrorFn
+#define eglGetPlatformDisplayEXT \
+ ::gfx::g_current_egl_context->eglGetPlatformDisplayEXTFn
+#define eglGetProcAddress ::gfx::g_current_egl_context->eglGetProcAddressFn
+#define eglGetSyncAttribKHR ::gfx::g_current_egl_context->eglGetSyncAttribKHRFn
+#define eglGetSyncValuesCHROMIUM \
+ ::gfx::g_current_egl_context->eglGetSyncValuesCHROMIUMFn
+#define eglInitialize ::gfx::g_current_egl_context->eglInitializeFn
+#define eglMakeCurrent ::gfx::g_current_egl_context->eglMakeCurrentFn
+#define eglPostSubBufferNV ::gfx::g_current_egl_context->eglPostSubBufferNVFn
+#define eglQueryAPI ::gfx::g_current_egl_context->eglQueryAPIFn
+#define eglQueryContext ::gfx::g_current_egl_context->eglQueryContextFn
+#define eglQueryString ::gfx::g_current_egl_context->eglQueryStringFn
+#define eglQuerySurface ::gfx::g_current_egl_context->eglQuerySurfaceFn
+#define eglQuerySurfacePointerANGLE \
+ ::gfx::g_current_egl_context->eglQuerySurfacePointerANGLEFn
+#define eglReleaseTexImage ::gfx::g_current_egl_context->eglReleaseTexImageFn
+#define eglReleaseThread ::gfx::g_current_egl_context->eglReleaseThreadFn
+#define eglSurfaceAttrib ::gfx::g_current_egl_context->eglSurfaceAttribFn
+#define eglSwapBuffers ::gfx::g_current_egl_context->eglSwapBuffersFn
+#define eglSwapInterval ::gfx::g_current_egl_context->eglSwapIntervalFn
+#define eglTerminate ::gfx::g_current_egl_context->eglTerminateFn
+#define eglWaitClient ::gfx::g_current_egl_context->eglWaitClientFn
+#define eglWaitGL ::gfx::g_current_egl_context->eglWaitGLFn
+#define eglWaitNative ::gfx::g_current_egl_context->eglWaitNativeFn
+#define eglWaitSyncKHR ::gfx::g_current_egl_context->eglWaitSyncKHRFn
+
+#endif // UI_GFX_GL_GL_BINDINGS_AUTOGEN_EGL_H_
diff --git a/ui/gl/gl_bindings_autogen_gl.cc b/ui/gl/gl_bindings_autogen_gl.cc
new file mode 100644
index 0000000..435758d
--- /dev/null
+++ b/ui/gl/gl_bindings_autogen_gl.cc
@@ -0,0 +1,11338 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+#include <string>
+
+#include "base/debug/trace_event.h"
+#include "ui/gl/gl_bindings.h"
+#include "ui/gl/gl_context.h"
+#include "ui/gl/gl_enums.h"
+#include "ui/gl/gl_gl_api_implementation.h"
+#include "ui/gl/gl_implementation.h"
+#include "ui/gl/gl_version_info.h"
+
+namespace gfx {
+
+static bool g_debugBindingsInitialized;
+DriverGL g_driver_gl;
+
+void glBeginQueryARBNotBound(GLenum target, GLuint id) {
+ NOTREACHED();
+}
+void glBindFramebufferEXTNotBound(GLenum target, GLuint framebuffer) {
+ NOTREACHED();
+}
+void glBindRenderbufferEXTNotBound(GLenum target, GLuint renderbuffer) {
+ NOTREACHED();
+}
+void glBindVertexArrayOESNotBound(GLuint array) {
+ NOTREACHED();
+}
+void glBlendBarrierKHRNotBound(void) {
+ NOTREACHED();
+}
+void glBlitFramebufferANGLENotBound(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ NOTREACHED();
+}
+void glBlitFramebufferEXTNotBound(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ NOTREACHED();
+}
+GLenum glCheckFramebufferStatusEXTNotBound(GLenum target) {
+ NOTREACHED();
+ return 0;
+}
+void glDeleteBuffersARBNotBound(GLsizei n, const GLuint* buffers) {
+ NOTREACHED();
+}
+void glDeleteFramebuffersEXTNotBound(GLsizei n, const GLuint* framebuffers) {
+ NOTREACHED();
+}
+void glDeleteQueriesARBNotBound(GLsizei n, const GLuint* ids) {
+ NOTREACHED();
+}
+void glDeleteRenderbuffersEXTNotBound(GLsizei n, const GLuint* renderbuffers) {
+ NOTREACHED();
+}
+void glDeleteVertexArraysOESNotBound(GLsizei n, const GLuint* arrays) {
+ NOTREACHED();
+}
+void glDrawArraysInstancedANGLENotBound(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount) {
+ NOTREACHED();
+}
+void glDrawBuffersARBNotBound(GLsizei n, const GLenum* bufs) {
+ NOTREACHED();
+}
+void glDrawElementsInstancedANGLENotBound(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount) {
+ NOTREACHED();
+}
+void glEndQueryARBNotBound(GLenum target) {
+ NOTREACHED();
+}
+void glFramebufferRenderbufferEXTNotBound(GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer) {
+ NOTREACHED();
+}
+void glFramebufferTexture2DEXTNotBound(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level) {
+ NOTREACHED();
+}
+void glGenBuffersARBNotBound(GLsizei n, GLuint* buffers) {
+ NOTREACHED();
+}
+void glGenerateMipmapEXTNotBound(GLenum target) {
+ NOTREACHED();
+}
+void glGenFramebuffersEXTNotBound(GLsizei n, GLuint* framebuffers) {
+ NOTREACHED();
+}
+void glGenQueriesARBNotBound(GLsizei n, GLuint* ids) {
+ NOTREACHED();
+}
+void glGenRenderbuffersEXTNotBound(GLsizei n, GLuint* renderbuffers) {
+ NOTREACHED();
+}
+void glGenVertexArraysOESNotBound(GLsizei n, GLuint* arrays) {
+ NOTREACHED();
+}
+void glGetFramebufferAttachmentParameterivEXTNotBound(GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* params) {
+ NOTREACHED();
+}
+GLenum glGetGraphicsResetStatusARBNotBound(void) {
+ NOTREACHED();
+ return 0;
+}
+void glGetProgramBinaryNotBound(GLuint program,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* binaryFormat,
+ GLvoid* binary) {
+ NOTREACHED();
+}
+void glGetQueryivARBNotBound(GLenum target, GLenum pname, GLint* params) {
+ NOTREACHED();
+}
+void glGetQueryObjectivARBNotBound(GLuint id, GLenum pname, GLint* params) {
+ NOTREACHED();
+}
+void glGetQueryObjectui64vNotBound(GLuint id, GLenum pname, GLuint64* params) {
+ NOTREACHED();
+}
+void glGetQueryObjectuivARBNotBound(GLuint id, GLenum pname, GLuint* params) {
+ NOTREACHED();
+}
+void glGetRenderbufferParameterivEXTNotBound(GLenum target,
+ GLenum pname,
+ GLint* params) {
+ NOTREACHED();
+}
+GLboolean glIsFramebufferEXTNotBound(GLuint framebuffer) {
+ NOTREACHED();
+ return 0;
+}
+GLboolean glIsQueryARBNotBound(GLuint query) {
+ NOTREACHED();
+ return 0;
+}
+GLboolean glIsRenderbufferEXTNotBound(GLuint renderbuffer) {
+ NOTREACHED();
+ return 0;
+}
+GLboolean glIsVertexArrayOESNotBound(GLuint array) {
+ NOTREACHED();
+ return 0;
+}
+void* glMapBufferNotBound(GLenum target, GLenum access) {
+ NOTREACHED();
+ return 0;
+}
+void* glMapBufferRangeNotBound(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length,
+ GLbitfield access) {
+ NOTREACHED();
+ return 0;
+}
+void glProgramBinaryNotBound(GLuint program,
+ GLenum binaryFormat,
+ const GLvoid* binary,
+ GLsizei length) {
+ NOTREACHED();
+}
+void glQueryCounterNotBound(GLuint id, GLenum target) {
+ NOTREACHED();
+}
+void glRenderbufferStorageEXTNotBound(GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ NOTREACHED();
+}
+void glRenderbufferStorageMultisampleANGLENotBound(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ NOTREACHED();
+}
+void glRenderbufferStorageMultisampleEXTNotBound(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ NOTREACHED();
+}
+void glTexStorage2DEXTNotBound(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ NOTREACHED();
+}
+GLboolean glUnmapBufferNotBound(GLenum target) {
+ NOTREACHED();
+ return 0;
+}
+void glVertexAttribDivisorANGLENotBound(GLuint index, GLuint divisor) {
+ NOTREACHED();
+}
+
+void DriverGL::InitializeStaticBindings() {
+ fn.glActiveTextureFn = reinterpret_cast<glActiveTextureProc>(
+ GetGLProcAddress("glActiveTexture"));
+ fn.glAttachShaderFn =
+ reinterpret_cast<glAttachShaderProc>(GetGLProcAddress("glAttachShader"));
+ fn.glBeginQueryFn =
+ reinterpret_cast<glBeginQueryProc>(GetGLProcAddress("glBeginQuery"));
+ fn.glBeginQueryARBFn =
+ reinterpret_cast<glBeginQueryARBProc>(glBeginQueryARBNotBound);
+ fn.glBeginTransformFeedbackFn =
+ reinterpret_cast<glBeginTransformFeedbackProc>(
+ GetGLProcAddress("glBeginTransformFeedback"));
+ fn.glBindAttribLocationFn = reinterpret_cast<glBindAttribLocationProc>(
+ GetGLProcAddress("glBindAttribLocation"));
+ fn.glBindBufferFn =
+ reinterpret_cast<glBindBufferProc>(GetGLProcAddress("glBindBuffer"));
+ fn.glBindBufferBaseFn = reinterpret_cast<glBindBufferBaseProc>(
+ GetGLProcAddress("glBindBufferBase"));
+ fn.glBindBufferRangeFn = reinterpret_cast<glBindBufferRangeProc>(
+ GetGLProcAddress("glBindBufferRange"));
+ fn.glBindFragDataLocationFn = reinterpret_cast<glBindFragDataLocationProc>(
+ GetGLProcAddress("glBindFragDataLocation"));
+ fn.glBindFragDataLocationIndexedFn =
+ reinterpret_cast<glBindFragDataLocationIndexedProc>(
+ GetGLProcAddress("glBindFragDataLocationIndexed"));
+ fn.glBindFramebufferEXTFn =
+ reinterpret_cast<glBindFramebufferEXTProc>(glBindFramebufferEXTNotBound);
+ fn.glBindRenderbufferEXTFn = reinterpret_cast<glBindRenderbufferEXTProc>(
+ glBindRenderbufferEXTNotBound);
+ fn.glBindSamplerFn =
+ reinterpret_cast<glBindSamplerProc>(GetGLProcAddress("glBindSampler"));
+ fn.glBindTextureFn =
+ reinterpret_cast<glBindTextureProc>(GetGLProcAddress("glBindTexture"));
+ fn.glBindTransformFeedbackFn = reinterpret_cast<glBindTransformFeedbackProc>(
+ GetGLProcAddress("glBindTransformFeedback"));
+ fn.glBindVertexArrayOESFn =
+ reinterpret_cast<glBindVertexArrayOESProc>(glBindVertexArrayOESNotBound);
+ fn.glBlendBarrierKHRFn =
+ reinterpret_cast<glBlendBarrierKHRProc>(glBlendBarrierKHRNotBound);
+ fn.glBlendColorFn =
+ reinterpret_cast<glBlendColorProc>(GetGLProcAddress("glBlendColor"));
+ fn.glBlendEquationFn = reinterpret_cast<glBlendEquationProc>(
+ GetGLProcAddress("glBlendEquation"));
+ fn.glBlendEquationSeparateFn = reinterpret_cast<glBlendEquationSeparateProc>(
+ GetGLProcAddress("glBlendEquationSeparate"));
+ fn.glBlendFuncFn =
+ reinterpret_cast<glBlendFuncProc>(GetGLProcAddress("glBlendFunc"));
+ fn.glBlendFuncSeparateFn = reinterpret_cast<glBlendFuncSeparateProc>(
+ GetGLProcAddress("glBlendFuncSeparate"));
+ fn.glBlitFramebufferFn = reinterpret_cast<glBlitFramebufferProc>(
+ GetGLProcAddress("glBlitFramebuffer"));
+ fn.glBlitFramebufferANGLEFn = reinterpret_cast<glBlitFramebufferANGLEProc>(
+ glBlitFramebufferANGLENotBound);
+ fn.glBlitFramebufferEXTFn =
+ reinterpret_cast<glBlitFramebufferEXTProc>(glBlitFramebufferEXTNotBound);
+ fn.glBufferDataFn =
+ reinterpret_cast<glBufferDataProc>(GetGLProcAddress("glBufferData"));
+ fn.glBufferSubDataFn = reinterpret_cast<glBufferSubDataProc>(
+ GetGLProcAddress("glBufferSubData"));
+ fn.glCheckFramebufferStatusEXTFn =
+ reinterpret_cast<glCheckFramebufferStatusEXTProc>(
+ glCheckFramebufferStatusEXTNotBound);
+ fn.glClearFn = reinterpret_cast<glClearProc>(GetGLProcAddress("glClear"));
+ fn.glClearBufferfiFn = reinterpret_cast<glClearBufferfiProc>(
+ GetGLProcAddress("glClearBufferfi"));
+ fn.glClearBufferfvFn = reinterpret_cast<glClearBufferfvProc>(
+ GetGLProcAddress("glClearBufferfv"));
+ fn.glClearBufferivFn = reinterpret_cast<glClearBufferivProc>(
+ GetGLProcAddress("glClearBufferiv"));
+ fn.glClearBufferuivFn = reinterpret_cast<glClearBufferuivProc>(
+ GetGLProcAddress("glClearBufferuiv"));
+ fn.glClearColorFn =
+ reinterpret_cast<glClearColorProc>(GetGLProcAddress("glClearColor"));
+ fn.glClearDepthFn =
+ reinterpret_cast<glClearDepthProc>(GetGLProcAddress("glClearDepth"));
+ fn.glClearDepthfFn =
+ reinterpret_cast<glClearDepthfProc>(GetGLProcAddress("glClearDepthf"));
+ fn.glClearStencilFn =
+ reinterpret_cast<glClearStencilProc>(GetGLProcAddress("glClearStencil"));
+ fn.glClientWaitSyncFn = reinterpret_cast<glClientWaitSyncProc>(
+ GetGLProcAddress("glClientWaitSync"));
+ fn.glColorMaskFn =
+ reinterpret_cast<glColorMaskProc>(GetGLProcAddress("glColorMask"));
+ fn.glCompileShaderFn = reinterpret_cast<glCompileShaderProc>(
+ GetGLProcAddress("glCompileShader"));
+ fn.glCompressedTexImage2DFn = reinterpret_cast<glCompressedTexImage2DProc>(
+ GetGLProcAddress("glCompressedTexImage2D"));
+ fn.glCompressedTexImage3DFn = reinterpret_cast<glCompressedTexImage3DProc>(
+ GetGLProcAddress("glCompressedTexImage3D"));
+ fn.glCompressedTexSubImage2DFn =
+ reinterpret_cast<glCompressedTexSubImage2DProc>(
+ GetGLProcAddress("glCompressedTexSubImage2D"));
+ fn.glCopyBufferSubDataFn = reinterpret_cast<glCopyBufferSubDataProc>(
+ GetGLProcAddress("glCopyBufferSubData"));
+ fn.glCopyTexImage2DFn = reinterpret_cast<glCopyTexImage2DProc>(
+ GetGLProcAddress("glCopyTexImage2D"));
+ fn.glCopyTexSubImage2DFn = reinterpret_cast<glCopyTexSubImage2DProc>(
+ GetGLProcAddress("glCopyTexSubImage2D"));
+ fn.glCopyTexSubImage3DFn = reinterpret_cast<glCopyTexSubImage3DProc>(
+ GetGLProcAddress("glCopyTexSubImage3D"));
+ fn.glCreateProgramFn = reinterpret_cast<glCreateProgramProc>(
+ GetGLProcAddress("glCreateProgram"));
+ fn.glCreateShaderFn =
+ reinterpret_cast<glCreateShaderProc>(GetGLProcAddress("glCreateShader"));
+ fn.glCullFaceFn =
+ reinterpret_cast<glCullFaceProc>(GetGLProcAddress("glCullFace"));
+ fn.glDeleteBuffersARBFn =
+ reinterpret_cast<glDeleteBuffersARBProc>(glDeleteBuffersARBNotBound);
+ fn.glDeleteFencesAPPLEFn = reinterpret_cast<glDeleteFencesAPPLEProc>(
+ GetGLProcAddress("glDeleteFencesAPPLE"));
+ fn.glDeleteFencesNVFn = reinterpret_cast<glDeleteFencesNVProc>(
+ GetGLProcAddress("glDeleteFencesNV"));
+ fn.glDeleteFramebuffersEXTFn = reinterpret_cast<glDeleteFramebuffersEXTProc>(
+ glDeleteFramebuffersEXTNotBound);
+ fn.glDeleteProgramFn = reinterpret_cast<glDeleteProgramProc>(
+ GetGLProcAddress("glDeleteProgram"));
+ fn.glDeleteQueriesFn = reinterpret_cast<glDeleteQueriesProc>(
+ GetGLProcAddress("glDeleteQueries"));
+ fn.glDeleteQueriesARBFn =
+ reinterpret_cast<glDeleteQueriesARBProc>(glDeleteQueriesARBNotBound);
+ fn.glDeleteRenderbuffersEXTFn =
+ reinterpret_cast<glDeleteRenderbuffersEXTProc>(
+ glDeleteRenderbuffersEXTNotBound);
+ fn.glDeleteSamplersFn = reinterpret_cast<glDeleteSamplersProc>(
+ GetGLProcAddress("glDeleteSamplers"));
+ fn.glDeleteShaderFn =
+ reinterpret_cast<glDeleteShaderProc>(GetGLProcAddress("glDeleteShader"));
+ fn.glDeleteSyncFn =
+ reinterpret_cast<glDeleteSyncProc>(GetGLProcAddress("glDeleteSync"));
+ fn.glDeleteTexturesFn = reinterpret_cast<glDeleteTexturesProc>(
+ GetGLProcAddress("glDeleteTextures"));
+ fn.glDeleteTransformFeedbacksFn =
+ reinterpret_cast<glDeleteTransformFeedbacksProc>(
+ GetGLProcAddress("glDeleteTransformFeedbacks"));
+ fn.glDeleteVertexArraysOESFn = reinterpret_cast<glDeleteVertexArraysOESProc>(
+ glDeleteVertexArraysOESNotBound);
+ fn.glDepthFuncFn =
+ reinterpret_cast<glDepthFuncProc>(GetGLProcAddress("glDepthFunc"));
+ fn.glDepthMaskFn =
+ reinterpret_cast<glDepthMaskProc>(GetGLProcAddress("glDepthMask"));
+ fn.glDepthRangeFn =
+ reinterpret_cast<glDepthRangeProc>(GetGLProcAddress("glDepthRange"));
+ fn.glDepthRangefFn =
+ reinterpret_cast<glDepthRangefProc>(GetGLProcAddress("glDepthRangef"));
+ fn.glDetachShaderFn =
+ reinterpret_cast<glDetachShaderProc>(GetGLProcAddress("glDetachShader"));
+ fn.glDisableFn =
+ reinterpret_cast<glDisableProc>(GetGLProcAddress("glDisable"));
+ fn.glDisableVertexAttribArrayFn =
+ reinterpret_cast<glDisableVertexAttribArrayProc>(
+ GetGLProcAddress("glDisableVertexAttribArray"));
+ fn.glDiscardFramebufferEXTFn = reinterpret_cast<glDiscardFramebufferEXTProc>(
+ GetGLProcAddress("glDiscardFramebufferEXT"));
+ fn.glDrawArraysFn =
+ reinterpret_cast<glDrawArraysProc>(GetGLProcAddress("glDrawArrays"));
+ fn.glDrawArraysInstancedANGLEFn =
+ reinterpret_cast<glDrawArraysInstancedANGLEProc>(
+ glDrawArraysInstancedANGLENotBound);
+ fn.glDrawBufferFn =
+ reinterpret_cast<glDrawBufferProc>(GetGLProcAddress("glDrawBuffer"));
+ fn.glDrawBuffersARBFn =
+ reinterpret_cast<glDrawBuffersARBProc>(glDrawBuffersARBNotBound);
+ fn.glDrawElementsFn =
+ reinterpret_cast<glDrawElementsProc>(GetGLProcAddress("glDrawElements"));
+ fn.glDrawElementsInstancedANGLEFn =
+ reinterpret_cast<glDrawElementsInstancedANGLEProc>(
+ glDrawElementsInstancedANGLENotBound);
+ fn.glDrawRangeElementsFn = reinterpret_cast<glDrawRangeElementsProc>(
+ GetGLProcAddress("glDrawRangeElements"));
+ fn.glEGLImageTargetRenderbufferStorageOESFn =
+ reinterpret_cast<glEGLImageTargetRenderbufferStorageOESProc>(
+ GetGLProcAddress("glEGLImageTargetRenderbufferStorageOES"));
+ fn.glEGLImageTargetTexture2DOESFn =
+ reinterpret_cast<glEGLImageTargetTexture2DOESProc>(
+ GetGLProcAddress("glEGLImageTargetTexture2DOES"));
+ fn.glEnableFn = reinterpret_cast<glEnableProc>(GetGLProcAddress("glEnable"));
+ fn.glEnableVertexAttribArrayFn =
+ reinterpret_cast<glEnableVertexAttribArrayProc>(
+ GetGLProcAddress("glEnableVertexAttribArray"));
+ fn.glEndQueryFn =
+ reinterpret_cast<glEndQueryProc>(GetGLProcAddress("glEndQuery"));
+ fn.glEndQueryARBFn =
+ reinterpret_cast<glEndQueryARBProc>(glEndQueryARBNotBound);
+ fn.glEndTransformFeedbackFn = reinterpret_cast<glEndTransformFeedbackProc>(
+ GetGLProcAddress("glEndTransformFeedback"));
+ fn.glFenceSyncFn =
+ reinterpret_cast<glFenceSyncProc>(GetGLProcAddress("glFenceSync"));
+ fn.glFinishFn = reinterpret_cast<glFinishProc>(GetGLProcAddress("glFinish"));
+ fn.glFinishFenceAPPLEFn = reinterpret_cast<glFinishFenceAPPLEProc>(
+ GetGLProcAddress("glFinishFenceAPPLE"));
+ fn.glFinishFenceNVFn = reinterpret_cast<glFinishFenceNVProc>(
+ GetGLProcAddress("glFinishFenceNV"));
+ fn.glFlushFn = reinterpret_cast<glFlushProc>(GetGLProcAddress("glFlush"));
+ fn.glFlushMappedBufferRangeFn =
+ reinterpret_cast<glFlushMappedBufferRangeProc>(
+ GetGLProcAddress("glFlushMappedBufferRange"));
+ fn.glFramebufferRenderbufferEXTFn =
+ reinterpret_cast<glFramebufferRenderbufferEXTProc>(
+ glFramebufferRenderbufferEXTNotBound);
+ fn.glFramebufferTexture2DEXTFn =
+ reinterpret_cast<glFramebufferTexture2DEXTProc>(
+ glFramebufferTexture2DEXTNotBound);
+ fn.glFramebufferTexture2DMultisampleEXTFn =
+ reinterpret_cast<glFramebufferTexture2DMultisampleEXTProc>(
+ GetGLProcAddress("glFramebufferTexture2DMultisampleEXT"));
+ fn.glFramebufferTexture2DMultisampleIMGFn =
+ reinterpret_cast<glFramebufferTexture2DMultisampleIMGProc>(
+ GetGLProcAddress("glFramebufferTexture2DMultisampleIMG"));
+ fn.glFramebufferTextureLayerFn =
+ reinterpret_cast<glFramebufferTextureLayerProc>(
+ GetGLProcAddress("glFramebufferTextureLayer"));
+ fn.glFrontFaceFn =
+ reinterpret_cast<glFrontFaceProc>(GetGLProcAddress("glFrontFace"));
+ fn.glGenBuffersARBFn =
+ reinterpret_cast<glGenBuffersARBProc>(glGenBuffersARBNotBound);
+ fn.glGenerateMipmapEXTFn =
+ reinterpret_cast<glGenerateMipmapEXTProc>(glGenerateMipmapEXTNotBound);
+ fn.glGenFencesAPPLEFn = reinterpret_cast<glGenFencesAPPLEProc>(
+ GetGLProcAddress("glGenFencesAPPLE"));
+ fn.glGenFencesNVFn =
+ reinterpret_cast<glGenFencesNVProc>(GetGLProcAddress("glGenFencesNV"));
+ fn.glGenFramebuffersEXTFn =
+ reinterpret_cast<glGenFramebuffersEXTProc>(glGenFramebuffersEXTNotBound);
+ fn.glGenQueriesFn =
+ reinterpret_cast<glGenQueriesProc>(GetGLProcAddress("glGenQueries"));
+ fn.glGenQueriesARBFn =
+ reinterpret_cast<glGenQueriesARBProc>(glGenQueriesARBNotBound);
+ fn.glGenRenderbuffersEXTFn = reinterpret_cast<glGenRenderbuffersEXTProc>(
+ glGenRenderbuffersEXTNotBound);
+ fn.glGenSamplersFn =
+ reinterpret_cast<glGenSamplersProc>(GetGLProcAddress("glGenSamplers"));
+ fn.glGenTexturesFn =
+ reinterpret_cast<glGenTexturesProc>(GetGLProcAddress("glGenTextures"));
+ fn.glGenTransformFeedbacksFn = reinterpret_cast<glGenTransformFeedbacksProc>(
+ GetGLProcAddress("glGenTransformFeedbacks"));
+ fn.glGenVertexArraysOESFn =
+ reinterpret_cast<glGenVertexArraysOESProc>(glGenVertexArraysOESNotBound);
+ fn.glGetActiveAttribFn = reinterpret_cast<glGetActiveAttribProc>(
+ GetGLProcAddress("glGetActiveAttrib"));
+ fn.glGetActiveUniformFn = reinterpret_cast<glGetActiveUniformProc>(
+ GetGLProcAddress("glGetActiveUniform"));
+ fn.glGetActiveUniformBlockivFn =
+ reinterpret_cast<glGetActiveUniformBlockivProc>(
+ GetGLProcAddress("glGetActiveUniformBlockiv"));
+ fn.glGetActiveUniformBlockNameFn =
+ reinterpret_cast<glGetActiveUniformBlockNameProc>(
+ GetGLProcAddress("glGetActiveUniformBlockName"));
+ fn.glGetActiveUniformsivFn = reinterpret_cast<glGetActiveUniformsivProc>(
+ GetGLProcAddress("glGetActiveUniformsiv"));
+ fn.glGetAttachedShadersFn = reinterpret_cast<glGetAttachedShadersProc>(
+ GetGLProcAddress("glGetAttachedShaders"));
+ fn.glGetAttribLocationFn = reinterpret_cast<glGetAttribLocationProc>(
+ GetGLProcAddress("glGetAttribLocation"));
+ fn.glGetBooleanvFn =
+ reinterpret_cast<glGetBooleanvProc>(GetGLProcAddress("glGetBooleanv"));
+ fn.glGetBufferParameterivFn = reinterpret_cast<glGetBufferParameterivProc>(
+ GetGLProcAddress("glGetBufferParameteriv"));
+ fn.glGetErrorFn =
+ reinterpret_cast<glGetErrorProc>(GetGLProcAddress("glGetError"));
+ fn.glGetFenceivNVFn =
+ reinterpret_cast<glGetFenceivNVProc>(GetGLProcAddress("glGetFenceivNV"));
+ fn.glGetFloatvFn =
+ reinterpret_cast<glGetFloatvProc>(GetGLProcAddress("glGetFloatv"));
+ fn.glGetFragDataLocationFn = reinterpret_cast<glGetFragDataLocationProc>(
+ GetGLProcAddress("glGetFragDataLocation"));
+ fn.glGetFramebufferAttachmentParameterivEXTFn =
+ reinterpret_cast<glGetFramebufferAttachmentParameterivEXTProc>(
+ glGetFramebufferAttachmentParameterivEXTNotBound);
+ fn.glGetGraphicsResetStatusARBFn =
+ reinterpret_cast<glGetGraphicsResetStatusARBProc>(
+ glGetGraphicsResetStatusARBNotBound);
+ fn.glGetInteger64i_vFn = reinterpret_cast<glGetInteger64i_vProc>(
+ GetGLProcAddress("glGetInteger64i_v"));
+ fn.glGetInteger64vFn = reinterpret_cast<glGetInteger64vProc>(
+ GetGLProcAddress("glGetInteger64v"));
+ fn.glGetIntegeri_vFn = reinterpret_cast<glGetIntegeri_vProc>(
+ GetGLProcAddress("glGetIntegeri_v"));
+ fn.glGetIntegervFn =
+ reinterpret_cast<glGetIntegervProc>(GetGLProcAddress("glGetIntegerv"));
+ fn.glGetInternalformativFn = reinterpret_cast<glGetInternalformativProc>(
+ GetGLProcAddress("glGetInternalformativ"));
+ fn.glGetProgramBinaryFn =
+ reinterpret_cast<glGetProgramBinaryProc>(glGetProgramBinaryNotBound);
+ fn.glGetProgramInfoLogFn = reinterpret_cast<glGetProgramInfoLogProc>(
+ GetGLProcAddress("glGetProgramInfoLog"));
+ fn.glGetProgramivFn =
+ reinterpret_cast<glGetProgramivProc>(GetGLProcAddress("glGetProgramiv"));
+ fn.glGetQueryivFn =
+ reinterpret_cast<glGetQueryivProc>(GetGLProcAddress("glGetQueryiv"));
+ fn.glGetQueryivARBFn =
+ reinterpret_cast<glGetQueryivARBProc>(glGetQueryivARBNotBound);
+ fn.glGetQueryObjecti64vFn = reinterpret_cast<glGetQueryObjecti64vProc>(
+ GetGLProcAddress("glGetQueryObjecti64v"));
+ fn.glGetQueryObjectivFn = reinterpret_cast<glGetQueryObjectivProc>(
+ GetGLProcAddress("glGetQueryObjectiv"));
+ fn.glGetQueryObjectivARBFn = reinterpret_cast<glGetQueryObjectivARBProc>(
+ glGetQueryObjectivARBNotBound);
+ fn.glGetQueryObjectui64vFn = reinterpret_cast<glGetQueryObjectui64vProc>(
+ glGetQueryObjectui64vNotBound);
+ fn.glGetQueryObjectuivFn = reinterpret_cast<glGetQueryObjectuivProc>(
+ GetGLProcAddress("glGetQueryObjectuiv"));
+ fn.glGetQueryObjectuivARBFn = reinterpret_cast<glGetQueryObjectuivARBProc>(
+ glGetQueryObjectuivARBNotBound);
+ fn.glGetRenderbufferParameterivEXTFn =
+ reinterpret_cast<glGetRenderbufferParameterivEXTProc>(
+ glGetRenderbufferParameterivEXTNotBound);
+ fn.glGetSamplerParameterfvFn = reinterpret_cast<glGetSamplerParameterfvProc>(
+ GetGLProcAddress("glGetSamplerParameterfv"));
+ fn.glGetSamplerParameterivFn = reinterpret_cast<glGetSamplerParameterivProc>(
+ GetGLProcAddress("glGetSamplerParameteriv"));
+ fn.glGetShaderInfoLogFn = reinterpret_cast<glGetShaderInfoLogProc>(
+ GetGLProcAddress("glGetShaderInfoLog"));
+ fn.glGetShaderivFn =
+ reinterpret_cast<glGetShaderivProc>(GetGLProcAddress("glGetShaderiv"));
+ fn.glGetShaderPrecisionFormatFn =
+ reinterpret_cast<glGetShaderPrecisionFormatProc>(
+ GetGLProcAddress("glGetShaderPrecisionFormat"));
+ fn.glGetShaderSourceFn = reinterpret_cast<glGetShaderSourceProc>(
+ GetGLProcAddress("glGetShaderSource"));
+ fn.glGetStringFn =
+ reinterpret_cast<glGetStringProc>(GetGLProcAddress("glGetString"));
+ fn.glGetSyncivFn =
+ reinterpret_cast<glGetSyncivProc>(GetGLProcAddress("glGetSynciv"));
+ fn.glGetTexLevelParameterfvFn =
+ reinterpret_cast<glGetTexLevelParameterfvProc>(
+ GetGLProcAddress("glGetTexLevelParameterfv"));
+ fn.glGetTexLevelParameterivFn =
+ reinterpret_cast<glGetTexLevelParameterivProc>(
+ GetGLProcAddress("glGetTexLevelParameteriv"));
+ fn.glGetTexParameterfvFn = reinterpret_cast<glGetTexParameterfvProc>(
+ GetGLProcAddress("glGetTexParameterfv"));
+ fn.glGetTexParameterivFn = reinterpret_cast<glGetTexParameterivProc>(
+ GetGLProcAddress("glGetTexParameteriv"));
+ fn.glGetTransformFeedbackVaryingFn =
+ reinterpret_cast<glGetTransformFeedbackVaryingProc>(
+ GetGLProcAddress("glGetTransformFeedbackVarying"));
+ fn.glGetTranslatedShaderSourceANGLEFn =
+ reinterpret_cast<glGetTranslatedShaderSourceANGLEProc>(
+ GetGLProcAddress("glGetTranslatedShaderSourceANGLE"));
+ fn.glGetUniformBlockIndexFn = reinterpret_cast<glGetUniformBlockIndexProc>(
+ GetGLProcAddress("glGetUniformBlockIndex"));
+ fn.glGetUniformfvFn =
+ reinterpret_cast<glGetUniformfvProc>(GetGLProcAddress("glGetUniformfv"));
+ fn.glGetUniformIndicesFn = reinterpret_cast<glGetUniformIndicesProc>(
+ GetGLProcAddress("glGetUniformIndices"));
+ fn.glGetUniformivFn =
+ reinterpret_cast<glGetUniformivProc>(GetGLProcAddress("glGetUniformiv"));
+ fn.glGetUniformLocationFn = reinterpret_cast<glGetUniformLocationProc>(
+ GetGLProcAddress("glGetUniformLocation"));
+ fn.glGetVertexAttribfvFn = reinterpret_cast<glGetVertexAttribfvProc>(
+ GetGLProcAddress("glGetVertexAttribfv"));
+ fn.glGetVertexAttribivFn = reinterpret_cast<glGetVertexAttribivProc>(
+ GetGLProcAddress("glGetVertexAttribiv"));
+ fn.glGetVertexAttribPointervFn =
+ reinterpret_cast<glGetVertexAttribPointervProc>(
+ GetGLProcAddress("glGetVertexAttribPointerv"));
+ fn.glHintFn = reinterpret_cast<glHintProc>(GetGLProcAddress("glHint"));
+ fn.glInsertEventMarkerEXTFn = reinterpret_cast<glInsertEventMarkerEXTProc>(
+ GetGLProcAddress("glInsertEventMarkerEXT"));
+ fn.glInvalidateFramebufferFn = reinterpret_cast<glInvalidateFramebufferProc>(
+ GetGLProcAddress("glInvalidateFramebuffer"));
+ fn.glInvalidateSubFramebufferFn =
+ reinterpret_cast<glInvalidateSubFramebufferProc>(
+ GetGLProcAddress("glInvalidateSubFramebuffer"));
+ fn.glIsBufferFn =
+ reinterpret_cast<glIsBufferProc>(GetGLProcAddress("glIsBuffer"));
+ fn.glIsEnabledFn =
+ reinterpret_cast<glIsEnabledProc>(GetGLProcAddress("glIsEnabled"));
+ fn.glIsFenceAPPLEFn =
+ reinterpret_cast<glIsFenceAPPLEProc>(GetGLProcAddress("glIsFenceAPPLE"));
+ fn.glIsFenceNVFn =
+ reinterpret_cast<glIsFenceNVProc>(GetGLProcAddress("glIsFenceNV"));
+ fn.glIsFramebufferEXTFn =
+ reinterpret_cast<glIsFramebufferEXTProc>(glIsFramebufferEXTNotBound);
+ fn.glIsProgramFn =
+ reinterpret_cast<glIsProgramProc>(GetGLProcAddress("glIsProgram"));
+ fn.glIsQueryFn =
+ reinterpret_cast<glIsQueryProc>(GetGLProcAddress("glIsQuery"));
+ fn.glIsQueryARBFn = reinterpret_cast<glIsQueryARBProc>(glIsQueryARBNotBound);
+ fn.glIsRenderbufferEXTFn =
+ reinterpret_cast<glIsRenderbufferEXTProc>(glIsRenderbufferEXTNotBound);
+ fn.glIsSamplerFn =
+ reinterpret_cast<glIsSamplerProc>(GetGLProcAddress("glIsSampler"));
+ fn.glIsShaderFn =
+ reinterpret_cast<glIsShaderProc>(GetGLProcAddress("glIsShader"));
+ fn.glIsSyncFn = reinterpret_cast<glIsSyncProc>(GetGLProcAddress("glIsSync"));
+ fn.glIsTextureFn =
+ reinterpret_cast<glIsTextureProc>(GetGLProcAddress("glIsTexture"));
+ fn.glIsTransformFeedbackFn = reinterpret_cast<glIsTransformFeedbackProc>(
+ GetGLProcAddress("glIsTransformFeedback"));
+ fn.glIsVertexArrayOESFn =
+ reinterpret_cast<glIsVertexArrayOESProc>(glIsVertexArrayOESNotBound);
+ fn.glLineWidthFn =
+ reinterpret_cast<glLineWidthProc>(GetGLProcAddress("glLineWidth"));
+ fn.glLinkProgramFn =
+ reinterpret_cast<glLinkProgramProc>(GetGLProcAddress("glLinkProgram"));
+ fn.glMapBufferFn = reinterpret_cast<glMapBufferProc>(glMapBufferNotBound);
+ fn.glMapBufferRangeFn =
+ reinterpret_cast<glMapBufferRangeProc>(glMapBufferRangeNotBound);
+ fn.glMatrixLoadfEXTFn = reinterpret_cast<glMatrixLoadfEXTProc>(
+ GetGLProcAddress("glMatrixLoadfEXT"));
+ fn.glMatrixLoadIdentityEXTFn = reinterpret_cast<glMatrixLoadIdentityEXTProc>(
+ GetGLProcAddress("glMatrixLoadIdentityEXT"));
+ fn.glPauseTransformFeedbackFn =
+ reinterpret_cast<glPauseTransformFeedbackProc>(
+ GetGLProcAddress("glPauseTransformFeedback"));
+ fn.glPixelStoreiFn =
+ reinterpret_cast<glPixelStoreiProc>(GetGLProcAddress("glPixelStorei"));
+ fn.glPointParameteriFn = reinterpret_cast<glPointParameteriProc>(
+ GetGLProcAddress("glPointParameteri"));
+ fn.glPolygonOffsetFn = reinterpret_cast<glPolygonOffsetProc>(
+ GetGLProcAddress("glPolygonOffset"));
+ fn.glPopGroupMarkerEXTFn = reinterpret_cast<glPopGroupMarkerEXTProc>(
+ GetGLProcAddress("glPopGroupMarkerEXT"));
+ fn.glProgramBinaryFn =
+ reinterpret_cast<glProgramBinaryProc>(glProgramBinaryNotBound);
+ fn.glProgramParameteriFn = reinterpret_cast<glProgramParameteriProc>(
+ GetGLProcAddress("glProgramParameteri"));
+ fn.glPushGroupMarkerEXTFn = reinterpret_cast<glPushGroupMarkerEXTProc>(
+ GetGLProcAddress("glPushGroupMarkerEXT"));
+ fn.glQueryCounterFn =
+ reinterpret_cast<glQueryCounterProc>(glQueryCounterNotBound);
+ fn.glReadBufferFn =
+ reinterpret_cast<glReadBufferProc>(GetGLProcAddress("glReadBuffer"));
+ fn.glReadPixelsFn =
+ reinterpret_cast<glReadPixelsProc>(GetGLProcAddress("glReadPixels"));
+ fn.glReleaseShaderCompilerFn = reinterpret_cast<glReleaseShaderCompilerProc>(
+ GetGLProcAddress("glReleaseShaderCompiler"));
+ fn.glRenderbufferStorageEXTFn =
+ reinterpret_cast<glRenderbufferStorageEXTProc>(
+ glRenderbufferStorageEXTNotBound);
+ fn.glRenderbufferStorageMultisampleFn =
+ reinterpret_cast<glRenderbufferStorageMultisampleProc>(
+ GetGLProcAddress("glRenderbufferStorageMultisample"));
+ fn.glRenderbufferStorageMultisampleANGLEFn =
+ reinterpret_cast<glRenderbufferStorageMultisampleANGLEProc>(
+ glRenderbufferStorageMultisampleANGLENotBound);
+ fn.glRenderbufferStorageMultisampleEXTFn =
+ reinterpret_cast<glRenderbufferStorageMultisampleEXTProc>(
+ glRenderbufferStorageMultisampleEXTNotBound);
+ fn.glRenderbufferStorageMultisampleIMGFn =
+ reinterpret_cast<glRenderbufferStorageMultisampleIMGProc>(
+ GetGLProcAddress("glRenderbufferStorageMultisampleIMG"));
+ fn.glResumeTransformFeedbackFn =
+ reinterpret_cast<glResumeTransformFeedbackProc>(
+ GetGLProcAddress("glResumeTransformFeedback"));
+ fn.glSampleCoverageFn = reinterpret_cast<glSampleCoverageProc>(
+ GetGLProcAddress("glSampleCoverage"));
+ fn.glSamplerParameterfFn = reinterpret_cast<glSamplerParameterfProc>(
+ GetGLProcAddress("glSamplerParameterf"));
+ fn.glSamplerParameterfvFn = reinterpret_cast<glSamplerParameterfvProc>(
+ GetGLProcAddress("glSamplerParameterfv"));
+ fn.glSamplerParameteriFn = reinterpret_cast<glSamplerParameteriProc>(
+ GetGLProcAddress("glSamplerParameteri"));
+ fn.glSamplerParameterivFn = reinterpret_cast<glSamplerParameterivProc>(
+ GetGLProcAddress("glSamplerParameteriv"));
+ fn.glScissorFn =
+ reinterpret_cast<glScissorProc>(GetGLProcAddress("glScissor"));
+ fn.glSetFenceAPPLEFn = reinterpret_cast<glSetFenceAPPLEProc>(
+ GetGLProcAddress("glSetFenceAPPLE"));
+ fn.glSetFenceNVFn =
+ reinterpret_cast<glSetFenceNVProc>(GetGLProcAddress("glSetFenceNV"));
+ fn.glShaderBinaryFn =
+ reinterpret_cast<glShaderBinaryProc>(GetGLProcAddress("glShaderBinary"));
+ fn.glShaderSourceFn =
+ reinterpret_cast<glShaderSourceProc>(GetGLProcAddress("glShaderSource"));
+ fn.glStencilFuncFn =
+ reinterpret_cast<glStencilFuncProc>(GetGLProcAddress("glStencilFunc"));
+ fn.glStencilFuncSeparateFn = reinterpret_cast<glStencilFuncSeparateProc>(
+ GetGLProcAddress("glStencilFuncSeparate"));
+ fn.glStencilMaskFn =
+ reinterpret_cast<glStencilMaskProc>(GetGLProcAddress("glStencilMask"));
+ fn.glStencilMaskSeparateFn = reinterpret_cast<glStencilMaskSeparateProc>(
+ GetGLProcAddress("glStencilMaskSeparate"));
+ fn.glStencilOpFn =
+ reinterpret_cast<glStencilOpProc>(GetGLProcAddress("glStencilOp"));
+ fn.glStencilOpSeparateFn = reinterpret_cast<glStencilOpSeparateProc>(
+ GetGLProcAddress("glStencilOpSeparate"));
+ fn.glTestFenceAPPLEFn = reinterpret_cast<glTestFenceAPPLEProc>(
+ GetGLProcAddress("glTestFenceAPPLE"));
+ fn.glTestFenceNVFn =
+ reinterpret_cast<glTestFenceNVProc>(GetGLProcAddress("glTestFenceNV"));
+ fn.glTexImage2DFn =
+ reinterpret_cast<glTexImage2DProc>(GetGLProcAddress("glTexImage2D"));
+ fn.glTexImage3DFn =
+ reinterpret_cast<glTexImage3DProc>(GetGLProcAddress("glTexImage3D"));
+ fn.glTexParameterfFn = reinterpret_cast<glTexParameterfProc>(
+ GetGLProcAddress("glTexParameterf"));
+ fn.glTexParameterfvFn = reinterpret_cast<glTexParameterfvProc>(
+ GetGLProcAddress("glTexParameterfv"));
+ fn.glTexParameteriFn = reinterpret_cast<glTexParameteriProc>(
+ GetGLProcAddress("glTexParameteri"));
+ fn.glTexParameterivFn = reinterpret_cast<glTexParameterivProc>(
+ GetGLProcAddress("glTexParameteriv"));
+ fn.glTexStorage2DEXTFn =
+ reinterpret_cast<glTexStorage2DEXTProc>(glTexStorage2DEXTNotBound);
+ fn.glTexStorage3DFn =
+ reinterpret_cast<glTexStorage3DProc>(GetGLProcAddress("glTexStorage3D"));
+ fn.glTexSubImage2DFn = reinterpret_cast<glTexSubImage2DProc>(
+ GetGLProcAddress("glTexSubImage2D"));
+ fn.glTransformFeedbackVaryingsFn =
+ reinterpret_cast<glTransformFeedbackVaryingsProc>(
+ GetGLProcAddress("glTransformFeedbackVaryings"));
+ fn.glUniform1fFn =
+ reinterpret_cast<glUniform1fProc>(GetGLProcAddress("glUniform1f"));
+ fn.glUniform1fvFn =
+ reinterpret_cast<glUniform1fvProc>(GetGLProcAddress("glUniform1fv"));
+ fn.glUniform1iFn =
+ reinterpret_cast<glUniform1iProc>(GetGLProcAddress("glUniform1i"));
+ fn.glUniform1ivFn =
+ reinterpret_cast<glUniform1ivProc>(GetGLProcAddress("glUniform1iv"));
+ fn.glUniform1uiFn =
+ reinterpret_cast<glUniform1uiProc>(GetGLProcAddress("glUniform1ui"));
+ fn.glUniform1uivFn =
+ reinterpret_cast<glUniform1uivProc>(GetGLProcAddress("glUniform1uiv"));
+ fn.glUniform2fFn =
+ reinterpret_cast<glUniform2fProc>(GetGLProcAddress("glUniform2f"));
+ fn.glUniform2fvFn =
+ reinterpret_cast<glUniform2fvProc>(GetGLProcAddress("glUniform2fv"));
+ fn.glUniform2iFn =
+ reinterpret_cast<glUniform2iProc>(GetGLProcAddress("glUniform2i"));
+ fn.glUniform2ivFn =
+ reinterpret_cast<glUniform2ivProc>(GetGLProcAddress("glUniform2iv"));
+ fn.glUniform2uiFn =
+ reinterpret_cast<glUniform2uiProc>(GetGLProcAddress("glUniform2ui"));
+ fn.glUniform2uivFn =
+ reinterpret_cast<glUniform2uivProc>(GetGLProcAddress("glUniform2uiv"));
+ fn.glUniform3fFn =
+ reinterpret_cast<glUniform3fProc>(GetGLProcAddress("glUniform3f"));
+ fn.glUniform3fvFn =
+ reinterpret_cast<glUniform3fvProc>(GetGLProcAddress("glUniform3fv"));
+ fn.glUniform3iFn =
+ reinterpret_cast<glUniform3iProc>(GetGLProcAddress("glUniform3i"));
+ fn.glUniform3ivFn =
+ reinterpret_cast<glUniform3ivProc>(GetGLProcAddress("glUniform3iv"));
+ fn.glUniform3uiFn =
+ reinterpret_cast<glUniform3uiProc>(GetGLProcAddress("glUniform3ui"));
+ fn.glUniform3uivFn =
+ reinterpret_cast<glUniform3uivProc>(GetGLProcAddress("glUniform3uiv"));
+ fn.glUniform4fFn =
+ reinterpret_cast<glUniform4fProc>(GetGLProcAddress("glUniform4f"));
+ fn.glUniform4fvFn =
+ reinterpret_cast<glUniform4fvProc>(GetGLProcAddress("glUniform4fv"));
+ fn.glUniform4iFn =
+ reinterpret_cast<glUniform4iProc>(GetGLProcAddress("glUniform4i"));
+ fn.glUniform4ivFn =
+ reinterpret_cast<glUniform4ivProc>(GetGLProcAddress("glUniform4iv"));
+ fn.glUniform4uiFn =
+ reinterpret_cast<glUniform4uiProc>(GetGLProcAddress("glUniform4ui"));
+ fn.glUniform4uivFn =
+ reinterpret_cast<glUniform4uivProc>(GetGLProcAddress("glUniform4uiv"));
+ fn.glUniformBlockBindingFn = reinterpret_cast<glUniformBlockBindingProc>(
+ GetGLProcAddress("glUniformBlockBinding"));
+ fn.glUniformMatrix2fvFn = reinterpret_cast<glUniformMatrix2fvProc>(
+ GetGLProcAddress("glUniformMatrix2fv"));
+ fn.glUniformMatrix2x3fvFn = reinterpret_cast<glUniformMatrix2x3fvProc>(
+ GetGLProcAddress("glUniformMatrix2x3fv"));
+ fn.glUniformMatrix2x4fvFn = reinterpret_cast<glUniformMatrix2x4fvProc>(
+ GetGLProcAddress("glUniformMatrix2x4fv"));
+ fn.glUniformMatrix3fvFn = reinterpret_cast<glUniformMatrix3fvProc>(
+ GetGLProcAddress("glUniformMatrix3fv"));
+ fn.glUniformMatrix3x2fvFn = reinterpret_cast<glUniformMatrix3x2fvProc>(
+ GetGLProcAddress("glUniformMatrix3x2fv"));
+ fn.glUniformMatrix3x4fvFn = reinterpret_cast<glUniformMatrix3x4fvProc>(
+ GetGLProcAddress("glUniformMatrix3x4fv"));
+ fn.glUniformMatrix4fvFn = reinterpret_cast<glUniformMatrix4fvProc>(
+ GetGLProcAddress("glUniformMatrix4fv"));
+ fn.glUniformMatrix4x2fvFn = reinterpret_cast<glUniformMatrix4x2fvProc>(
+ GetGLProcAddress("glUniformMatrix4x2fv"));
+ fn.glUniformMatrix4x3fvFn = reinterpret_cast<glUniformMatrix4x3fvProc>(
+ GetGLProcAddress("glUniformMatrix4x3fv"));
+ fn.glUnmapBufferFn =
+ reinterpret_cast<glUnmapBufferProc>(glUnmapBufferNotBound);
+ fn.glUseProgramFn =
+ reinterpret_cast<glUseProgramProc>(GetGLProcAddress("glUseProgram"));
+ fn.glValidateProgramFn = reinterpret_cast<glValidateProgramProc>(
+ GetGLProcAddress("glValidateProgram"));
+ fn.glVertexAttrib1fFn = reinterpret_cast<glVertexAttrib1fProc>(
+ GetGLProcAddress("glVertexAttrib1f"));
+ fn.glVertexAttrib1fvFn = reinterpret_cast<glVertexAttrib1fvProc>(
+ GetGLProcAddress("glVertexAttrib1fv"));
+ fn.glVertexAttrib2fFn = reinterpret_cast<glVertexAttrib2fProc>(
+ GetGLProcAddress("glVertexAttrib2f"));
+ fn.glVertexAttrib2fvFn = reinterpret_cast<glVertexAttrib2fvProc>(
+ GetGLProcAddress("glVertexAttrib2fv"));
+ fn.glVertexAttrib3fFn = reinterpret_cast<glVertexAttrib3fProc>(
+ GetGLProcAddress("glVertexAttrib3f"));
+ fn.glVertexAttrib3fvFn = reinterpret_cast<glVertexAttrib3fvProc>(
+ GetGLProcAddress("glVertexAttrib3fv"));
+ fn.glVertexAttrib4fFn = reinterpret_cast<glVertexAttrib4fProc>(
+ GetGLProcAddress("glVertexAttrib4f"));
+ fn.glVertexAttrib4fvFn = reinterpret_cast<glVertexAttrib4fvProc>(
+ GetGLProcAddress("glVertexAttrib4fv"));
+ fn.glVertexAttribDivisorANGLEFn =
+ reinterpret_cast<glVertexAttribDivisorANGLEProc>(
+ glVertexAttribDivisorANGLENotBound);
+ fn.glVertexAttribI4iFn = reinterpret_cast<glVertexAttribI4iProc>(
+ GetGLProcAddress("glVertexAttribI4i"));
+ fn.glVertexAttribI4ivFn = reinterpret_cast<glVertexAttribI4ivProc>(
+ GetGLProcAddress("glVertexAttribI4iv"));
+ fn.glVertexAttribI4uiFn = reinterpret_cast<glVertexAttribI4uiProc>(
+ GetGLProcAddress("glVertexAttribI4ui"));
+ fn.glVertexAttribI4uivFn = reinterpret_cast<glVertexAttribI4uivProc>(
+ GetGLProcAddress("glVertexAttribI4uiv"));
+ fn.glVertexAttribIPointerFn = reinterpret_cast<glVertexAttribIPointerProc>(
+ GetGLProcAddress("glVertexAttribIPointer"));
+ fn.glVertexAttribPointerFn = reinterpret_cast<glVertexAttribPointerProc>(
+ GetGLProcAddress("glVertexAttribPointer"));
+ fn.glViewportFn =
+ reinterpret_cast<glViewportProc>(GetGLProcAddress("glViewport"));
+ fn.glWaitSyncFn =
+ reinterpret_cast<glWaitSyncProc>(GetGLProcAddress("glWaitSync"));
+}
+
+void DriverGL::InitializeDynamicBindings(GLContext* context) {
+ DCHECK(context && context->IsCurrent(NULL));
+ const GLVersionInfo* ver = context->GetVersionInfo();
+ ALLOW_UNUSED_LOCAL(ver);
+ std::string extensions = context->GetExtensions() + " ";
+ ALLOW_UNUSED_LOCAL(extensions);
+
+ ext.b_GL_ANGLE_framebuffer_blit =
+ extensions.find("GL_ANGLE_framebuffer_blit ") != std::string::npos;
+ ext.b_GL_ANGLE_framebuffer_multisample =
+ extensions.find("GL_ANGLE_framebuffer_multisample ") != std::string::npos;
+ ext.b_GL_ANGLE_instanced_arrays =
+ extensions.find("GL_ANGLE_instanced_arrays ") != std::string::npos;
+ ext.b_GL_ANGLE_translated_shader_source =
+ extensions.find("GL_ANGLE_translated_shader_source ") !=
+ std::string::npos;
+ ext.b_GL_APPLE_fence =
+ extensions.find("GL_APPLE_fence ") != std::string::npos;
+ ext.b_GL_APPLE_vertex_array_object =
+ extensions.find("GL_APPLE_vertex_array_object ") != std::string::npos;
+ ext.b_GL_ARB_ES2_compatibility =
+ extensions.find("GL_ARB_ES2_compatibility ") != std::string::npos;
+ ext.b_GL_ARB_blend_func_extended =
+ extensions.find("GL_ARB_blend_func_extended ") != std::string::npos;
+ ext.b_GL_ARB_copy_buffer =
+ extensions.find("GL_ARB_copy_buffer ") != std::string::npos;
+ ext.b_GL_ARB_draw_buffers =
+ extensions.find("GL_ARB_draw_buffers ") != std::string::npos;
+ ext.b_GL_ARB_draw_instanced =
+ extensions.find("GL_ARB_draw_instanced ") != std::string::npos;
+ ext.b_GL_ARB_framebuffer_object =
+ extensions.find("GL_ARB_framebuffer_object ") != std::string::npos;
+ ext.b_GL_ARB_get_program_binary =
+ extensions.find("GL_ARB_get_program_binary ") != std::string::npos;
+ ext.b_GL_ARB_instanced_arrays =
+ extensions.find("GL_ARB_instanced_arrays ") != std::string::npos;
+ ext.b_GL_ARB_internalformat_query =
+ extensions.find("GL_ARB_internalformat_query ") != std::string::npos;
+ ext.b_GL_ARB_invalidate_subdata =
+ extensions.find("GL_ARB_invalidate_subdata ") != std::string::npos;
+ ext.b_GL_ARB_map_buffer_range =
+ extensions.find("GL_ARB_map_buffer_range ") != std::string::npos;
+ ext.b_GL_ARB_occlusion_query =
+ extensions.find("GL_ARB_occlusion_query ") != std::string::npos;
+ ext.b_GL_ARB_robustness =
+ extensions.find("GL_ARB_robustness ") != std::string::npos;
+ ext.b_GL_ARB_sampler_objects =
+ extensions.find("GL_ARB_sampler_objects ") != std::string::npos;
+ ext.b_GL_ARB_sync = extensions.find("GL_ARB_sync ") != std::string::npos;
+ ext.b_GL_ARB_texture_storage =
+ extensions.find("GL_ARB_texture_storage ") != std::string::npos;
+ ext.b_GL_ARB_timer_query =
+ extensions.find("GL_ARB_timer_query ") != std::string::npos;
+ ext.b_GL_ARB_transform_feedback2 =
+ extensions.find("GL_ARB_transform_feedback2 ") != std::string::npos;
+ ext.b_GL_ARB_uniform_buffer_object =
+ extensions.find("GL_ARB_uniform_buffer_object ") != std::string::npos;
+ ext.b_GL_ARB_vertex_array_object =
+ extensions.find("GL_ARB_vertex_array_object ") != std::string::npos;
+ ext.b_GL_ARB_vertex_buffer_object =
+ extensions.find("GL_ARB_vertex_buffer_object ") != std::string::npos;
+ ext.b_GL_EXT_debug_marker =
+ extensions.find("GL_EXT_debug_marker ") != std::string::npos;
+ ext.b_GL_EXT_direct_state_access =
+ extensions.find("GL_EXT_direct_state_access ") != std::string::npos;
+ ext.b_GL_EXT_discard_framebuffer =
+ extensions.find("GL_EXT_discard_framebuffer ") != std::string::npos;
+ ext.b_GL_EXT_disjoint_timer_query =
+ extensions.find("GL_EXT_disjoint_timer_query ") != std::string::npos;
+ ext.b_GL_EXT_draw_buffers =
+ extensions.find("GL_EXT_draw_buffers ") != std::string::npos;
+ ext.b_GL_EXT_framebuffer_blit =
+ extensions.find("GL_EXT_framebuffer_blit ") != std::string::npos;
+ ext.b_GL_EXT_framebuffer_multisample =
+ extensions.find("GL_EXT_framebuffer_multisample ") != std::string::npos;
+ ext.b_GL_EXT_framebuffer_object =
+ extensions.find("GL_EXT_framebuffer_object ") != std::string::npos;
+ ext.b_GL_EXT_map_buffer_range =
+ extensions.find("GL_EXT_map_buffer_range ") != std::string::npos;
+ ext.b_GL_EXT_multisampled_render_to_texture =
+ extensions.find("GL_EXT_multisampled_render_to_texture ") !=
+ std::string::npos;
+ ext.b_GL_EXT_robustness =
+ extensions.find("GL_EXT_robustness ") != std::string::npos;
+ ext.b_GL_EXT_texture_storage =
+ extensions.find("GL_EXT_texture_storage ") != std::string::npos;
+ ext.b_GL_EXT_timer_query =
+ extensions.find("GL_EXT_timer_query ") != std::string::npos;
+ ext.b_GL_IMG_multisampled_render_to_texture =
+ extensions.find("GL_IMG_multisampled_render_to_texture ") !=
+ std::string::npos;
+ ext.b_GL_KHR_blend_equation_advanced =
+ extensions.find("GL_KHR_blend_equation_advanced ") != std::string::npos;
+ ext.b_GL_KHR_robustness =
+ extensions.find("GL_KHR_robustness ") != std::string::npos;
+ ext.b_GL_NV_blend_equation_advanced =
+ extensions.find("GL_NV_blend_equation_advanced ") != std::string::npos;
+ ext.b_GL_NV_fence = extensions.find("GL_NV_fence ") != std::string::npos;
+ ext.b_GL_NV_path_rendering =
+ extensions.find("GL_NV_path_rendering ") != std::string::npos;
+ ext.b_GL_OES_EGL_image =
+ extensions.find("GL_OES_EGL_image ") != std::string::npos;
+ ext.b_GL_OES_get_program_binary =
+ extensions.find("GL_OES_get_program_binary ") != std::string::npos;
+ ext.b_GL_OES_mapbuffer =
+ extensions.find("GL_OES_mapbuffer ") != std::string::npos;
+ ext.b_GL_OES_vertex_array_object =
+ extensions.find("GL_OES_vertex_array_object ") != std::string::npos;
+
+ fn.glBeginQueryARBFn = 0;
+ debug_fn.glBeginQueryARBFn = 0;
+ if (ext.b_GL_ARB_occlusion_query) {
+ fn.glBeginQueryARBFn = reinterpret_cast<glBeginQueryARBProc>(
+ GetGLProcAddress("glBeginQueryARB"));
+ }
+ if (!fn.glBeginQueryARBFn) {
+ fn.glBeginQueryARBFn = reinterpret_cast<glBeginQueryARBProc>(
+ GetGLProcAddress("glBeginQueryEXT"));
+ }
+
+ fn.glBindFramebufferEXTFn = 0;
+ debug_fn.glBindFramebufferEXTFn = 0;
+ if (ext.b_GL_EXT_framebuffer_object) {
+ fn.glBindFramebufferEXTFn = reinterpret_cast<glBindFramebufferEXTProc>(
+ GetGLProcAddress("glBindFramebufferEXT"));
+ }
+ if (!fn.glBindFramebufferEXTFn) {
+ fn.glBindFramebufferEXTFn = reinterpret_cast<glBindFramebufferEXTProc>(
+ GetGLProcAddress("glBindFramebuffer"));
+ }
+
+ fn.glBindRenderbufferEXTFn = 0;
+ debug_fn.glBindRenderbufferEXTFn = 0;
+ if (ext.b_GL_EXT_framebuffer_object) {
+ fn.glBindRenderbufferEXTFn = reinterpret_cast<glBindRenderbufferEXTProc>(
+ GetGLProcAddress("glBindRenderbufferEXT"));
+ }
+ if (!fn.glBindRenderbufferEXTFn) {
+ fn.glBindRenderbufferEXTFn = reinterpret_cast<glBindRenderbufferEXTProc>(
+ GetGLProcAddress("glBindRenderbuffer"));
+ }
+
+ fn.glBindVertexArrayOESFn = 0;
+ debug_fn.glBindVertexArrayOESFn = 0;
+ if ((ver->is_gl3 || ver->is_gl4 || ver->is_es3) ||
+ ext.b_GL_ARB_vertex_array_object) {
+ fn.glBindVertexArrayOESFn = reinterpret_cast<glBindVertexArrayOESProc>(
+ GetGLProcAddress("glBindVertexArray"));
+ }
+ if (!fn.glBindVertexArrayOESFn && (ext.b_GL_OES_vertex_array_object)) {
+ fn.glBindVertexArrayOESFn = reinterpret_cast<glBindVertexArrayOESProc>(
+ GetGLProcAddress("glBindVertexArrayOES"));
+ }
+ if (!fn.glBindVertexArrayOESFn) {
+ fn.glBindVertexArrayOESFn = reinterpret_cast<glBindVertexArrayOESProc>(
+ GetGLProcAddress("glBindVertexArrayAPPLE"));
+ }
+
+ fn.glBlendBarrierKHRFn = 0;
+ debug_fn.glBlendBarrierKHRFn = 0;
+ if (ext.b_GL_NV_blend_equation_advanced) {
+ fn.glBlendBarrierKHRFn = reinterpret_cast<glBlendBarrierKHRProc>(
+ GetGLProcAddress("glBlendBarrierNV"));
+ }
+ if (!fn.glBlendBarrierKHRFn) {
+ fn.glBlendBarrierKHRFn = reinterpret_cast<glBlendBarrierKHRProc>(
+ GetGLProcAddress("glBlendBarrierKHR"));
+ }
+
+ fn.glBlitFramebufferANGLEFn = 0;
+ debug_fn.glBlitFramebufferANGLEFn = 0;
+ if (ext.b_GL_ANGLE_framebuffer_blit) {
+ fn.glBlitFramebufferANGLEFn = reinterpret_cast<glBlitFramebufferANGLEProc>(
+ GetGLProcAddress("glBlitFramebufferANGLE"));
+ }
+ if (!fn.glBlitFramebufferANGLEFn) {
+ fn.glBlitFramebufferANGLEFn = reinterpret_cast<glBlitFramebufferANGLEProc>(
+ GetGLProcAddress("glBlitFramebuffer"));
+ }
+
+ fn.glBlitFramebufferEXTFn = 0;
+ debug_fn.glBlitFramebufferEXTFn = 0;
+ if (ext.b_GL_EXT_framebuffer_blit) {
+ fn.glBlitFramebufferEXTFn = reinterpret_cast<glBlitFramebufferEXTProc>(
+ GetGLProcAddress("glBlitFramebufferEXT"));
+ }
+ if (!fn.glBlitFramebufferEXTFn) {
+ fn.glBlitFramebufferEXTFn = reinterpret_cast<glBlitFramebufferEXTProc>(
+ GetGLProcAddress("glBlitFramebuffer"));
+ }
+
+ fn.glCheckFramebufferStatusEXTFn = 0;
+ debug_fn.glCheckFramebufferStatusEXTFn = 0;
+ if (ext.b_GL_EXT_framebuffer_object) {
+ fn.glCheckFramebufferStatusEXTFn =
+ reinterpret_cast<glCheckFramebufferStatusEXTProc>(
+ GetGLProcAddress("glCheckFramebufferStatusEXT"));
+ }
+ if (!fn.glCheckFramebufferStatusEXTFn) {
+ fn.glCheckFramebufferStatusEXTFn =
+ reinterpret_cast<glCheckFramebufferStatusEXTProc>(
+ GetGLProcAddress("glCheckFramebufferStatus"));
+ }
+
+ fn.glDeleteBuffersARBFn = 0;
+ debug_fn.glDeleteBuffersARBFn = 0;
+ if (ext.b_GL_ARB_vertex_buffer_object) {
+ fn.glDeleteBuffersARBFn = reinterpret_cast<glDeleteBuffersARBProc>(
+ GetGLProcAddress("glDeleteBuffersARB"));
+ }
+ if (!fn.glDeleteBuffersARBFn) {
+ fn.glDeleteBuffersARBFn = reinterpret_cast<glDeleteBuffersARBProc>(
+ GetGLProcAddress("glDeleteBuffers"));
+ }
+
+ fn.glDeleteFramebuffersEXTFn = 0;
+ debug_fn.glDeleteFramebuffersEXTFn = 0;
+ if (ext.b_GL_EXT_framebuffer_object) {
+ fn.glDeleteFramebuffersEXTFn =
+ reinterpret_cast<glDeleteFramebuffersEXTProc>(
+ GetGLProcAddress("glDeleteFramebuffersEXT"));
+ }
+ if (!fn.glDeleteFramebuffersEXTFn) {
+ fn.glDeleteFramebuffersEXTFn =
+ reinterpret_cast<glDeleteFramebuffersEXTProc>(
+ GetGLProcAddress("glDeleteFramebuffers"));
+ }
+
+ fn.glDeleteQueriesARBFn = 0;
+ debug_fn.glDeleteQueriesARBFn = 0;
+ if (ext.b_GL_ARB_occlusion_query) {
+ fn.glDeleteQueriesARBFn = reinterpret_cast<glDeleteQueriesARBProc>(
+ GetGLProcAddress("glDeleteQueriesARB"));
+ }
+ if (!fn.glDeleteQueriesARBFn) {
+ fn.glDeleteQueriesARBFn = reinterpret_cast<glDeleteQueriesARBProc>(
+ GetGLProcAddress("glDeleteQueriesEXT"));
+ }
+
+ fn.glDeleteRenderbuffersEXTFn = 0;
+ debug_fn.glDeleteRenderbuffersEXTFn = 0;
+ if (ext.b_GL_EXT_framebuffer_object) {
+ fn.glDeleteRenderbuffersEXTFn =
+ reinterpret_cast<glDeleteRenderbuffersEXTProc>(
+ GetGLProcAddress("glDeleteRenderbuffersEXT"));
+ }
+ if (!fn.glDeleteRenderbuffersEXTFn) {
+ fn.glDeleteRenderbuffersEXTFn =
+ reinterpret_cast<glDeleteRenderbuffersEXTProc>(
+ GetGLProcAddress("glDeleteRenderbuffers"));
+ }
+
+ fn.glDeleteVertexArraysOESFn = 0;
+ debug_fn.glDeleteVertexArraysOESFn = 0;
+ if ((ver->is_gl3 || ver->is_gl4 || ver->is_es3) ||
+ ext.b_GL_ARB_vertex_array_object) {
+ fn.glDeleteVertexArraysOESFn =
+ reinterpret_cast<glDeleteVertexArraysOESProc>(
+ GetGLProcAddress("glDeleteVertexArrays"));
+ }
+ if (!fn.glDeleteVertexArraysOESFn && (ext.b_GL_OES_vertex_array_object)) {
+ fn.glDeleteVertexArraysOESFn =
+ reinterpret_cast<glDeleteVertexArraysOESProc>(
+ GetGLProcAddress("glDeleteVertexArraysOES"));
+ }
+ if (!fn.glDeleteVertexArraysOESFn) {
+ fn.glDeleteVertexArraysOESFn =
+ reinterpret_cast<glDeleteVertexArraysOESProc>(
+ GetGLProcAddress("glDeleteVertexArraysAPPLE"));
+ }
+
+ fn.glDrawArraysInstancedANGLEFn = 0;
+ debug_fn.glDrawArraysInstancedANGLEFn = 0;
+ if (ext.b_GL_ARB_draw_instanced) {
+ fn.glDrawArraysInstancedANGLEFn =
+ reinterpret_cast<glDrawArraysInstancedANGLEProc>(
+ GetGLProcAddress("glDrawArraysInstancedARB"));
+ }
+ if (!fn.glDrawArraysInstancedANGLEFn && (ext.b_GL_ANGLE_instanced_arrays)) {
+ fn.glDrawArraysInstancedANGLEFn =
+ reinterpret_cast<glDrawArraysInstancedANGLEProc>(
+ GetGLProcAddress("glDrawArraysInstancedANGLE"));
+ }
+ if (!fn.glDrawArraysInstancedANGLEFn) {
+ fn.glDrawArraysInstancedANGLEFn =
+ reinterpret_cast<glDrawArraysInstancedANGLEProc>(
+ GetGLProcAddress("glDrawArraysInstanced"));
+ }
+
+ fn.glDrawBuffersARBFn = 0;
+ debug_fn.glDrawBuffersARBFn = 0;
+ if (ext.b_GL_ARB_draw_buffers) {
+ fn.glDrawBuffersARBFn = reinterpret_cast<glDrawBuffersARBProc>(
+ GetGLProcAddress("glDrawBuffersARB"));
+ }
+ if (!fn.glDrawBuffersARBFn && (ext.b_GL_EXT_draw_buffers)) {
+ fn.glDrawBuffersARBFn = reinterpret_cast<glDrawBuffersARBProc>(
+ GetGLProcAddress("glDrawBuffersEXT"));
+ }
+ if (!fn.glDrawBuffersARBFn) {
+ fn.glDrawBuffersARBFn = reinterpret_cast<glDrawBuffersARBProc>(
+ GetGLProcAddress("glDrawBuffers"));
+ }
+
+ fn.glDrawElementsInstancedANGLEFn = 0;
+ debug_fn.glDrawElementsInstancedANGLEFn = 0;
+ if (ext.b_GL_ARB_draw_instanced) {
+ fn.glDrawElementsInstancedANGLEFn =
+ reinterpret_cast<glDrawElementsInstancedANGLEProc>(
+ GetGLProcAddress("glDrawElementsInstancedARB"));
+ }
+ if (!fn.glDrawElementsInstancedANGLEFn && (ext.b_GL_ANGLE_instanced_arrays)) {
+ fn.glDrawElementsInstancedANGLEFn =
+ reinterpret_cast<glDrawElementsInstancedANGLEProc>(
+ GetGLProcAddress("glDrawElementsInstancedANGLE"));
+ }
+ if (!fn.glDrawElementsInstancedANGLEFn) {
+ fn.glDrawElementsInstancedANGLEFn =
+ reinterpret_cast<glDrawElementsInstancedANGLEProc>(
+ GetGLProcAddress("glDrawElementsInstanced"));
+ }
+
+ fn.glEndQueryARBFn = 0;
+ debug_fn.glEndQueryARBFn = 0;
+ if (ext.b_GL_ARB_occlusion_query) {
+ fn.glEndQueryARBFn =
+ reinterpret_cast<glEndQueryARBProc>(GetGLProcAddress("glEndQueryARB"));
+ }
+ if (!fn.glEndQueryARBFn) {
+ fn.glEndQueryARBFn =
+ reinterpret_cast<glEndQueryARBProc>(GetGLProcAddress("glEndQueryEXT"));
+ }
+
+ fn.glFramebufferRenderbufferEXTFn = 0;
+ debug_fn.glFramebufferRenderbufferEXTFn = 0;
+ if (ext.b_GL_EXT_framebuffer_object) {
+ fn.glFramebufferRenderbufferEXTFn =
+ reinterpret_cast<glFramebufferRenderbufferEXTProc>(
+ GetGLProcAddress("glFramebufferRenderbufferEXT"));
+ }
+ if (!fn.glFramebufferRenderbufferEXTFn) {
+ fn.glFramebufferRenderbufferEXTFn =
+ reinterpret_cast<glFramebufferRenderbufferEXTProc>(
+ GetGLProcAddress("glFramebufferRenderbuffer"));
+ }
+
+ fn.glFramebufferTexture2DEXTFn = 0;
+ debug_fn.glFramebufferTexture2DEXTFn = 0;
+ if (ext.b_GL_EXT_framebuffer_object) {
+ fn.glFramebufferTexture2DEXTFn =
+ reinterpret_cast<glFramebufferTexture2DEXTProc>(
+ GetGLProcAddress("glFramebufferTexture2DEXT"));
+ }
+ if (!fn.glFramebufferTexture2DEXTFn) {
+ fn.glFramebufferTexture2DEXTFn =
+ reinterpret_cast<glFramebufferTexture2DEXTProc>(
+ GetGLProcAddress("glFramebufferTexture2D"));
+ }
+
+ fn.glGenBuffersARBFn = 0;
+ debug_fn.glGenBuffersARBFn = 0;
+ if (ext.b_GL_ARB_vertex_buffer_object) {
+ fn.glGenBuffersARBFn = reinterpret_cast<glGenBuffersARBProc>(
+ GetGLProcAddress("glGenBuffersARB"));
+ }
+ if (!fn.glGenBuffersARBFn) {
+ fn.glGenBuffersARBFn =
+ reinterpret_cast<glGenBuffersARBProc>(GetGLProcAddress("glGenBuffers"));
+ }
+
+ fn.glGenerateMipmapEXTFn = 0;
+ debug_fn.glGenerateMipmapEXTFn = 0;
+ if (ext.b_GL_EXT_framebuffer_object) {
+ fn.glGenerateMipmapEXTFn = reinterpret_cast<glGenerateMipmapEXTProc>(
+ GetGLProcAddress("glGenerateMipmapEXT"));
+ }
+ if (!fn.glGenerateMipmapEXTFn) {
+ fn.glGenerateMipmapEXTFn = reinterpret_cast<glGenerateMipmapEXTProc>(
+ GetGLProcAddress("glGenerateMipmap"));
+ }
+
+ fn.glGenFramebuffersEXTFn = 0;
+ debug_fn.glGenFramebuffersEXTFn = 0;
+ if (ext.b_GL_EXT_framebuffer_object) {
+ fn.glGenFramebuffersEXTFn = reinterpret_cast<glGenFramebuffersEXTProc>(
+ GetGLProcAddress("glGenFramebuffersEXT"));
+ }
+ if (!fn.glGenFramebuffersEXTFn) {
+ fn.glGenFramebuffersEXTFn = reinterpret_cast<glGenFramebuffersEXTProc>(
+ GetGLProcAddress("glGenFramebuffers"));
+ }
+
+ fn.glGenQueriesARBFn = 0;
+ debug_fn.glGenQueriesARBFn = 0;
+ if (ext.b_GL_ARB_occlusion_query) {
+ fn.glGenQueriesARBFn = reinterpret_cast<glGenQueriesARBProc>(
+ GetGLProcAddress("glGenQueriesARB"));
+ }
+ if (!fn.glGenQueriesARBFn) {
+ fn.glGenQueriesARBFn = reinterpret_cast<glGenQueriesARBProc>(
+ GetGLProcAddress("glGenQueriesEXT"));
+ }
+
+ fn.glGenRenderbuffersEXTFn = 0;
+ debug_fn.glGenRenderbuffersEXTFn = 0;
+ if (ext.b_GL_EXT_framebuffer_object) {
+ fn.glGenRenderbuffersEXTFn = reinterpret_cast<glGenRenderbuffersEXTProc>(
+ GetGLProcAddress("glGenRenderbuffersEXT"));
+ }
+ if (!fn.glGenRenderbuffersEXTFn) {
+ fn.glGenRenderbuffersEXTFn = reinterpret_cast<glGenRenderbuffersEXTProc>(
+ GetGLProcAddress("glGenRenderbuffers"));
+ }
+
+ fn.glGenVertexArraysOESFn = 0;
+ debug_fn.glGenVertexArraysOESFn = 0;
+ if ((ver->is_gl3 || ver->is_gl4 || ver->is_es3) ||
+ ext.b_GL_ARB_vertex_array_object) {
+ fn.glGenVertexArraysOESFn = reinterpret_cast<glGenVertexArraysOESProc>(
+ GetGLProcAddress("glGenVertexArrays"));
+ }
+ if (!fn.glGenVertexArraysOESFn && (ext.b_GL_OES_vertex_array_object)) {
+ fn.glGenVertexArraysOESFn = reinterpret_cast<glGenVertexArraysOESProc>(
+ GetGLProcAddress("glGenVertexArraysOES"));
+ }
+ if (!fn.glGenVertexArraysOESFn) {
+ fn.glGenVertexArraysOESFn = reinterpret_cast<glGenVertexArraysOESProc>(
+ GetGLProcAddress("glGenVertexArraysAPPLE"));
+ }
+
+ fn.glGetFramebufferAttachmentParameterivEXTFn = 0;
+ debug_fn.glGetFramebufferAttachmentParameterivEXTFn = 0;
+ if (ext.b_GL_EXT_framebuffer_object) {
+ fn.glGetFramebufferAttachmentParameterivEXTFn =
+ reinterpret_cast<glGetFramebufferAttachmentParameterivEXTProc>(
+ GetGLProcAddress("glGetFramebufferAttachmentParameterivEXT"));
+ }
+ if (!fn.glGetFramebufferAttachmentParameterivEXTFn) {
+ fn.glGetFramebufferAttachmentParameterivEXTFn =
+ reinterpret_cast<glGetFramebufferAttachmentParameterivEXTProc>(
+ GetGLProcAddress("glGetFramebufferAttachmentParameteriv"));
+ }
+
+ fn.glGetGraphicsResetStatusARBFn = 0;
+ debug_fn.glGetGraphicsResetStatusARBFn = 0;
+ if (ext.b_GL_ARB_robustness) {
+ fn.glGetGraphicsResetStatusARBFn =
+ reinterpret_cast<glGetGraphicsResetStatusARBProc>(
+ GetGLProcAddress("glGetGraphicsResetStatusARB"));
+ }
+ if (!fn.glGetGraphicsResetStatusARBFn && (ext.b_GL_KHR_robustness)) {
+ fn.glGetGraphicsResetStatusARBFn =
+ reinterpret_cast<glGetGraphicsResetStatusARBProc>(
+ GetGLProcAddress("glGetGraphicsResetStatusKHR"));
+ }
+ if (!fn.glGetGraphicsResetStatusARBFn && (ext.b_GL_EXT_robustness)) {
+ fn.glGetGraphicsResetStatusARBFn =
+ reinterpret_cast<glGetGraphicsResetStatusARBProc>(
+ GetGLProcAddress("glGetGraphicsResetStatusEXT"));
+ }
+ if (!fn.glGetGraphicsResetStatusARBFn) {
+ fn.glGetGraphicsResetStatusARBFn =
+ reinterpret_cast<glGetGraphicsResetStatusARBProc>(
+ GetGLProcAddress("glGetGraphicsResetStatus"));
+ }
+
+ fn.glGetProgramBinaryFn = 0;
+ debug_fn.glGetProgramBinaryFn = 0;
+ if (ext.b_GL_OES_get_program_binary) {
+ fn.glGetProgramBinaryFn = reinterpret_cast<glGetProgramBinaryProc>(
+ GetGLProcAddress("glGetProgramBinaryOES"));
+ }
+ if (!fn.glGetProgramBinaryFn) {
+ fn.glGetProgramBinaryFn = reinterpret_cast<glGetProgramBinaryProc>(
+ GetGLProcAddress("glGetProgramBinary"));
+ }
+
+ fn.glGetQueryivARBFn = 0;
+ debug_fn.glGetQueryivARBFn = 0;
+ if (ext.b_GL_ARB_occlusion_query) {
+ fn.glGetQueryivARBFn = reinterpret_cast<glGetQueryivARBProc>(
+ GetGLProcAddress("glGetQueryivARB"));
+ }
+ if (!fn.glGetQueryivARBFn) {
+ fn.glGetQueryivARBFn = reinterpret_cast<glGetQueryivARBProc>(
+ GetGLProcAddress("glGetQueryivEXT"));
+ }
+
+ fn.glGetQueryObjectivARBFn = 0;
+ debug_fn.glGetQueryObjectivARBFn = 0;
+ if (ext.b_GL_ARB_occlusion_query) {
+ fn.glGetQueryObjectivARBFn = reinterpret_cast<glGetQueryObjectivARBProc>(
+ GetGLProcAddress("glGetQueryObjectivARB"));
+ }
+ if (!fn.glGetQueryObjectivARBFn) {
+ fn.glGetQueryObjectivARBFn = reinterpret_cast<glGetQueryObjectivARBProc>(
+ GetGLProcAddress("glGetQueryObjectivEXT"));
+ }
+
+ fn.glGetQueryObjectui64vFn = 0;
+ debug_fn.glGetQueryObjectui64vFn = 0;
+ if (ext.b_GL_ARB_timer_query) {
+ fn.glGetQueryObjectui64vFn = reinterpret_cast<glGetQueryObjectui64vProc>(
+ GetGLProcAddress("glGetQueryObjectui64v"));
+ }
+ if (!fn.glGetQueryObjectui64vFn) {
+ fn.glGetQueryObjectui64vFn = reinterpret_cast<glGetQueryObjectui64vProc>(
+ GetGLProcAddress("glGetQueryObjectui64vEXT"));
+ }
+
+ fn.glGetQueryObjectuivARBFn = 0;
+ debug_fn.glGetQueryObjectuivARBFn = 0;
+ if (ext.b_GL_ARB_occlusion_query) {
+ fn.glGetQueryObjectuivARBFn = reinterpret_cast<glGetQueryObjectuivARBProc>(
+ GetGLProcAddress("glGetQueryObjectuivARB"));
+ }
+ if (!fn.glGetQueryObjectuivARBFn) {
+ fn.glGetQueryObjectuivARBFn = reinterpret_cast<glGetQueryObjectuivARBProc>(
+ GetGLProcAddress("glGetQueryObjectuivEXT"));
+ }
+
+ fn.glGetRenderbufferParameterivEXTFn = 0;
+ debug_fn.glGetRenderbufferParameterivEXTFn = 0;
+ if (ext.b_GL_EXT_framebuffer_object) {
+ fn.glGetRenderbufferParameterivEXTFn =
+ reinterpret_cast<glGetRenderbufferParameterivEXTProc>(
+ GetGLProcAddress("glGetRenderbufferParameterivEXT"));
+ }
+ if (!fn.glGetRenderbufferParameterivEXTFn) {
+ fn.glGetRenderbufferParameterivEXTFn =
+ reinterpret_cast<glGetRenderbufferParameterivEXTProc>(
+ GetGLProcAddress("glGetRenderbufferParameteriv"));
+ }
+
+ fn.glIsFramebufferEXTFn = 0;
+ debug_fn.glIsFramebufferEXTFn = 0;
+ if (ext.b_GL_EXT_framebuffer_object) {
+ fn.glIsFramebufferEXTFn = reinterpret_cast<glIsFramebufferEXTProc>(
+ GetGLProcAddress("glIsFramebufferEXT"));
+ }
+ if (!fn.glIsFramebufferEXTFn) {
+ fn.glIsFramebufferEXTFn = reinterpret_cast<glIsFramebufferEXTProc>(
+ GetGLProcAddress("glIsFramebuffer"));
+ }
+
+ fn.glIsQueryARBFn = 0;
+ debug_fn.glIsQueryARBFn = 0;
+ if (ext.b_GL_ARB_occlusion_query) {
+ fn.glIsQueryARBFn =
+ reinterpret_cast<glIsQueryARBProc>(GetGLProcAddress("glIsQueryARB"));
+ }
+ if (!fn.glIsQueryARBFn) {
+ fn.glIsQueryARBFn =
+ reinterpret_cast<glIsQueryARBProc>(GetGLProcAddress("glIsQueryEXT"));
+ }
+
+ fn.glIsRenderbufferEXTFn = 0;
+ debug_fn.glIsRenderbufferEXTFn = 0;
+ if (ext.b_GL_EXT_framebuffer_object) {
+ fn.glIsRenderbufferEXTFn = reinterpret_cast<glIsRenderbufferEXTProc>(
+ GetGLProcAddress("glIsRenderbufferEXT"));
+ }
+ if (!fn.glIsRenderbufferEXTFn) {
+ fn.glIsRenderbufferEXTFn = reinterpret_cast<glIsRenderbufferEXTProc>(
+ GetGLProcAddress("glIsRenderbuffer"));
+ }
+
+ fn.glIsVertexArrayOESFn = 0;
+ debug_fn.glIsVertexArrayOESFn = 0;
+ if ((ver->is_gl3 || ver->is_gl4 || ver->is_es3) ||
+ ext.b_GL_ARB_vertex_array_object) {
+ fn.glIsVertexArrayOESFn = reinterpret_cast<glIsVertexArrayOESProc>(
+ GetGLProcAddress("glIsVertexArray"));
+ }
+ if (!fn.glIsVertexArrayOESFn && (ext.b_GL_OES_vertex_array_object)) {
+ fn.glIsVertexArrayOESFn = reinterpret_cast<glIsVertexArrayOESProc>(
+ GetGLProcAddress("glIsVertexArrayOES"));
+ }
+ if (!fn.glIsVertexArrayOESFn) {
+ fn.glIsVertexArrayOESFn = reinterpret_cast<glIsVertexArrayOESProc>(
+ GetGLProcAddress("glIsVertexArrayAPPLE"));
+ }
+
+ fn.glMapBufferFn = 0;
+ debug_fn.glMapBufferFn = 0;
+ if (ext.b_GL_OES_mapbuffer) {
+ fn.glMapBufferFn =
+ reinterpret_cast<glMapBufferProc>(GetGLProcAddress("glMapBufferOES"));
+ }
+ if (!fn.glMapBufferFn) {
+ fn.glMapBufferFn =
+ reinterpret_cast<glMapBufferProc>(GetGLProcAddress("glMapBuffer"));
+ }
+
+ fn.glMapBufferRangeFn = 0;
+ debug_fn.glMapBufferRangeFn = 0;
+ if ((ver->is_gl3 || ver->is_gl4 || ver->is_es3) ||
+ ext.b_GL_ARB_map_buffer_range) {
+ fn.glMapBufferRangeFn = reinterpret_cast<glMapBufferRangeProc>(
+ GetGLProcAddress("glMapBufferRange"));
+ }
+ if (!fn.glMapBufferRangeFn) {
+ fn.glMapBufferRangeFn = reinterpret_cast<glMapBufferRangeProc>(
+ GetGLProcAddress("glMapBufferRangeEXT"));
+ }
+
+ fn.glProgramBinaryFn = 0;
+ debug_fn.glProgramBinaryFn = 0;
+ if (ext.b_GL_OES_get_program_binary) {
+ fn.glProgramBinaryFn = reinterpret_cast<glProgramBinaryProc>(
+ GetGLProcAddress("glProgramBinaryOES"));
+ }
+ if (!fn.glProgramBinaryFn) {
+ fn.glProgramBinaryFn = reinterpret_cast<glProgramBinaryProc>(
+ GetGLProcAddress("glProgramBinary"));
+ }
+
+ fn.glQueryCounterFn = 0;
+ debug_fn.glQueryCounterFn = 0;
+ if (ext.b_GL_ARB_timer_query) {
+ fn.glQueryCounterFn = reinterpret_cast<glQueryCounterProc>(
+ GetGLProcAddress("glQueryCounter"));
+ }
+ if (!fn.glQueryCounterFn) {
+ fn.glQueryCounterFn = reinterpret_cast<glQueryCounterProc>(
+ GetGLProcAddress("glQueryCounterEXT"));
+ }
+
+ fn.glRenderbufferStorageEXTFn = 0;
+ debug_fn.glRenderbufferStorageEXTFn = 0;
+ if (ext.b_GL_EXT_framebuffer_object) {
+ fn.glRenderbufferStorageEXTFn =
+ reinterpret_cast<glRenderbufferStorageEXTProc>(
+ GetGLProcAddress("glRenderbufferStorageEXT"));
+ }
+ if (!fn.glRenderbufferStorageEXTFn) {
+ fn.glRenderbufferStorageEXTFn =
+ reinterpret_cast<glRenderbufferStorageEXTProc>(
+ GetGLProcAddress("glRenderbufferStorage"));
+ }
+
+ fn.glRenderbufferStorageMultisampleANGLEFn = 0;
+ debug_fn.glRenderbufferStorageMultisampleANGLEFn = 0;
+ if (ext.b_GL_ANGLE_framebuffer_multisample) {
+ fn.glRenderbufferStorageMultisampleANGLEFn =
+ reinterpret_cast<glRenderbufferStorageMultisampleANGLEProc>(
+ GetGLProcAddress("glRenderbufferStorageMultisampleANGLE"));
+ }
+ if (!fn.glRenderbufferStorageMultisampleANGLEFn) {
+ fn.glRenderbufferStorageMultisampleANGLEFn =
+ reinterpret_cast<glRenderbufferStorageMultisampleANGLEProc>(
+ GetGLProcAddress("glRenderbufferStorageMultisample"));
+ }
+
+ fn.glRenderbufferStorageMultisampleEXTFn = 0;
+ debug_fn.glRenderbufferStorageMultisampleEXTFn = 0;
+ if ((ext.b_GL_EXT_framebuffer_multisample ||
+ ext.b_GL_EXT_multisampled_render_to_texture)) {
+ fn.glRenderbufferStorageMultisampleEXTFn =
+ reinterpret_cast<glRenderbufferStorageMultisampleEXTProc>(
+ GetGLProcAddress("glRenderbufferStorageMultisampleEXT"));
+ }
+ if (!fn.glRenderbufferStorageMultisampleEXTFn) {
+ fn.glRenderbufferStorageMultisampleEXTFn =
+ reinterpret_cast<glRenderbufferStorageMultisampleEXTProc>(
+ GetGLProcAddress("glRenderbufferStorageMultisample"));
+ }
+
+ fn.glTexStorage2DEXTFn = 0;
+ debug_fn.glTexStorage2DEXTFn = 0;
+ if (ver->is_es3 || ext.b_GL_ARB_texture_storage) {
+ fn.glTexStorage2DEXTFn = reinterpret_cast<glTexStorage2DEXTProc>(
+ GetGLProcAddress("glTexStorage2D"));
+ }
+ if (!fn.glTexStorage2DEXTFn) {
+ fn.glTexStorage2DEXTFn = reinterpret_cast<glTexStorage2DEXTProc>(
+ GetGLProcAddress("glTexStorage2DEXT"));
+ }
+
+ fn.glUnmapBufferFn = 0;
+ debug_fn.glUnmapBufferFn = 0;
+ if (ext.b_GL_OES_mapbuffer) {
+ fn.glUnmapBufferFn = reinterpret_cast<glUnmapBufferProc>(
+ GetGLProcAddress("glUnmapBufferOES"));
+ }
+ if (!fn.glUnmapBufferFn) {
+ fn.glUnmapBufferFn =
+ reinterpret_cast<glUnmapBufferProc>(GetGLProcAddress("glUnmapBuffer"));
+ }
+
+ fn.glVertexAttribDivisorANGLEFn = 0;
+ debug_fn.glVertexAttribDivisorANGLEFn = 0;
+ if (ext.b_GL_ARB_instanced_arrays) {
+ fn.glVertexAttribDivisorANGLEFn =
+ reinterpret_cast<glVertexAttribDivisorANGLEProc>(
+ GetGLProcAddress("glVertexAttribDivisorARB"));
+ }
+ if (!fn.glVertexAttribDivisorANGLEFn && (ext.b_GL_ANGLE_instanced_arrays)) {
+ fn.glVertexAttribDivisorANGLEFn =
+ reinterpret_cast<glVertexAttribDivisorANGLEProc>(
+ GetGLProcAddress("glVertexAttribDivisorANGLE"));
+ }
+ if (!fn.glVertexAttribDivisorANGLEFn) {
+ fn.glVertexAttribDivisorANGLEFn =
+ reinterpret_cast<glVertexAttribDivisorANGLEProc>(
+ GetGLProcAddress("glVertexAttribDivisor"));
+ }
+
+ if (g_debugBindingsInitialized)
+ InitializeDebugBindings();
+}
+
+extern "C" {
+
+static void GL_BINDING_CALL Debug_glActiveTexture(GLenum texture) {
+ GL_SERVICE_LOG("glActiveTexture"
+ << "(" << GLEnums::GetStringEnum(texture) << ")");
+ g_driver_gl.debug_fn.glActiveTextureFn(texture);
+}
+
+static void GL_BINDING_CALL
+Debug_glAttachShader(GLuint program, GLuint shader) {
+ GL_SERVICE_LOG("glAttachShader"
+ << "(" << program << ", " << shader << ")");
+ g_driver_gl.debug_fn.glAttachShaderFn(program, shader);
+}
+
+static void GL_BINDING_CALL Debug_glBeginQuery(GLenum target, GLuint id) {
+ GL_SERVICE_LOG("glBeginQuery"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << id << ")");
+ 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"
+ << "(" << GLEnums::GetStringEnum(primitiveMode) << ")");
+ g_driver_gl.debug_fn.glBeginTransformFeedbackFn(primitiveMode);
+}
+
+static void GL_BINDING_CALL
+Debug_glBindAttribLocation(GLuint program, GLuint index, const char* name) {
+ GL_SERVICE_LOG("glBindAttribLocation"
+ << "(" << program << ", " << index << ", " << name << ")");
+ g_driver_gl.debug_fn.glBindAttribLocationFn(program, index, name);
+}
+
+static void GL_BINDING_CALL Debug_glBindBuffer(GLenum target, GLuint buffer) {
+ GL_SERVICE_LOG("glBindBuffer"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << buffer
+ << ")");
+ g_driver_gl.debug_fn.glBindBufferFn(target, buffer);
+}
+
+static void GL_BINDING_CALL
+Debug_glBindBufferBase(GLenum target, GLuint index, GLuint buffer) {
+ GL_SERVICE_LOG("glBindBufferBase"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << index
+ << ", " << buffer << ")");
+ g_driver_gl.debug_fn.glBindBufferBaseFn(target, index, buffer);
+}
+
+static void GL_BINDING_CALL Debug_glBindBufferRange(GLenum target,
+ GLuint index,
+ GLuint buffer,
+ GLintptr offset,
+ GLsizeiptr size) {
+ GL_SERVICE_LOG("glBindBufferRange"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << index
+ << ", " << buffer << ", " << offset << ", " << size << ")");
+ g_driver_gl.debug_fn.glBindBufferRangeFn(target, index, buffer, offset, size);
+}
+
+static void GL_BINDING_CALL Debug_glBindFragDataLocation(GLuint program,
+ GLuint colorNumber,
+ const char* name) {
+ GL_SERVICE_LOG("glBindFragDataLocation"
+ << "(" << program << ", " << colorNumber << ", " << name
+ << ")");
+ g_driver_gl.debug_fn.glBindFragDataLocationFn(program, colorNumber, name);
+}
+
+static void GL_BINDING_CALL
+Debug_glBindFragDataLocationIndexed(GLuint program,
+ GLuint colorNumber,
+ GLuint index,
+ const char* name) {
+ GL_SERVICE_LOG("glBindFragDataLocationIndexed"
+ << "(" << program << ", " << colorNumber << ", " << index
+ << ", " << name << ")");
+ g_driver_gl.debug_fn.glBindFragDataLocationIndexedFn(program, colorNumber,
+ index, name);
+}
+
+static void GL_BINDING_CALL
+Debug_glBindFramebufferEXT(GLenum target, GLuint framebuffer) {
+ GL_SERVICE_LOG("glBindFramebufferEXT"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << framebuffer
+ << ")");
+ g_driver_gl.debug_fn.glBindFramebufferEXTFn(target, framebuffer);
+}
+
+static void GL_BINDING_CALL
+Debug_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer) {
+ GL_SERVICE_LOG("glBindRenderbufferEXT"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << renderbuffer << ")");
+ g_driver_gl.debug_fn.glBindRenderbufferEXTFn(target, renderbuffer);
+}
+
+static void GL_BINDING_CALL Debug_glBindSampler(GLuint unit, GLuint sampler) {
+ GL_SERVICE_LOG("glBindSampler"
+ << "(" << unit << ", " << sampler << ")");
+ g_driver_gl.debug_fn.glBindSamplerFn(unit, sampler);
+}
+
+static void GL_BINDING_CALL Debug_glBindTexture(GLenum target, GLuint texture) {
+ GL_SERVICE_LOG("glBindTexture"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << texture
+ << ")");
+ g_driver_gl.debug_fn.glBindTextureFn(target, texture);
+}
+
+static void GL_BINDING_CALL
+Debug_glBindTransformFeedback(GLenum target, GLuint id) {
+ GL_SERVICE_LOG("glBindTransformFeedback"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << id << ")");
+ g_driver_gl.debug_fn.glBindTransformFeedbackFn(target, id);
+}
+
+static void GL_BINDING_CALL Debug_glBindVertexArrayOES(GLuint array) {
+ GL_SERVICE_LOG("glBindVertexArrayOES"
+ << "(" << array << ")");
+ g_driver_gl.debug_fn.glBindVertexArrayOESFn(array);
+}
+
+static void GL_BINDING_CALL Debug_glBlendBarrierKHR(void) {
+ GL_SERVICE_LOG("glBlendBarrierKHR"
+ << "("
+ << ")");
+ g_driver_gl.debug_fn.glBlendBarrierKHRFn();
+}
+
+static void GL_BINDING_CALL Debug_glBlendColor(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) {
+ GL_SERVICE_LOG("glBlendColor"
+ << "(" << red << ", " << green << ", " << blue << ", " << alpha
+ << ")");
+ g_driver_gl.debug_fn.glBlendColorFn(red, green, blue, alpha);
+}
+
+static void GL_BINDING_CALL Debug_glBlendEquation(GLenum mode) {
+ GL_SERVICE_LOG("glBlendEquation"
+ << "(" << GLEnums::GetStringEnum(mode) << ")");
+ g_driver_gl.debug_fn.glBlendEquationFn(mode);
+}
+
+static void GL_BINDING_CALL
+Debug_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) {
+ GL_SERVICE_LOG("glBlendEquationSeparate"
+ << "(" << GLEnums::GetStringEnum(modeRGB) << ", "
+ << GLEnums::GetStringEnum(modeAlpha) << ")");
+ g_driver_gl.debug_fn.glBlendEquationSeparateFn(modeRGB, modeAlpha);
+}
+
+static void GL_BINDING_CALL Debug_glBlendFunc(GLenum sfactor, GLenum dfactor) {
+ GL_SERVICE_LOG("glBlendFunc"
+ << "(" << GLEnums::GetStringEnum(sfactor) << ", "
+ << GLEnums::GetStringEnum(dfactor) << ")");
+ g_driver_gl.debug_fn.glBlendFuncFn(sfactor, dfactor);
+}
+
+static void GL_BINDING_CALL Debug_glBlendFuncSeparate(GLenum srcRGB,
+ GLenum dstRGB,
+ GLenum srcAlpha,
+ GLenum dstAlpha) {
+ GL_SERVICE_LOG("glBlendFuncSeparate"
+ << "(" << GLEnums::GetStringEnum(srcRGB) << ", "
+ << GLEnums::GetStringEnum(dstRGB) << ", "
+ << GLEnums::GetStringEnum(srcAlpha) << ", "
+ << GLEnums::GetStringEnum(dstAlpha) << ")");
+ g_driver_gl.debug_fn.glBlendFuncSeparateFn(srcRGB, dstRGB, srcAlpha,
+ dstAlpha);
+}
+
+static void GL_BINDING_CALL Debug_glBlitFramebuffer(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ GL_SERVICE_LOG("glBlitFramebuffer"
+ << "(" << srcX0 << ", " << srcY0 << ", " << srcX1 << ", "
+ << srcY1 << ", " << dstX0 << ", " << dstY0 << ", " << dstX1
+ << ", " << dstY1 << ", " << mask << ", "
+ << GLEnums::GetStringEnum(filter) << ")");
+ g_driver_gl.debug_fn.glBlitFramebufferFn(srcX0, srcY0, srcX1, srcY1, dstX0,
+ dstY0, dstX1, dstY1, mask, filter);
+}
+
+static void GL_BINDING_CALL Debug_glBlitFramebufferANGLE(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ GL_SERVICE_LOG("glBlitFramebufferANGLE"
+ << "(" << srcX0 << ", " << srcY0 << ", " << srcX1 << ", "
+ << srcY1 << ", " << dstX0 << ", " << dstY0 << ", " << dstX1
+ << ", " << dstY1 << ", " << mask << ", "
+ << GLEnums::GetStringEnum(filter) << ")");
+ g_driver_gl.debug_fn.glBlitFramebufferANGLEFn(
+ srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+}
+
+static void GL_BINDING_CALL Debug_glBlitFramebufferEXT(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ GL_SERVICE_LOG("glBlitFramebufferEXT"
+ << "(" << srcX0 << ", " << srcY0 << ", " << srcX1 << ", "
+ << srcY1 << ", " << dstX0 << ", " << dstY0 << ", " << dstX1
+ << ", " << dstY1 << ", " << mask << ", "
+ << GLEnums::GetStringEnum(filter) << ")");
+ g_driver_gl.debug_fn.glBlitFramebufferEXTFn(
+ srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+}
+
+static void GL_BINDING_CALL Debug_glBufferData(GLenum target,
+ GLsizeiptr size,
+ const void* data,
+ GLenum usage) {
+ GL_SERVICE_LOG("glBufferData"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << size
+ << ", " << static_cast<const void*>(data) << ", "
+ << GLEnums::GetStringEnum(usage) << ")");
+ g_driver_gl.debug_fn.glBufferDataFn(target, size, data, usage);
+}
+
+static void GL_BINDING_CALL Debug_glBufferSubData(GLenum target,
+ GLintptr offset,
+ GLsizeiptr size,
+ const void* data) {
+ GL_SERVICE_LOG("glBufferSubData"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << offset
+ << ", " << size << ", " << static_cast<const void*>(data)
+ << ")");
+ g_driver_gl.debug_fn.glBufferSubDataFn(target, offset, size, data);
+}
+
+static GLenum GL_BINDING_CALL Debug_glCheckFramebufferStatusEXT(GLenum target) {
+ GL_SERVICE_LOG("glCheckFramebufferStatusEXT"
+ << "(" << GLEnums::GetStringEnum(target) << ")");
+ GLenum result = g_driver_gl.debug_fn.glCheckFramebufferStatusEXTFn(target);
+
+ GL_SERVICE_LOG("GL_RESULT: " << GLEnums::GetStringEnum(result));
+
+ return result;
+}
+
+static void GL_BINDING_CALL Debug_glClear(GLbitfield mask) {
+ GL_SERVICE_LOG("glClear"
+ << "(" << mask << ")");
+ g_driver_gl.debug_fn.glClearFn(mask);
+}
+
+static void GL_BINDING_CALL Debug_glClearBufferfi(GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat depth,
+ GLint stencil) {
+ GL_SERVICE_LOG("glClearBufferfi"
+ << "(" << GLEnums::GetStringEnum(buffer) << ", " << drawbuffer
+ << ", " << depth << ", " << stencil << ")");
+ g_driver_gl.debug_fn.glClearBufferfiFn(buffer, drawbuffer, depth, stencil);
+}
+
+static void GL_BINDING_CALL
+Debug_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value) {
+ GL_SERVICE_LOG("glClearBufferfv"
+ << "(" << GLEnums::GetStringEnum(buffer) << ", " << drawbuffer
+ << ", " << static_cast<const void*>(value) << ")");
+ g_driver_gl.debug_fn.glClearBufferfvFn(buffer, drawbuffer, value);
+}
+
+static void GL_BINDING_CALL
+Debug_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value) {
+ GL_SERVICE_LOG("glClearBufferiv"
+ << "(" << GLEnums::GetStringEnum(buffer) << ", " << drawbuffer
+ << ", " << static_cast<const void*>(value) << ")");
+ g_driver_gl.debug_fn.glClearBufferivFn(buffer, drawbuffer, value);
+}
+
+static void GL_BINDING_CALL
+Debug_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value) {
+ GL_SERVICE_LOG("glClearBufferuiv"
+ << "(" << GLEnums::GetStringEnum(buffer) << ", " << drawbuffer
+ << ", " << static_cast<const void*>(value) << ")");
+ g_driver_gl.debug_fn.glClearBufferuivFn(buffer, drawbuffer, value);
+}
+
+static void GL_BINDING_CALL Debug_glClearColor(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) {
+ GL_SERVICE_LOG("glClearColor"
+ << "(" << red << ", " << green << ", " << blue << ", " << alpha
+ << ")");
+ g_driver_gl.debug_fn.glClearColorFn(red, green, blue, alpha);
+}
+
+static void GL_BINDING_CALL Debug_glClearDepth(GLclampd depth) {
+ GL_SERVICE_LOG("glClearDepth"
+ << "(" << depth << ")");
+ g_driver_gl.debug_fn.glClearDepthFn(depth);
+}
+
+static void GL_BINDING_CALL Debug_glClearDepthf(GLclampf depth) {
+ GL_SERVICE_LOG("glClearDepthf"
+ << "(" << depth << ")");
+ g_driver_gl.debug_fn.glClearDepthfFn(depth);
+}
+
+static void GL_BINDING_CALL Debug_glClearStencil(GLint s) {
+ GL_SERVICE_LOG("glClearStencil"
+ << "(" << s << ")");
+ g_driver_gl.debug_fn.glClearStencilFn(s);
+}
+
+static GLenum GL_BINDING_CALL
+Debug_glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) {
+ GL_SERVICE_LOG("glClientWaitSync"
+ << "(" << sync << ", " << flags << ", " << timeout << ")");
+ GLenum result = g_driver_gl.debug_fn.glClientWaitSyncFn(sync, flags, timeout);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL Debug_glColorMask(GLboolean red,
+ GLboolean green,
+ GLboolean blue,
+ GLboolean alpha) {
+ GL_SERVICE_LOG("glColorMask"
+ << "(" << GLEnums::GetStringBool(red) << ", "
+ << GLEnums::GetStringBool(green) << ", "
+ << GLEnums::GetStringBool(blue) << ", "
+ << GLEnums::GetStringBool(alpha) << ")");
+ g_driver_gl.debug_fn.glColorMaskFn(red, green, blue, alpha);
+}
+
+static void GL_BINDING_CALL Debug_glCompileShader(GLuint shader) {
+ GL_SERVICE_LOG("glCompileShader"
+ << "(" << shader << ")");
+ g_driver_gl.debug_fn.glCompileShaderFn(shader);
+}
+
+static void GL_BINDING_CALL Debug_glCompressedTexImage2D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) {
+ GL_SERVICE_LOG("glCompressedTexImage2D"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << level
+ << ", " << GLEnums::GetStringEnum(internalformat) << ", "
+ << width << ", " << height << ", " << border << ", "
+ << imageSize << ", " << static_cast<const void*>(data) << ")");
+ g_driver_gl.debug_fn.glCompressedTexImage2DFn(
+ target, level, internalformat, width, height, border, imageSize, data);
+}
+
+static void GL_BINDING_CALL Debug_glCompressedTexImage3D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) {
+ GL_SERVICE_LOG("glCompressedTexImage3D"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << level
+ << ", " << GLEnums::GetStringEnum(internalformat) << ", "
+ << width << ", " << height << ", " << depth << ", " << border
+ << ", " << imageSize << ", " << static_cast<const void*>(data)
+ << ")");
+ g_driver_gl.debug_fn.glCompressedTexImage3DFn(target, level, internalformat,
+ width, height, depth, border,
+ imageSize, data);
+}
+
+static void GL_BINDING_CALL Debug_glCompressedTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLsizei imageSize,
+ const void* data) {
+ GL_SERVICE_LOG("glCompressedTexSubImage2D"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << level
+ << ", " << xoffset << ", " << yoffset << ", " << width << ", "
+ << height << ", " << GLEnums::GetStringEnum(format) << ", "
+ << imageSize << ", " << static_cast<const void*>(data) << ")");
+ g_driver_gl.debug_fn.glCompressedTexSubImage2DFn(
+ target, level, xoffset, yoffset, width, height, format, imageSize, data);
+}
+
+static void GL_BINDING_CALL Debug_glCopyBufferSubData(GLenum readTarget,
+ GLenum writeTarget,
+ GLintptr readOffset,
+ GLintptr writeOffset,
+ GLsizeiptr size) {
+ GL_SERVICE_LOG("glCopyBufferSubData"
+ << "(" << GLEnums::GetStringEnum(readTarget) << ", "
+ << GLEnums::GetStringEnum(writeTarget) << ", " << readOffset
+ << ", " << writeOffset << ", " << size << ")");
+ g_driver_gl.debug_fn.glCopyBufferSubDataFn(readTarget, writeTarget,
+ readOffset, writeOffset, size);
+}
+
+static void GL_BINDING_CALL Debug_glCopyTexImage2D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLint border) {
+ GL_SERVICE_LOG("glCopyTexImage2D"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << level
+ << ", " << GLEnums::GetStringEnum(internalformat) << ", " << x
+ << ", " << y << ", " << width << ", " << height << ", "
+ << border << ")");
+ g_driver_gl.debug_fn.glCopyTexImage2DFn(target, level, internalformat, x, y,
+ width, height, border);
+}
+
+static void GL_BINDING_CALL Debug_glCopyTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) {
+ GL_SERVICE_LOG("glCopyTexSubImage2D"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << level
+ << ", " << xoffset << ", " << yoffset << ", " << x << ", " << y
+ << ", " << width << ", " << height << ")");
+ g_driver_gl.debug_fn.glCopyTexSubImage2DFn(target, level, xoffset, yoffset, x,
+ y, width, height);
+}
+
+static void GL_BINDING_CALL Debug_glCopyTexSubImage3D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint zoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) {
+ GL_SERVICE_LOG("glCopyTexSubImage3D"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << level
+ << ", " << xoffset << ", " << yoffset << ", " << zoffset
+ << ", " << x << ", " << y << ", " << width << ", " << height
+ << ")");
+ g_driver_gl.debug_fn.glCopyTexSubImage3DFn(target, level, xoffset, yoffset,
+ zoffset, x, y, width, height);
+}
+
+static GLuint GL_BINDING_CALL Debug_glCreateProgram(void) {
+ GL_SERVICE_LOG("glCreateProgram"
+ << "("
+ << ")");
+ GLuint result = g_driver_gl.debug_fn.glCreateProgramFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLuint GL_BINDING_CALL Debug_glCreateShader(GLenum type) {
+ GL_SERVICE_LOG("glCreateShader"
+ << "(" << GLEnums::GetStringEnum(type) << ")");
+ GLuint result = g_driver_gl.debug_fn.glCreateShaderFn(type);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL Debug_glCullFace(GLenum mode) {
+ GL_SERVICE_LOG("glCullFace"
+ << "(" << GLEnums::GetStringEnum(mode) << ")");
+ g_driver_gl.debug_fn.glCullFaceFn(mode);
+}
+
+static void GL_BINDING_CALL
+Debug_glDeleteBuffersARB(GLsizei n, const GLuint* buffers) {
+ GL_SERVICE_LOG("glDeleteBuffersARB"
+ << "(" << n << ", " << static_cast<const void*>(buffers)
+ << ")");
+ g_driver_gl.debug_fn.glDeleteBuffersARBFn(n, buffers);
+}
+
+static void GL_BINDING_CALL
+Debug_glDeleteFencesAPPLE(GLsizei n, const GLuint* fences) {
+ GL_SERVICE_LOG("glDeleteFencesAPPLE"
+ << "(" << n << ", " << static_cast<const void*>(fences)
+ << ")");
+ g_driver_gl.debug_fn.glDeleteFencesAPPLEFn(n, fences);
+}
+
+static void GL_BINDING_CALL
+Debug_glDeleteFencesNV(GLsizei n, const GLuint* fences) {
+ GL_SERVICE_LOG("glDeleteFencesNV"
+ << "(" << n << ", " << static_cast<const void*>(fences)
+ << ")");
+ g_driver_gl.debug_fn.glDeleteFencesNVFn(n, fences);
+}
+
+static void GL_BINDING_CALL
+Debug_glDeleteFramebuffersEXT(GLsizei n, const GLuint* framebuffers) {
+ GL_SERVICE_LOG("glDeleteFramebuffersEXT"
+ << "(" << n << ", " << static_cast<const void*>(framebuffers)
+ << ")");
+ g_driver_gl.debug_fn.glDeleteFramebuffersEXTFn(n, framebuffers);
+}
+
+static void GL_BINDING_CALL Debug_glDeleteProgram(GLuint program) {
+ GL_SERVICE_LOG("glDeleteProgram"
+ << "(" << program << ")");
+ g_driver_gl.debug_fn.glDeleteProgramFn(program);
+}
+
+static void GL_BINDING_CALL
+Debug_glDeleteQueries(GLsizei n, const GLuint* ids) {
+ GL_SERVICE_LOG("glDeleteQueries"
+ << "(" << n << ", " << static_cast<const void*>(ids) << ")");
+ g_driver_gl.debug_fn.glDeleteQueriesFn(n, ids);
+}
+
+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)
+ << ")");
+ g_driver_gl.debug_fn.glDeleteRenderbuffersEXTFn(n, renderbuffers);
+}
+
+static void GL_BINDING_CALL
+Debug_glDeleteSamplers(GLsizei n, const GLuint* samplers) {
+ GL_SERVICE_LOG("glDeleteSamplers"
+ << "(" << n << ", " << static_cast<const void*>(samplers)
+ << ")");
+ g_driver_gl.debug_fn.glDeleteSamplersFn(n, samplers);
+}
+
+static void GL_BINDING_CALL Debug_glDeleteShader(GLuint shader) {
+ GL_SERVICE_LOG("glDeleteShader"
+ << "(" << shader << ")");
+ g_driver_gl.debug_fn.glDeleteShaderFn(shader);
+}
+
+static void GL_BINDING_CALL Debug_glDeleteSync(GLsync sync) {
+ GL_SERVICE_LOG("glDeleteSync"
+ << "(" << sync << ")");
+ g_driver_gl.debug_fn.glDeleteSyncFn(sync);
+}
+
+static void GL_BINDING_CALL
+Debug_glDeleteTextures(GLsizei n, const GLuint* textures) {
+ GL_SERVICE_LOG("glDeleteTextures"
+ << "(" << n << ", " << static_cast<const void*>(textures)
+ << ")");
+ g_driver_gl.debug_fn.glDeleteTexturesFn(n, textures);
+}
+
+static void GL_BINDING_CALL
+Debug_glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids) {
+ GL_SERVICE_LOG("glDeleteTransformFeedbacks"
+ << "(" << n << ", " << static_cast<const void*>(ids) << ")");
+ g_driver_gl.debug_fn.glDeleteTransformFeedbacksFn(n, ids);
+}
+
+static void GL_BINDING_CALL
+Debug_glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays) {
+ GL_SERVICE_LOG("glDeleteVertexArraysOES"
+ << "(" << n << ", " << static_cast<const void*>(arrays)
+ << ")");
+ g_driver_gl.debug_fn.glDeleteVertexArraysOESFn(n, arrays);
+}
+
+static void GL_BINDING_CALL Debug_glDepthFunc(GLenum func) {
+ GL_SERVICE_LOG("glDepthFunc"
+ << "(" << GLEnums::GetStringEnum(func) << ")");
+ g_driver_gl.debug_fn.glDepthFuncFn(func);
+}
+
+static void GL_BINDING_CALL Debug_glDepthMask(GLboolean flag) {
+ GL_SERVICE_LOG("glDepthMask"
+ << "(" << GLEnums::GetStringBool(flag) << ")");
+ g_driver_gl.debug_fn.glDepthMaskFn(flag);
+}
+
+static void GL_BINDING_CALL Debug_glDepthRange(GLclampd zNear, GLclampd zFar) {
+ GL_SERVICE_LOG("glDepthRange"
+ << "(" << zNear << ", " << zFar << ")");
+ g_driver_gl.debug_fn.glDepthRangeFn(zNear, zFar);
+}
+
+static void GL_BINDING_CALL Debug_glDepthRangef(GLclampf zNear, GLclampf zFar) {
+ GL_SERVICE_LOG("glDepthRangef"
+ << "(" << zNear << ", " << zFar << ")");
+ g_driver_gl.debug_fn.glDepthRangefFn(zNear, zFar);
+}
+
+static void GL_BINDING_CALL
+Debug_glDetachShader(GLuint program, GLuint shader) {
+ GL_SERVICE_LOG("glDetachShader"
+ << "(" << program << ", " << shader << ")");
+ g_driver_gl.debug_fn.glDetachShaderFn(program, shader);
+}
+
+static void GL_BINDING_CALL Debug_glDisable(GLenum cap) {
+ GL_SERVICE_LOG("glDisable"
+ << "(" << GLEnums::GetStringEnum(cap) << ")");
+ g_driver_gl.debug_fn.glDisableFn(cap);
+}
+
+static void GL_BINDING_CALL Debug_glDisableVertexAttribArray(GLuint index) {
+ GL_SERVICE_LOG("glDisableVertexAttribArray"
+ << "(" << index << ")");
+ g_driver_gl.debug_fn.glDisableVertexAttribArrayFn(index);
+}
+
+static void GL_BINDING_CALL
+Debug_glDiscardFramebufferEXT(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments) {
+ GL_SERVICE_LOG("glDiscardFramebufferEXT"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << numAttachments << ", "
+ << static_cast<const void*>(attachments) << ")");
+ g_driver_gl.debug_fn.glDiscardFramebufferEXTFn(target, numAttachments,
+ attachments);
+}
+
+static void GL_BINDING_CALL
+Debug_glDrawArrays(GLenum mode, GLint first, GLsizei count) {
+ GL_SERVICE_LOG("glDrawArrays"
+ << "(" << GLEnums::GetStringEnum(mode) << ", " << first << ", "
+ << count << ")");
+ g_driver_gl.debug_fn.glDrawArraysFn(mode, first, count);
+}
+
+static void GL_BINDING_CALL
+Debug_glDrawArraysInstancedANGLE(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount) {
+ GL_SERVICE_LOG("glDrawArraysInstancedANGLE"
+ << "(" << GLEnums::GetStringEnum(mode) << ", " << first << ", "
+ << count << ", " << primcount << ")");
+ g_driver_gl.debug_fn.glDrawArraysInstancedANGLEFn(mode, first, count,
+ primcount);
+}
+
+static void GL_BINDING_CALL Debug_glDrawBuffer(GLenum mode) {
+ GL_SERVICE_LOG("glDrawBuffer"
+ << "(" << GLEnums::GetStringEnum(mode) << ")");
+ g_driver_gl.debug_fn.glDrawBufferFn(mode);
+}
+
+static void GL_BINDING_CALL
+Debug_glDrawBuffersARB(GLsizei n, const GLenum* bufs) {
+ GL_SERVICE_LOG("glDrawBuffersARB"
+ << "(" << n << ", " << static_cast<const void*>(bufs) << ")");
+ g_driver_gl.debug_fn.glDrawBuffersARBFn(n, bufs);
+}
+
+static void GL_BINDING_CALL Debug_glDrawElements(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices) {
+ GL_SERVICE_LOG("glDrawElements"
+ << "(" << GLEnums::GetStringEnum(mode) << ", " << count << ", "
+ << GLEnums::GetStringEnum(type) << ", "
+ << static_cast<const void*>(indices) << ")");
+ g_driver_gl.debug_fn.glDrawElementsFn(mode, count, type, indices);
+}
+
+static void GL_BINDING_CALL
+Debug_glDrawElementsInstancedANGLE(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount) {
+ GL_SERVICE_LOG("glDrawElementsInstancedANGLE"
+ << "(" << GLEnums::GetStringEnum(mode) << ", " << count << ", "
+ << GLEnums::GetStringEnum(type) << ", "
+ << static_cast<const void*>(indices) << ", " << primcount
+ << ")");
+ g_driver_gl.debug_fn.glDrawElementsInstancedANGLEFn(mode, count, type,
+ indices, primcount);
+}
+
+static void GL_BINDING_CALL Debug_glDrawRangeElements(GLenum mode,
+ GLuint start,
+ GLuint end,
+ GLsizei count,
+ GLenum type,
+ const void* indices) {
+ GL_SERVICE_LOG("glDrawRangeElements"
+ << "(" << GLEnums::GetStringEnum(mode) << ", " << start << ", "
+ << end << ", " << count << ", " << GLEnums::GetStringEnum(type)
+ << ", " << static_cast<const void*>(indices) << ")");
+ g_driver_gl.debug_fn.glDrawRangeElementsFn(mode, start, end, count, type,
+ indices);
+}
+
+static void GL_BINDING_CALL
+Debug_glEGLImageTargetRenderbufferStorageOES(GLenum target,
+ GLeglImageOES image) {
+ GL_SERVICE_LOG("glEGLImageTargetRenderbufferStorageOES"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << image
+ << ")");
+ g_driver_gl.debug_fn.glEGLImageTargetRenderbufferStorageOESFn(target, image);
+}
+
+static void GL_BINDING_CALL
+Debug_glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) {
+ GL_SERVICE_LOG("glEGLImageTargetTexture2DOES"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << image
+ << ")");
+ g_driver_gl.debug_fn.glEGLImageTargetTexture2DOESFn(target, image);
+}
+
+static void GL_BINDING_CALL Debug_glEnable(GLenum cap) {
+ GL_SERVICE_LOG("glEnable"
+ << "(" << GLEnums::GetStringEnum(cap) << ")");
+ g_driver_gl.debug_fn.glEnableFn(cap);
+}
+
+static void GL_BINDING_CALL Debug_glEnableVertexAttribArray(GLuint index) {
+ GL_SERVICE_LOG("glEnableVertexAttribArray"
+ << "(" << index << ")");
+ g_driver_gl.debug_fn.glEnableVertexAttribArrayFn(index);
+}
+
+static void GL_BINDING_CALL Debug_glEndQuery(GLenum target) {
+ GL_SERVICE_LOG("glEndQuery"
+ << "(" << GLEnums::GetStringEnum(target) << ")");
+ 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"
+ << "("
+ << ")");
+ g_driver_gl.debug_fn.glEndTransformFeedbackFn();
+}
+
+static GLsync GL_BINDING_CALL
+Debug_glFenceSync(GLenum condition, GLbitfield flags) {
+ GL_SERVICE_LOG("glFenceSync"
+ << "(" << GLEnums::GetStringEnum(condition) << ", " << flags
+ << ")");
+ GLsync result = g_driver_gl.debug_fn.glFenceSyncFn(condition, flags);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL Debug_glFinish(void) {
+ GL_SERVICE_LOG("glFinish"
+ << "("
+ << ")");
+ g_driver_gl.debug_fn.glFinishFn();
+}
+
+static void GL_BINDING_CALL Debug_glFinishFenceAPPLE(GLuint fence) {
+ GL_SERVICE_LOG("glFinishFenceAPPLE"
+ << "(" << fence << ")");
+ g_driver_gl.debug_fn.glFinishFenceAPPLEFn(fence);
+}
+
+static void GL_BINDING_CALL Debug_glFinishFenceNV(GLuint fence) {
+ GL_SERVICE_LOG("glFinishFenceNV"
+ << "(" << fence << ")");
+ g_driver_gl.debug_fn.glFinishFenceNVFn(fence);
+}
+
+static void GL_BINDING_CALL Debug_glFlush(void) {
+ GL_SERVICE_LOG("glFlush"
+ << "("
+ << ")");
+ g_driver_gl.debug_fn.glFlushFn();
+}
+
+static void GL_BINDING_CALL Debug_glFlushMappedBufferRange(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length) {
+ GL_SERVICE_LOG("glFlushMappedBufferRange"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << offset
+ << ", " << length << ")");
+ g_driver_gl.debug_fn.glFlushMappedBufferRangeFn(target, offset, length);
+}
+
+static void GL_BINDING_CALL
+Debug_glFramebufferRenderbufferEXT(GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer) {
+ GL_SERVICE_LOG("glFramebufferRenderbufferEXT"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(attachment) << ", "
+ << GLEnums::GetStringEnum(renderbuffertarget) << ", "
+ << renderbuffer << ")");
+ g_driver_gl.debug_fn.glFramebufferRenderbufferEXTFn(
+ target, attachment, renderbuffertarget, renderbuffer);
+}
+
+static void GL_BINDING_CALL Debug_glFramebufferTexture2DEXT(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level) {
+ GL_SERVICE_LOG("glFramebufferTexture2DEXT"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(attachment) << ", "
+ << GLEnums::GetStringEnum(textarget) << ", " << texture << ", "
+ << level << ")");
+ g_driver_gl.debug_fn.glFramebufferTexture2DEXTFn(target, attachment,
+ textarget, texture, level);
+}
+
+static void GL_BINDING_CALL
+Debug_glFramebufferTexture2DMultisampleEXT(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) {
+ GL_SERVICE_LOG("glFramebufferTexture2DMultisampleEXT"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(attachment) << ", "
+ << GLEnums::GetStringEnum(textarget) << ", " << texture << ", "
+ << level << ", " << samples << ")");
+ g_driver_gl.debug_fn.glFramebufferTexture2DMultisampleEXTFn(
+ target, attachment, textarget, texture, level, samples);
+}
+
+static void GL_BINDING_CALL
+Debug_glFramebufferTexture2DMultisampleIMG(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) {
+ GL_SERVICE_LOG("glFramebufferTexture2DMultisampleIMG"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(attachment) << ", "
+ << GLEnums::GetStringEnum(textarget) << ", " << texture << ", "
+ << level << ", " << samples << ")");
+ g_driver_gl.debug_fn.glFramebufferTexture2DMultisampleIMGFn(
+ target, attachment, textarget, texture, level, samples);
+}
+
+static void GL_BINDING_CALL Debug_glFramebufferTextureLayer(GLenum target,
+ GLenum attachment,
+ GLuint texture,
+ GLint level,
+ GLint layer) {
+ GL_SERVICE_LOG("glFramebufferTextureLayer"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(attachment) << ", " << texture
+ << ", " << level << ", " << layer << ")");
+ g_driver_gl.debug_fn.glFramebufferTextureLayerFn(target, attachment, texture,
+ level, layer);
+}
+
+static void GL_BINDING_CALL Debug_glFrontFace(GLenum mode) {
+ GL_SERVICE_LOG("glFrontFace"
+ << "(" << GLEnums::GetStringEnum(mode) << ")");
+ g_driver_gl.debug_fn.glFrontFaceFn(mode);
+}
+
+static void GL_BINDING_CALL Debug_glGenBuffersARB(GLsizei n, GLuint* buffers) {
+ GL_SERVICE_LOG("glGenBuffersARB"
+ << "(" << n << ", " << static_cast<const void*>(buffers)
+ << ")");
+ g_driver_gl.debug_fn.glGenBuffersARBFn(n, buffers);
+}
+
+static void GL_BINDING_CALL Debug_glGenerateMipmapEXT(GLenum target) {
+ GL_SERVICE_LOG("glGenerateMipmapEXT"
+ << "(" << GLEnums::GetStringEnum(target) << ")");
+ g_driver_gl.debug_fn.glGenerateMipmapEXTFn(target);
+}
+
+static void GL_BINDING_CALL Debug_glGenFencesAPPLE(GLsizei n, GLuint* fences) {
+ GL_SERVICE_LOG("glGenFencesAPPLE"
+ << "(" << n << ", " << static_cast<const void*>(fences)
+ << ")");
+ g_driver_gl.debug_fn.glGenFencesAPPLEFn(n, fences);
+}
+
+static void GL_BINDING_CALL Debug_glGenFencesNV(GLsizei n, GLuint* fences) {
+ GL_SERVICE_LOG("glGenFencesNV"
+ << "(" << n << ", " << static_cast<const void*>(fences)
+ << ")");
+ g_driver_gl.debug_fn.glGenFencesNVFn(n, fences);
+}
+
+static void GL_BINDING_CALL
+Debug_glGenFramebuffersEXT(GLsizei n, GLuint* framebuffers) {
+ GL_SERVICE_LOG("glGenFramebuffersEXT"
+ << "(" << n << ", " << static_cast<const void*>(framebuffers)
+ << ")");
+ g_driver_gl.debug_fn.glGenFramebuffersEXTFn(n, framebuffers);
+}
+
+static void GL_BINDING_CALL Debug_glGenQueries(GLsizei n, GLuint* ids) {
+ GL_SERVICE_LOG("glGenQueries"
+ << "(" << n << ", " << static_cast<const void*>(ids) << ")");
+ 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"
+ << "(" << n << ", " << static_cast<const void*>(renderbuffers)
+ << ")");
+ g_driver_gl.debug_fn.glGenRenderbuffersEXTFn(n, renderbuffers);
+}
+
+static void GL_BINDING_CALL Debug_glGenSamplers(GLsizei n, GLuint* samplers) {
+ GL_SERVICE_LOG("glGenSamplers"
+ << "(" << n << ", " << static_cast<const void*>(samplers)
+ << ")");
+ g_driver_gl.debug_fn.glGenSamplersFn(n, samplers);
+}
+
+static void GL_BINDING_CALL Debug_glGenTextures(GLsizei n, GLuint* textures) {
+ GL_SERVICE_LOG("glGenTextures"
+ << "(" << n << ", " << static_cast<const void*>(textures)
+ << ")");
+ g_driver_gl.debug_fn.glGenTexturesFn(n, textures);
+}
+
+static void GL_BINDING_CALL
+Debug_glGenTransformFeedbacks(GLsizei n, GLuint* ids) {
+ GL_SERVICE_LOG("glGenTransformFeedbacks"
+ << "(" << n << ", " << static_cast<const void*>(ids) << ")");
+ g_driver_gl.debug_fn.glGenTransformFeedbacksFn(n, ids);
+}
+
+static void GL_BINDING_CALL
+Debug_glGenVertexArraysOES(GLsizei n, GLuint* arrays) {
+ GL_SERVICE_LOG("glGenVertexArraysOES"
+ << "(" << n << ", " << static_cast<const void*>(arrays)
+ << ")");
+ g_driver_gl.debug_fn.glGenVertexArraysOESFn(n, arrays);
+}
+
+static void GL_BINDING_CALL Debug_glGetActiveAttrib(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) {
+ GL_SERVICE_LOG("glGetActiveAttrib"
+ << "(" << program << ", " << index << ", " << bufsize << ", "
+ << static_cast<const void*>(length) << ", "
+ << static_cast<const void*>(size) << ", "
+ << static_cast<const void*>(type) << ", "
+ << static_cast<const void*>(name) << ")");
+ g_driver_gl.debug_fn.glGetActiveAttribFn(program, index, bufsize, length,
+ size, type, name);
+}
+
+static void GL_BINDING_CALL Debug_glGetActiveUniform(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) {
+ GL_SERVICE_LOG("glGetActiveUniform"
+ << "(" << program << ", " << index << ", " << bufsize << ", "
+ << static_cast<const void*>(length) << ", "
+ << static_cast<const void*>(size) << ", "
+ << static_cast<const void*>(type) << ", "
+ << static_cast<const void*>(name) << ")");
+ g_driver_gl.debug_fn.glGetActiveUniformFn(program, index, bufsize, length,
+ size, type, name);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetActiveUniformBlockiv(GLuint program,
+ GLuint uniformBlockIndex,
+ GLenum pname,
+ GLint* params) {
+ GL_SERVICE_LOG("glGetActiveUniformBlockiv"
+ << "(" << program << ", " << uniformBlockIndex << ", "
+ << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetActiveUniformBlockivFn(program, uniformBlockIndex,
+ pname, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetActiveUniformBlockName(GLuint program,
+ GLuint uniformBlockIndex,
+ GLsizei bufSize,
+ GLsizei* length,
+ char* uniformBlockName) {
+ GL_SERVICE_LOG("glGetActiveUniformBlockName"
+ << "(" << program << ", " << uniformBlockIndex << ", "
+ << bufSize << ", " << static_cast<const void*>(length) << ", "
+ << static_cast<const void*>(uniformBlockName) << ")");
+ g_driver_gl.debug_fn.glGetActiveUniformBlockNameFn(
+ program, uniformBlockIndex, bufSize, length, uniformBlockName);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetActiveUniformsiv(GLuint program,
+ GLsizei uniformCount,
+ const GLuint* uniformIndices,
+ GLenum pname,
+ GLint* params) {
+ GL_SERVICE_LOG("glGetActiveUniformsiv"
+ << "(" << program << ", " << uniformCount << ", "
+ << static_cast<const void*>(uniformIndices) << ", "
+ << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetActiveUniformsivFn(program, uniformCount,
+ uniformIndices, pname, params);
+}
+
+static void GL_BINDING_CALL Debug_glGetAttachedShaders(GLuint program,
+ GLsizei maxcount,
+ GLsizei* count,
+ GLuint* shaders) {
+ GL_SERVICE_LOG("glGetAttachedShaders"
+ << "(" << program << ", " << maxcount << ", "
+ << static_cast<const void*>(count) << ", "
+ << static_cast<const void*>(shaders) << ")");
+ g_driver_gl.debug_fn.glGetAttachedShadersFn(program, maxcount, count,
+ shaders);
+}
+
+static GLint GL_BINDING_CALL
+Debug_glGetAttribLocation(GLuint program, const char* name) {
+ GL_SERVICE_LOG("glGetAttribLocation"
+ << "(" << program << ", " << name << ")");
+ GLint result = g_driver_gl.debug_fn.glGetAttribLocationFn(program, name);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL
+Debug_glGetBooleanv(GLenum pname, GLboolean* params) {
+ GL_SERVICE_LOG("glGetBooleanv"
+ << "(" << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetBooleanvFn(pname, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) {
+ GL_SERVICE_LOG("glGetBufferParameteriv"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetBufferParameterivFn(target, pname, params);
+}
+
+static GLenum GL_BINDING_CALL Debug_glGetError(void) {
+ GL_SERVICE_LOG("glGetError"
+ << "("
+ << ")");
+ GLenum result = g_driver_gl.debug_fn.glGetErrorFn();
+
+ GL_SERVICE_LOG("GL_RESULT: " << GLEnums::GetStringError(result));
+
+ return result;
+}
+
+static void GL_BINDING_CALL
+Debug_glGetFenceivNV(GLuint fence, GLenum pname, GLint* params) {
+ GL_SERVICE_LOG("glGetFenceivNV"
+ << "(" << fence << ", " << GLEnums::GetStringEnum(pname)
+ << ", " << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetFenceivNVFn(fence, pname, params);
+}
+
+static void GL_BINDING_CALL Debug_glGetFloatv(GLenum pname, GLfloat* params) {
+ GL_SERVICE_LOG("glGetFloatv"
+ << "(" << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetFloatvFn(pname, params);
+}
+
+static GLint GL_BINDING_CALL
+Debug_glGetFragDataLocation(GLuint program, const char* name) {
+ GL_SERVICE_LOG("glGetFragDataLocation"
+ << "(" << program << ", " << name << ")");
+ GLint result = g_driver_gl.debug_fn.glGetFragDataLocationFn(program, name);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL
+Debug_glGetFramebufferAttachmentParameterivEXT(GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* params) {
+ GL_SERVICE_LOG("glGetFramebufferAttachmentParameterivEXT"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(attachment) << ", "
+ << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetFramebufferAttachmentParameterivEXTFn(
+ target, attachment, pname, params);
+}
+
+static GLenum GL_BINDING_CALL Debug_glGetGraphicsResetStatusARB(void) {
+ GL_SERVICE_LOG("glGetGraphicsResetStatusARB"
+ << "("
+ << ")");
+ GLenum result = g_driver_gl.debug_fn.glGetGraphicsResetStatusARBFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL
+Debug_glGetInteger64i_v(GLenum target, GLuint index, GLint64* data) {
+ GL_SERVICE_LOG("glGetInteger64i_v"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << index
+ << ", " << static_cast<const void*>(data) << ")");
+ g_driver_gl.debug_fn.glGetInteger64i_vFn(target, index, data);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetInteger64v(GLenum pname, GLint64* params) {
+ GL_SERVICE_LOG("glGetInteger64v"
+ << "(" << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetInteger64vFn(pname, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetIntegeri_v(GLenum target, GLuint index, GLint* data) {
+ GL_SERVICE_LOG("glGetIntegeri_v"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << index
+ << ", " << static_cast<const void*>(data) << ")");
+ g_driver_gl.debug_fn.glGetIntegeri_vFn(target, index, data);
+}
+
+static void GL_BINDING_CALL Debug_glGetIntegerv(GLenum pname, GLint* params) {
+ GL_SERVICE_LOG("glGetIntegerv"
+ << "(" << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetIntegervFn(pname, params);
+}
+
+static void GL_BINDING_CALL Debug_glGetInternalformativ(GLenum target,
+ GLenum internalformat,
+ GLenum pname,
+ GLsizei bufSize,
+ GLint* params) {
+ GL_SERVICE_LOG("glGetInternalformativ"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(internalformat) << ", "
+ << GLEnums::GetStringEnum(pname) << ", " << bufSize << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetInternalformativFn(target, internalformat, pname,
+ bufSize, params);
+}
+
+static void GL_BINDING_CALL Debug_glGetProgramBinary(GLuint program,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* binaryFormat,
+ GLvoid* binary) {
+ GL_SERVICE_LOG("glGetProgramBinary"
+ << "(" << program << ", " << bufSize << ", "
+ << static_cast<const void*>(length) << ", "
+ << static_cast<const void*>(binaryFormat) << ", "
+ << static_cast<const void*>(binary) << ")");
+ g_driver_gl.debug_fn.glGetProgramBinaryFn(program, bufSize, length,
+ binaryFormat, binary);
+}
+
+static void GL_BINDING_CALL Debug_glGetProgramInfoLog(GLuint program,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) {
+ GL_SERVICE_LOG("glGetProgramInfoLog"
+ << "(" << program << ", " << bufsize << ", "
+ << static_cast<const void*>(length) << ", "
+ << static_cast<const void*>(infolog) << ")");
+ g_driver_gl.debug_fn.glGetProgramInfoLogFn(program, bufsize, length, infolog);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetProgramiv(GLuint program, GLenum pname, GLint* params) {
+ GL_SERVICE_LOG("glGetProgramiv"
+ << "(" << program << ", " << GLEnums::GetStringEnum(pname)
+ << ", " << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetProgramivFn(program, pname, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetQueryiv(GLenum target, GLenum pname, GLint* params) {
+ GL_SERVICE_LOG("glGetQueryiv"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetQueryivFn(target, pname, params);
+}
+
+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) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetQueryObjecti64vFn(id, pname, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetQueryObjectiv(GLuint id, GLenum pname, GLint* params) {
+ GL_SERVICE_LOG("glGetQueryObjectiv"
+ << "(" << id << ", " << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetQueryObjectivFn(id, pname, params);
+}
+
+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) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetQueryObjectui64vFn(id, pname, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params) {
+ GL_SERVICE_LOG("glGetQueryObjectuiv"
+ << "(" << id << ", " << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetQueryObjectuivFn(id, pname, params);
+}
+
+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) {
+ GL_SERVICE_LOG("glGetRenderbufferParameterivEXT"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetRenderbufferParameterivEXTFn(target, pname, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params) {
+ GL_SERVICE_LOG("glGetSamplerParameterfv"
+ << "(" << sampler << ", " << GLEnums::GetStringEnum(pname)
+ << ", " << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetSamplerParameterfvFn(sampler, pname, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params) {
+ GL_SERVICE_LOG("glGetSamplerParameteriv"
+ << "(" << sampler << ", " << GLEnums::GetStringEnum(pname)
+ << ", " << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetSamplerParameterivFn(sampler, pname, params);
+}
+
+static void GL_BINDING_CALL Debug_glGetShaderInfoLog(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) {
+ GL_SERVICE_LOG("glGetShaderInfoLog"
+ << "(" << shader << ", " << bufsize << ", "
+ << static_cast<const void*>(length) << ", "
+ << static_cast<const void*>(infolog) << ")");
+ g_driver_gl.debug_fn.glGetShaderInfoLogFn(shader, bufsize, length, infolog);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetShaderiv(GLuint shader, GLenum pname, GLint* params) {
+ GL_SERVICE_LOG("glGetShaderiv"
+ << "(" << shader << ", " << GLEnums::GetStringEnum(pname)
+ << ", " << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetShaderivFn(shader, pname, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetShaderPrecisionFormat(GLenum shadertype,
+ GLenum precisiontype,
+ GLint* range,
+ GLint* precision) {
+ GL_SERVICE_LOG("glGetShaderPrecisionFormat"
+ << "(" << GLEnums::GetStringEnum(shadertype) << ", "
+ << GLEnums::GetStringEnum(precisiontype) << ", "
+ << static_cast<const void*>(range) << ", "
+ << static_cast<const void*>(precision) << ")");
+ g_driver_gl.debug_fn.glGetShaderPrecisionFormatFn(shadertype, precisiontype,
+ range, precision);
+}
+
+static void GL_BINDING_CALL Debug_glGetShaderSource(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) {
+ GL_SERVICE_LOG("glGetShaderSource"
+ << "(" << shader << ", " << bufsize << ", "
+ << static_cast<const void*>(length) << ", "
+ << static_cast<const void*>(source) << ")");
+ g_driver_gl.debug_fn.glGetShaderSourceFn(shader, bufsize, length, source);
+}
+
+static const GLubyte* GL_BINDING_CALL Debug_glGetString(GLenum name) {
+ GL_SERVICE_LOG("glGetString"
+ << "(" << GLEnums::GetStringEnum(name) << ")");
+ const GLubyte* result = g_driver_gl.debug_fn.glGetStringFn(name);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL Debug_glGetSynciv(GLsync sync,
+ GLenum pname,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLint* values) {
+ GL_SERVICE_LOG("glGetSynciv"
+ << "(" << sync << ", " << GLEnums::GetStringEnum(pname) << ", "
+ << bufSize << ", " << static_cast<const void*>(length) << ", "
+ << static_cast<const void*>(values) << ")");
+ g_driver_gl.debug_fn.glGetSyncivFn(sync, pname, bufSize, length, values);
+}
+
+static void GL_BINDING_CALL Debug_glGetTexLevelParameterfv(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLfloat* params) {
+ GL_SERVICE_LOG("glGetTexLevelParameterfv"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << level
+ << ", " << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetTexLevelParameterfvFn(target, level, pname, params);
+}
+
+static void GL_BINDING_CALL Debug_glGetTexLevelParameteriv(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLint* params) {
+ GL_SERVICE_LOG("glGetTexLevelParameteriv"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << level
+ << ", " << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetTexLevelParameterivFn(target, level, pname, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) {
+ GL_SERVICE_LOG("glGetTexParameterfv"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetTexParameterfvFn(target, pname, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) {
+ GL_SERVICE_LOG("glGetTexParameteriv"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetTexParameterivFn(target, pname, params);
+}
+
+static void GL_BINDING_CALL Debug_glGetTransformFeedbackVarying(GLuint program,
+ GLuint index,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* type,
+ char* name) {
+ GL_SERVICE_LOG("glGetTransformFeedbackVarying"
+ << "(" << program << ", " << index << ", " << bufSize << ", "
+ << static_cast<const void*>(length) << ", "
+ << static_cast<const void*>(type) << ", "
+ << static_cast<const void*>(name) << ")");
+ g_driver_gl.debug_fn.glGetTransformFeedbackVaryingFn(program, index, bufSize,
+ length, type, name);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetTranslatedShaderSourceANGLE(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) {
+ GL_SERVICE_LOG("glGetTranslatedShaderSourceANGLE"
+ << "(" << shader << ", " << bufsize << ", "
+ << static_cast<const void*>(length) << ", "
+ << static_cast<const void*>(source) << ")");
+ g_driver_gl.debug_fn.glGetTranslatedShaderSourceANGLEFn(shader, bufsize,
+ length, source);
+}
+
+static GLuint GL_BINDING_CALL
+Debug_glGetUniformBlockIndex(GLuint program, const char* uniformBlockName) {
+ GL_SERVICE_LOG("glGetUniformBlockIndex"
+ << "(" << program << ", " << uniformBlockName << ")");
+ GLuint result =
+ g_driver_gl.debug_fn.glGetUniformBlockIndexFn(program, uniformBlockName);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL
+Debug_glGetUniformfv(GLuint program, GLint location, GLfloat* params) {
+ GL_SERVICE_LOG("glGetUniformfv"
+ << "(" << program << ", " << location << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetUniformfvFn(program, location, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetUniformIndices(GLuint program,
+ GLsizei uniformCount,
+ const char* const* uniformNames,
+ GLuint* uniformIndices) {
+ GL_SERVICE_LOG("glGetUniformIndices"
+ << "(" << program << ", " << uniformCount << ", "
+ << static_cast<const void*>(uniformNames) << ", "
+ << static_cast<const void*>(uniformIndices) << ")");
+ g_driver_gl.debug_fn.glGetUniformIndicesFn(program, uniformCount,
+ uniformNames, uniformIndices);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetUniformiv(GLuint program, GLint location, GLint* params) {
+ GL_SERVICE_LOG("glGetUniformiv"
+ << "(" << program << ", " << location << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetUniformivFn(program, location, params);
+}
+
+static GLint GL_BINDING_CALL
+Debug_glGetUniformLocation(GLuint program, const char* name) {
+ GL_SERVICE_LOG("glGetUniformLocation"
+ << "(" << program << ", " << name << ")");
+ GLint result = g_driver_gl.debug_fn.glGetUniformLocationFn(program, name);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL
+Debug_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) {
+ GL_SERVICE_LOG("glGetVertexAttribfv"
+ << "(" << index << ", " << GLEnums::GetStringEnum(pname)
+ << ", " << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetVertexAttribfvFn(index, pname, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) {
+ GL_SERVICE_LOG("glGetVertexAttribiv"
+ << "(" << index << ", " << GLEnums::GetStringEnum(pname)
+ << ", " << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glGetVertexAttribivFn(index, pname, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer) {
+ GL_SERVICE_LOG("glGetVertexAttribPointerv"
+ << "(" << index << ", " << GLEnums::GetStringEnum(pname)
+ << ", " << pointer << ")");
+ g_driver_gl.debug_fn.glGetVertexAttribPointervFn(index, pname, pointer);
+}
+
+static void GL_BINDING_CALL Debug_glHint(GLenum target, GLenum mode) {
+ GL_SERVICE_LOG("glHint"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(mode) << ")");
+ g_driver_gl.debug_fn.glHintFn(target, mode);
+}
+
+static void GL_BINDING_CALL
+Debug_glInsertEventMarkerEXT(GLsizei length, const char* marker) {
+ GL_SERVICE_LOG("glInsertEventMarkerEXT"
+ << "(" << length << ", " << marker << ")");
+ g_driver_gl.debug_fn.glInsertEventMarkerEXTFn(length, marker);
+}
+
+static void GL_BINDING_CALL
+Debug_glInvalidateFramebuffer(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments) {
+ GL_SERVICE_LOG("glInvalidateFramebuffer"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << numAttachments << ", "
+ << static_cast<const void*>(attachments) << ")");
+ g_driver_gl.debug_fn.glInvalidateFramebufferFn(target, numAttachments,
+ attachments);
+}
+
+static void GL_BINDING_CALL
+Debug_glInvalidateSubFramebuffer(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments,
+ GLint x,
+ GLint y,
+ GLint width,
+ GLint height) {
+ GL_SERVICE_LOG("glInvalidateSubFramebuffer"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << numAttachments << ", "
+ << static_cast<const void*>(attachments) << ", " << x << ", "
+ << y << ", " << width << ", " << height << ")");
+ g_driver_gl.debug_fn.glInvalidateSubFramebufferFn(
+ target, numAttachments, attachments, x, y, width, height);
+}
+
+static GLboolean GL_BINDING_CALL Debug_glIsBuffer(GLuint buffer) {
+ GL_SERVICE_LOG("glIsBuffer"
+ << "(" << buffer << ")");
+ GLboolean result = g_driver_gl.debug_fn.glIsBufferFn(buffer);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLboolean GL_BINDING_CALL Debug_glIsEnabled(GLenum cap) {
+ GL_SERVICE_LOG("glIsEnabled"
+ << "(" << GLEnums::GetStringEnum(cap) << ")");
+ GLboolean result = g_driver_gl.debug_fn.glIsEnabledFn(cap);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLboolean GL_BINDING_CALL Debug_glIsFenceAPPLE(GLuint fence) {
+ GL_SERVICE_LOG("glIsFenceAPPLE"
+ << "(" << fence << ")");
+ GLboolean result = g_driver_gl.debug_fn.glIsFenceAPPLEFn(fence);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLboolean GL_BINDING_CALL Debug_glIsFenceNV(GLuint fence) {
+ GL_SERVICE_LOG("glIsFenceNV"
+ << "(" << fence << ")");
+ GLboolean result = g_driver_gl.debug_fn.glIsFenceNVFn(fence);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLboolean GL_BINDING_CALL Debug_glIsFramebufferEXT(GLuint framebuffer) {
+ GL_SERVICE_LOG("glIsFramebufferEXT"
+ << "(" << framebuffer << ")");
+ GLboolean result = g_driver_gl.debug_fn.glIsFramebufferEXTFn(framebuffer);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLboolean GL_BINDING_CALL Debug_glIsProgram(GLuint program) {
+ GL_SERVICE_LOG("glIsProgram"
+ << "(" << program << ")");
+ GLboolean result = g_driver_gl.debug_fn.glIsProgramFn(program);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLboolean GL_BINDING_CALL Debug_glIsQuery(GLuint query) {
+ GL_SERVICE_LOG("glIsQuery"
+ << "(" << query << ")");
+ GLboolean result = g_driver_gl.debug_fn.glIsQueryFn(query);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ 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"
+ << "(" << renderbuffer << ")");
+ GLboolean result = g_driver_gl.debug_fn.glIsRenderbufferEXTFn(renderbuffer);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLboolean GL_BINDING_CALL Debug_glIsSampler(GLuint sampler) {
+ GL_SERVICE_LOG("glIsSampler"
+ << "(" << sampler << ")");
+ GLboolean result = g_driver_gl.debug_fn.glIsSamplerFn(sampler);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLboolean GL_BINDING_CALL Debug_glIsShader(GLuint shader) {
+ GL_SERVICE_LOG("glIsShader"
+ << "(" << shader << ")");
+ GLboolean result = g_driver_gl.debug_fn.glIsShaderFn(shader);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLboolean GL_BINDING_CALL Debug_glIsSync(GLsync sync) {
+ GL_SERVICE_LOG("glIsSync"
+ << "(" << sync << ")");
+ GLboolean result = g_driver_gl.debug_fn.glIsSyncFn(sync);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLboolean GL_BINDING_CALL Debug_glIsTexture(GLuint texture) {
+ GL_SERVICE_LOG("glIsTexture"
+ << "(" << texture << ")");
+ GLboolean result = g_driver_gl.debug_fn.glIsTextureFn(texture);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLboolean GL_BINDING_CALL Debug_glIsTransformFeedback(GLuint id) {
+ GL_SERVICE_LOG("glIsTransformFeedback"
+ << "(" << id << ")");
+ GLboolean result = g_driver_gl.debug_fn.glIsTransformFeedbackFn(id);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLboolean GL_BINDING_CALL Debug_glIsVertexArrayOES(GLuint array) {
+ GL_SERVICE_LOG("glIsVertexArrayOES"
+ << "(" << array << ")");
+ GLboolean result = g_driver_gl.debug_fn.glIsVertexArrayOESFn(array);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL Debug_glLineWidth(GLfloat width) {
+ GL_SERVICE_LOG("glLineWidth"
+ << "(" << width << ")");
+ g_driver_gl.debug_fn.glLineWidthFn(width);
+}
+
+static void GL_BINDING_CALL Debug_glLinkProgram(GLuint program) {
+ GL_SERVICE_LOG("glLinkProgram"
+ << "(" << program << ")");
+ g_driver_gl.debug_fn.glLinkProgramFn(program);
+}
+
+static void* GL_BINDING_CALL Debug_glMapBuffer(GLenum target, GLenum access) {
+ GL_SERVICE_LOG("glMapBuffer"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(access) << ")");
+ void* result = g_driver_gl.debug_fn.glMapBufferFn(target, access);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void* GL_BINDING_CALL Debug_glMapBufferRange(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length,
+ GLbitfield access) {
+ GL_SERVICE_LOG("glMapBufferRange"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << offset
+ << ", " << length << ", " << access << ")");
+ void* result =
+ g_driver_gl.debug_fn.glMapBufferRangeFn(target, offset, length, access);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL
+Debug_glMatrixLoadfEXT(GLenum matrixMode, const GLfloat* m) {
+ GL_SERVICE_LOG("glMatrixLoadfEXT"
+ << "(" << GLEnums::GetStringEnum(matrixMode) << ", "
+ << static_cast<const void*>(m) << ")");
+ g_driver_gl.debug_fn.glMatrixLoadfEXTFn(matrixMode, m);
+}
+
+static void GL_BINDING_CALL Debug_glMatrixLoadIdentityEXT(GLenum matrixMode) {
+ GL_SERVICE_LOG("glMatrixLoadIdentityEXT"
+ << "(" << GLEnums::GetStringEnum(matrixMode) << ")");
+ g_driver_gl.debug_fn.glMatrixLoadIdentityEXTFn(matrixMode);
+}
+
+static void GL_BINDING_CALL Debug_glPauseTransformFeedback(void) {
+ GL_SERVICE_LOG("glPauseTransformFeedback"
+ << "("
+ << ")");
+ g_driver_gl.debug_fn.glPauseTransformFeedbackFn();
+}
+
+static void GL_BINDING_CALL Debug_glPixelStorei(GLenum pname, GLint param) {
+ GL_SERVICE_LOG("glPixelStorei"
+ << "(" << GLEnums::GetStringEnum(pname) << ", " << param
+ << ")");
+ g_driver_gl.debug_fn.glPixelStoreiFn(pname, param);
+}
+
+static void GL_BINDING_CALL Debug_glPointParameteri(GLenum pname, GLint param) {
+ GL_SERVICE_LOG("glPointParameteri"
+ << "(" << GLEnums::GetStringEnum(pname) << ", " << param
+ << ")");
+ g_driver_gl.debug_fn.glPointParameteriFn(pname, param);
+}
+
+static void GL_BINDING_CALL
+Debug_glPolygonOffset(GLfloat factor, GLfloat units) {
+ GL_SERVICE_LOG("glPolygonOffset"
+ << "(" << factor << ", " << units << ")");
+ g_driver_gl.debug_fn.glPolygonOffsetFn(factor, units);
+}
+
+static void GL_BINDING_CALL Debug_glPopGroupMarkerEXT(void) {
+ GL_SERVICE_LOG("glPopGroupMarkerEXT"
+ << "("
+ << ")");
+ g_driver_gl.debug_fn.glPopGroupMarkerEXTFn();
+}
+
+static void GL_BINDING_CALL Debug_glProgramBinary(GLuint program,
+ GLenum binaryFormat,
+ const GLvoid* binary,
+ GLsizei length) {
+ GL_SERVICE_LOG("glProgramBinary"
+ << "(" << program << ", "
+ << GLEnums::GetStringEnum(binaryFormat) << ", "
+ << static_cast<const void*>(binary) << ", " << length << ")");
+ g_driver_gl.debug_fn.glProgramBinaryFn(program, binaryFormat, binary, length);
+}
+
+static void GL_BINDING_CALL
+Debug_glProgramParameteri(GLuint program, GLenum pname, GLint value) {
+ GL_SERVICE_LOG("glProgramParameteri"
+ << "(" << program << ", " << GLEnums::GetStringEnum(pname)
+ << ", " << value << ")");
+ g_driver_gl.debug_fn.glProgramParameteriFn(program, pname, value);
+}
+
+static void GL_BINDING_CALL
+Debug_glPushGroupMarkerEXT(GLsizei length, const char* marker) {
+ GL_SERVICE_LOG("glPushGroupMarkerEXT"
+ << "(" << length << ", " << marker << ")");
+ g_driver_gl.debug_fn.glPushGroupMarkerEXTFn(length, marker);
+}
+
+static void GL_BINDING_CALL Debug_glQueryCounter(GLuint id, GLenum target) {
+ GL_SERVICE_LOG("glQueryCounter"
+ << "(" << id << ", " << GLEnums::GetStringEnum(target) << ")");
+ g_driver_gl.debug_fn.glQueryCounterFn(id, target);
+}
+
+static void GL_BINDING_CALL Debug_glReadBuffer(GLenum src) {
+ GL_SERVICE_LOG("glReadBuffer"
+ << "(" << GLEnums::GetStringEnum(src) << ")");
+ g_driver_gl.debug_fn.glReadBufferFn(src);
+}
+
+static void GL_BINDING_CALL Debug_glReadPixels(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ void* pixels) {
+ GL_SERVICE_LOG("glReadPixels"
+ << "(" << x << ", " << y << ", " << width << ", " << height
+ << ", " << GLEnums::GetStringEnum(format) << ", "
+ << GLEnums::GetStringEnum(type) << ", "
+ << static_cast<const void*>(pixels) << ")");
+ g_driver_gl.debug_fn.glReadPixelsFn(x, y, width, height, format, type,
+ pixels);
+}
+
+static void GL_BINDING_CALL Debug_glReleaseShaderCompiler(void) {
+ GL_SERVICE_LOG("glReleaseShaderCompiler"
+ << "("
+ << ")");
+ g_driver_gl.debug_fn.glReleaseShaderCompilerFn();
+}
+
+static void GL_BINDING_CALL
+Debug_glRenderbufferStorageEXT(GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ GL_SERVICE_LOG("glRenderbufferStorageEXT"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(internalformat) << ", " << width
+ << ", " << height << ")");
+ g_driver_gl.debug_fn.glRenderbufferStorageEXTFn(target, internalformat, width,
+ height);
+}
+
+static void GL_BINDING_CALL
+Debug_glRenderbufferStorageMultisample(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ GL_SERVICE_LOG("glRenderbufferStorageMultisample"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << samples
+ << ", " << GLEnums::GetStringEnum(internalformat) << ", "
+ << width << ", " << height << ")");
+ g_driver_gl.debug_fn.glRenderbufferStorageMultisampleFn(
+ target, samples, internalformat, width, height);
+}
+
+static void GL_BINDING_CALL
+Debug_glRenderbufferStorageMultisampleANGLE(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ GL_SERVICE_LOG("glRenderbufferStorageMultisampleANGLE"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << samples
+ << ", " << GLEnums::GetStringEnum(internalformat) << ", "
+ << width << ", " << height << ")");
+ g_driver_gl.debug_fn.glRenderbufferStorageMultisampleANGLEFn(
+ target, samples, internalformat, width, height);
+}
+
+static void GL_BINDING_CALL
+Debug_glRenderbufferStorageMultisampleEXT(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ GL_SERVICE_LOG("glRenderbufferStorageMultisampleEXT"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << samples
+ << ", " << GLEnums::GetStringEnum(internalformat) << ", "
+ << width << ", " << height << ")");
+ g_driver_gl.debug_fn.glRenderbufferStorageMultisampleEXTFn(
+ target, samples, internalformat, width, height);
+}
+
+static void GL_BINDING_CALL
+Debug_glRenderbufferStorageMultisampleIMG(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ GL_SERVICE_LOG("glRenderbufferStorageMultisampleIMG"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << samples
+ << ", " << GLEnums::GetStringEnum(internalformat) << ", "
+ << width << ", " << height << ")");
+ g_driver_gl.debug_fn.glRenderbufferStorageMultisampleIMGFn(
+ target, samples, internalformat, width, height);
+}
+
+static void GL_BINDING_CALL Debug_glResumeTransformFeedback(void) {
+ GL_SERVICE_LOG("glResumeTransformFeedback"
+ << "("
+ << ")");
+ g_driver_gl.debug_fn.glResumeTransformFeedbackFn();
+}
+
+static void GL_BINDING_CALL
+Debug_glSampleCoverage(GLclampf value, GLboolean invert) {
+ GL_SERVICE_LOG("glSampleCoverage"
+ << "(" << value << ", " << GLEnums::GetStringBool(invert)
+ << ")");
+ g_driver_gl.debug_fn.glSampleCoverageFn(value, invert);
+}
+
+static void GL_BINDING_CALL
+Debug_glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) {
+ GL_SERVICE_LOG("glSamplerParameterf"
+ << "(" << sampler << ", " << GLEnums::GetStringEnum(pname)
+ << ", " << param << ")");
+ g_driver_gl.debug_fn.glSamplerParameterfFn(sampler, pname, param);
+}
+
+static void GL_BINDING_CALL Debug_glSamplerParameterfv(GLuint sampler,
+ GLenum pname,
+ const GLfloat* params) {
+ GL_SERVICE_LOG("glSamplerParameterfv"
+ << "(" << sampler << ", " << GLEnums::GetStringEnum(pname)
+ << ", " << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glSamplerParameterfvFn(sampler, pname, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glSamplerParameteri(GLuint sampler, GLenum pname, GLint param) {
+ GL_SERVICE_LOG("glSamplerParameteri"
+ << "(" << sampler << ", " << GLEnums::GetStringEnum(pname)
+ << ", " << param << ")");
+ g_driver_gl.debug_fn.glSamplerParameteriFn(sampler, pname, param);
+}
+
+static void GL_BINDING_CALL
+Debug_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* params) {
+ GL_SERVICE_LOG("glSamplerParameteriv"
+ << "(" << sampler << ", " << GLEnums::GetStringEnum(pname)
+ << ", " << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glSamplerParameterivFn(sampler, pname, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glScissor(GLint x, GLint y, GLsizei width, GLsizei height) {
+ GL_SERVICE_LOG("glScissor"
+ << "(" << x << ", " << y << ", " << width << ", " << height
+ << ")");
+ g_driver_gl.debug_fn.glScissorFn(x, y, width, height);
+}
+
+static void GL_BINDING_CALL Debug_glSetFenceAPPLE(GLuint fence) {
+ GL_SERVICE_LOG("glSetFenceAPPLE"
+ << "(" << fence << ")");
+ g_driver_gl.debug_fn.glSetFenceAPPLEFn(fence);
+}
+
+static void GL_BINDING_CALL Debug_glSetFenceNV(GLuint fence, GLenum condition) {
+ GL_SERVICE_LOG("glSetFenceNV"
+ << "(" << fence << ", " << GLEnums::GetStringEnum(condition)
+ << ")");
+ g_driver_gl.debug_fn.glSetFenceNVFn(fence, condition);
+}
+
+static void GL_BINDING_CALL Debug_glShaderBinary(GLsizei n,
+ const GLuint* shaders,
+ GLenum binaryformat,
+ const void* binary,
+ GLsizei length) {
+ GL_SERVICE_LOG("glShaderBinary"
+ << "(" << n << ", " << static_cast<const void*>(shaders)
+ << ", " << GLEnums::GetStringEnum(binaryformat) << ", "
+ << static_cast<const void*>(binary) << ", " << length << ")");
+ g_driver_gl.debug_fn.glShaderBinaryFn(n, shaders, binaryformat, binary,
+ length);
+}
+
+static void GL_BINDING_CALL Debug_glShaderSource(GLuint shader,
+ GLsizei count,
+ const char* const* str,
+ const GLint* length) {
+ GL_SERVICE_LOG("glShaderSource"
+ << "(" << shader << ", " << count << ", "
+ << static_cast<const void*>(str) << ", "
+ << static_cast<const void*>(length) << ")");
+ g_driver_gl.debug_fn.glShaderSourceFn(shader, count, str, length);
+
+ GL_SERVICE_LOG_CODE_BLOCK({
+ for (GLsizei ii = 0; ii < count; ++ii) {
+ if (str[ii]) {
+ if (length && length[ii] >= 0) {
+ std::string source(str[ii], length[ii]);
+ GL_SERVICE_LOG(" " << ii << ": ---\n" << source << "\n---");
+ } else {
+ GL_SERVICE_LOG(" " << ii << ": ---\n" << str[ii] << "\n---");
+ }
+ } else {
+ GL_SERVICE_LOG(" " << ii << ": NULL");
+ }
+ }
+ });
+}
+
+static void GL_BINDING_CALL
+Debug_glStencilFunc(GLenum func, GLint ref, GLuint mask) {
+ GL_SERVICE_LOG("glStencilFunc"
+ << "(" << GLEnums::GetStringEnum(func) << ", " << ref << ", "
+ << mask << ")");
+ g_driver_gl.debug_fn.glStencilFuncFn(func, ref, mask);
+}
+
+static void GL_BINDING_CALL
+Debug_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) {
+ GL_SERVICE_LOG("glStencilFuncSeparate"
+ << "(" << GLEnums::GetStringEnum(face) << ", "
+ << GLEnums::GetStringEnum(func) << ", " << ref << ", " << mask
+ << ")");
+ g_driver_gl.debug_fn.glStencilFuncSeparateFn(face, func, ref, mask);
+}
+
+static void GL_BINDING_CALL Debug_glStencilMask(GLuint mask) {
+ GL_SERVICE_LOG("glStencilMask"
+ << "(" << mask << ")");
+ g_driver_gl.debug_fn.glStencilMaskFn(mask);
+}
+
+static void GL_BINDING_CALL
+Debug_glStencilMaskSeparate(GLenum face, GLuint mask) {
+ GL_SERVICE_LOG("glStencilMaskSeparate"
+ << "(" << GLEnums::GetStringEnum(face) << ", " << mask << ")");
+ g_driver_gl.debug_fn.glStencilMaskSeparateFn(face, mask);
+}
+
+static void GL_BINDING_CALL
+Debug_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) {
+ GL_SERVICE_LOG("glStencilOp"
+ << "(" << GLEnums::GetStringEnum(fail) << ", "
+ << GLEnums::GetStringEnum(zfail) << ", "
+ << GLEnums::GetStringEnum(zpass) << ")");
+ g_driver_gl.debug_fn.glStencilOpFn(fail, zfail, zpass);
+}
+
+static void GL_BINDING_CALL Debug_glStencilOpSeparate(GLenum face,
+ GLenum fail,
+ GLenum zfail,
+ GLenum zpass) {
+ GL_SERVICE_LOG("glStencilOpSeparate"
+ << "(" << GLEnums::GetStringEnum(face) << ", "
+ << GLEnums::GetStringEnum(fail) << ", "
+ << GLEnums::GetStringEnum(zfail) << ", "
+ << GLEnums::GetStringEnum(zpass) << ")");
+ g_driver_gl.debug_fn.glStencilOpSeparateFn(face, fail, zfail, zpass);
+}
+
+static GLboolean GL_BINDING_CALL Debug_glTestFenceAPPLE(GLuint fence) {
+ GL_SERVICE_LOG("glTestFenceAPPLE"
+ << "(" << fence << ")");
+ GLboolean result = g_driver_gl.debug_fn.glTestFenceAPPLEFn(fence);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLboolean GL_BINDING_CALL Debug_glTestFenceNV(GLuint fence) {
+ GL_SERVICE_LOG("glTestFenceNV"
+ << "(" << fence << ")");
+ GLboolean result = g_driver_gl.debug_fn.glTestFenceNVFn(fence);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL Debug_glTexImage2D(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) {
+ GL_SERVICE_LOG("glTexImage2D"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << level
+ << ", " << internalformat << ", " << width << ", " << height
+ << ", " << border << ", " << GLEnums::GetStringEnum(format)
+ << ", " << GLEnums::GetStringEnum(type) << ", "
+ << static_cast<const void*>(pixels) << ")");
+ g_driver_gl.debug_fn.glTexImage2DFn(target, level, internalformat, width,
+ height, border, format, type, pixels);
+}
+
+static void GL_BINDING_CALL Debug_glTexImage3D(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) {
+ GL_SERVICE_LOG("glTexImage3D"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << level
+ << ", " << internalformat << ", " << width << ", " << height
+ << ", " << depth << ", " << border << ", "
+ << GLEnums::GetStringEnum(format) << ", "
+ << GLEnums::GetStringEnum(type) << ", "
+ << static_cast<const void*>(pixels) << ")");
+ g_driver_gl.debug_fn.glTexImage3DFn(target, level, internalformat, width,
+ height, depth, border, format, type,
+ pixels);
+}
+
+static void GL_BINDING_CALL
+Debug_glTexParameterf(GLenum target, GLenum pname, GLfloat param) {
+ GL_SERVICE_LOG("glTexParameterf"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(pname) << ", " << param << ")");
+ g_driver_gl.debug_fn.glTexParameterfFn(target, pname, param);
+}
+
+static void GL_BINDING_CALL
+Debug_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params) {
+ GL_SERVICE_LOG("glTexParameterfv"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glTexParameterfvFn(target, pname, params);
+}
+
+static void GL_BINDING_CALL
+Debug_glTexParameteri(GLenum target, GLenum pname, GLint param) {
+ GL_SERVICE_LOG("glTexParameteri"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(pname) << ", " << param << ")");
+ g_driver_gl.debug_fn.glTexParameteriFn(target, pname, param);
+}
+
+static void GL_BINDING_CALL
+Debug_glTexParameteriv(GLenum target, GLenum pname, const GLint* params) {
+ GL_SERVICE_LOG("glTexParameteriv"
+ << "(" << GLEnums::GetStringEnum(target) << ", "
+ << GLEnums::GetStringEnum(pname) << ", "
+ << static_cast<const void*>(params) << ")");
+ g_driver_gl.debug_fn.glTexParameterivFn(target, pname, params);
+}
+
+static void GL_BINDING_CALL Debug_glTexStorage2DEXT(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ GL_SERVICE_LOG("glTexStorage2DEXT"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << levels
+ << ", " << GLEnums::GetStringEnum(internalformat) << ", "
+ << width << ", " << height << ")");
+ g_driver_gl.debug_fn.glTexStorage2DEXTFn(target, levels, internalformat,
+ width, height);
+}
+
+static void GL_BINDING_CALL Debug_glTexStorage3D(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth) {
+ GL_SERVICE_LOG("glTexStorage3D"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << levels
+ << ", " << GLEnums::GetStringEnum(internalformat) << ", "
+ << width << ", " << height << ", " << depth << ")");
+ g_driver_gl.debug_fn.glTexStorage3DFn(target, levels, internalformat, width,
+ height, depth);
+}
+
+static void GL_BINDING_CALL Debug_glTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels) {
+ GL_SERVICE_LOG("glTexSubImage2D"
+ << "(" << GLEnums::GetStringEnum(target) << ", " << level
+ << ", " << xoffset << ", " << yoffset << ", " << width << ", "
+ << height << ", " << GLEnums::GetStringEnum(format) << ", "
+ << GLEnums::GetStringEnum(type) << ", "
+ << static_cast<const void*>(pixels) << ")");
+ g_driver_gl.debug_fn.glTexSubImage2DFn(target, level, xoffset, yoffset, width,
+ height, format, type, pixels);
+}
+
+static void GL_BINDING_CALL
+Debug_glTransformFeedbackVaryings(GLuint program,
+ GLsizei count,
+ const char* const* varyings,
+ GLenum bufferMode) {
+ GL_SERVICE_LOG("glTransformFeedbackVaryings"
+ << "(" << program << ", " << count << ", "
+ << static_cast<const void*>(varyings) << ", "
+ << GLEnums::GetStringEnum(bufferMode) << ")");
+ g_driver_gl.debug_fn.glTransformFeedbackVaryingsFn(program, count, varyings,
+ bufferMode);
+}
+
+static void GL_BINDING_CALL Debug_glUniform1f(GLint location, GLfloat x) {
+ GL_SERVICE_LOG("glUniform1f"
+ << "(" << location << ", " << x << ")");
+ g_driver_gl.debug_fn.glUniform1fFn(location, x);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform1fv(GLint location, GLsizei count, const GLfloat* v) {
+ GL_SERVICE_LOG("glUniform1fv"
+ << "(" << location << ", " << count << ", "
+ << static_cast<const void*>(v) << ")");
+ g_driver_gl.debug_fn.glUniform1fvFn(location, count, v);
+}
+
+static void GL_BINDING_CALL Debug_glUniform1i(GLint location, GLint x) {
+ GL_SERVICE_LOG("glUniform1i"
+ << "(" << location << ", " << x << ")");
+ g_driver_gl.debug_fn.glUniform1iFn(location, x);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform1iv(GLint location, GLsizei count, const GLint* v) {
+ GL_SERVICE_LOG("glUniform1iv"
+ << "(" << location << ", " << count << ", "
+ << static_cast<const void*>(v) << ")");
+ g_driver_gl.debug_fn.glUniform1ivFn(location, count, v);
+}
+
+static void GL_BINDING_CALL Debug_glUniform1ui(GLint location, GLuint v0) {
+ GL_SERVICE_LOG("glUniform1ui"
+ << "(" << location << ", " << v0 << ")");
+ g_driver_gl.debug_fn.glUniform1uiFn(location, v0);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform1uiv(GLint location, GLsizei count, const GLuint* v) {
+ GL_SERVICE_LOG("glUniform1uiv"
+ << "(" << location << ", " << count << ", "
+ << static_cast<const void*>(v) << ")");
+ g_driver_gl.debug_fn.glUniform1uivFn(location, count, v);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform2f(GLint location, GLfloat x, GLfloat y) {
+ GL_SERVICE_LOG("glUniform2f"
+ << "(" << location << ", " << x << ", " << y << ")");
+ g_driver_gl.debug_fn.glUniform2fFn(location, x, y);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform2fv(GLint location, GLsizei count, const GLfloat* v) {
+ GL_SERVICE_LOG("glUniform2fv"
+ << "(" << location << ", " << count << ", "
+ << static_cast<const void*>(v) << ")");
+ g_driver_gl.debug_fn.glUniform2fvFn(location, count, v);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform2i(GLint location, GLint x, GLint y) {
+ GL_SERVICE_LOG("glUniform2i"
+ << "(" << location << ", " << x << ", " << y << ")");
+ g_driver_gl.debug_fn.glUniform2iFn(location, x, y);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform2iv(GLint location, GLsizei count, const GLint* v) {
+ GL_SERVICE_LOG("glUniform2iv"
+ << "(" << location << ", " << count << ", "
+ << static_cast<const void*>(v) << ")");
+ g_driver_gl.debug_fn.glUniform2ivFn(location, count, v);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform2ui(GLint location, GLuint v0, GLuint v1) {
+ GL_SERVICE_LOG("glUniform2ui"
+ << "(" << location << ", " << v0 << ", " << v1 << ")");
+ g_driver_gl.debug_fn.glUniform2uiFn(location, v0, v1);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform2uiv(GLint location, GLsizei count, const GLuint* v) {
+ GL_SERVICE_LOG("glUniform2uiv"
+ << "(" << location << ", " << count << ", "
+ << static_cast<const void*>(v) << ")");
+ g_driver_gl.debug_fn.glUniform2uivFn(location, count, v);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) {
+ GL_SERVICE_LOG("glUniform3f"
+ << "(" << location << ", " << x << ", " << y << ", " << z
+ << ")");
+ g_driver_gl.debug_fn.glUniform3fFn(location, x, y, z);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform3fv(GLint location, GLsizei count, const GLfloat* v) {
+ GL_SERVICE_LOG("glUniform3fv"
+ << "(" << location << ", " << count << ", "
+ << static_cast<const void*>(v) << ")");
+ g_driver_gl.debug_fn.glUniform3fvFn(location, count, v);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform3i(GLint location, GLint x, GLint y, GLint z) {
+ GL_SERVICE_LOG("glUniform3i"
+ << "(" << location << ", " << x << ", " << y << ", " << z
+ << ")");
+ g_driver_gl.debug_fn.glUniform3iFn(location, x, y, z);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform3iv(GLint location, GLsizei count, const GLint* v) {
+ GL_SERVICE_LOG("glUniform3iv"
+ << "(" << location << ", " << count << ", "
+ << static_cast<const void*>(v) << ")");
+ g_driver_gl.debug_fn.glUniform3ivFn(location, count, v);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2) {
+ GL_SERVICE_LOG("glUniform3ui"
+ << "(" << location << ", " << v0 << ", " << v1 << ", " << v2
+ << ")");
+ g_driver_gl.debug_fn.glUniform3uiFn(location, v0, v1, v2);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform3uiv(GLint location, GLsizei count, const GLuint* v) {
+ GL_SERVICE_LOG("glUniform3uiv"
+ << "(" << location << ", " << count << ", "
+ << static_cast<const void*>(v) << ")");
+ g_driver_gl.debug_fn.glUniform3uivFn(location, count, v);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
+ GL_SERVICE_LOG("glUniform4f"
+ << "(" << location << ", " << x << ", " << y << ", " << z
+ << ", " << w << ")");
+ g_driver_gl.debug_fn.glUniform4fFn(location, x, y, z, w);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform4fv(GLint location, GLsizei count, const GLfloat* v) {
+ GL_SERVICE_LOG("glUniform4fv"
+ << "(" << location << ", " << count << ", "
+ << static_cast<const void*>(v) << ")");
+ g_driver_gl.debug_fn.glUniform4fvFn(location, count, v);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) {
+ GL_SERVICE_LOG("glUniform4i"
+ << "(" << location << ", " << x << ", " << y << ", " << z
+ << ", " << w << ")");
+ g_driver_gl.debug_fn.glUniform4iFn(location, x, y, z, w);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform4iv(GLint location, GLsizei count, const GLint* v) {
+ GL_SERVICE_LOG("glUniform4iv"
+ << "(" << location << ", " << count << ", "
+ << static_cast<const void*>(v) << ")");
+ g_driver_gl.debug_fn.glUniform4ivFn(location, count, v);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) {
+ GL_SERVICE_LOG("glUniform4ui"
+ << "(" << location << ", " << v0 << ", " << v1 << ", " << v2
+ << ", " << v3 << ")");
+ g_driver_gl.debug_fn.glUniform4uiFn(location, v0, v1, v2, v3);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniform4uiv(GLint location, GLsizei count, const GLuint* v) {
+ GL_SERVICE_LOG("glUniform4uiv"
+ << "(" << location << ", " << count << ", "
+ << static_cast<const void*>(v) << ")");
+ g_driver_gl.debug_fn.glUniform4uivFn(location, count, v);
+}
+
+static void GL_BINDING_CALL
+Debug_glUniformBlockBinding(GLuint program,
+ GLuint uniformBlockIndex,
+ GLuint uniformBlockBinding) {
+ GL_SERVICE_LOG("glUniformBlockBinding"
+ << "(" << program << ", " << uniformBlockIndex << ", "
+ << uniformBlockBinding << ")");
+ g_driver_gl.debug_fn.glUniformBlockBindingFn(program, uniformBlockIndex,
+ uniformBlockBinding);
+}
+
+static void GL_BINDING_CALL Debug_glUniformMatrix2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ GL_SERVICE_LOG("glUniformMatrix2fv"
+ << "(" << location << ", " << count << ", "
+ << GLEnums::GetStringBool(transpose) << ", "
+ << static_cast<const void*>(value) << ")");
+ g_driver_gl.debug_fn.glUniformMatrix2fvFn(location, count, transpose, value);
+}
+
+static void GL_BINDING_CALL Debug_glUniformMatrix2x3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ GL_SERVICE_LOG("glUniformMatrix2x3fv"
+ << "(" << location << ", " << count << ", "
+ << GLEnums::GetStringBool(transpose) << ", "
+ << static_cast<const void*>(value) << ")");
+ g_driver_gl.debug_fn.glUniformMatrix2x3fvFn(location, count, transpose,
+ value);
+}
+
+static void GL_BINDING_CALL Debug_glUniformMatrix2x4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ GL_SERVICE_LOG("glUniformMatrix2x4fv"
+ << "(" << location << ", " << count << ", "
+ << GLEnums::GetStringBool(transpose) << ", "
+ << static_cast<const void*>(value) << ")");
+ g_driver_gl.debug_fn.glUniformMatrix2x4fvFn(location, count, transpose,
+ value);
+}
+
+static void GL_BINDING_CALL Debug_glUniformMatrix3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ GL_SERVICE_LOG("glUniformMatrix3fv"
+ << "(" << location << ", " << count << ", "
+ << GLEnums::GetStringBool(transpose) << ", "
+ << static_cast<const void*>(value) << ")");
+ g_driver_gl.debug_fn.glUniformMatrix3fvFn(location, count, transpose, value);
+}
+
+static void GL_BINDING_CALL Debug_glUniformMatrix3x2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ GL_SERVICE_LOG("glUniformMatrix3x2fv"
+ << "(" << location << ", " << count << ", "
+ << GLEnums::GetStringBool(transpose) << ", "
+ << static_cast<const void*>(value) << ")");
+ g_driver_gl.debug_fn.glUniformMatrix3x2fvFn(location, count, transpose,
+ value);
+}
+
+static void GL_BINDING_CALL Debug_glUniformMatrix3x4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ GL_SERVICE_LOG("glUniformMatrix3x4fv"
+ << "(" << location << ", " << count << ", "
+ << GLEnums::GetStringBool(transpose) << ", "
+ << static_cast<const void*>(value) << ")");
+ g_driver_gl.debug_fn.glUniformMatrix3x4fvFn(location, count, transpose,
+ value);
+}
+
+static void GL_BINDING_CALL Debug_glUniformMatrix4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ GL_SERVICE_LOG("glUniformMatrix4fv"
+ << "(" << location << ", " << count << ", "
+ << GLEnums::GetStringBool(transpose) << ", "
+ << static_cast<const void*>(value) << ")");
+ g_driver_gl.debug_fn.glUniformMatrix4fvFn(location, count, transpose, value);
+}
+
+static void GL_BINDING_CALL Debug_glUniformMatrix4x2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ GL_SERVICE_LOG("glUniformMatrix4x2fv"
+ << "(" << location << ", " << count << ", "
+ << GLEnums::GetStringBool(transpose) << ", "
+ << static_cast<const void*>(value) << ")");
+ g_driver_gl.debug_fn.glUniformMatrix4x2fvFn(location, count, transpose,
+ value);
+}
+
+static void GL_BINDING_CALL Debug_glUniformMatrix4x3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ GL_SERVICE_LOG("glUniformMatrix4x3fv"
+ << "(" << location << ", " << count << ", "
+ << GLEnums::GetStringBool(transpose) << ", "
+ << static_cast<const void*>(value) << ")");
+ g_driver_gl.debug_fn.glUniformMatrix4x3fvFn(location, count, transpose,
+ value);
+}
+
+static GLboolean GL_BINDING_CALL Debug_glUnmapBuffer(GLenum target) {
+ GL_SERVICE_LOG("glUnmapBuffer"
+ << "(" << GLEnums::GetStringEnum(target) << ")");
+ GLboolean result = g_driver_gl.debug_fn.glUnmapBufferFn(target);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL Debug_glUseProgram(GLuint program) {
+ GL_SERVICE_LOG("glUseProgram"
+ << "(" << program << ")");
+ g_driver_gl.debug_fn.glUseProgramFn(program);
+}
+
+static void GL_BINDING_CALL Debug_glValidateProgram(GLuint program) {
+ GL_SERVICE_LOG("glValidateProgram"
+ << "(" << program << ")");
+ g_driver_gl.debug_fn.glValidateProgramFn(program);
+}
+
+static void GL_BINDING_CALL Debug_glVertexAttrib1f(GLuint indx, GLfloat x) {
+ GL_SERVICE_LOG("glVertexAttrib1f"
+ << "(" << indx << ", " << x << ")");
+ g_driver_gl.debug_fn.glVertexAttrib1fFn(indx, x);
+}
+
+static void GL_BINDING_CALL
+Debug_glVertexAttrib1fv(GLuint indx, const GLfloat* values) {
+ GL_SERVICE_LOG("glVertexAttrib1fv"
+ << "(" << indx << ", " << static_cast<const void*>(values)
+ << ")");
+ g_driver_gl.debug_fn.glVertexAttrib1fvFn(indx, values);
+}
+
+static void GL_BINDING_CALL
+Debug_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) {
+ GL_SERVICE_LOG("glVertexAttrib2f"
+ << "(" << indx << ", " << x << ", " << y << ")");
+ g_driver_gl.debug_fn.glVertexAttrib2fFn(indx, x, y);
+}
+
+static void GL_BINDING_CALL
+Debug_glVertexAttrib2fv(GLuint indx, const GLfloat* values) {
+ GL_SERVICE_LOG("glVertexAttrib2fv"
+ << "(" << indx << ", " << static_cast<const void*>(values)
+ << ")");
+ g_driver_gl.debug_fn.glVertexAttrib2fvFn(indx, values);
+}
+
+static void GL_BINDING_CALL
+Debug_glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) {
+ GL_SERVICE_LOG("glVertexAttrib3f"
+ << "(" << indx << ", " << x << ", " << y << ", " << z << ")");
+ g_driver_gl.debug_fn.glVertexAttrib3fFn(indx, x, y, z);
+}
+
+static void GL_BINDING_CALL
+Debug_glVertexAttrib3fv(GLuint indx, const GLfloat* values) {
+ GL_SERVICE_LOG("glVertexAttrib3fv"
+ << "(" << indx << ", " << static_cast<const void*>(values)
+ << ")");
+ g_driver_gl.debug_fn.glVertexAttrib3fvFn(indx, values);
+}
+
+static void GL_BINDING_CALL Debug_glVertexAttrib4f(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) {
+ GL_SERVICE_LOG("glVertexAttrib4f"
+ << "(" << indx << ", " << x << ", " << y << ", " << z << ", "
+ << w << ")");
+ g_driver_gl.debug_fn.glVertexAttrib4fFn(indx, x, y, z, w);
+}
+
+static void GL_BINDING_CALL
+Debug_glVertexAttrib4fv(GLuint indx, const GLfloat* values) {
+ GL_SERVICE_LOG("glVertexAttrib4fv"
+ << "(" << indx << ", " << static_cast<const void*>(values)
+ << ")");
+ g_driver_gl.debug_fn.glVertexAttrib4fvFn(indx, values);
+}
+
+static void GL_BINDING_CALL
+Debug_glVertexAttribDivisorANGLE(GLuint index, GLuint divisor) {
+ GL_SERVICE_LOG("glVertexAttribDivisorANGLE"
+ << "(" << index << ", " << divisor << ")");
+ g_driver_gl.debug_fn.glVertexAttribDivisorANGLEFn(index, divisor);
+}
+
+static void GL_BINDING_CALL
+Debug_glVertexAttribI4i(GLuint indx, GLint x, GLint y, GLint z, GLint w) {
+ GL_SERVICE_LOG("glVertexAttribI4i"
+ << "(" << indx << ", " << x << ", " << y << ", " << z << ", "
+ << w << ")");
+ g_driver_gl.debug_fn.glVertexAttribI4iFn(indx, x, y, z, w);
+}
+
+static void GL_BINDING_CALL
+Debug_glVertexAttribI4iv(GLuint indx, const GLint* values) {
+ GL_SERVICE_LOG("glVertexAttribI4iv"
+ << "(" << indx << ", " << static_cast<const void*>(values)
+ << ")");
+ g_driver_gl.debug_fn.glVertexAttribI4ivFn(indx, values);
+}
+
+static void GL_BINDING_CALL
+Debug_glVertexAttribI4ui(GLuint indx, GLuint x, GLuint y, GLuint z, GLuint w) {
+ GL_SERVICE_LOG("glVertexAttribI4ui"
+ << "(" << indx << ", " << x << ", " << y << ", " << z << ", "
+ << w << ")");
+ g_driver_gl.debug_fn.glVertexAttribI4uiFn(indx, x, y, z, w);
+}
+
+static void GL_BINDING_CALL
+Debug_glVertexAttribI4uiv(GLuint indx, const GLuint* values) {
+ GL_SERVICE_LOG("glVertexAttribI4uiv"
+ << "(" << indx << ", " << static_cast<const void*>(values)
+ << ")");
+ g_driver_gl.debug_fn.glVertexAttribI4uivFn(indx, values);
+}
+
+static void GL_BINDING_CALL Debug_glVertexAttribIPointer(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLsizei stride,
+ const void* ptr) {
+ GL_SERVICE_LOG("glVertexAttribIPointer"
+ << "(" << indx << ", " << size << ", "
+ << GLEnums::GetStringEnum(type) << ", " << stride << ", "
+ << static_cast<const void*>(ptr) << ")");
+ g_driver_gl.debug_fn.glVertexAttribIPointerFn(indx, size, type, stride, ptr);
+}
+
+static void GL_BINDING_CALL Debug_glVertexAttribPointer(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLboolean normalized,
+ GLsizei stride,
+ const void* ptr) {
+ GL_SERVICE_LOG("glVertexAttribPointer"
+ << "(" << indx << ", " << size << ", "
+ << GLEnums::GetStringEnum(type) << ", "
+ << GLEnums::GetStringBool(normalized) << ", " << stride << ", "
+ << static_cast<const void*>(ptr) << ")");
+ g_driver_gl.debug_fn.glVertexAttribPointerFn(indx, size, type, normalized,
+ stride, ptr);
+}
+
+static void GL_BINDING_CALL
+Debug_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) {
+ GL_SERVICE_LOG("glViewport"
+ << "(" << x << ", " << y << ", " << width << ", " << height
+ << ")");
+ g_driver_gl.debug_fn.glViewportFn(x, y, width, height);
+}
+
+static GLenum GL_BINDING_CALL
+Debug_glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) {
+ GL_SERVICE_LOG("glWaitSync"
+ << "(" << sync << ", " << flags << ", " << timeout << ")");
+ GLenum result = g_driver_gl.debug_fn.glWaitSyncFn(sync, flags, timeout);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+} // extern "C"
+
+void DriverGL::InitializeDebugBindings() {
+ if (!debug_fn.glActiveTextureFn) {
+ debug_fn.glActiveTextureFn = fn.glActiveTextureFn;
+ fn.glActiveTextureFn = Debug_glActiveTexture;
+ }
+ if (!debug_fn.glAttachShaderFn) {
+ debug_fn.glAttachShaderFn = fn.glAttachShaderFn;
+ fn.glAttachShaderFn = Debug_glAttachShader;
+ }
+ if (!debug_fn.glBeginQueryFn) {
+ 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;
+ }
+ if (!debug_fn.glBindAttribLocationFn) {
+ debug_fn.glBindAttribLocationFn = fn.glBindAttribLocationFn;
+ fn.glBindAttribLocationFn = Debug_glBindAttribLocation;
+ }
+ if (!debug_fn.glBindBufferFn) {
+ debug_fn.glBindBufferFn = fn.glBindBufferFn;
+ fn.glBindBufferFn = Debug_glBindBuffer;
+ }
+ if (!debug_fn.glBindBufferBaseFn) {
+ debug_fn.glBindBufferBaseFn = fn.glBindBufferBaseFn;
+ fn.glBindBufferBaseFn = Debug_glBindBufferBase;
+ }
+ if (!debug_fn.glBindBufferRangeFn) {
+ debug_fn.glBindBufferRangeFn = fn.glBindBufferRangeFn;
+ fn.glBindBufferRangeFn = Debug_glBindBufferRange;
+ }
+ if (!debug_fn.glBindFragDataLocationFn) {
+ debug_fn.glBindFragDataLocationFn = fn.glBindFragDataLocationFn;
+ fn.glBindFragDataLocationFn = Debug_glBindFragDataLocation;
+ }
+ if (!debug_fn.glBindFragDataLocationIndexedFn) {
+ debug_fn.glBindFragDataLocationIndexedFn =
+ fn.glBindFragDataLocationIndexedFn;
+ fn.glBindFragDataLocationIndexedFn = Debug_glBindFragDataLocationIndexed;
+ }
+ if (!debug_fn.glBindFramebufferEXTFn) {
+ debug_fn.glBindFramebufferEXTFn = fn.glBindFramebufferEXTFn;
+ fn.glBindFramebufferEXTFn = Debug_glBindFramebufferEXT;
+ }
+ if (!debug_fn.glBindRenderbufferEXTFn) {
+ debug_fn.glBindRenderbufferEXTFn = fn.glBindRenderbufferEXTFn;
+ fn.glBindRenderbufferEXTFn = Debug_glBindRenderbufferEXT;
+ }
+ if (!debug_fn.glBindSamplerFn) {
+ debug_fn.glBindSamplerFn = fn.glBindSamplerFn;
+ fn.glBindSamplerFn = Debug_glBindSampler;
+ }
+ if (!debug_fn.glBindTextureFn) {
+ debug_fn.glBindTextureFn = fn.glBindTextureFn;
+ fn.glBindTextureFn = Debug_glBindTexture;
+ }
+ if (!debug_fn.glBindTransformFeedbackFn) {
+ debug_fn.glBindTransformFeedbackFn = fn.glBindTransformFeedbackFn;
+ fn.glBindTransformFeedbackFn = Debug_glBindTransformFeedback;
+ }
+ if (!debug_fn.glBindVertexArrayOESFn) {
+ debug_fn.glBindVertexArrayOESFn = fn.glBindVertexArrayOESFn;
+ fn.glBindVertexArrayOESFn = Debug_glBindVertexArrayOES;
+ }
+ if (!debug_fn.glBlendBarrierKHRFn) {
+ debug_fn.glBlendBarrierKHRFn = fn.glBlendBarrierKHRFn;
+ fn.glBlendBarrierKHRFn = Debug_glBlendBarrierKHR;
+ }
+ if (!debug_fn.glBlendColorFn) {
+ debug_fn.glBlendColorFn = fn.glBlendColorFn;
+ fn.glBlendColorFn = Debug_glBlendColor;
+ }
+ if (!debug_fn.glBlendEquationFn) {
+ debug_fn.glBlendEquationFn = fn.glBlendEquationFn;
+ fn.glBlendEquationFn = Debug_glBlendEquation;
+ }
+ if (!debug_fn.glBlendEquationSeparateFn) {
+ debug_fn.glBlendEquationSeparateFn = fn.glBlendEquationSeparateFn;
+ fn.glBlendEquationSeparateFn = Debug_glBlendEquationSeparate;
+ }
+ if (!debug_fn.glBlendFuncFn) {
+ debug_fn.glBlendFuncFn = fn.glBlendFuncFn;
+ fn.glBlendFuncFn = Debug_glBlendFunc;
+ }
+ if (!debug_fn.glBlendFuncSeparateFn) {
+ debug_fn.glBlendFuncSeparateFn = fn.glBlendFuncSeparateFn;
+ fn.glBlendFuncSeparateFn = Debug_glBlendFuncSeparate;
+ }
+ if (!debug_fn.glBlitFramebufferFn) {
+ debug_fn.glBlitFramebufferFn = fn.glBlitFramebufferFn;
+ fn.glBlitFramebufferFn = Debug_glBlitFramebuffer;
+ }
+ if (!debug_fn.glBlitFramebufferANGLEFn) {
+ debug_fn.glBlitFramebufferANGLEFn = fn.glBlitFramebufferANGLEFn;
+ fn.glBlitFramebufferANGLEFn = Debug_glBlitFramebufferANGLE;
+ }
+ if (!debug_fn.glBlitFramebufferEXTFn) {
+ debug_fn.glBlitFramebufferEXTFn = fn.glBlitFramebufferEXTFn;
+ fn.glBlitFramebufferEXTFn = Debug_glBlitFramebufferEXT;
+ }
+ if (!debug_fn.glBufferDataFn) {
+ debug_fn.glBufferDataFn = fn.glBufferDataFn;
+ fn.glBufferDataFn = Debug_glBufferData;
+ }
+ if (!debug_fn.glBufferSubDataFn) {
+ debug_fn.glBufferSubDataFn = fn.glBufferSubDataFn;
+ fn.glBufferSubDataFn = Debug_glBufferSubData;
+ }
+ if (!debug_fn.glCheckFramebufferStatusEXTFn) {
+ debug_fn.glCheckFramebufferStatusEXTFn = fn.glCheckFramebufferStatusEXTFn;
+ fn.glCheckFramebufferStatusEXTFn = Debug_glCheckFramebufferStatusEXT;
+ }
+ if (!debug_fn.glClearFn) {
+ debug_fn.glClearFn = fn.glClearFn;
+ fn.glClearFn = Debug_glClear;
+ }
+ if (!debug_fn.glClearBufferfiFn) {
+ debug_fn.glClearBufferfiFn = fn.glClearBufferfiFn;
+ fn.glClearBufferfiFn = Debug_glClearBufferfi;
+ }
+ if (!debug_fn.glClearBufferfvFn) {
+ debug_fn.glClearBufferfvFn = fn.glClearBufferfvFn;
+ fn.glClearBufferfvFn = Debug_glClearBufferfv;
+ }
+ if (!debug_fn.glClearBufferivFn) {
+ debug_fn.glClearBufferivFn = fn.glClearBufferivFn;
+ fn.glClearBufferivFn = Debug_glClearBufferiv;
+ }
+ if (!debug_fn.glClearBufferuivFn) {
+ debug_fn.glClearBufferuivFn = fn.glClearBufferuivFn;
+ fn.glClearBufferuivFn = Debug_glClearBufferuiv;
+ }
+ if (!debug_fn.glClearColorFn) {
+ debug_fn.glClearColorFn = fn.glClearColorFn;
+ fn.glClearColorFn = Debug_glClearColor;
+ }
+ if (!debug_fn.glClearDepthFn) {
+ debug_fn.glClearDepthFn = fn.glClearDepthFn;
+ fn.glClearDepthFn = Debug_glClearDepth;
+ }
+ if (!debug_fn.glClearDepthfFn) {
+ debug_fn.glClearDepthfFn = fn.glClearDepthfFn;
+ fn.glClearDepthfFn = Debug_glClearDepthf;
+ }
+ if (!debug_fn.glClearStencilFn) {
+ debug_fn.glClearStencilFn = fn.glClearStencilFn;
+ fn.glClearStencilFn = Debug_glClearStencil;
+ }
+ if (!debug_fn.glClientWaitSyncFn) {
+ debug_fn.glClientWaitSyncFn = fn.glClientWaitSyncFn;
+ fn.glClientWaitSyncFn = Debug_glClientWaitSync;
+ }
+ if (!debug_fn.glColorMaskFn) {
+ debug_fn.glColorMaskFn = fn.glColorMaskFn;
+ fn.glColorMaskFn = Debug_glColorMask;
+ }
+ if (!debug_fn.glCompileShaderFn) {
+ debug_fn.glCompileShaderFn = fn.glCompileShaderFn;
+ fn.glCompileShaderFn = Debug_glCompileShader;
+ }
+ if (!debug_fn.glCompressedTexImage2DFn) {
+ debug_fn.glCompressedTexImage2DFn = fn.glCompressedTexImage2DFn;
+ fn.glCompressedTexImage2DFn = Debug_glCompressedTexImage2D;
+ }
+ if (!debug_fn.glCompressedTexImage3DFn) {
+ debug_fn.glCompressedTexImage3DFn = fn.glCompressedTexImage3DFn;
+ fn.glCompressedTexImage3DFn = Debug_glCompressedTexImage3D;
+ }
+ if (!debug_fn.glCompressedTexSubImage2DFn) {
+ debug_fn.glCompressedTexSubImage2DFn = fn.glCompressedTexSubImage2DFn;
+ fn.glCompressedTexSubImage2DFn = Debug_glCompressedTexSubImage2D;
+ }
+ if (!debug_fn.glCopyBufferSubDataFn) {
+ debug_fn.glCopyBufferSubDataFn = fn.glCopyBufferSubDataFn;
+ fn.glCopyBufferSubDataFn = Debug_glCopyBufferSubData;
+ }
+ if (!debug_fn.glCopyTexImage2DFn) {
+ debug_fn.glCopyTexImage2DFn = fn.glCopyTexImage2DFn;
+ fn.glCopyTexImage2DFn = Debug_glCopyTexImage2D;
+ }
+ if (!debug_fn.glCopyTexSubImage2DFn) {
+ debug_fn.glCopyTexSubImage2DFn = fn.glCopyTexSubImage2DFn;
+ fn.glCopyTexSubImage2DFn = Debug_glCopyTexSubImage2D;
+ }
+ if (!debug_fn.glCopyTexSubImage3DFn) {
+ debug_fn.glCopyTexSubImage3DFn = fn.glCopyTexSubImage3DFn;
+ fn.glCopyTexSubImage3DFn = Debug_glCopyTexSubImage3D;
+ }
+ if (!debug_fn.glCreateProgramFn) {
+ debug_fn.glCreateProgramFn = fn.glCreateProgramFn;
+ fn.glCreateProgramFn = Debug_glCreateProgram;
+ }
+ if (!debug_fn.glCreateShaderFn) {
+ debug_fn.glCreateShaderFn = fn.glCreateShaderFn;
+ fn.glCreateShaderFn = Debug_glCreateShader;
+ }
+ if (!debug_fn.glCullFaceFn) {
+ debug_fn.glCullFaceFn = fn.glCullFaceFn;
+ fn.glCullFaceFn = Debug_glCullFace;
+ }
+ if (!debug_fn.glDeleteBuffersARBFn) {
+ debug_fn.glDeleteBuffersARBFn = fn.glDeleteBuffersARBFn;
+ fn.glDeleteBuffersARBFn = Debug_glDeleteBuffersARB;
+ }
+ if (!debug_fn.glDeleteFencesAPPLEFn) {
+ debug_fn.glDeleteFencesAPPLEFn = fn.glDeleteFencesAPPLEFn;
+ fn.glDeleteFencesAPPLEFn = Debug_glDeleteFencesAPPLE;
+ }
+ if (!debug_fn.glDeleteFencesNVFn) {
+ debug_fn.glDeleteFencesNVFn = fn.glDeleteFencesNVFn;
+ fn.glDeleteFencesNVFn = Debug_glDeleteFencesNV;
+ }
+ if (!debug_fn.glDeleteFramebuffersEXTFn) {
+ debug_fn.glDeleteFramebuffersEXTFn = fn.glDeleteFramebuffersEXTFn;
+ fn.glDeleteFramebuffersEXTFn = Debug_glDeleteFramebuffersEXT;
+ }
+ if (!debug_fn.glDeleteProgramFn) {
+ debug_fn.glDeleteProgramFn = fn.glDeleteProgramFn;
+ fn.glDeleteProgramFn = Debug_glDeleteProgram;
+ }
+ if (!debug_fn.glDeleteQueriesFn) {
+ 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;
+ }
+ if (!debug_fn.glDeleteSamplersFn) {
+ debug_fn.glDeleteSamplersFn = fn.glDeleteSamplersFn;
+ fn.glDeleteSamplersFn = Debug_glDeleteSamplers;
+ }
+ if (!debug_fn.glDeleteShaderFn) {
+ debug_fn.glDeleteShaderFn = fn.glDeleteShaderFn;
+ fn.glDeleteShaderFn = Debug_glDeleteShader;
+ }
+ if (!debug_fn.glDeleteSyncFn) {
+ debug_fn.glDeleteSyncFn = fn.glDeleteSyncFn;
+ fn.glDeleteSyncFn = Debug_glDeleteSync;
+ }
+ if (!debug_fn.glDeleteTexturesFn) {
+ debug_fn.glDeleteTexturesFn = fn.glDeleteTexturesFn;
+ fn.glDeleteTexturesFn = Debug_glDeleteTextures;
+ }
+ if (!debug_fn.glDeleteTransformFeedbacksFn) {
+ debug_fn.glDeleteTransformFeedbacksFn = fn.glDeleteTransformFeedbacksFn;
+ fn.glDeleteTransformFeedbacksFn = Debug_glDeleteTransformFeedbacks;
+ }
+ if (!debug_fn.glDeleteVertexArraysOESFn) {
+ debug_fn.glDeleteVertexArraysOESFn = fn.glDeleteVertexArraysOESFn;
+ fn.glDeleteVertexArraysOESFn = Debug_glDeleteVertexArraysOES;
+ }
+ if (!debug_fn.glDepthFuncFn) {
+ debug_fn.glDepthFuncFn = fn.glDepthFuncFn;
+ fn.glDepthFuncFn = Debug_glDepthFunc;
+ }
+ if (!debug_fn.glDepthMaskFn) {
+ debug_fn.glDepthMaskFn = fn.glDepthMaskFn;
+ fn.glDepthMaskFn = Debug_glDepthMask;
+ }
+ if (!debug_fn.glDepthRangeFn) {
+ debug_fn.glDepthRangeFn = fn.glDepthRangeFn;
+ fn.glDepthRangeFn = Debug_glDepthRange;
+ }
+ if (!debug_fn.glDepthRangefFn) {
+ debug_fn.glDepthRangefFn = fn.glDepthRangefFn;
+ fn.glDepthRangefFn = Debug_glDepthRangef;
+ }
+ if (!debug_fn.glDetachShaderFn) {
+ debug_fn.glDetachShaderFn = fn.glDetachShaderFn;
+ fn.glDetachShaderFn = Debug_glDetachShader;
+ }
+ if (!debug_fn.glDisableFn) {
+ debug_fn.glDisableFn = fn.glDisableFn;
+ fn.glDisableFn = Debug_glDisable;
+ }
+ if (!debug_fn.glDisableVertexAttribArrayFn) {
+ debug_fn.glDisableVertexAttribArrayFn = fn.glDisableVertexAttribArrayFn;
+ fn.glDisableVertexAttribArrayFn = Debug_glDisableVertexAttribArray;
+ }
+ if (!debug_fn.glDiscardFramebufferEXTFn) {
+ debug_fn.glDiscardFramebufferEXTFn = fn.glDiscardFramebufferEXTFn;
+ fn.glDiscardFramebufferEXTFn = Debug_glDiscardFramebufferEXT;
+ }
+ if (!debug_fn.glDrawArraysFn) {
+ debug_fn.glDrawArraysFn = fn.glDrawArraysFn;
+ fn.glDrawArraysFn = Debug_glDrawArrays;
+ }
+ if (!debug_fn.glDrawArraysInstancedANGLEFn) {
+ debug_fn.glDrawArraysInstancedANGLEFn = fn.glDrawArraysInstancedANGLEFn;
+ fn.glDrawArraysInstancedANGLEFn = Debug_glDrawArraysInstancedANGLE;
+ }
+ if (!debug_fn.glDrawBufferFn) {
+ debug_fn.glDrawBufferFn = fn.glDrawBufferFn;
+ fn.glDrawBufferFn = Debug_glDrawBuffer;
+ }
+ if (!debug_fn.glDrawBuffersARBFn) {
+ debug_fn.glDrawBuffersARBFn = fn.glDrawBuffersARBFn;
+ fn.glDrawBuffersARBFn = Debug_glDrawBuffersARB;
+ }
+ if (!debug_fn.glDrawElementsFn) {
+ debug_fn.glDrawElementsFn = fn.glDrawElementsFn;
+ fn.glDrawElementsFn = Debug_glDrawElements;
+ }
+ if (!debug_fn.glDrawElementsInstancedANGLEFn) {
+ debug_fn.glDrawElementsInstancedANGLEFn = fn.glDrawElementsInstancedANGLEFn;
+ fn.glDrawElementsInstancedANGLEFn = Debug_glDrawElementsInstancedANGLE;
+ }
+ if (!debug_fn.glDrawRangeElementsFn) {
+ debug_fn.glDrawRangeElementsFn = fn.glDrawRangeElementsFn;
+ fn.glDrawRangeElementsFn = Debug_glDrawRangeElements;
+ }
+ if (!debug_fn.glEGLImageTargetRenderbufferStorageOESFn) {
+ debug_fn.glEGLImageTargetRenderbufferStorageOESFn =
+ fn.glEGLImageTargetRenderbufferStorageOESFn;
+ fn.glEGLImageTargetRenderbufferStorageOESFn =
+ Debug_glEGLImageTargetRenderbufferStorageOES;
+ }
+ if (!debug_fn.glEGLImageTargetTexture2DOESFn) {
+ debug_fn.glEGLImageTargetTexture2DOESFn = fn.glEGLImageTargetTexture2DOESFn;
+ fn.glEGLImageTargetTexture2DOESFn = Debug_glEGLImageTargetTexture2DOES;
+ }
+ if (!debug_fn.glEnableFn) {
+ debug_fn.glEnableFn = fn.glEnableFn;
+ fn.glEnableFn = Debug_glEnable;
+ }
+ if (!debug_fn.glEnableVertexAttribArrayFn) {
+ debug_fn.glEnableVertexAttribArrayFn = fn.glEnableVertexAttribArrayFn;
+ fn.glEnableVertexAttribArrayFn = Debug_glEnableVertexAttribArray;
+ }
+ if (!debug_fn.glEndQueryFn) {
+ 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;
+ }
+ if (!debug_fn.glFenceSyncFn) {
+ debug_fn.glFenceSyncFn = fn.glFenceSyncFn;
+ fn.glFenceSyncFn = Debug_glFenceSync;
+ }
+ if (!debug_fn.glFinishFn) {
+ debug_fn.glFinishFn = fn.glFinishFn;
+ fn.glFinishFn = Debug_glFinish;
+ }
+ if (!debug_fn.glFinishFenceAPPLEFn) {
+ debug_fn.glFinishFenceAPPLEFn = fn.glFinishFenceAPPLEFn;
+ fn.glFinishFenceAPPLEFn = Debug_glFinishFenceAPPLE;
+ }
+ if (!debug_fn.glFinishFenceNVFn) {
+ debug_fn.glFinishFenceNVFn = fn.glFinishFenceNVFn;
+ fn.glFinishFenceNVFn = Debug_glFinishFenceNV;
+ }
+ if (!debug_fn.glFlushFn) {
+ debug_fn.glFlushFn = fn.glFlushFn;
+ fn.glFlushFn = Debug_glFlush;
+ }
+ if (!debug_fn.glFlushMappedBufferRangeFn) {
+ debug_fn.glFlushMappedBufferRangeFn = fn.glFlushMappedBufferRangeFn;
+ fn.glFlushMappedBufferRangeFn = Debug_glFlushMappedBufferRange;
+ }
+ if (!debug_fn.glFramebufferRenderbufferEXTFn) {
+ debug_fn.glFramebufferRenderbufferEXTFn = fn.glFramebufferRenderbufferEXTFn;
+ fn.glFramebufferRenderbufferEXTFn = Debug_glFramebufferRenderbufferEXT;
+ }
+ if (!debug_fn.glFramebufferTexture2DEXTFn) {
+ debug_fn.glFramebufferTexture2DEXTFn = fn.glFramebufferTexture2DEXTFn;
+ fn.glFramebufferTexture2DEXTFn = Debug_glFramebufferTexture2DEXT;
+ }
+ if (!debug_fn.glFramebufferTexture2DMultisampleEXTFn) {
+ debug_fn.glFramebufferTexture2DMultisampleEXTFn =
+ fn.glFramebufferTexture2DMultisampleEXTFn;
+ fn.glFramebufferTexture2DMultisampleEXTFn =
+ Debug_glFramebufferTexture2DMultisampleEXT;
+ }
+ if (!debug_fn.glFramebufferTexture2DMultisampleIMGFn) {
+ debug_fn.glFramebufferTexture2DMultisampleIMGFn =
+ fn.glFramebufferTexture2DMultisampleIMGFn;
+ fn.glFramebufferTexture2DMultisampleIMGFn =
+ Debug_glFramebufferTexture2DMultisampleIMG;
+ }
+ if (!debug_fn.glFramebufferTextureLayerFn) {
+ debug_fn.glFramebufferTextureLayerFn = fn.glFramebufferTextureLayerFn;
+ fn.glFramebufferTextureLayerFn = Debug_glFramebufferTextureLayer;
+ }
+ if (!debug_fn.glFrontFaceFn) {
+ debug_fn.glFrontFaceFn = fn.glFrontFaceFn;
+ fn.glFrontFaceFn = Debug_glFrontFace;
+ }
+ if (!debug_fn.glGenBuffersARBFn) {
+ debug_fn.glGenBuffersARBFn = fn.glGenBuffersARBFn;
+ fn.glGenBuffersARBFn = Debug_glGenBuffersARB;
+ }
+ if (!debug_fn.glGenerateMipmapEXTFn) {
+ debug_fn.glGenerateMipmapEXTFn = fn.glGenerateMipmapEXTFn;
+ fn.glGenerateMipmapEXTFn = Debug_glGenerateMipmapEXT;
+ }
+ if (!debug_fn.glGenFencesAPPLEFn) {
+ debug_fn.glGenFencesAPPLEFn = fn.glGenFencesAPPLEFn;
+ fn.glGenFencesAPPLEFn = Debug_glGenFencesAPPLE;
+ }
+ if (!debug_fn.glGenFencesNVFn) {
+ debug_fn.glGenFencesNVFn = fn.glGenFencesNVFn;
+ fn.glGenFencesNVFn = Debug_glGenFencesNV;
+ }
+ if (!debug_fn.glGenFramebuffersEXTFn) {
+ debug_fn.glGenFramebuffersEXTFn = fn.glGenFramebuffersEXTFn;
+ fn.glGenFramebuffersEXTFn = Debug_glGenFramebuffersEXT;
+ }
+ if (!debug_fn.glGenQueriesFn) {
+ 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;
+ }
+ if (!debug_fn.glGenSamplersFn) {
+ debug_fn.glGenSamplersFn = fn.glGenSamplersFn;
+ fn.glGenSamplersFn = Debug_glGenSamplers;
+ }
+ if (!debug_fn.glGenTexturesFn) {
+ debug_fn.glGenTexturesFn = fn.glGenTexturesFn;
+ fn.glGenTexturesFn = Debug_glGenTextures;
+ }
+ if (!debug_fn.glGenTransformFeedbacksFn) {
+ debug_fn.glGenTransformFeedbacksFn = fn.glGenTransformFeedbacksFn;
+ fn.glGenTransformFeedbacksFn = Debug_glGenTransformFeedbacks;
+ }
+ if (!debug_fn.glGenVertexArraysOESFn) {
+ debug_fn.glGenVertexArraysOESFn = fn.glGenVertexArraysOESFn;
+ fn.glGenVertexArraysOESFn = Debug_glGenVertexArraysOES;
+ }
+ if (!debug_fn.glGetActiveAttribFn) {
+ debug_fn.glGetActiveAttribFn = fn.glGetActiveAttribFn;
+ fn.glGetActiveAttribFn = Debug_glGetActiveAttrib;
+ }
+ if (!debug_fn.glGetActiveUniformFn) {
+ debug_fn.glGetActiveUniformFn = fn.glGetActiveUniformFn;
+ fn.glGetActiveUniformFn = Debug_glGetActiveUniform;
+ }
+ if (!debug_fn.glGetActiveUniformBlockivFn) {
+ debug_fn.glGetActiveUniformBlockivFn = fn.glGetActiveUniformBlockivFn;
+ fn.glGetActiveUniformBlockivFn = Debug_glGetActiveUniformBlockiv;
+ }
+ if (!debug_fn.glGetActiveUniformBlockNameFn) {
+ debug_fn.glGetActiveUniformBlockNameFn = fn.glGetActiveUniformBlockNameFn;
+ fn.glGetActiveUniformBlockNameFn = Debug_glGetActiveUniformBlockName;
+ }
+ if (!debug_fn.glGetActiveUniformsivFn) {
+ debug_fn.glGetActiveUniformsivFn = fn.glGetActiveUniformsivFn;
+ fn.glGetActiveUniformsivFn = Debug_glGetActiveUniformsiv;
+ }
+ if (!debug_fn.glGetAttachedShadersFn) {
+ debug_fn.glGetAttachedShadersFn = fn.glGetAttachedShadersFn;
+ fn.glGetAttachedShadersFn = Debug_glGetAttachedShaders;
+ }
+ if (!debug_fn.glGetAttribLocationFn) {
+ debug_fn.glGetAttribLocationFn = fn.glGetAttribLocationFn;
+ fn.glGetAttribLocationFn = Debug_glGetAttribLocation;
+ }
+ if (!debug_fn.glGetBooleanvFn) {
+ debug_fn.glGetBooleanvFn = fn.glGetBooleanvFn;
+ fn.glGetBooleanvFn = Debug_glGetBooleanv;
+ }
+ if (!debug_fn.glGetBufferParameterivFn) {
+ debug_fn.glGetBufferParameterivFn = fn.glGetBufferParameterivFn;
+ fn.glGetBufferParameterivFn = Debug_glGetBufferParameteriv;
+ }
+ if (!debug_fn.glGetErrorFn) {
+ debug_fn.glGetErrorFn = fn.glGetErrorFn;
+ fn.glGetErrorFn = Debug_glGetError;
+ }
+ if (!debug_fn.glGetFenceivNVFn) {
+ debug_fn.glGetFenceivNVFn = fn.glGetFenceivNVFn;
+ fn.glGetFenceivNVFn = Debug_glGetFenceivNV;
+ }
+ if (!debug_fn.glGetFloatvFn) {
+ debug_fn.glGetFloatvFn = fn.glGetFloatvFn;
+ fn.glGetFloatvFn = Debug_glGetFloatv;
+ }
+ if (!debug_fn.glGetFragDataLocationFn) {
+ debug_fn.glGetFragDataLocationFn = fn.glGetFragDataLocationFn;
+ fn.glGetFragDataLocationFn = Debug_glGetFragDataLocation;
+ }
+ if (!debug_fn.glGetFramebufferAttachmentParameterivEXTFn) {
+ debug_fn.glGetFramebufferAttachmentParameterivEXTFn =
+ fn.glGetFramebufferAttachmentParameterivEXTFn;
+ fn.glGetFramebufferAttachmentParameterivEXTFn =
+ Debug_glGetFramebufferAttachmentParameterivEXT;
+ }
+ if (!debug_fn.glGetGraphicsResetStatusARBFn) {
+ debug_fn.glGetGraphicsResetStatusARBFn = fn.glGetGraphicsResetStatusARBFn;
+ fn.glGetGraphicsResetStatusARBFn = Debug_glGetGraphicsResetStatusARB;
+ }
+ if (!debug_fn.glGetInteger64i_vFn) {
+ debug_fn.glGetInteger64i_vFn = fn.glGetInteger64i_vFn;
+ fn.glGetInteger64i_vFn = Debug_glGetInteger64i_v;
+ }
+ if (!debug_fn.glGetInteger64vFn) {
+ debug_fn.glGetInteger64vFn = fn.glGetInteger64vFn;
+ fn.glGetInteger64vFn = Debug_glGetInteger64v;
+ }
+ if (!debug_fn.glGetIntegeri_vFn) {
+ debug_fn.glGetIntegeri_vFn = fn.glGetIntegeri_vFn;
+ fn.glGetIntegeri_vFn = Debug_glGetIntegeri_v;
+ }
+ if (!debug_fn.glGetIntegervFn) {
+ debug_fn.glGetIntegervFn = fn.glGetIntegervFn;
+ fn.glGetIntegervFn = Debug_glGetIntegerv;
+ }
+ if (!debug_fn.glGetInternalformativFn) {
+ debug_fn.glGetInternalformativFn = fn.glGetInternalformativFn;
+ fn.glGetInternalformativFn = Debug_glGetInternalformativ;
+ }
+ if (!debug_fn.glGetProgramBinaryFn) {
+ debug_fn.glGetProgramBinaryFn = fn.glGetProgramBinaryFn;
+ fn.glGetProgramBinaryFn = Debug_glGetProgramBinary;
+ }
+ if (!debug_fn.glGetProgramInfoLogFn) {
+ debug_fn.glGetProgramInfoLogFn = fn.glGetProgramInfoLogFn;
+ fn.glGetProgramInfoLogFn = Debug_glGetProgramInfoLog;
+ }
+ if (!debug_fn.glGetProgramivFn) {
+ debug_fn.glGetProgramivFn = fn.glGetProgramivFn;
+ fn.glGetProgramivFn = Debug_glGetProgramiv;
+ }
+ if (!debug_fn.glGetQueryivFn) {
+ 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;
+ }
+ if (!debug_fn.glGetQueryObjectivFn) {
+ 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;
+ }
+ if (!debug_fn.glGetQueryObjectuivFn) {
+ 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;
+ fn.glGetRenderbufferParameterivEXTFn =
+ Debug_glGetRenderbufferParameterivEXT;
+ }
+ if (!debug_fn.glGetSamplerParameterfvFn) {
+ debug_fn.glGetSamplerParameterfvFn = fn.glGetSamplerParameterfvFn;
+ fn.glGetSamplerParameterfvFn = Debug_glGetSamplerParameterfv;
+ }
+ if (!debug_fn.glGetSamplerParameterivFn) {
+ debug_fn.glGetSamplerParameterivFn = fn.glGetSamplerParameterivFn;
+ fn.glGetSamplerParameterivFn = Debug_glGetSamplerParameteriv;
+ }
+ if (!debug_fn.glGetShaderInfoLogFn) {
+ debug_fn.glGetShaderInfoLogFn = fn.glGetShaderInfoLogFn;
+ fn.glGetShaderInfoLogFn = Debug_glGetShaderInfoLog;
+ }
+ if (!debug_fn.glGetShaderivFn) {
+ debug_fn.glGetShaderivFn = fn.glGetShaderivFn;
+ fn.glGetShaderivFn = Debug_glGetShaderiv;
+ }
+ if (!debug_fn.glGetShaderPrecisionFormatFn) {
+ debug_fn.glGetShaderPrecisionFormatFn = fn.glGetShaderPrecisionFormatFn;
+ fn.glGetShaderPrecisionFormatFn = Debug_glGetShaderPrecisionFormat;
+ }
+ if (!debug_fn.glGetShaderSourceFn) {
+ debug_fn.glGetShaderSourceFn = fn.glGetShaderSourceFn;
+ fn.glGetShaderSourceFn = Debug_glGetShaderSource;
+ }
+ if (!debug_fn.glGetStringFn) {
+ debug_fn.glGetStringFn = fn.glGetStringFn;
+ fn.glGetStringFn = Debug_glGetString;
+ }
+ if (!debug_fn.glGetSyncivFn) {
+ debug_fn.glGetSyncivFn = fn.glGetSyncivFn;
+ fn.glGetSyncivFn = Debug_glGetSynciv;
+ }
+ if (!debug_fn.glGetTexLevelParameterfvFn) {
+ debug_fn.glGetTexLevelParameterfvFn = fn.glGetTexLevelParameterfvFn;
+ fn.glGetTexLevelParameterfvFn = Debug_glGetTexLevelParameterfv;
+ }
+ if (!debug_fn.glGetTexLevelParameterivFn) {
+ debug_fn.glGetTexLevelParameterivFn = fn.glGetTexLevelParameterivFn;
+ fn.glGetTexLevelParameterivFn = Debug_glGetTexLevelParameteriv;
+ }
+ if (!debug_fn.glGetTexParameterfvFn) {
+ debug_fn.glGetTexParameterfvFn = fn.glGetTexParameterfvFn;
+ fn.glGetTexParameterfvFn = Debug_glGetTexParameterfv;
+ }
+ if (!debug_fn.glGetTexParameterivFn) {
+ debug_fn.glGetTexParameterivFn = fn.glGetTexParameterivFn;
+ fn.glGetTexParameterivFn = Debug_glGetTexParameteriv;
+ }
+ if (!debug_fn.glGetTransformFeedbackVaryingFn) {
+ debug_fn.glGetTransformFeedbackVaryingFn =
+ fn.glGetTransformFeedbackVaryingFn;
+ fn.glGetTransformFeedbackVaryingFn = Debug_glGetTransformFeedbackVarying;
+ }
+ if (!debug_fn.glGetTranslatedShaderSourceANGLEFn) {
+ debug_fn.glGetTranslatedShaderSourceANGLEFn =
+ fn.glGetTranslatedShaderSourceANGLEFn;
+ fn.glGetTranslatedShaderSourceANGLEFn =
+ Debug_glGetTranslatedShaderSourceANGLE;
+ }
+ if (!debug_fn.glGetUniformBlockIndexFn) {
+ debug_fn.glGetUniformBlockIndexFn = fn.glGetUniformBlockIndexFn;
+ fn.glGetUniformBlockIndexFn = Debug_glGetUniformBlockIndex;
+ }
+ if (!debug_fn.glGetUniformfvFn) {
+ debug_fn.glGetUniformfvFn = fn.glGetUniformfvFn;
+ fn.glGetUniformfvFn = Debug_glGetUniformfv;
+ }
+ if (!debug_fn.glGetUniformIndicesFn) {
+ debug_fn.glGetUniformIndicesFn = fn.glGetUniformIndicesFn;
+ fn.glGetUniformIndicesFn = Debug_glGetUniformIndices;
+ }
+ if (!debug_fn.glGetUniformivFn) {
+ debug_fn.glGetUniformivFn = fn.glGetUniformivFn;
+ fn.glGetUniformivFn = Debug_glGetUniformiv;
+ }
+ if (!debug_fn.glGetUniformLocationFn) {
+ debug_fn.glGetUniformLocationFn = fn.glGetUniformLocationFn;
+ fn.glGetUniformLocationFn = Debug_glGetUniformLocation;
+ }
+ if (!debug_fn.glGetVertexAttribfvFn) {
+ debug_fn.glGetVertexAttribfvFn = fn.glGetVertexAttribfvFn;
+ fn.glGetVertexAttribfvFn = Debug_glGetVertexAttribfv;
+ }
+ if (!debug_fn.glGetVertexAttribivFn) {
+ debug_fn.glGetVertexAttribivFn = fn.glGetVertexAttribivFn;
+ fn.glGetVertexAttribivFn = Debug_glGetVertexAttribiv;
+ }
+ if (!debug_fn.glGetVertexAttribPointervFn) {
+ debug_fn.glGetVertexAttribPointervFn = fn.glGetVertexAttribPointervFn;
+ fn.glGetVertexAttribPointervFn = Debug_glGetVertexAttribPointerv;
+ }
+ if (!debug_fn.glHintFn) {
+ debug_fn.glHintFn = fn.glHintFn;
+ fn.glHintFn = Debug_glHint;
+ }
+ if (!debug_fn.glInsertEventMarkerEXTFn) {
+ debug_fn.glInsertEventMarkerEXTFn = fn.glInsertEventMarkerEXTFn;
+ fn.glInsertEventMarkerEXTFn = Debug_glInsertEventMarkerEXT;
+ }
+ if (!debug_fn.glInvalidateFramebufferFn) {
+ debug_fn.glInvalidateFramebufferFn = fn.glInvalidateFramebufferFn;
+ fn.glInvalidateFramebufferFn = Debug_glInvalidateFramebuffer;
+ }
+ if (!debug_fn.glInvalidateSubFramebufferFn) {
+ debug_fn.glInvalidateSubFramebufferFn = fn.glInvalidateSubFramebufferFn;
+ fn.glInvalidateSubFramebufferFn = Debug_glInvalidateSubFramebuffer;
+ }
+ if (!debug_fn.glIsBufferFn) {
+ debug_fn.glIsBufferFn = fn.glIsBufferFn;
+ fn.glIsBufferFn = Debug_glIsBuffer;
+ }
+ if (!debug_fn.glIsEnabledFn) {
+ debug_fn.glIsEnabledFn = fn.glIsEnabledFn;
+ fn.glIsEnabledFn = Debug_glIsEnabled;
+ }
+ if (!debug_fn.glIsFenceAPPLEFn) {
+ debug_fn.glIsFenceAPPLEFn = fn.glIsFenceAPPLEFn;
+ fn.glIsFenceAPPLEFn = Debug_glIsFenceAPPLE;
+ }
+ if (!debug_fn.glIsFenceNVFn) {
+ debug_fn.glIsFenceNVFn = fn.glIsFenceNVFn;
+ fn.glIsFenceNVFn = Debug_glIsFenceNV;
+ }
+ if (!debug_fn.glIsFramebufferEXTFn) {
+ debug_fn.glIsFramebufferEXTFn = fn.glIsFramebufferEXTFn;
+ fn.glIsFramebufferEXTFn = Debug_glIsFramebufferEXT;
+ }
+ if (!debug_fn.glIsProgramFn) {
+ debug_fn.glIsProgramFn = fn.glIsProgramFn;
+ fn.glIsProgramFn = Debug_glIsProgram;
+ }
+ if (!debug_fn.glIsQueryFn) {
+ 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;
+ }
+ if (!debug_fn.glIsSamplerFn) {
+ debug_fn.glIsSamplerFn = fn.glIsSamplerFn;
+ fn.glIsSamplerFn = Debug_glIsSampler;
+ }
+ if (!debug_fn.glIsShaderFn) {
+ debug_fn.glIsShaderFn = fn.glIsShaderFn;
+ fn.glIsShaderFn = Debug_glIsShader;
+ }
+ if (!debug_fn.glIsSyncFn) {
+ debug_fn.glIsSyncFn = fn.glIsSyncFn;
+ fn.glIsSyncFn = Debug_glIsSync;
+ }
+ if (!debug_fn.glIsTextureFn) {
+ debug_fn.glIsTextureFn = fn.glIsTextureFn;
+ fn.glIsTextureFn = Debug_glIsTexture;
+ }
+ if (!debug_fn.glIsTransformFeedbackFn) {
+ debug_fn.glIsTransformFeedbackFn = fn.glIsTransformFeedbackFn;
+ fn.glIsTransformFeedbackFn = Debug_glIsTransformFeedback;
+ }
+ if (!debug_fn.glIsVertexArrayOESFn) {
+ debug_fn.glIsVertexArrayOESFn = fn.glIsVertexArrayOESFn;
+ fn.glIsVertexArrayOESFn = Debug_glIsVertexArrayOES;
+ }
+ if (!debug_fn.glLineWidthFn) {
+ debug_fn.glLineWidthFn = fn.glLineWidthFn;
+ fn.glLineWidthFn = Debug_glLineWidth;
+ }
+ if (!debug_fn.glLinkProgramFn) {
+ debug_fn.glLinkProgramFn = fn.glLinkProgramFn;
+ fn.glLinkProgramFn = Debug_glLinkProgram;
+ }
+ if (!debug_fn.glMapBufferFn) {
+ debug_fn.glMapBufferFn = fn.glMapBufferFn;
+ fn.glMapBufferFn = Debug_glMapBuffer;
+ }
+ if (!debug_fn.glMapBufferRangeFn) {
+ debug_fn.glMapBufferRangeFn = fn.glMapBufferRangeFn;
+ fn.glMapBufferRangeFn = Debug_glMapBufferRange;
+ }
+ if (!debug_fn.glMatrixLoadfEXTFn) {
+ debug_fn.glMatrixLoadfEXTFn = fn.glMatrixLoadfEXTFn;
+ fn.glMatrixLoadfEXTFn = Debug_glMatrixLoadfEXT;
+ }
+ if (!debug_fn.glMatrixLoadIdentityEXTFn) {
+ debug_fn.glMatrixLoadIdentityEXTFn = fn.glMatrixLoadIdentityEXTFn;
+ fn.glMatrixLoadIdentityEXTFn = Debug_glMatrixLoadIdentityEXT;
+ }
+ if (!debug_fn.glPauseTransformFeedbackFn) {
+ debug_fn.glPauseTransformFeedbackFn = fn.glPauseTransformFeedbackFn;
+ fn.glPauseTransformFeedbackFn = Debug_glPauseTransformFeedback;
+ }
+ if (!debug_fn.glPixelStoreiFn) {
+ debug_fn.glPixelStoreiFn = fn.glPixelStoreiFn;
+ fn.glPixelStoreiFn = Debug_glPixelStorei;
+ }
+ if (!debug_fn.glPointParameteriFn) {
+ debug_fn.glPointParameteriFn = fn.glPointParameteriFn;
+ fn.glPointParameteriFn = Debug_glPointParameteri;
+ }
+ if (!debug_fn.glPolygonOffsetFn) {
+ debug_fn.glPolygonOffsetFn = fn.glPolygonOffsetFn;
+ fn.glPolygonOffsetFn = Debug_glPolygonOffset;
+ }
+ if (!debug_fn.glPopGroupMarkerEXTFn) {
+ debug_fn.glPopGroupMarkerEXTFn = fn.glPopGroupMarkerEXTFn;
+ fn.glPopGroupMarkerEXTFn = Debug_glPopGroupMarkerEXT;
+ }
+ if (!debug_fn.glProgramBinaryFn) {
+ debug_fn.glProgramBinaryFn = fn.glProgramBinaryFn;
+ fn.glProgramBinaryFn = Debug_glProgramBinary;
+ }
+ if (!debug_fn.glProgramParameteriFn) {
+ debug_fn.glProgramParameteriFn = fn.glProgramParameteriFn;
+ fn.glProgramParameteriFn = Debug_glProgramParameteri;
+ }
+ if (!debug_fn.glPushGroupMarkerEXTFn) {
+ debug_fn.glPushGroupMarkerEXTFn = fn.glPushGroupMarkerEXTFn;
+ fn.glPushGroupMarkerEXTFn = Debug_glPushGroupMarkerEXT;
+ }
+ if (!debug_fn.glQueryCounterFn) {
+ debug_fn.glQueryCounterFn = fn.glQueryCounterFn;
+ fn.glQueryCounterFn = Debug_glQueryCounter;
+ }
+ if (!debug_fn.glReadBufferFn) {
+ debug_fn.glReadBufferFn = fn.glReadBufferFn;
+ fn.glReadBufferFn = Debug_glReadBuffer;
+ }
+ if (!debug_fn.glReadPixelsFn) {
+ debug_fn.glReadPixelsFn = fn.glReadPixelsFn;
+ fn.glReadPixelsFn = Debug_glReadPixels;
+ }
+ if (!debug_fn.glReleaseShaderCompilerFn) {
+ debug_fn.glReleaseShaderCompilerFn = fn.glReleaseShaderCompilerFn;
+ fn.glReleaseShaderCompilerFn = Debug_glReleaseShaderCompiler;
+ }
+ if (!debug_fn.glRenderbufferStorageEXTFn) {
+ debug_fn.glRenderbufferStorageEXTFn = fn.glRenderbufferStorageEXTFn;
+ fn.glRenderbufferStorageEXTFn = Debug_glRenderbufferStorageEXT;
+ }
+ if (!debug_fn.glRenderbufferStorageMultisampleFn) {
+ debug_fn.glRenderbufferStorageMultisampleFn =
+ fn.glRenderbufferStorageMultisampleFn;
+ fn.glRenderbufferStorageMultisampleFn =
+ Debug_glRenderbufferStorageMultisample;
+ }
+ if (!debug_fn.glRenderbufferStorageMultisampleANGLEFn) {
+ debug_fn.glRenderbufferStorageMultisampleANGLEFn =
+ fn.glRenderbufferStorageMultisampleANGLEFn;
+ fn.glRenderbufferStorageMultisampleANGLEFn =
+ Debug_glRenderbufferStorageMultisampleANGLE;
+ }
+ if (!debug_fn.glRenderbufferStorageMultisampleEXTFn) {
+ debug_fn.glRenderbufferStorageMultisampleEXTFn =
+ fn.glRenderbufferStorageMultisampleEXTFn;
+ fn.glRenderbufferStorageMultisampleEXTFn =
+ Debug_glRenderbufferStorageMultisampleEXT;
+ }
+ if (!debug_fn.glRenderbufferStorageMultisampleIMGFn) {
+ debug_fn.glRenderbufferStorageMultisampleIMGFn =
+ fn.glRenderbufferStorageMultisampleIMGFn;
+ fn.glRenderbufferStorageMultisampleIMGFn =
+ Debug_glRenderbufferStorageMultisampleIMG;
+ }
+ if (!debug_fn.glResumeTransformFeedbackFn) {
+ debug_fn.glResumeTransformFeedbackFn = fn.glResumeTransformFeedbackFn;
+ fn.glResumeTransformFeedbackFn = Debug_glResumeTransformFeedback;
+ }
+ if (!debug_fn.glSampleCoverageFn) {
+ debug_fn.glSampleCoverageFn = fn.glSampleCoverageFn;
+ fn.glSampleCoverageFn = Debug_glSampleCoverage;
+ }
+ if (!debug_fn.glSamplerParameterfFn) {
+ debug_fn.glSamplerParameterfFn = fn.glSamplerParameterfFn;
+ fn.glSamplerParameterfFn = Debug_glSamplerParameterf;
+ }
+ if (!debug_fn.glSamplerParameterfvFn) {
+ debug_fn.glSamplerParameterfvFn = fn.glSamplerParameterfvFn;
+ fn.glSamplerParameterfvFn = Debug_glSamplerParameterfv;
+ }
+ if (!debug_fn.glSamplerParameteriFn) {
+ debug_fn.glSamplerParameteriFn = fn.glSamplerParameteriFn;
+ fn.glSamplerParameteriFn = Debug_glSamplerParameteri;
+ }
+ if (!debug_fn.glSamplerParameterivFn) {
+ debug_fn.glSamplerParameterivFn = fn.glSamplerParameterivFn;
+ fn.glSamplerParameterivFn = Debug_glSamplerParameteriv;
+ }
+ if (!debug_fn.glScissorFn) {
+ debug_fn.glScissorFn = fn.glScissorFn;
+ fn.glScissorFn = Debug_glScissor;
+ }
+ if (!debug_fn.glSetFenceAPPLEFn) {
+ debug_fn.glSetFenceAPPLEFn = fn.glSetFenceAPPLEFn;
+ fn.glSetFenceAPPLEFn = Debug_glSetFenceAPPLE;
+ }
+ if (!debug_fn.glSetFenceNVFn) {
+ debug_fn.glSetFenceNVFn = fn.glSetFenceNVFn;
+ fn.glSetFenceNVFn = Debug_glSetFenceNV;
+ }
+ if (!debug_fn.glShaderBinaryFn) {
+ debug_fn.glShaderBinaryFn = fn.glShaderBinaryFn;
+ fn.glShaderBinaryFn = Debug_glShaderBinary;
+ }
+ if (!debug_fn.glShaderSourceFn) {
+ debug_fn.glShaderSourceFn = fn.glShaderSourceFn;
+ fn.glShaderSourceFn = Debug_glShaderSource;
+ }
+ if (!debug_fn.glStencilFuncFn) {
+ debug_fn.glStencilFuncFn = fn.glStencilFuncFn;
+ fn.glStencilFuncFn = Debug_glStencilFunc;
+ }
+ if (!debug_fn.glStencilFuncSeparateFn) {
+ debug_fn.glStencilFuncSeparateFn = fn.glStencilFuncSeparateFn;
+ fn.glStencilFuncSeparateFn = Debug_glStencilFuncSeparate;
+ }
+ if (!debug_fn.glStencilMaskFn) {
+ debug_fn.glStencilMaskFn = fn.glStencilMaskFn;
+ fn.glStencilMaskFn = Debug_glStencilMask;
+ }
+ if (!debug_fn.glStencilMaskSeparateFn) {
+ debug_fn.glStencilMaskSeparateFn = fn.glStencilMaskSeparateFn;
+ fn.glStencilMaskSeparateFn = Debug_glStencilMaskSeparate;
+ }
+ if (!debug_fn.glStencilOpFn) {
+ debug_fn.glStencilOpFn = fn.glStencilOpFn;
+ fn.glStencilOpFn = Debug_glStencilOp;
+ }
+ if (!debug_fn.glStencilOpSeparateFn) {
+ debug_fn.glStencilOpSeparateFn = fn.glStencilOpSeparateFn;
+ fn.glStencilOpSeparateFn = Debug_glStencilOpSeparate;
+ }
+ if (!debug_fn.glTestFenceAPPLEFn) {
+ debug_fn.glTestFenceAPPLEFn = fn.glTestFenceAPPLEFn;
+ fn.glTestFenceAPPLEFn = Debug_glTestFenceAPPLE;
+ }
+ if (!debug_fn.glTestFenceNVFn) {
+ debug_fn.glTestFenceNVFn = fn.glTestFenceNVFn;
+ fn.glTestFenceNVFn = Debug_glTestFenceNV;
+ }
+ if (!debug_fn.glTexImage2DFn) {
+ debug_fn.glTexImage2DFn = fn.glTexImage2DFn;
+ fn.glTexImage2DFn = Debug_glTexImage2D;
+ }
+ if (!debug_fn.glTexImage3DFn) {
+ debug_fn.glTexImage3DFn = fn.glTexImage3DFn;
+ fn.glTexImage3DFn = Debug_glTexImage3D;
+ }
+ if (!debug_fn.glTexParameterfFn) {
+ debug_fn.glTexParameterfFn = fn.glTexParameterfFn;
+ fn.glTexParameterfFn = Debug_glTexParameterf;
+ }
+ if (!debug_fn.glTexParameterfvFn) {
+ debug_fn.glTexParameterfvFn = fn.glTexParameterfvFn;
+ fn.glTexParameterfvFn = Debug_glTexParameterfv;
+ }
+ if (!debug_fn.glTexParameteriFn) {
+ debug_fn.glTexParameteriFn = fn.glTexParameteriFn;
+ fn.glTexParameteriFn = Debug_glTexParameteri;
+ }
+ if (!debug_fn.glTexParameterivFn) {
+ debug_fn.glTexParameterivFn = fn.glTexParameterivFn;
+ fn.glTexParameterivFn = Debug_glTexParameteriv;
+ }
+ if (!debug_fn.glTexStorage2DEXTFn) {
+ debug_fn.glTexStorage2DEXTFn = fn.glTexStorage2DEXTFn;
+ fn.glTexStorage2DEXTFn = Debug_glTexStorage2DEXT;
+ }
+ if (!debug_fn.glTexStorage3DFn) {
+ debug_fn.glTexStorage3DFn = fn.glTexStorage3DFn;
+ fn.glTexStorage3DFn = Debug_glTexStorage3D;
+ }
+ if (!debug_fn.glTexSubImage2DFn) {
+ debug_fn.glTexSubImage2DFn = fn.glTexSubImage2DFn;
+ fn.glTexSubImage2DFn = Debug_glTexSubImage2D;
+ }
+ if (!debug_fn.glTransformFeedbackVaryingsFn) {
+ debug_fn.glTransformFeedbackVaryingsFn = fn.glTransformFeedbackVaryingsFn;
+ fn.glTransformFeedbackVaryingsFn = Debug_glTransformFeedbackVaryings;
+ }
+ if (!debug_fn.glUniform1fFn) {
+ debug_fn.glUniform1fFn = fn.glUniform1fFn;
+ fn.glUniform1fFn = Debug_glUniform1f;
+ }
+ if (!debug_fn.glUniform1fvFn) {
+ debug_fn.glUniform1fvFn = fn.glUniform1fvFn;
+ fn.glUniform1fvFn = Debug_glUniform1fv;
+ }
+ if (!debug_fn.glUniform1iFn) {
+ debug_fn.glUniform1iFn = fn.glUniform1iFn;
+ fn.glUniform1iFn = Debug_glUniform1i;
+ }
+ if (!debug_fn.glUniform1ivFn) {
+ debug_fn.glUniform1ivFn = fn.glUniform1ivFn;
+ fn.glUniform1ivFn = Debug_glUniform1iv;
+ }
+ if (!debug_fn.glUniform1uiFn) {
+ debug_fn.glUniform1uiFn = fn.glUniform1uiFn;
+ fn.glUniform1uiFn = Debug_glUniform1ui;
+ }
+ if (!debug_fn.glUniform1uivFn) {
+ debug_fn.glUniform1uivFn = fn.glUniform1uivFn;
+ fn.glUniform1uivFn = Debug_glUniform1uiv;
+ }
+ if (!debug_fn.glUniform2fFn) {
+ debug_fn.glUniform2fFn = fn.glUniform2fFn;
+ fn.glUniform2fFn = Debug_glUniform2f;
+ }
+ if (!debug_fn.glUniform2fvFn) {
+ debug_fn.glUniform2fvFn = fn.glUniform2fvFn;
+ fn.glUniform2fvFn = Debug_glUniform2fv;
+ }
+ if (!debug_fn.glUniform2iFn) {
+ debug_fn.glUniform2iFn = fn.glUniform2iFn;
+ fn.glUniform2iFn = Debug_glUniform2i;
+ }
+ if (!debug_fn.glUniform2ivFn) {
+ debug_fn.glUniform2ivFn = fn.glUniform2ivFn;
+ fn.glUniform2ivFn = Debug_glUniform2iv;
+ }
+ if (!debug_fn.glUniform2uiFn) {
+ debug_fn.glUniform2uiFn = fn.glUniform2uiFn;
+ fn.glUniform2uiFn = Debug_glUniform2ui;
+ }
+ if (!debug_fn.glUniform2uivFn) {
+ debug_fn.glUniform2uivFn = fn.glUniform2uivFn;
+ fn.glUniform2uivFn = Debug_glUniform2uiv;
+ }
+ if (!debug_fn.glUniform3fFn) {
+ debug_fn.glUniform3fFn = fn.glUniform3fFn;
+ fn.glUniform3fFn = Debug_glUniform3f;
+ }
+ if (!debug_fn.glUniform3fvFn) {
+ debug_fn.glUniform3fvFn = fn.glUniform3fvFn;
+ fn.glUniform3fvFn = Debug_glUniform3fv;
+ }
+ if (!debug_fn.glUniform3iFn) {
+ debug_fn.glUniform3iFn = fn.glUniform3iFn;
+ fn.glUniform3iFn = Debug_glUniform3i;
+ }
+ if (!debug_fn.glUniform3ivFn) {
+ debug_fn.glUniform3ivFn = fn.glUniform3ivFn;
+ fn.glUniform3ivFn = Debug_glUniform3iv;
+ }
+ if (!debug_fn.glUniform3uiFn) {
+ debug_fn.glUniform3uiFn = fn.glUniform3uiFn;
+ fn.glUniform3uiFn = Debug_glUniform3ui;
+ }
+ if (!debug_fn.glUniform3uivFn) {
+ debug_fn.glUniform3uivFn = fn.glUniform3uivFn;
+ fn.glUniform3uivFn = Debug_glUniform3uiv;
+ }
+ if (!debug_fn.glUniform4fFn) {
+ debug_fn.glUniform4fFn = fn.glUniform4fFn;
+ fn.glUniform4fFn = Debug_glUniform4f;
+ }
+ if (!debug_fn.glUniform4fvFn) {
+ debug_fn.glUniform4fvFn = fn.glUniform4fvFn;
+ fn.glUniform4fvFn = Debug_glUniform4fv;
+ }
+ if (!debug_fn.glUniform4iFn) {
+ debug_fn.glUniform4iFn = fn.glUniform4iFn;
+ fn.glUniform4iFn = Debug_glUniform4i;
+ }
+ if (!debug_fn.glUniform4ivFn) {
+ debug_fn.glUniform4ivFn = fn.glUniform4ivFn;
+ fn.glUniform4ivFn = Debug_glUniform4iv;
+ }
+ if (!debug_fn.glUniform4uiFn) {
+ debug_fn.glUniform4uiFn = fn.glUniform4uiFn;
+ fn.glUniform4uiFn = Debug_glUniform4ui;
+ }
+ if (!debug_fn.glUniform4uivFn) {
+ debug_fn.glUniform4uivFn = fn.glUniform4uivFn;
+ fn.glUniform4uivFn = Debug_glUniform4uiv;
+ }
+ if (!debug_fn.glUniformBlockBindingFn) {
+ debug_fn.glUniformBlockBindingFn = fn.glUniformBlockBindingFn;
+ fn.glUniformBlockBindingFn = Debug_glUniformBlockBinding;
+ }
+ if (!debug_fn.glUniformMatrix2fvFn) {
+ debug_fn.glUniformMatrix2fvFn = fn.glUniformMatrix2fvFn;
+ fn.glUniformMatrix2fvFn = Debug_glUniformMatrix2fv;
+ }
+ if (!debug_fn.glUniformMatrix2x3fvFn) {
+ debug_fn.glUniformMatrix2x3fvFn = fn.glUniformMatrix2x3fvFn;
+ fn.glUniformMatrix2x3fvFn = Debug_glUniformMatrix2x3fv;
+ }
+ if (!debug_fn.glUniformMatrix2x4fvFn) {
+ debug_fn.glUniformMatrix2x4fvFn = fn.glUniformMatrix2x4fvFn;
+ fn.glUniformMatrix2x4fvFn = Debug_glUniformMatrix2x4fv;
+ }
+ if (!debug_fn.glUniformMatrix3fvFn) {
+ debug_fn.glUniformMatrix3fvFn = fn.glUniformMatrix3fvFn;
+ fn.glUniformMatrix3fvFn = Debug_glUniformMatrix3fv;
+ }
+ if (!debug_fn.glUniformMatrix3x2fvFn) {
+ debug_fn.glUniformMatrix3x2fvFn = fn.glUniformMatrix3x2fvFn;
+ fn.glUniformMatrix3x2fvFn = Debug_glUniformMatrix3x2fv;
+ }
+ if (!debug_fn.glUniformMatrix3x4fvFn) {
+ debug_fn.glUniformMatrix3x4fvFn = fn.glUniformMatrix3x4fvFn;
+ fn.glUniformMatrix3x4fvFn = Debug_glUniformMatrix3x4fv;
+ }
+ if (!debug_fn.glUniformMatrix4fvFn) {
+ debug_fn.glUniformMatrix4fvFn = fn.glUniformMatrix4fvFn;
+ fn.glUniformMatrix4fvFn = Debug_glUniformMatrix4fv;
+ }
+ if (!debug_fn.glUniformMatrix4x2fvFn) {
+ debug_fn.glUniformMatrix4x2fvFn = fn.glUniformMatrix4x2fvFn;
+ fn.glUniformMatrix4x2fvFn = Debug_glUniformMatrix4x2fv;
+ }
+ if (!debug_fn.glUniformMatrix4x3fvFn) {
+ debug_fn.glUniformMatrix4x3fvFn = fn.glUniformMatrix4x3fvFn;
+ fn.glUniformMatrix4x3fvFn = Debug_glUniformMatrix4x3fv;
+ }
+ if (!debug_fn.glUnmapBufferFn) {
+ debug_fn.glUnmapBufferFn = fn.glUnmapBufferFn;
+ fn.glUnmapBufferFn = Debug_glUnmapBuffer;
+ }
+ if (!debug_fn.glUseProgramFn) {
+ debug_fn.glUseProgramFn = fn.glUseProgramFn;
+ fn.glUseProgramFn = Debug_glUseProgram;
+ }
+ if (!debug_fn.glValidateProgramFn) {
+ debug_fn.glValidateProgramFn = fn.glValidateProgramFn;
+ fn.glValidateProgramFn = Debug_glValidateProgram;
+ }
+ if (!debug_fn.glVertexAttrib1fFn) {
+ debug_fn.glVertexAttrib1fFn = fn.glVertexAttrib1fFn;
+ fn.glVertexAttrib1fFn = Debug_glVertexAttrib1f;
+ }
+ if (!debug_fn.glVertexAttrib1fvFn) {
+ debug_fn.glVertexAttrib1fvFn = fn.glVertexAttrib1fvFn;
+ fn.glVertexAttrib1fvFn = Debug_glVertexAttrib1fv;
+ }
+ if (!debug_fn.glVertexAttrib2fFn) {
+ debug_fn.glVertexAttrib2fFn = fn.glVertexAttrib2fFn;
+ fn.glVertexAttrib2fFn = Debug_glVertexAttrib2f;
+ }
+ if (!debug_fn.glVertexAttrib2fvFn) {
+ debug_fn.glVertexAttrib2fvFn = fn.glVertexAttrib2fvFn;
+ fn.glVertexAttrib2fvFn = Debug_glVertexAttrib2fv;
+ }
+ if (!debug_fn.glVertexAttrib3fFn) {
+ debug_fn.glVertexAttrib3fFn = fn.glVertexAttrib3fFn;
+ fn.glVertexAttrib3fFn = Debug_glVertexAttrib3f;
+ }
+ if (!debug_fn.glVertexAttrib3fvFn) {
+ debug_fn.glVertexAttrib3fvFn = fn.glVertexAttrib3fvFn;
+ fn.glVertexAttrib3fvFn = Debug_glVertexAttrib3fv;
+ }
+ if (!debug_fn.glVertexAttrib4fFn) {
+ debug_fn.glVertexAttrib4fFn = fn.glVertexAttrib4fFn;
+ fn.glVertexAttrib4fFn = Debug_glVertexAttrib4f;
+ }
+ if (!debug_fn.glVertexAttrib4fvFn) {
+ debug_fn.glVertexAttrib4fvFn = fn.glVertexAttrib4fvFn;
+ fn.glVertexAttrib4fvFn = Debug_glVertexAttrib4fv;
+ }
+ if (!debug_fn.glVertexAttribDivisorANGLEFn) {
+ debug_fn.glVertexAttribDivisorANGLEFn = fn.glVertexAttribDivisorANGLEFn;
+ fn.glVertexAttribDivisorANGLEFn = Debug_glVertexAttribDivisorANGLE;
+ }
+ if (!debug_fn.glVertexAttribI4iFn) {
+ debug_fn.glVertexAttribI4iFn = fn.glVertexAttribI4iFn;
+ fn.glVertexAttribI4iFn = Debug_glVertexAttribI4i;
+ }
+ if (!debug_fn.glVertexAttribI4ivFn) {
+ debug_fn.glVertexAttribI4ivFn = fn.glVertexAttribI4ivFn;
+ fn.glVertexAttribI4ivFn = Debug_glVertexAttribI4iv;
+ }
+ if (!debug_fn.glVertexAttribI4uiFn) {
+ debug_fn.glVertexAttribI4uiFn = fn.glVertexAttribI4uiFn;
+ fn.glVertexAttribI4uiFn = Debug_glVertexAttribI4ui;
+ }
+ if (!debug_fn.glVertexAttribI4uivFn) {
+ debug_fn.glVertexAttribI4uivFn = fn.glVertexAttribI4uivFn;
+ fn.glVertexAttribI4uivFn = Debug_glVertexAttribI4uiv;
+ }
+ if (!debug_fn.glVertexAttribIPointerFn) {
+ debug_fn.glVertexAttribIPointerFn = fn.glVertexAttribIPointerFn;
+ fn.glVertexAttribIPointerFn = Debug_glVertexAttribIPointer;
+ }
+ if (!debug_fn.glVertexAttribPointerFn) {
+ debug_fn.glVertexAttribPointerFn = fn.glVertexAttribPointerFn;
+ fn.glVertexAttribPointerFn = Debug_glVertexAttribPointer;
+ }
+ if (!debug_fn.glViewportFn) {
+ debug_fn.glViewportFn = fn.glViewportFn;
+ fn.glViewportFn = Debug_glViewport;
+ }
+ if (!debug_fn.glWaitSyncFn) {
+ debug_fn.glWaitSyncFn = fn.glWaitSyncFn;
+ fn.glWaitSyncFn = Debug_glWaitSync;
+ }
+ g_debugBindingsInitialized = true;
+}
+
+void DriverGL::ClearBindings() {
+ memset(this, 0, sizeof(*this));
+}
+
+void GLApiBase::glActiveTextureFn(GLenum texture) {
+ driver_->fn.glActiveTextureFn(texture);
+}
+
+void GLApiBase::glAttachShaderFn(GLuint program, GLuint shader) {
+ driver_->fn.glAttachShaderFn(program, shader);
+}
+
+void GLApiBase::glBeginQueryFn(GLenum target, GLuint id) {
+ 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);
+}
+
+void GLApiBase::glBindAttribLocationFn(GLuint program,
+ GLuint index,
+ const char* name) {
+ driver_->fn.glBindAttribLocationFn(program, index, name);
+}
+
+void GLApiBase::glBindBufferFn(GLenum target, GLuint buffer) {
+ driver_->fn.glBindBufferFn(target, buffer);
+}
+
+void GLApiBase::glBindBufferBaseFn(GLenum target, GLuint index, GLuint buffer) {
+ driver_->fn.glBindBufferBaseFn(target, index, buffer);
+}
+
+void GLApiBase::glBindBufferRangeFn(GLenum target,
+ GLuint index,
+ GLuint buffer,
+ GLintptr offset,
+ GLsizeiptr size) {
+ driver_->fn.glBindBufferRangeFn(target, index, buffer, offset, size);
+}
+
+void GLApiBase::glBindFragDataLocationFn(GLuint program,
+ GLuint colorNumber,
+ const char* name) {
+ driver_->fn.glBindFragDataLocationFn(program, colorNumber, name);
+}
+
+void GLApiBase::glBindFragDataLocationIndexedFn(GLuint program,
+ GLuint colorNumber,
+ GLuint index,
+ const char* name) {
+ driver_->fn.glBindFragDataLocationIndexedFn(program, colorNumber, index,
+ name);
+}
+
+void GLApiBase::glBindFramebufferEXTFn(GLenum target, GLuint framebuffer) {
+ driver_->fn.glBindFramebufferEXTFn(target, framebuffer);
+}
+
+void GLApiBase::glBindRenderbufferEXTFn(GLenum target, GLuint renderbuffer) {
+ driver_->fn.glBindRenderbufferEXTFn(target, renderbuffer);
+}
+
+void GLApiBase::glBindSamplerFn(GLuint unit, GLuint sampler) {
+ driver_->fn.glBindSamplerFn(unit, sampler);
+}
+
+void GLApiBase::glBindTextureFn(GLenum target, GLuint texture) {
+ driver_->fn.glBindTextureFn(target, texture);
+}
+
+void GLApiBase::glBindTransformFeedbackFn(GLenum target, GLuint id) {
+ driver_->fn.glBindTransformFeedbackFn(target, id);
+}
+
+void GLApiBase::glBindVertexArrayOESFn(GLuint array) {
+ driver_->fn.glBindVertexArrayOESFn(array);
+}
+
+void GLApiBase::glBlendBarrierKHRFn(void) {
+ driver_->fn.glBlendBarrierKHRFn();
+}
+
+void GLApiBase::glBlendColorFn(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) {
+ driver_->fn.glBlendColorFn(red, green, blue, alpha);
+}
+
+void GLApiBase::glBlendEquationFn(GLenum mode) {
+ driver_->fn.glBlendEquationFn(mode);
+}
+
+void GLApiBase::glBlendEquationSeparateFn(GLenum modeRGB, GLenum modeAlpha) {
+ driver_->fn.glBlendEquationSeparateFn(modeRGB, modeAlpha);
+}
+
+void GLApiBase::glBlendFuncFn(GLenum sfactor, GLenum dfactor) {
+ driver_->fn.glBlendFuncFn(sfactor, dfactor);
+}
+
+void GLApiBase::glBlendFuncSeparateFn(GLenum srcRGB,
+ GLenum dstRGB,
+ GLenum srcAlpha,
+ GLenum dstAlpha) {
+ driver_->fn.glBlendFuncSeparateFn(srcRGB, dstRGB, srcAlpha, dstAlpha);
+}
+
+void GLApiBase::glBlitFramebufferFn(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ driver_->fn.glBlitFramebufferFn(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0,
+ dstX1, dstY1, mask, filter);
+}
+
+void GLApiBase::glBlitFramebufferANGLEFn(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ driver_->fn.glBlitFramebufferANGLEFn(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0,
+ dstX1, dstY1, mask, filter);
+}
+
+void GLApiBase::glBlitFramebufferEXTFn(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ driver_->fn.glBlitFramebufferEXTFn(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0,
+ dstX1, dstY1, mask, filter);
+}
+
+void GLApiBase::glBufferDataFn(GLenum target,
+ GLsizeiptr size,
+ const void* data,
+ GLenum usage) {
+ driver_->fn.glBufferDataFn(target, size, data, usage);
+}
+
+void GLApiBase::glBufferSubDataFn(GLenum target,
+ GLintptr offset,
+ GLsizeiptr size,
+ const void* data) {
+ driver_->fn.glBufferSubDataFn(target, offset, size, data);
+}
+
+GLenum GLApiBase::glCheckFramebufferStatusEXTFn(GLenum target) {
+ return driver_->fn.glCheckFramebufferStatusEXTFn(target);
+}
+
+void GLApiBase::glClearFn(GLbitfield mask) {
+ driver_->fn.glClearFn(mask);
+}
+
+void GLApiBase::glClearBufferfiFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat depth,
+ GLint stencil) {
+ driver_->fn.glClearBufferfiFn(buffer, drawbuffer, depth, stencil);
+}
+
+void GLApiBase::glClearBufferfvFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat* value) {
+ driver_->fn.glClearBufferfvFn(buffer, drawbuffer, value);
+}
+
+void GLApiBase::glClearBufferivFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLint* value) {
+ driver_->fn.glClearBufferivFn(buffer, drawbuffer, value);
+}
+
+void GLApiBase::glClearBufferuivFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLuint* value) {
+ driver_->fn.glClearBufferuivFn(buffer, drawbuffer, value);
+}
+
+void GLApiBase::glClearColorFn(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) {
+ driver_->fn.glClearColorFn(red, green, blue, alpha);
+}
+
+void GLApiBase::glClearDepthFn(GLclampd depth) {
+ driver_->fn.glClearDepthFn(depth);
+}
+
+void GLApiBase::glClearDepthfFn(GLclampf depth) {
+ driver_->fn.glClearDepthfFn(depth);
+}
+
+void GLApiBase::glClearStencilFn(GLint s) {
+ driver_->fn.glClearStencilFn(s);
+}
+
+GLenum GLApiBase::glClientWaitSyncFn(GLsync sync,
+ GLbitfield flags,
+ GLuint64 timeout) {
+ return driver_->fn.glClientWaitSyncFn(sync, flags, timeout);
+}
+
+void GLApiBase::glColorMaskFn(GLboolean red,
+ GLboolean green,
+ GLboolean blue,
+ GLboolean alpha) {
+ driver_->fn.glColorMaskFn(red, green, blue, alpha);
+}
+
+void GLApiBase::glCompileShaderFn(GLuint shader) {
+ driver_->fn.glCompileShaderFn(shader);
+}
+
+void GLApiBase::glCompressedTexImage2DFn(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) {
+ driver_->fn.glCompressedTexImage2DFn(target, level, internalformat, width,
+ height, border, imageSize, data);
+}
+
+void GLApiBase::glCompressedTexImage3DFn(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) {
+ driver_->fn.glCompressedTexImage3DFn(target, level, internalformat, width,
+ height, depth, border, imageSize, data);
+}
+
+void GLApiBase::glCompressedTexSubImage2DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLsizei imageSize,
+ const void* data) {
+ driver_->fn.glCompressedTexSubImage2DFn(
+ target, level, xoffset, yoffset, width, height, format, imageSize, data);
+}
+
+void GLApiBase::glCopyBufferSubDataFn(GLenum readTarget,
+ GLenum writeTarget,
+ GLintptr readOffset,
+ GLintptr writeOffset,
+ GLsizeiptr size) {
+ driver_->fn.glCopyBufferSubDataFn(readTarget, writeTarget, readOffset,
+ writeOffset, size);
+}
+
+void GLApiBase::glCopyTexImage2DFn(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLint border) {
+ driver_->fn.glCopyTexImage2DFn(target, level, internalformat, x, y, width,
+ height, border);
+}
+
+void GLApiBase::glCopyTexSubImage2DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) {
+ driver_->fn.glCopyTexSubImage2DFn(target, level, xoffset, yoffset, x, y,
+ width, height);
+}
+
+void GLApiBase::glCopyTexSubImage3DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint zoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) {
+ driver_->fn.glCopyTexSubImage3DFn(target, level, xoffset, yoffset, zoffset, x,
+ y, width, height);
+}
+
+GLuint GLApiBase::glCreateProgramFn(void) {
+ return driver_->fn.glCreateProgramFn();
+}
+
+GLuint GLApiBase::glCreateShaderFn(GLenum type) {
+ return driver_->fn.glCreateShaderFn(type);
+}
+
+void GLApiBase::glCullFaceFn(GLenum mode) {
+ driver_->fn.glCullFaceFn(mode);
+}
+
+void GLApiBase::glDeleteBuffersARBFn(GLsizei n, const GLuint* buffers) {
+ driver_->fn.glDeleteBuffersARBFn(n, buffers);
+}
+
+void GLApiBase::glDeleteFencesAPPLEFn(GLsizei n, const GLuint* fences) {
+ driver_->fn.glDeleteFencesAPPLEFn(n, fences);
+}
+
+void GLApiBase::glDeleteFencesNVFn(GLsizei n, const GLuint* fences) {
+ driver_->fn.glDeleteFencesNVFn(n, fences);
+}
+
+void GLApiBase::glDeleteFramebuffersEXTFn(GLsizei n,
+ const GLuint* framebuffers) {
+ driver_->fn.glDeleteFramebuffersEXTFn(n, framebuffers);
+}
+
+void GLApiBase::glDeleteProgramFn(GLuint program) {
+ driver_->fn.glDeleteProgramFn(program);
+}
+
+void GLApiBase::glDeleteQueriesFn(GLsizei n, const GLuint* ids) {
+ 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);
+}
+
+void GLApiBase::glDeleteSamplersFn(GLsizei n, const GLuint* samplers) {
+ driver_->fn.glDeleteSamplersFn(n, samplers);
+}
+
+void GLApiBase::glDeleteShaderFn(GLuint shader) {
+ driver_->fn.glDeleteShaderFn(shader);
+}
+
+void GLApiBase::glDeleteSyncFn(GLsync sync) {
+ driver_->fn.glDeleteSyncFn(sync);
+}
+
+void GLApiBase::glDeleteTexturesFn(GLsizei n, const GLuint* textures) {
+ driver_->fn.glDeleteTexturesFn(n, textures);
+}
+
+void GLApiBase::glDeleteTransformFeedbacksFn(GLsizei n, const GLuint* ids) {
+ driver_->fn.glDeleteTransformFeedbacksFn(n, ids);
+}
+
+void GLApiBase::glDeleteVertexArraysOESFn(GLsizei n, const GLuint* arrays) {
+ driver_->fn.glDeleteVertexArraysOESFn(n, arrays);
+}
+
+void GLApiBase::glDepthFuncFn(GLenum func) {
+ driver_->fn.glDepthFuncFn(func);
+}
+
+void GLApiBase::glDepthMaskFn(GLboolean flag) {
+ driver_->fn.glDepthMaskFn(flag);
+}
+
+void GLApiBase::glDepthRangeFn(GLclampd zNear, GLclampd zFar) {
+ driver_->fn.glDepthRangeFn(zNear, zFar);
+}
+
+void GLApiBase::glDepthRangefFn(GLclampf zNear, GLclampf zFar) {
+ driver_->fn.glDepthRangefFn(zNear, zFar);
+}
+
+void GLApiBase::glDetachShaderFn(GLuint program, GLuint shader) {
+ driver_->fn.glDetachShaderFn(program, shader);
+}
+
+void GLApiBase::glDisableFn(GLenum cap) {
+ driver_->fn.glDisableFn(cap);
+}
+
+void GLApiBase::glDisableVertexAttribArrayFn(GLuint index) {
+ driver_->fn.glDisableVertexAttribArrayFn(index);
+}
+
+void GLApiBase::glDiscardFramebufferEXTFn(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments) {
+ driver_->fn.glDiscardFramebufferEXTFn(target, numAttachments, attachments);
+}
+
+void GLApiBase::glDrawArraysFn(GLenum mode, GLint first, GLsizei count) {
+ driver_->fn.glDrawArraysFn(mode, first, count);
+}
+
+void GLApiBase::glDrawArraysInstancedANGLEFn(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount) {
+ driver_->fn.glDrawArraysInstancedANGLEFn(mode, first, count, primcount);
+}
+
+void GLApiBase::glDrawBufferFn(GLenum mode) {
+ driver_->fn.glDrawBufferFn(mode);
+}
+
+void GLApiBase::glDrawBuffersARBFn(GLsizei n, const GLenum* bufs) {
+ driver_->fn.glDrawBuffersARBFn(n, bufs);
+}
+
+void GLApiBase::glDrawElementsFn(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices) {
+ driver_->fn.glDrawElementsFn(mode, count, type, indices);
+}
+
+void GLApiBase::glDrawElementsInstancedANGLEFn(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount) {
+ driver_->fn.glDrawElementsInstancedANGLEFn(mode, count, type, indices,
+ primcount);
+}
+
+void GLApiBase::glDrawRangeElementsFn(GLenum mode,
+ GLuint start,
+ GLuint end,
+ GLsizei count,
+ GLenum type,
+ const void* indices) {
+ driver_->fn.glDrawRangeElementsFn(mode, start, end, count, type, indices);
+}
+
+void GLApiBase::glEGLImageTargetRenderbufferStorageOESFn(GLenum target,
+ GLeglImageOES image) {
+ driver_->fn.glEGLImageTargetRenderbufferStorageOESFn(target, image);
+}
+
+void GLApiBase::glEGLImageTargetTexture2DOESFn(GLenum target,
+ GLeglImageOES image) {
+ driver_->fn.glEGLImageTargetTexture2DOESFn(target, image);
+}
+
+void GLApiBase::glEnableFn(GLenum cap) {
+ driver_->fn.glEnableFn(cap);
+}
+
+void GLApiBase::glEnableVertexAttribArrayFn(GLuint index) {
+ driver_->fn.glEnableVertexAttribArrayFn(index);
+}
+
+void GLApiBase::glEndQueryFn(GLenum target) {
+ driver_->fn.glEndQueryFn(target);
+}
+
+void GLApiBase::glEndQueryARBFn(GLenum target) {
+ driver_->fn.glEndQueryARBFn(target);
+}
+
+void GLApiBase::glEndTransformFeedbackFn(void) {
+ driver_->fn.glEndTransformFeedbackFn();
+}
+
+GLsync GLApiBase::glFenceSyncFn(GLenum condition, GLbitfield flags) {
+ return driver_->fn.glFenceSyncFn(condition, flags);
+}
+
+void GLApiBase::glFinishFn(void) {
+ driver_->fn.glFinishFn();
+}
+
+void GLApiBase::glFinishFenceAPPLEFn(GLuint fence) {
+ driver_->fn.glFinishFenceAPPLEFn(fence);
+}
+
+void GLApiBase::glFinishFenceNVFn(GLuint fence) {
+ driver_->fn.glFinishFenceNVFn(fence);
+}
+
+void GLApiBase::glFlushFn(void) {
+ driver_->fn.glFlushFn();
+}
+
+void GLApiBase::glFlushMappedBufferRangeFn(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length) {
+ driver_->fn.glFlushMappedBufferRangeFn(target, offset, length);
+}
+
+void GLApiBase::glFramebufferRenderbufferEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer) {
+ driver_->fn.glFramebufferRenderbufferEXTFn(target, attachment,
+ renderbuffertarget, renderbuffer);
+}
+
+void GLApiBase::glFramebufferTexture2DEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level) {
+ driver_->fn.glFramebufferTexture2DEXTFn(target, attachment, textarget,
+ texture, level);
+}
+
+void GLApiBase::glFramebufferTexture2DMultisampleEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) {
+ driver_->fn.glFramebufferTexture2DMultisampleEXTFn(
+ target, attachment, textarget, texture, level, samples);
+}
+
+void GLApiBase::glFramebufferTexture2DMultisampleIMGFn(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) {
+ driver_->fn.glFramebufferTexture2DMultisampleIMGFn(
+ target, attachment, textarget, texture, level, samples);
+}
+
+void GLApiBase::glFramebufferTextureLayerFn(GLenum target,
+ GLenum attachment,
+ GLuint texture,
+ GLint level,
+ GLint layer) {
+ driver_->fn.glFramebufferTextureLayerFn(target, attachment, texture, level,
+ layer);
+}
+
+void GLApiBase::glFrontFaceFn(GLenum mode) {
+ driver_->fn.glFrontFaceFn(mode);
+}
+
+void GLApiBase::glGenBuffersARBFn(GLsizei n, GLuint* buffers) {
+ driver_->fn.glGenBuffersARBFn(n, buffers);
+}
+
+void GLApiBase::glGenerateMipmapEXTFn(GLenum target) {
+ driver_->fn.glGenerateMipmapEXTFn(target);
+}
+
+void GLApiBase::glGenFencesAPPLEFn(GLsizei n, GLuint* fences) {
+ driver_->fn.glGenFencesAPPLEFn(n, fences);
+}
+
+void GLApiBase::glGenFencesNVFn(GLsizei n, GLuint* fences) {
+ driver_->fn.glGenFencesNVFn(n, fences);
+}
+
+void GLApiBase::glGenFramebuffersEXTFn(GLsizei n, GLuint* framebuffers) {
+ driver_->fn.glGenFramebuffersEXTFn(n, framebuffers);
+}
+
+void GLApiBase::glGenQueriesFn(GLsizei n, GLuint* ids) {
+ 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);
+}
+
+void GLApiBase::glGenSamplersFn(GLsizei n, GLuint* samplers) {
+ driver_->fn.glGenSamplersFn(n, samplers);
+}
+
+void GLApiBase::glGenTexturesFn(GLsizei n, GLuint* textures) {
+ driver_->fn.glGenTexturesFn(n, textures);
+}
+
+void GLApiBase::glGenTransformFeedbacksFn(GLsizei n, GLuint* ids) {
+ driver_->fn.glGenTransformFeedbacksFn(n, ids);
+}
+
+void GLApiBase::glGenVertexArraysOESFn(GLsizei n, GLuint* arrays) {
+ driver_->fn.glGenVertexArraysOESFn(n, arrays);
+}
+
+void GLApiBase::glGetActiveAttribFn(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) {
+ driver_->fn.glGetActiveAttribFn(program, index, bufsize, length, size, type,
+ name);
+}
+
+void GLApiBase::glGetActiveUniformFn(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) {
+ driver_->fn.glGetActiveUniformFn(program, index, bufsize, length, size, type,
+ name);
+}
+
+void GLApiBase::glGetActiveUniformBlockivFn(GLuint program,
+ GLuint uniformBlockIndex,
+ GLenum pname,
+ GLint* params) {
+ driver_->fn.glGetActiveUniformBlockivFn(program, uniformBlockIndex, pname,
+ params);
+}
+
+void GLApiBase::glGetActiveUniformBlockNameFn(GLuint program,
+ GLuint uniformBlockIndex,
+ GLsizei bufSize,
+ GLsizei* length,
+ char* uniformBlockName) {
+ driver_->fn.glGetActiveUniformBlockNameFn(program, uniformBlockIndex, bufSize,
+ length, uniformBlockName);
+}
+
+void GLApiBase::glGetActiveUniformsivFn(GLuint program,
+ GLsizei uniformCount,
+ const GLuint* uniformIndices,
+ GLenum pname,
+ GLint* params) {
+ driver_->fn.glGetActiveUniformsivFn(program, uniformCount, uniformIndices,
+ pname, params);
+}
+
+void GLApiBase::glGetAttachedShadersFn(GLuint program,
+ GLsizei maxcount,
+ GLsizei* count,
+ GLuint* shaders) {
+ driver_->fn.glGetAttachedShadersFn(program, maxcount, count, shaders);
+}
+
+GLint GLApiBase::glGetAttribLocationFn(GLuint program, const char* name) {
+ return driver_->fn.glGetAttribLocationFn(program, name);
+}
+
+void GLApiBase::glGetBooleanvFn(GLenum pname, GLboolean* params) {
+ driver_->fn.glGetBooleanvFn(pname, params);
+}
+
+void GLApiBase::glGetBufferParameterivFn(GLenum target,
+ GLenum pname,
+ GLint* params) {
+ driver_->fn.glGetBufferParameterivFn(target, pname, params);
+}
+
+GLenum GLApiBase::glGetErrorFn(void) {
+ return driver_->fn.glGetErrorFn();
+}
+
+void GLApiBase::glGetFenceivNVFn(GLuint fence, GLenum pname, GLint* params) {
+ driver_->fn.glGetFenceivNVFn(fence, pname, params);
+}
+
+void GLApiBase::glGetFloatvFn(GLenum pname, GLfloat* params) {
+ driver_->fn.glGetFloatvFn(pname, params);
+}
+
+GLint GLApiBase::glGetFragDataLocationFn(GLuint program, const char* name) {
+ return driver_->fn.glGetFragDataLocationFn(program, name);
+}
+
+void GLApiBase::glGetFramebufferAttachmentParameterivEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* params) {
+ driver_->fn.glGetFramebufferAttachmentParameterivEXTFn(target, attachment,
+ pname, params);
+}
+
+GLenum GLApiBase::glGetGraphicsResetStatusARBFn(void) {
+ return driver_->fn.glGetGraphicsResetStatusARBFn();
+}
+
+void GLApiBase::glGetInteger64i_vFn(GLenum target,
+ GLuint index,
+ GLint64* data) {
+ driver_->fn.glGetInteger64i_vFn(target, index, data);
+}
+
+void GLApiBase::glGetInteger64vFn(GLenum pname, GLint64* params) {
+ driver_->fn.glGetInteger64vFn(pname, params);
+}
+
+void GLApiBase::glGetIntegeri_vFn(GLenum target, GLuint index, GLint* data) {
+ driver_->fn.glGetIntegeri_vFn(target, index, data);
+}
+
+void GLApiBase::glGetIntegervFn(GLenum pname, GLint* params) {
+ driver_->fn.glGetIntegervFn(pname, params);
+}
+
+void GLApiBase::glGetInternalformativFn(GLenum target,
+ GLenum internalformat,
+ GLenum pname,
+ GLsizei bufSize,
+ GLint* params) {
+ driver_->fn.glGetInternalformativFn(target, internalformat, pname, bufSize,
+ params);
+}
+
+void GLApiBase::glGetProgramBinaryFn(GLuint program,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* binaryFormat,
+ GLvoid* binary) {
+ driver_->fn.glGetProgramBinaryFn(program, bufSize, length, binaryFormat,
+ binary);
+}
+
+void GLApiBase::glGetProgramInfoLogFn(GLuint program,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) {
+ driver_->fn.glGetProgramInfoLogFn(program, bufsize, length, infolog);
+}
+
+void GLApiBase::glGetProgramivFn(GLuint program, GLenum pname, GLint* params) {
+ driver_->fn.glGetProgramivFn(program, pname, params);
+}
+
+void GLApiBase::glGetQueryivFn(GLenum target, GLenum pname, GLint* params) {
+ 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) {
+ driver_->fn.glGetQueryObjecti64vFn(id, pname, params);
+}
+
+void GLApiBase::glGetQueryObjectivFn(GLuint id, GLenum pname, GLint* params) {
+ 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) {
+ driver_->fn.glGetQueryObjectui64vFn(id, pname, params);
+}
+
+void GLApiBase::glGetQueryObjectuivFn(GLuint id, GLenum pname, GLuint* params) {
+ 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) {
+ driver_->fn.glGetRenderbufferParameterivEXTFn(target, pname, params);
+}
+
+void GLApiBase::glGetSamplerParameterfvFn(GLuint sampler,
+ GLenum pname,
+ GLfloat* params) {
+ driver_->fn.glGetSamplerParameterfvFn(sampler, pname, params);
+}
+
+void GLApiBase::glGetSamplerParameterivFn(GLuint sampler,
+ GLenum pname,
+ GLint* params) {
+ driver_->fn.glGetSamplerParameterivFn(sampler, pname, params);
+}
+
+void GLApiBase::glGetShaderInfoLogFn(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) {
+ driver_->fn.glGetShaderInfoLogFn(shader, bufsize, length, infolog);
+}
+
+void GLApiBase::glGetShaderivFn(GLuint shader, GLenum pname, GLint* params) {
+ driver_->fn.glGetShaderivFn(shader, pname, params);
+}
+
+void GLApiBase::glGetShaderPrecisionFormatFn(GLenum shadertype,
+ GLenum precisiontype,
+ GLint* range,
+ GLint* precision) {
+ driver_->fn.glGetShaderPrecisionFormatFn(shadertype, precisiontype, range,
+ precision);
+}
+
+void GLApiBase::glGetShaderSourceFn(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) {
+ driver_->fn.glGetShaderSourceFn(shader, bufsize, length, source);
+}
+
+const GLubyte* GLApiBase::glGetStringFn(GLenum name) {
+ return driver_->fn.glGetStringFn(name);
+}
+
+void GLApiBase::glGetSyncivFn(GLsync sync,
+ GLenum pname,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLint* values) {
+ driver_->fn.glGetSyncivFn(sync, pname, bufSize, length, values);
+}
+
+void GLApiBase::glGetTexLevelParameterfvFn(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLfloat* params) {
+ driver_->fn.glGetTexLevelParameterfvFn(target, level, pname, params);
+}
+
+void GLApiBase::glGetTexLevelParameterivFn(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLint* params) {
+ driver_->fn.glGetTexLevelParameterivFn(target, level, pname, params);
+}
+
+void GLApiBase::glGetTexParameterfvFn(GLenum target,
+ GLenum pname,
+ GLfloat* params) {
+ driver_->fn.glGetTexParameterfvFn(target, pname, params);
+}
+
+void GLApiBase::glGetTexParameterivFn(GLenum target,
+ GLenum pname,
+ GLint* params) {
+ driver_->fn.glGetTexParameterivFn(target, pname, params);
+}
+
+void GLApiBase::glGetTransformFeedbackVaryingFn(GLuint program,
+ GLuint index,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* type,
+ char* name) {
+ driver_->fn.glGetTransformFeedbackVaryingFn(program, index, bufSize, length,
+ type, name);
+}
+
+void GLApiBase::glGetTranslatedShaderSourceANGLEFn(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) {
+ driver_->fn.glGetTranslatedShaderSourceANGLEFn(shader, bufsize, length,
+ source);
+}
+
+GLuint GLApiBase::glGetUniformBlockIndexFn(GLuint program,
+ const char* uniformBlockName) {
+ return driver_->fn.glGetUniformBlockIndexFn(program, uniformBlockName);
+}
+
+void GLApiBase::glGetUniformfvFn(GLuint program,
+ GLint location,
+ GLfloat* params) {
+ driver_->fn.glGetUniformfvFn(program, location, params);
+}
+
+void GLApiBase::glGetUniformIndicesFn(GLuint program,
+ GLsizei uniformCount,
+ const char* const* uniformNames,
+ GLuint* uniformIndices) {
+ driver_->fn.glGetUniformIndicesFn(program, uniformCount, uniformNames,
+ uniformIndices);
+}
+
+void GLApiBase::glGetUniformivFn(GLuint program,
+ GLint location,
+ GLint* params) {
+ driver_->fn.glGetUniformivFn(program, location, params);
+}
+
+GLint GLApiBase::glGetUniformLocationFn(GLuint program, const char* name) {
+ return driver_->fn.glGetUniformLocationFn(program, name);
+}
+
+void GLApiBase::glGetVertexAttribfvFn(GLuint index,
+ GLenum pname,
+ GLfloat* params) {
+ driver_->fn.glGetVertexAttribfvFn(index, pname, params);
+}
+
+void GLApiBase::glGetVertexAttribivFn(GLuint index,
+ GLenum pname,
+ GLint* params) {
+ driver_->fn.glGetVertexAttribivFn(index, pname, params);
+}
+
+void GLApiBase::glGetVertexAttribPointervFn(GLuint index,
+ GLenum pname,
+ void** pointer) {
+ driver_->fn.glGetVertexAttribPointervFn(index, pname, pointer);
+}
+
+void GLApiBase::glHintFn(GLenum target, GLenum mode) {
+ driver_->fn.glHintFn(target, mode);
+}
+
+void GLApiBase::glInsertEventMarkerEXTFn(GLsizei length, const char* marker) {
+ driver_->fn.glInsertEventMarkerEXTFn(length, marker);
+}
+
+void GLApiBase::glInvalidateFramebufferFn(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments) {
+ driver_->fn.glInvalidateFramebufferFn(target, numAttachments, attachments);
+}
+
+void GLApiBase::glInvalidateSubFramebufferFn(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments,
+ GLint x,
+ GLint y,
+ GLint width,
+ GLint height) {
+ driver_->fn.glInvalidateSubFramebufferFn(target, numAttachments, attachments,
+ x, y, width, height);
+}
+
+GLboolean GLApiBase::glIsBufferFn(GLuint buffer) {
+ return driver_->fn.glIsBufferFn(buffer);
+}
+
+GLboolean GLApiBase::glIsEnabledFn(GLenum cap) {
+ return driver_->fn.glIsEnabledFn(cap);
+}
+
+GLboolean GLApiBase::glIsFenceAPPLEFn(GLuint fence) {
+ return driver_->fn.glIsFenceAPPLEFn(fence);
+}
+
+GLboolean GLApiBase::glIsFenceNVFn(GLuint fence) {
+ return driver_->fn.glIsFenceNVFn(fence);
+}
+
+GLboolean GLApiBase::glIsFramebufferEXTFn(GLuint framebuffer) {
+ return driver_->fn.glIsFramebufferEXTFn(framebuffer);
+}
+
+GLboolean GLApiBase::glIsProgramFn(GLuint program) {
+ return driver_->fn.glIsProgramFn(program);
+}
+
+GLboolean GLApiBase::glIsQueryFn(GLuint query) {
+ 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);
+}
+
+GLboolean GLApiBase::glIsSamplerFn(GLuint sampler) {
+ return driver_->fn.glIsSamplerFn(sampler);
+}
+
+GLboolean GLApiBase::glIsShaderFn(GLuint shader) {
+ return driver_->fn.glIsShaderFn(shader);
+}
+
+GLboolean GLApiBase::glIsSyncFn(GLsync sync) {
+ return driver_->fn.glIsSyncFn(sync);
+}
+
+GLboolean GLApiBase::glIsTextureFn(GLuint texture) {
+ return driver_->fn.glIsTextureFn(texture);
+}
+
+GLboolean GLApiBase::glIsTransformFeedbackFn(GLuint id) {
+ return driver_->fn.glIsTransformFeedbackFn(id);
+}
+
+GLboolean GLApiBase::glIsVertexArrayOESFn(GLuint array) {
+ return driver_->fn.glIsVertexArrayOESFn(array);
+}
+
+void GLApiBase::glLineWidthFn(GLfloat width) {
+ driver_->fn.glLineWidthFn(width);
+}
+
+void GLApiBase::glLinkProgramFn(GLuint program) {
+ driver_->fn.glLinkProgramFn(program);
+}
+
+void* GLApiBase::glMapBufferFn(GLenum target, GLenum access) {
+ return driver_->fn.glMapBufferFn(target, access);
+}
+
+void* GLApiBase::glMapBufferRangeFn(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length,
+ GLbitfield access) {
+ return driver_->fn.glMapBufferRangeFn(target, offset, length, access);
+}
+
+void GLApiBase::glMatrixLoadfEXTFn(GLenum matrixMode, const GLfloat* m) {
+ driver_->fn.glMatrixLoadfEXTFn(matrixMode, m);
+}
+
+void GLApiBase::glMatrixLoadIdentityEXTFn(GLenum matrixMode) {
+ driver_->fn.glMatrixLoadIdentityEXTFn(matrixMode);
+}
+
+void GLApiBase::glPauseTransformFeedbackFn(void) {
+ driver_->fn.glPauseTransformFeedbackFn();
+}
+
+void GLApiBase::glPixelStoreiFn(GLenum pname, GLint param) {
+ driver_->fn.glPixelStoreiFn(pname, param);
+}
+
+void GLApiBase::glPointParameteriFn(GLenum pname, GLint param) {
+ driver_->fn.glPointParameteriFn(pname, param);
+}
+
+void GLApiBase::glPolygonOffsetFn(GLfloat factor, GLfloat units) {
+ driver_->fn.glPolygonOffsetFn(factor, units);
+}
+
+void GLApiBase::glPopGroupMarkerEXTFn(void) {
+ driver_->fn.glPopGroupMarkerEXTFn();
+}
+
+void GLApiBase::glProgramBinaryFn(GLuint program,
+ GLenum binaryFormat,
+ const GLvoid* binary,
+ GLsizei length) {
+ driver_->fn.glProgramBinaryFn(program, binaryFormat, binary, length);
+}
+
+void GLApiBase::glProgramParameteriFn(GLuint program,
+ GLenum pname,
+ GLint value) {
+ driver_->fn.glProgramParameteriFn(program, pname, value);
+}
+
+void GLApiBase::glPushGroupMarkerEXTFn(GLsizei length, const char* marker) {
+ driver_->fn.glPushGroupMarkerEXTFn(length, marker);
+}
+
+void GLApiBase::glQueryCounterFn(GLuint id, GLenum target) {
+ driver_->fn.glQueryCounterFn(id, target);
+}
+
+void GLApiBase::glReadBufferFn(GLenum src) {
+ driver_->fn.glReadBufferFn(src);
+}
+
+void GLApiBase::glReadPixelsFn(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ void* pixels) {
+ driver_->fn.glReadPixelsFn(x, y, width, height, format, type, pixels);
+}
+
+void GLApiBase::glReleaseShaderCompilerFn(void) {
+ driver_->fn.glReleaseShaderCompilerFn();
+}
+
+void GLApiBase::glRenderbufferStorageEXTFn(GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ driver_->fn.glRenderbufferStorageEXTFn(target, internalformat, width, height);
+}
+
+void GLApiBase::glRenderbufferStorageMultisampleFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ driver_->fn.glRenderbufferStorageMultisampleFn(target, samples,
+ internalformat, width, height);
+}
+
+void GLApiBase::glRenderbufferStorageMultisampleANGLEFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ driver_->fn.glRenderbufferStorageMultisampleANGLEFn(
+ target, samples, internalformat, width, height);
+}
+
+void GLApiBase::glRenderbufferStorageMultisampleEXTFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ driver_->fn.glRenderbufferStorageMultisampleEXTFn(
+ target, samples, internalformat, width, height);
+}
+
+void GLApiBase::glRenderbufferStorageMultisampleIMGFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ driver_->fn.glRenderbufferStorageMultisampleIMGFn(
+ target, samples, internalformat, width, height);
+}
+
+void GLApiBase::glResumeTransformFeedbackFn(void) {
+ driver_->fn.glResumeTransformFeedbackFn();
+}
+
+void GLApiBase::glSampleCoverageFn(GLclampf value, GLboolean invert) {
+ driver_->fn.glSampleCoverageFn(value, invert);
+}
+
+void GLApiBase::glSamplerParameterfFn(GLuint sampler,
+ GLenum pname,
+ GLfloat param) {
+ driver_->fn.glSamplerParameterfFn(sampler, pname, param);
+}
+
+void GLApiBase::glSamplerParameterfvFn(GLuint sampler,
+ GLenum pname,
+ const GLfloat* params) {
+ driver_->fn.glSamplerParameterfvFn(sampler, pname, params);
+}
+
+void GLApiBase::glSamplerParameteriFn(GLuint sampler,
+ GLenum pname,
+ GLint param) {
+ driver_->fn.glSamplerParameteriFn(sampler, pname, param);
+}
+
+void GLApiBase::glSamplerParameterivFn(GLuint sampler,
+ GLenum pname,
+ const GLint* params) {
+ driver_->fn.glSamplerParameterivFn(sampler, pname, params);
+}
+
+void GLApiBase::glScissorFn(GLint x, GLint y, GLsizei width, GLsizei height) {
+ driver_->fn.glScissorFn(x, y, width, height);
+}
+
+void GLApiBase::glSetFenceAPPLEFn(GLuint fence) {
+ driver_->fn.glSetFenceAPPLEFn(fence);
+}
+
+void GLApiBase::glSetFenceNVFn(GLuint fence, GLenum condition) {
+ driver_->fn.glSetFenceNVFn(fence, condition);
+}
+
+void GLApiBase::glShaderBinaryFn(GLsizei n,
+ const GLuint* shaders,
+ GLenum binaryformat,
+ const void* binary,
+ GLsizei length) {
+ driver_->fn.glShaderBinaryFn(n, shaders, binaryformat, binary, length);
+}
+
+void GLApiBase::glShaderSourceFn(GLuint shader,
+ GLsizei count,
+ const char* const* str,
+ const GLint* length) {
+ driver_->fn.glShaderSourceFn(shader, count, str, length);
+}
+
+void GLApiBase::glStencilFuncFn(GLenum func, GLint ref, GLuint mask) {
+ driver_->fn.glStencilFuncFn(func, ref, mask);
+}
+
+void GLApiBase::glStencilFuncSeparateFn(GLenum face,
+ GLenum func,
+ GLint ref,
+ GLuint mask) {
+ driver_->fn.glStencilFuncSeparateFn(face, func, ref, mask);
+}
+
+void GLApiBase::glStencilMaskFn(GLuint mask) {
+ driver_->fn.glStencilMaskFn(mask);
+}
+
+void GLApiBase::glStencilMaskSeparateFn(GLenum face, GLuint mask) {
+ driver_->fn.glStencilMaskSeparateFn(face, mask);
+}
+
+void GLApiBase::glStencilOpFn(GLenum fail, GLenum zfail, GLenum zpass) {
+ driver_->fn.glStencilOpFn(fail, zfail, zpass);
+}
+
+void GLApiBase::glStencilOpSeparateFn(GLenum face,
+ GLenum fail,
+ GLenum zfail,
+ GLenum zpass) {
+ driver_->fn.glStencilOpSeparateFn(face, fail, zfail, zpass);
+}
+
+GLboolean GLApiBase::glTestFenceAPPLEFn(GLuint fence) {
+ return driver_->fn.glTestFenceAPPLEFn(fence);
+}
+
+GLboolean GLApiBase::glTestFenceNVFn(GLuint fence) {
+ return driver_->fn.glTestFenceNVFn(fence);
+}
+
+void GLApiBase::glTexImage2DFn(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) {
+ driver_->fn.glTexImage2DFn(target, level, internalformat, width, height,
+ border, format, type, pixels);
+}
+
+void GLApiBase::glTexImage3DFn(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) {
+ driver_->fn.glTexImage3DFn(target, level, internalformat, width, height,
+ depth, border, format, type, pixels);
+}
+
+void GLApiBase::glTexParameterfFn(GLenum target, GLenum pname, GLfloat param) {
+ driver_->fn.glTexParameterfFn(target, pname, param);
+}
+
+void GLApiBase::glTexParameterfvFn(GLenum target,
+ GLenum pname,
+ const GLfloat* params) {
+ driver_->fn.glTexParameterfvFn(target, pname, params);
+}
+
+void GLApiBase::glTexParameteriFn(GLenum target, GLenum pname, GLint param) {
+ driver_->fn.glTexParameteriFn(target, pname, param);
+}
+
+void GLApiBase::glTexParameterivFn(GLenum target,
+ GLenum pname,
+ const GLint* params) {
+ driver_->fn.glTexParameterivFn(target, pname, params);
+}
+
+void GLApiBase::glTexStorage2DEXTFn(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ driver_->fn.glTexStorage2DEXTFn(target, levels, internalformat, width,
+ height);
+}
+
+void GLApiBase::glTexStorage3DFn(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth) {
+ driver_->fn.glTexStorage3DFn(target, levels, internalformat, width, height,
+ depth);
+}
+
+void GLApiBase::glTexSubImage2DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels) {
+ driver_->fn.glTexSubImage2DFn(target, level, xoffset, yoffset, width, height,
+ format, type, pixels);
+}
+
+void GLApiBase::glTransformFeedbackVaryingsFn(GLuint program,
+ GLsizei count,
+ const char* const* varyings,
+ GLenum bufferMode) {
+ driver_->fn.glTransformFeedbackVaryingsFn(program, count, varyings,
+ bufferMode);
+}
+
+void GLApiBase::glUniform1fFn(GLint location, GLfloat x) {
+ driver_->fn.glUniform1fFn(location, x);
+}
+
+void GLApiBase::glUniform1fvFn(GLint location,
+ GLsizei count,
+ const GLfloat* v) {
+ driver_->fn.glUniform1fvFn(location, count, v);
+}
+
+void GLApiBase::glUniform1iFn(GLint location, GLint x) {
+ driver_->fn.glUniform1iFn(location, x);
+}
+
+void GLApiBase::glUniform1ivFn(GLint location, GLsizei count, const GLint* v) {
+ driver_->fn.glUniform1ivFn(location, count, v);
+}
+
+void GLApiBase::glUniform1uiFn(GLint location, GLuint v0) {
+ driver_->fn.glUniform1uiFn(location, v0);
+}
+
+void GLApiBase::glUniform1uivFn(GLint location,
+ GLsizei count,
+ const GLuint* v) {
+ driver_->fn.glUniform1uivFn(location, count, v);
+}
+
+void GLApiBase::glUniform2fFn(GLint location, GLfloat x, GLfloat y) {
+ driver_->fn.glUniform2fFn(location, x, y);
+}
+
+void GLApiBase::glUniform2fvFn(GLint location,
+ GLsizei count,
+ const GLfloat* v) {
+ driver_->fn.glUniform2fvFn(location, count, v);
+}
+
+void GLApiBase::glUniform2iFn(GLint location, GLint x, GLint y) {
+ driver_->fn.glUniform2iFn(location, x, y);
+}
+
+void GLApiBase::glUniform2ivFn(GLint location, GLsizei count, const GLint* v) {
+ driver_->fn.glUniform2ivFn(location, count, v);
+}
+
+void GLApiBase::glUniform2uiFn(GLint location, GLuint v0, GLuint v1) {
+ driver_->fn.glUniform2uiFn(location, v0, v1);
+}
+
+void GLApiBase::glUniform2uivFn(GLint location,
+ GLsizei count,
+ const GLuint* v) {
+ driver_->fn.glUniform2uivFn(location, count, v);
+}
+
+void GLApiBase::glUniform3fFn(GLint location, GLfloat x, GLfloat y, GLfloat z) {
+ driver_->fn.glUniform3fFn(location, x, y, z);
+}
+
+void GLApiBase::glUniform3fvFn(GLint location,
+ GLsizei count,
+ const GLfloat* v) {
+ driver_->fn.glUniform3fvFn(location, count, v);
+}
+
+void GLApiBase::glUniform3iFn(GLint location, GLint x, GLint y, GLint z) {
+ driver_->fn.glUniform3iFn(location, x, y, z);
+}
+
+void GLApiBase::glUniform3ivFn(GLint location, GLsizei count, const GLint* v) {
+ driver_->fn.glUniform3ivFn(location, count, v);
+}
+
+void GLApiBase::glUniform3uiFn(GLint location,
+ GLuint v0,
+ GLuint v1,
+ GLuint v2) {
+ driver_->fn.glUniform3uiFn(location, v0, v1, v2);
+}
+
+void GLApiBase::glUniform3uivFn(GLint location,
+ GLsizei count,
+ const GLuint* v) {
+ driver_->fn.glUniform3uivFn(location, count, v);
+}
+
+void GLApiBase::glUniform4fFn(GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) {
+ driver_->fn.glUniform4fFn(location, x, y, z, w);
+}
+
+void GLApiBase::glUniform4fvFn(GLint location,
+ GLsizei count,
+ const GLfloat* v) {
+ driver_->fn.glUniform4fvFn(location, count, v);
+}
+
+void GLApiBase::glUniform4iFn(GLint location,
+ GLint x,
+ GLint y,
+ GLint z,
+ GLint w) {
+ driver_->fn.glUniform4iFn(location, x, y, z, w);
+}
+
+void GLApiBase::glUniform4ivFn(GLint location, GLsizei count, const GLint* v) {
+ driver_->fn.glUniform4ivFn(location, count, v);
+}
+
+void GLApiBase::glUniform4uiFn(GLint location,
+ GLuint v0,
+ GLuint v1,
+ GLuint v2,
+ GLuint v3) {
+ driver_->fn.glUniform4uiFn(location, v0, v1, v2, v3);
+}
+
+void GLApiBase::glUniform4uivFn(GLint location,
+ GLsizei count,
+ const GLuint* v) {
+ driver_->fn.glUniform4uivFn(location, count, v);
+}
+
+void GLApiBase::glUniformBlockBindingFn(GLuint program,
+ GLuint uniformBlockIndex,
+ GLuint uniformBlockBinding) {
+ driver_->fn.glUniformBlockBindingFn(program, uniformBlockIndex,
+ uniformBlockBinding);
+}
+
+void GLApiBase::glUniformMatrix2fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ driver_->fn.glUniformMatrix2fvFn(location, count, transpose, value);
+}
+
+void GLApiBase::glUniformMatrix2x3fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ driver_->fn.glUniformMatrix2x3fvFn(location, count, transpose, value);
+}
+
+void GLApiBase::glUniformMatrix2x4fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ driver_->fn.glUniformMatrix2x4fvFn(location, count, transpose, value);
+}
+
+void GLApiBase::glUniformMatrix3fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ driver_->fn.glUniformMatrix3fvFn(location, count, transpose, value);
+}
+
+void GLApiBase::glUniformMatrix3x2fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ driver_->fn.glUniformMatrix3x2fvFn(location, count, transpose, value);
+}
+
+void GLApiBase::glUniformMatrix3x4fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ driver_->fn.glUniformMatrix3x4fvFn(location, count, transpose, value);
+}
+
+void GLApiBase::glUniformMatrix4fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ driver_->fn.glUniformMatrix4fvFn(location, count, transpose, value);
+}
+
+void GLApiBase::glUniformMatrix4x2fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ driver_->fn.glUniformMatrix4x2fvFn(location, count, transpose, value);
+}
+
+void GLApiBase::glUniformMatrix4x3fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ driver_->fn.glUniformMatrix4x3fvFn(location, count, transpose, value);
+}
+
+GLboolean GLApiBase::glUnmapBufferFn(GLenum target) {
+ return driver_->fn.glUnmapBufferFn(target);
+}
+
+void GLApiBase::glUseProgramFn(GLuint program) {
+ driver_->fn.glUseProgramFn(program);
+}
+
+void GLApiBase::glValidateProgramFn(GLuint program) {
+ driver_->fn.glValidateProgramFn(program);
+}
+
+void GLApiBase::glVertexAttrib1fFn(GLuint indx, GLfloat x) {
+ driver_->fn.glVertexAttrib1fFn(indx, x);
+}
+
+void GLApiBase::glVertexAttrib1fvFn(GLuint indx, const GLfloat* values) {
+ driver_->fn.glVertexAttrib1fvFn(indx, values);
+}
+
+void GLApiBase::glVertexAttrib2fFn(GLuint indx, GLfloat x, GLfloat y) {
+ driver_->fn.glVertexAttrib2fFn(indx, x, y);
+}
+
+void GLApiBase::glVertexAttrib2fvFn(GLuint indx, const GLfloat* values) {
+ driver_->fn.glVertexAttrib2fvFn(indx, values);
+}
+
+void GLApiBase::glVertexAttrib3fFn(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z) {
+ driver_->fn.glVertexAttrib3fFn(indx, x, y, z);
+}
+
+void GLApiBase::glVertexAttrib3fvFn(GLuint indx, const GLfloat* values) {
+ driver_->fn.glVertexAttrib3fvFn(indx, values);
+}
+
+void GLApiBase::glVertexAttrib4fFn(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) {
+ driver_->fn.glVertexAttrib4fFn(indx, x, y, z, w);
+}
+
+void GLApiBase::glVertexAttrib4fvFn(GLuint indx, const GLfloat* values) {
+ driver_->fn.glVertexAttrib4fvFn(indx, values);
+}
+
+void GLApiBase::glVertexAttribDivisorANGLEFn(GLuint index, GLuint divisor) {
+ driver_->fn.glVertexAttribDivisorANGLEFn(index, divisor);
+}
+
+void GLApiBase::glVertexAttribI4iFn(GLuint indx,
+ GLint x,
+ GLint y,
+ GLint z,
+ GLint w) {
+ driver_->fn.glVertexAttribI4iFn(indx, x, y, z, w);
+}
+
+void GLApiBase::glVertexAttribI4ivFn(GLuint indx, const GLint* values) {
+ driver_->fn.glVertexAttribI4ivFn(indx, values);
+}
+
+void GLApiBase::glVertexAttribI4uiFn(GLuint indx,
+ GLuint x,
+ GLuint y,
+ GLuint z,
+ GLuint w) {
+ driver_->fn.glVertexAttribI4uiFn(indx, x, y, z, w);
+}
+
+void GLApiBase::glVertexAttribI4uivFn(GLuint indx, const GLuint* values) {
+ driver_->fn.glVertexAttribI4uivFn(indx, values);
+}
+
+void GLApiBase::glVertexAttribIPointerFn(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLsizei stride,
+ const void* ptr) {
+ driver_->fn.glVertexAttribIPointerFn(indx, size, type, stride, ptr);
+}
+
+void GLApiBase::glVertexAttribPointerFn(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLboolean normalized,
+ GLsizei stride,
+ const void* ptr) {
+ driver_->fn.glVertexAttribPointerFn(indx, size, type, normalized, stride,
+ ptr);
+}
+
+void GLApiBase::glViewportFn(GLint x, GLint y, GLsizei width, GLsizei height) {
+ driver_->fn.glViewportFn(x, y, width, height);
+}
+
+GLenum GLApiBase::glWaitSyncFn(GLsync sync,
+ GLbitfield flags,
+ GLuint64 timeout) {
+ return driver_->fn.glWaitSyncFn(sync, flags, timeout);
+}
+
+void TraceGLApi::glActiveTextureFn(GLenum texture) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glActiveTexture")
+ gl_api_->glActiveTextureFn(texture);
+}
+
+void TraceGLApi::glAttachShaderFn(GLuint program, GLuint shader) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glAttachShader")
+ gl_api_->glAttachShaderFn(program, shader);
+}
+
+void TraceGLApi::glBeginQueryFn(GLenum target, GLuint id) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBeginQuery")
+ 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);
+}
+
+void TraceGLApi::glBindAttribLocationFn(GLuint program,
+ GLuint index,
+ const char* name) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindAttribLocation")
+ gl_api_->glBindAttribLocationFn(program, index, name);
+}
+
+void TraceGLApi::glBindBufferFn(GLenum target, GLuint buffer) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindBuffer")
+ gl_api_->glBindBufferFn(target, buffer);
+}
+
+void TraceGLApi::glBindBufferBaseFn(GLenum target,
+ GLuint index,
+ GLuint buffer) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindBufferBase")
+ gl_api_->glBindBufferBaseFn(target, index, buffer);
+}
+
+void TraceGLApi::glBindBufferRangeFn(GLenum target,
+ GLuint index,
+ GLuint buffer,
+ GLintptr offset,
+ GLsizeiptr size) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindBufferRange")
+ gl_api_->glBindBufferRangeFn(target, index, buffer, offset, size);
+}
+
+void TraceGLApi::glBindFragDataLocationFn(GLuint program,
+ GLuint colorNumber,
+ const char* name) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindFragDataLocation")
+ gl_api_->glBindFragDataLocationFn(program, colorNumber, name);
+}
+
+void TraceGLApi::glBindFragDataLocationIndexedFn(GLuint program,
+ GLuint colorNumber,
+ GLuint index,
+ const char* name) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu",
+ "TraceGLAPI::glBindFragDataLocationIndexed")
+ gl_api_->glBindFragDataLocationIndexedFn(program, colorNumber, index, name);
+}
+
+void TraceGLApi::glBindFramebufferEXTFn(GLenum target, GLuint framebuffer) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindFramebufferEXT")
+ gl_api_->glBindFramebufferEXTFn(target, framebuffer);
+}
+
+void TraceGLApi::glBindRenderbufferEXTFn(GLenum target, GLuint renderbuffer) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindRenderbufferEXT")
+ gl_api_->glBindRenderbufferEXTFn(target, renderbuffer);
+}
+
+void TraceGLApi::glBindSamplerFn(GLuint unit, GLuint sampler) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindSampler")
+ gl_api_->glBindSamplerFn(unit, sampler);
+}
+
+void TraceGLApi::glBindTextureFn(GLenum target, GLuint texture) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindTexture")
+ gl_api_->glBindTextureFn(target, texture);
+}
+
+void TraceGLApi::glBindTransformFeedbackFn(GLenum target, GLuint id) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindTransformFeedback")
+ gl_api_->glBindTransformFeedbackFn(target, id);
+}
+
+void TraceGLApi::glBindVertexArrayOESFn(GLuint array) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindVertexArrayOES")
+ gl_api_->glBindVertexArrayOESFn(array);
+}
+
+void TraceGLApi::glBlendBarrierKHRFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendBarrierKHR")
+ gl_api_->glBlendBarrierKHRFn();
+}
+
+void TraceGLApi::glBlendColorFn(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendColor")
+ gl_api_->glBlendColorFn(red, green, blue, alpha);
+}
+
+void TraceGLApi::glBlendEquationFn(GLenum mode) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendEquation")
+ gl_api_->glBlendEquationFn(mode);
+}
+
+void TraceGLApi::glBlendEquationSeparateFn(GLenum modeRGB, GLenum modeAlpha) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendEquationSeparate")
+ gl_api_->glBlendEquationSeparateFn(modeRGB, modeAlpha);
+}
+
+void TraceGLApi::glBlendFuncFn(GLenum sfactor, GLenum dfactor) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendFunc")
+ gl_api_->glBlendFuncFn(sfactor, dfactor);
+}
+
+void TraceGLApi::glBlendFuncSeparateFn(GLenum srcRGB,
+ GLenum dstRGB,
+ GLenum srcAlpha,
+ GLenum dstAlpha) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendFuncSeparate")
+ gl_api_->glBlendFuncSeparateFn(srcRGB, dstRGB, srcAlpha, dstAlpha);
+}
+
+void TraceGLApi::glBlitFramebufferFn(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlitFramebuffer")
+ gl_api_->glBlitFramebufferFn(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1,
+ dstY1, mask, filter);
+}
+
+void TraceGLApi::glBlitFramebufferANGLEFn(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlitFramebufferANGLE")
+ gl_api_->glBlitFramebufferANGLEFn(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0,
+ dstX1, dstY1, mask, filter);
+}
+
+void TraceGLApi::glBlitFramebufferEXTFn(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlitFramebufferEXT")
+ gl_api_->glBlitFramebufferEXTFn(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0,
+ dstX1, dstY1, mask, filter);
+}
+
+void TraceGLApi::glBufferDataFn(GLenum target,
+ GLsizeiptr size,
+ const void* data,
+ GLenum usage) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBufferData")
+ gl_api_->glBufferDataFn(target, size, data, usage);
+}
+
+void TraceGLApi::glBufferSubDataFn(GLenum target,
+ GLintptr offset,
+ GLsizeiptr size,
+ const void* data) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBufferSubData")
+ gl_api_->glBufferSubDataFn(target, offset, size, data);
+}
+
+GLenum TraceGLApi::glCheckFramebufferStatusEXTFn(GLenum target) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu",
+ "TraceGLAPI::glCheckFramebufferStatusEXT")
+ return gl_api_->glCheckFramebufferStatusEXTFn(target);
+}
+
+void TraceGLApi::glClearFn(GLbitfield mask) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClear")
+ gl_api_->glClearFn(mask);
+}
+
+void TraceGLApi::glClearBufferfiFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat depth,
+ GLint stencil) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearBufferfi")
+ gl_api_->glClearBufferfiFn(buffer, drawbuffer, depth, stencil);
+}
+
+void TraceGLApi::glClearBufferfvFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearBufferfv")
+ gl_api_->glClearBufferfvFn(buffer, drawbuffer, value);
+}
+
+void TraceGLApi::glClearBufferivFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLint* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearBufferiv")
+ gl_api_->glClearBufferivFn(buffer, drawbuffer, value);
+}
+
+void TraceGLApi::glClearBufferuivFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLuint* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearBufferuiv")
+ gl_api_->glClearBufferuivFn(buffer, drawbuffer, value);
+}
+
+void TraceGLApi::glClearColorFn(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearColor")
+ gl_api_->glClearColorFn(red, green, blue, alpha);
+}
+
+void TraceGLApi::glClearDepthFn(GLclampd depth) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearDepth")
+ gl_api_->glClearDepthFn(depth);
+}
+
+void TraceGLApi::glClearDepthfFn(GLclampf depth) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearDepthf")
+ gl_api_->glClearDepthfFn(depth);
+}
+
+void TraceGLApi::glClearStencilFn(GLint s) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearStencil")
+ gl_api_->glClearStencilFn(s);
+}
+
+GLenum TraceGLApi::glClientWaitSyncFn(GLsync sync,
+ GLbitfield flags,
+ GLuint64 timeout) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClientWaitSync")
+ return gl_api_->glClientWaitSyncFn(sync, flags, timeout);
+}
+
+void TraceGLApi::glColorMaskFn(GLboolean red,
+ GLboolean green,
+ GLboolean blue,
+ GLboolean alpha) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glColorMask")
+ gl_api_->glColorMaskFn(red, green, blue, alpha);
+}
+
+void TraceGLApi::glCompileShaderFn(GLuint shader) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCompileShader")
+ gl_api_->glCompileShaderFn(shader);
+}
+
+void TraceGLApi::glCompressedTexImage2DFn(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCompressedTexImage2D")
+ gl_api_->glCompressedTexImage2DFn(target, level, internalformat, width,
+ height, border, imageSize, data);
+}
+
+void TraceGLApi::glCompressedTexImage3DFn(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCompressedTexImage3D")
+ gl_api_->glCompressedTexImage3DFn(target, level, internalformat, width,
+ height, depth, border, imageSize, data);
+}
+
+void TraceGLApi::glCompressedTexSubImage2DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLsizei imageSize,
+ const void* data) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCompressedTexSubImage2D")
+ gl_api_->glCompressedTexSubImage2DFn(target, level, xoffset, yoffset, width,
+ height, format, imageSize, data);
+}
+
+void TraceGLApi::glCopyBufferSubDataFn(GLenum readTarget,
+ GLenum writeTarget,
+ GLintptr readOffset,
+ GLintptr writeOffset,
+ GLsizeiptr size) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCopyBufferSubData")
+ gl_api_->glCopyBufferSubDataFn(readTarget, writeTarget, readOffset,
+ writeOffset, size);
+}
+
+void TraceGLApi::glCopyTexImage2DFn(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLint border) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCopyTexImage2D")
+ gl_api_->glCopyTexImage2DFn(target, level, internalformat, x, y, width,
+ height, border);
+}
+
+void TraceGLApi::glCopyTexSubImage2DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCopyTexSubImage2D")
+ gl_api_->glCopyTexSubImage2DFn(target, level, xoffset, yoffset, x, y, width,
+ height);
+}
+
+void TraceGLApi::glCopyTexSubImage3DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint zoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCopyTexSubImage3D")
+ gl_api_->glCopyTexSubImage3DFn(target, level, xoffset, yoffset, zoffset, x, y,
+ width, height);
+}
+
+GLuint TraceGLApi::glCreateProgramFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCreateProgram")
+ return gl_api_->glCreateProgramFn();
+}
+
+GLuint TraceGLApi::glCreateShaderFn(GLenum type) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCreateShader")
+ return gl_api_->glCreateShaderFn(type);
+}
+
+void TraceGLApi::glCullFaceFn(GLenum mode) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCullFace")
+ gl_api_->glCullFaceFn(mode);
+}
+
+void TraceGLApi::glDeleteBuffersARBFn(GLsizei n, const GLuint* buffers) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteBuffersARB")
+ gl_api_->glDeleteBuffersARBFn(n, buffers);
+}
+
+void TraceGLApi::glDeleteFencesAPPLEFn(GLsizei n, const GLuint* fences) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteFencesAPPLE")
+ gl_api_->glDeleteFencesAPPLEFn(n, fences);
+}
+
+void TraceGLApi::glDeleteFencesNVFn(GLsizei n, const GLuint* fences) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteFencesNV")
+ gl_api_->glDeleteFencesNVFn(n, fences);
+}
+
+void TraceGLApi::glDeleteFramebuffersEXTFn(GLsizei n,
+ const GLuint* framebuffers) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteFramebuffersEXT")
+ gl_api_->glDeleteFramebuffersEXTFn(n, framebuffers);
+}
+
+void TraceGLApi::glDeleteProgramFn(GLuint program) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteProgram")
+ gl_api_->glDeleteProgramFn(program);
+}
+
+void TraceGLApi::glDeleteQueriesFn(GLsizei n, const GLuint* ids) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteQueries")
+ 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")
+ gl_api_->glDeleteRenderbuffersEXTFn(n, renderbuffers);
+}
+
+void TraceGLApi::glDeleteSamplersFn(GLsizei n, const GLuint* samplers) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteSamplers")
+ gl_api_->glDeleteSamplersFn(n, samplers);
+}
+
+void TraceGLApi::glDeleteShaderFn(GLuint shader) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteShader")
+ gl_api_->glDeleteShaderFn(shader);
+}
+
+void TraceGLApi::glDeleteSyncFn(GLsync sync) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteSync")
+ gl_api_->glDeleteSyncFn(sync);
+}
+
+void TraceGLApi::glDeleteTexturesFn(GLsizei n, const GLuint* textures) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteTextures")
+ gl_api_->glDeleteTexturesFn(n, textures);
+}
+
+void TraceGLApi::glDeleteTransformFeedbacksFn(GLsizei n, const GLuint* ids) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteTransformFeedbacks")
+ gl_api_->glDeleteTransformFeedbacksFn(n, ids);
+}
+
+void TraceGLApi::glDeleteVertexArraysOESFn(GLsizei n, const GLuint* arrays) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteVertexArraysOES")
+ gl_api_->glDeleteVertexArraysOESFn(n, arrays);
+}
+
+void TraceGLApi::glDepthFuncFn(GLenum func) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDepthFunc")
+ gl_api_->glDepthFuncFn(func);
+}
+
+void TraceGLApi::glDepthMaskFn(GLboolean flag) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDepthMask")
+ gl_api_->glDepthMaskFn(flag);
+}
+
+void TraceGLApi::glDepthRangeFn(GLclampd zNear, GLclampd zFar) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDepthRange")
+ gl_api_->glDepthRangeFn(zNear, zFar);
+}
+
+void TraceGLApi::glDepthRangefFn(GLclampf zNear, GLclampf zFar) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDepthRangef")
+ gl_api_->glDepthRangefFn(zNear, zFar);
+}
+
+void TraceGLApi::glDetachShaderFn(GLuint program, GLuint shader) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDetachShader")
+ gl_api_->glDetachShaderFn(program, shader);
+}
+
+void TraceGLApi::glDisableFn(GLenum cap) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDisable")
+ gl_api_->glDisableFn(cap);
+}
+
+void TraceGLApi::glDisableVertexAttribArrayFn(GLuint index) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDisableVertexAttribArray")
+ gl_api_->glDisableVertexAttribArrayFn(index);
+}
+
+void TraceGLApi::glDiscardFramebufferEXTFn(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDiscardFramebufferEXT")
+ gl_api_->glDiscardFramebufferEXTFn(target, numAttachments, attachments);
+}
+
+void TraceGLApi::glDrawArraysFn(GLenum mode, GLint first, GLsizei count) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawArrays")
+ gl_api_->glDrawArraysFn(mode, first, count);
+}
+
+void TraceGLApi::glDrawArraysInstancedANGLEFn(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawArraysInstancedANGLE")
+ gl_api_->glDrawArraysInstancedANGLEFn(mode, first, count, primcount);
+}
+
+void TraceGLApi::glDrawBufferFn(GLenum mode) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawBuffer")
+ gl_api_->glDrawBufferFn(mode);
+}
+
+void TraceGLApi::glDrawBuffersARBFn(GLsizei n, const GLenum* bufs) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawBuffersARB")
+ gl_api_->glDrawBuffersARBFn(n, bufs);
+}
+
+void TraceGLApi::glDrawElementsFn(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawElements")
+ gl_api_->glDrawElementsFn(mode, count, type, indices);
+}
+
+void TraceGLApi::glDrawElementsInstancedANGLEFn(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu",
+ "TraceGLAPI::glDrawElementsInstancedANGLE")
+ gl_api_->glDrawElementsInstancedANGLEFn(mode, count, type, indices,
+ primcount);
+}
+
+void TraceGLApi::glDrawRangeElementsFn(GLenum mode,
+ GLuint start,
+ GLuint end,
+ GLsizei count,
+ GLenum type,
+ const void* indices) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawRangeElements")
+ gl_api_->glDrawRangeElementsFn(mode, start, end, count, type, indices);
+}
+
+void TraceGLApi::glEGLImageTargetRenderbufferStorageOESFn(GLenum target,
+ GLeglImageOES image) {
+ TRACE_EVENT_BINARY_EFFICIENT0(
+ "gpu", "TraceGLAPI::glEGLImageTargetRenderbufferStorageOES")
+ gl_api_->glEGLImageTargetRenderbufferStorageOESFn(target, image);
+}
+
+void TraceGLApi::glEGLImageTargetTexture2DOESFn(GLenum target,
+ GLeglImageOES image) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu",
+ "TraceGLAPI::glEGLImageTargetTexture2DOES")
+ gl_api_->glEGLImageTargetTexture2DOESFn(target, image);
+}
+
+void TraceGLApi::glEnableFn(GLenum cap) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEnable")
+ gl_api_->glEnableFn(cap);
+}
+
+void TraceGLApi::glEnableVertexAttribArrayFn(GLuint index) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEnableVertexAttribArray")
+ gl_api_->glEnableVertexAttribArrayFn(index);
+}
+
+void TraceGLApi::glEndQueryFn(GLenum target) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEndQuery")
+ 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();
+}
+
+GLsync TraceGLApi::glFenceSyncFn(GLenum condition, GLbitfield flags) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFenceSync")
+ return gl_api_->glFenceSyncFn(condition, flags);
+}
+
+void TraceGLApi::glFinishFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFinish")
+ gl_api_->glFinishFn();
+}
+
+void TraceGLApi::glFinishFenceAPPLEFn(GLuint fence) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFinishFenceAPPLE")
+ gl_api_->glFinishFenceAPPLEFn(fence);
+}
+
+void TraceGLApi::glFinishFenceNVFn(GLuint fence) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFinishFenceNV")
+ gl_api_->glFinishFenceNVFn(fence);
+}
+
+void TraceGLApi::glFlushFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFlush")
+ gl_api_->glFlushFn();
+}
+
+void TraceGLApi::glFlushMappedBufferRangeFn(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFlushMappedBufferRange")
+ gl_api_->glFlushMappedBufferRangeFn(target, offset, length);
+}
+
+void TraceGLApi::glFramebufferRenderbufferEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu",
+ "TraceGLAPI::glFramebufferRenderbufferEXT")
+ gl_api_->glFramebufferRenderbufferEXTFn(target, attachment,
+ renderbuffertarget, renderbuffer);
+}
+
+void TraceGLApi::glFramebufferTexture2DEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFramebufferTexture2DEXT")
+ gl_api_->glFramebufferTexture2DEXTFn(target, attachment, textarget, texture,
+ level);
+}
+
+void TraceGLApi::glFramebufferTexture2DMultisampleEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) {
+ TRACE_EVENT_BINARY_EFFICIENT0(
+ "gpu", "TraceGLAPI::glFramebufferTexture2DMultisampleEXT")
+ gl_api_->glFramebufferTexture2DMultisampleEXTFn(target, attachment, textarget,
+ texture, level, samples);
+}
+
+void TraceGLApi::glFramebufferTexture2DMultisampleIMGFn(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) {
+ TRACE_EVENT_BINARY_EFFICIENT0(
+ "gpu", "TraceGLAPI::glFramebufferTexture2DMultisampleIMG")
+ gl_api_->glFramebufferTexture2DMultisampleIMGFn(target, attachment, textarget,
+ texture, level, samples);
+}
+
+void TraceGLApi::glFramebufferTextureLayerFn(GLenum target,
+ GLenum attachment,
+ GLuint texture,
+ GLint level,
+ GLint layer) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFramebufferTextureLayer")
+ gl_api_->glFramebufferTextureLayerFn(target, attachment, texture, level,
+ layer);
+}
+
+void TraceGLApi::glFrontFaceFn(GLenum mode) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFrontFace")
+ gl_api_->glFrontFaceFn(mode);
+}
+
+void TraceGLApi::glGenBuffersARBFn(GLsizei n, GLuint* buffers) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenBuffersARB")
+ gl_api_->glGenBuffersARBFn(n, buffers);
+}
+
+void TraceGLApi::glGenerateMipmapEXTFn(GLenum target) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenerateMipmapEXT")
+ gl_api_->glGenerateMipmapEXTFn(target);
+}
+
+void TraceGLApi::glGenFencesAPPLEFn(GLsizei n, GLuint* fences) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenFencesAPPLE")
+ gl_api_->glGenFencesAPPLEFn(n, fences);
+}
+
+void TraceGLApi::glGenFencesNVFn(GLsizei n, GLuint* fences) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenFencesNV")
+ gl_api_->glGenFencesNVFn(n, fences);
+}
+
+void TraceGLApi::glGenFramebuffersEXTFn(GLsizei n, GLuint* framebuffers) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenFramebuffersEXT")
+ gl_api_->glGenFramebuffersEXTFn(n, framebuffers);
+}
+
+void TraceGLApi::glGenQueriesFn(GLsizei n, GLuint* ids) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenQueries")
+ 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);
+}
+
+void TraceGLApi::glGenSamplersFn(GLsizei n, GLuint* samplers) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenSamplers")
+ gl_api_->glGenSamplersFn(n, samplers);
+}
+
+void TraceGLApi::glGenTexturesFn(GLsizei n, GLuint* textures) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenTextures")
+ gl_api_->glGenTexturesFn(n, textures);
+}
+
+void TraceGLApi::glGenTransformFeedbacksFn(GLsizei n, GLuint* ids) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenTransformFeedbacks")
+ gl_api_->glGenTransformFeedbacksFn(n, ids);
+}
+
+void TraceGLApi::glGenVertexArraysOESFn(GLsizei n, GLuint* arrays) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenVertexArraysOES")
+ gl_api_->glGenVertexArraysOESFn(n, arrays);
+}
+
+void TraceGLApi::glGetActiveAttribFn(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetActiveAttrib")
+ gl_api_->glGetActiveAttribFn(program, index, bufsize, length, size, type,
+ name);
+}
+
+void TraceGLApi::glGetActiveUniformFn(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetActiveUniform")
+ gl_api_->glGetActiveUniformFn(program, index, bufsize, length, size, type,
+ name);
+}
+
+void TraceGLApi::glGetActiveUniformBlockivFn(GLuint program,
+ GLuint uniformBlockIndex,
+ GLenum pname,
+ GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetActiveUniformBlockiv")
+ gl_api_->glGetActiveUniformBlockivFn(program, uniformBlockIndex, pname,
+ params);
+}
+
+void TraceGLApi::glGetActiveUniformBlockNameFn(GLuint program,
+ GLuint uniformBlockIndex,
+ GLsizei bufSize,
+ GLsizei* length,
+ char* uniformBlockName) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu",
+ "TraceGLAPI::glGetActiveUniformBlockName")
+ gl_api_->glGetActiveUniformBlockNameFn(program, uniformBlockIndex, bufSize,
+ length, uniformBlockName);
+}
+
+void TraceGLApi::glGetActiveUniformsivFn(GLuint program,
+ GLsizei uniformCount,
+ const GLuint* uniformIndices,
+ GLenum pname,
+ GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetActiveUniformsiv")
+ gl_api_->glGetActiveUniformsivFn(program, uniformCount, uniformIndices, pname,
+ params);
+}
+
+void TraceGLApi::glGetAttachedShadersFn(GLuint program,
+ GLsizei maxcount,
+ GLsizei* count,
+ GLuint* shaders) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetAttachedShaders")
+ gl_api_->glGetAttachedShadersFn(program, maxcount, count, shaders);
+}
+
+GLint TraceGLApi::glGetAttribLocationFn(GLuint program, const char* name) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetAttribLocation")
+ return gl_api_->glGetAttribLocationFn(program, name);
+}
+
+void TraceGLApi::glGetBooleanvFn(GLenum pname, GLboolean* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetBooleanv")
+ gl_api_->glGetBooleanvFn(pname, params);
+}
+
+void TraceGLApi::glGetBufferParameterivFn(GLenum target,
+ GLenum pname,
+ GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetBufferParameteriv")
+ gl_api_->glGetBufferParameterivFn(target, pname, params);
+}
+
+GLenum TraceGLApi::glGetErrorFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetError")
+ return gl_api_->glGetErrorFn();
+}
+
+void TraceGLApi::glGetFenceivNVFn(GLuint fence, GLenum pname, GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetFenceivNV")
+ gl_api_->glGetFenceivNVFn(fence, pname, params);
+}
+
+void TraceGLApi::glGetFloatvFn(GLenum pname, GLfloat* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetFloatv")
+ gl_api_->glGetFloatvFn(pname, params);
+}
+
+GLint TraceGLApi::glGetFragDataLocationFn(GLuint program, const char* name) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetFragDataLocation")
+ return gl_api_->glGetFragDataLocationFn(program, name);
+}
+
+void TraceGLApi::glGetFramebufferAttachmentParameterivEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0(
+ "gpu", "TraceGLAPI::glGetFramebufferAttachmentParameterivEXT")
+ gl_api_->glGetFramebufferAttachmentParameterivEXTFn(target, attachment, pname,
+ params);
+}
+
+GLenum TraceGLApi::glGetGraphicsResetStatusARBFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu",
+ "TraceGLAPI::glGetGraphicsResetStatusARB")
+ return gl_api_->glGetGraphicsResetStatusARBFn();
+}
+
+void TraceGLApi::glGetInteger64i_vFn(GLenum target,
+ GLuint index,
+ GLint64* data) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetInteger64i_v")
+ gl_api_->glGetInteger64i_vFn(target, index, data);
+}
+
+void TraceGLApi::glGetInteger64vFn(GLenum pname, GLint64* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetInteger64v")
+ gl_api_->glGetInteger64vFn(pname, params);
+}
+
+void TraceGLApi::glGetIntegeri_vFn(GLenum target, GLuint index, GLint* data) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetIntegeri_v")
+ gl_api_->glGetIntegeri_vFn(target, index, data);
+}
+
+void TraceGLApi::glGetIntegervFn(GLenum pname, GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetIntegerv")
+ gl_api_->glGetIntegervFn(pname, params);
+}
+
+void TraceGLApi::glGetInternalformativFn(GLenum target,
+ GLenum internalformat,
+ GLenum pname,
+ GLsizei bufSize,
+ GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetInternalformativ")
+ gl_api_->glGetInternalformativFn(target, internalformat, pname, bufSize,
+ params);
+}
+
+void TraceGLApi::glGetProgramBinaryFn(GLuint program,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* binaryFormat,
+ GLvoid* binary) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramBinary")
+ gl_api_->glGetProgramBinaryFn(program, bufSize, length, binaryFormat, binary);
+}
+
+void TraceGLApi::glGetProgramInfoLogFn(GLuint program,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramInfoLog")
+ gl_api_->glGetProgramInfoLogFn(program, bufsize, length, infolog);
+}
+
+void TraceGLApi::glGetProgramivFn(GLuint program, GLenum pname, GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramiv")
+ gl_api_->glGetProgramivFn(program, pname, params);
+}
+
+void TraceGLApi::glGetQueryivFn(GLenum target, GLenum pname, GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryiv")
+ 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) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryObjecti64v")
+ gl_api_->glGetQueryObjecti64vFn(id, pname, params);
+}
+
+void TraceGLApi::glGetQueryObjectivFn(GLuint id, GLenum pname, GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryObjectiv")
+ 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) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryObjectui64v")
+ gl_api_->glGetQueryObjectui64vFn(id, pname, params);
+}
+
+void TraceGLApi::glGetQueryObjectuivFn(GLuint id,
+ GLenum pname,
+ GLuint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryObjectuiv")
+ 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) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu",
+ "TraceGLAPI::glGetRenderbufferParameterivEXT")
+ gl_api_->glGetRenderbufferParameterivEXTFn(target, pname, params);
+}
+
+void TraceGLApi::glGetSamplerParameterfvFn(GLuint sampler,
+ GLenum pname,
+ GLfloat* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetSamplerParameterfv")
+ gl_api_->glGetSamplerParameterfvFn(sampler, pname, params);
+}
+
+void TraceGLApi::glGetSamplerParameterivFn(GLuint sampler,
+ GLenum pname,
+ GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetSamplerParameteriv")
+ gl_api_->glGetSamplerParameterivFn(sampler, pname, params);
+}
+
+void TraceGLApi::glGetShaderInfoLogFn(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetShaderInfoLog")
+ gl_api_->glGetShaderInfoLogFn(shader, bufsize, length, infolog);
+}
+
+void TraceGLApi::glGetShaderivFn(GLuint shader, GLenum pname, GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetShaderiv")
+ gl_api_->glGetShaderivFn(shader, pname, params);
+}
+
+void TraceGLApi::glGetShaderPrecisionFormatFn(GLenum shadertype,
+ GLenum precisiontype,
+ GLint* range,
+ GLint* precision) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetShaderPrecisionFormat")
+ gl_api_->glGetShaderPrecisionFormatFn(shadertype, precisiontype, range,
+ precision);
+}
+
+void TraceGLApi::glGetShaderSourceFn(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetShaderSource")
+ gl_api_->glGetShaderSourceFn(shader, bufsize, length, source);
+}
+
+const GLubyte* TraceGLApi::glGetStringFn(GLenum name) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetString")
+ return gl_api_->glGetStringFn(name);
+}
+
+void TraceGLApi::glGetSyncivFn(GLsync sync,
+ GLenum pname,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLint* values) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetSynciv")
+ gl_api_->glGetSyncivFn(sync, pname, bufSize, length, values);
+}
+
+void TraceGLApi::glGetTexLevelParameterfvFn(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLfloat* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetTexLevelParameterfv")
+ gl_api_->glGetTexLevelParameterfvFn(target, level, pname, params);
+}
+
+void TraceGLApi::glGetTexLevelParameterivFn(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetTexLevelParameteriv")
+ gl_api_->glGetTexLevelParameterivFn(target, level, pname, params);
+}
+
+void TraceGLApi::glGetTexParameterfvFn(GLenum target,
+ GLenum pname,
+ GLfloat* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetTexParameterfv")
+ gl_api_->glGetTexParameterfvFn(target, pname, params);
+}
+
+void TraceGLApi::glGetTexParameterivFn(GLenum target,
+ GLenum pname,
+ GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetTexParameteriv")
+ gl_api_->glGetTexParameterivFn(target, pname, params);
+}
+
+void TraceGLApi::glGetTransformFeedbackVaryingFn(GLuint program,
+ GLuint index,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* type,
+ char* name) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu",
+ "TraceGLAPI::glGetTransformFeedbackVarying")
+ gl_api_->glGetTransformFeedbackVaryingFn(program, index, bufSize, length,
+ type, name);
+}
+
+void TraceGLApi::glGetTranslatedShaderSourceANGLEFn(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu",
+ "TraceGLAPI::glGetTranslatedShaderSourceANGLE")
+ gl_api_->glGetTranslatedShaderSourceANGLEFn(shader, bufsize, length, source);
+}
+
+GLuint TraceGLApi::glGetUniformBlockIndexFn(GLuint program,
+ const char* uniformBlockName) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformBlockIndex")
+ return gl_api_->glGetUniformBlockIndexFn(program, uniformBlockName);
+}
+
+void TraceGLApi::glGetUniformfvFn(GLuint program,
+ GLint location,
+ GLfloat* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformfv")
+ gl_api_->glGetUniformfvFn(program, location, params);
+}
+
+void TraceGLApi::glGetUniformIndicesFn(GLuint program,
+ GLsizei uniformCount,
+ const char* const* uniformNames,
+ GLuint* uniformIndices) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformIndices")
+ gl_api_->glGetUniformIndicesFn(program, uniformCount, uniformNames,
+ uniformIndices);
+}
+
+void TraceGLApi::glGetUniformivFn(GLuint program,
+ GLint location,
+ GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformiv")
+ gl_api_->glGetUniformivFn(program, location, params);
+}
+
+GLint TraceGLApi::glGetUniformLocationFn(GLuint program, const char* name) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformLocation")
+ return gl_api_->glGetUniformLocationFn(program, name);
+}
+
+void TraceGLApi::glGetVertexAttribfvFn(GLuint index,
+ GLenum pname,
+ GLfloat* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetVertexAttribfv")
+ gl_api_->glGetVertexAttribfvFn(index, pname, params);
+}
+
+void TraceGLApi::glGetVertexAttribivFn(GLuint index,
+ GLenum pname,
+ GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetVertexAttribiv")
+ gl_api_->glGetVertexAttribivFn(index, pname, params);
+}
+
+void TraceGLApi::glGetVertexAttribPointervFn(GLuint index,
+ GLenum pname,
+ void** pointer) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetVertexAttribPointerv")
+ gl_api_->glGetVertexAttribPointervFn(index, pname, pointer);
+}
+
+void TraceGLApi::glHintFn(GLenum target, GLenum mode) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glHint")
+ gl_api_->glHintFn(target, mode);
+}
+
+void TraceGLApi::glInsertEventMarkerEXTFn(GLsizei length, const char* marker) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glInsertEventMarkerEXT")
+ gl_api_->glInsertEventMarkerEXTFn(length, marker);
+}
+
+void TraceGLApi::glInvalidateFramebufferFn(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glInvalidateFramebuffer")
+ gl_api_->glInvalidateFramebufferFn(target, numAttachments, attachments);
+}
+
+void TraceGLApi::glInvalidateSubFramebufferFn(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments,
+ GLint x,
+ GLint y,
+ GLint width,
+ GLint height) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glInvalidateSubFramebuffer")
+ gl_api_->glInvalidateSubFramebufferFn(target, numAttachments, attachments, x,
+ y, width, height);
+}
+
+GLboolean TraceGLApi::glIsBufferFn(GLuint buffer) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsBuffer")
+ return gl_api_->glIsBufferFn(buffer);
+}
+
+GLboolean TraceGLApi::glIsEnabledFn(GLenum cap) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsEnabled")
+ return gl_api_->glIsEnabledFn(cap);
+}
+
+GLboolean TraceGLApi::glIsFenceAPPLEFn(GLuint fence) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsFenceAPPLE")
+ return gl_api_->glIsFenceAPPLEFn(fence);
+}
+
+GLboolean TraceGLApi::glIsFenceNVFn(GLuint fence) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsFenceNV")
+ return gl_api_->glIsFenceNVFn(fence);
+}
+
+GLboolean TraceGLApi::glIsFramebufferEXTFn(GLuint framebuffer) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsFramebufferEXT")
+ return gl_api_->glIsFramebufferEXTFn(framebuffer);
+}
+
+GLboolean TraceGLApi::glIsProgramFn(GLuint program) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsProgram")
+ return gl_api_->glIsProgramFn(program);
+}
+
+GLboolean TraceGLApi::glIsQueryFn(GLuint query) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsQuery")
+ 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);
+}
+
+GLboolean TraceGLApi::glIsSamplerFn(GLuint sampler) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsSampler")
+ return gl_api_->glIsSamplerFn(sampler);
+}
+
+GLboolean TraceGLApi::glIsShaderFn(GLuint shader) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsShader")
+ return gl_api_->glIsShaderFn(shader);
+}
+
+GLboolean TraceGLApi::glIsSyncFn(GLsync sync) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsSync")
+ return gl_api_->glIsSyncFn(sync);
+}
+
+GLboolean TraceGLApi::glIsTextureFn(GLuint texture) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsTexture")
+ return gl_api_->glIsTextureFn(texture);
+}
+
+GLboolean TraceGLApi::glIsTransformFeedbackFn(GLuint id) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsTransformFeedback")
+ return gl_api_->glIsTransformFeedbackFn(id);
+}
+
+GLboolean TraceGLApi::glIsVertexArrayOESFn(GLuint array) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsVertexArrayOES")
+ return gl_api_->glIsVertexArrayOESFn(array);
+}
+
+void TraceGLApi::glLineWidthFn(GLfloat width) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glLineWidth")
+ gl_api_->glLineWidthFn(width);
+}
+
+void TraceGLApi::glLinkProgramFn(GLuint program) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glLinkProgram")
+ gl_api_->glLinkProgramFn(program);
+}
+
+void* TraceGLApi::glMapBufferFn(GLenum target, GLenum access) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMapBuffer")
+ return gl_api_->glMapBufferFn(target, access);
+}
+
+void* TraceGLApi::glMapBufferRangeFn(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length,
+ GLbitfield access) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMapBufferRange")
+ return gl_api_->glMapBufferRangeFn(target, offset, length, access);
+}
+
+void TraceGLApi::glMatrixLoadfEXTFn(GLenum matrixMode, const GLfloat* m) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMatrixLoadfEXT")
+ gl_api_->glMatrixLoadfEXTFn(matrixMode, m);
+}
+
+void TraceGLApi::glMatrixLoadIdentityEXTFn(GLenum matrixMode) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMatrixLoadIdentityEXT")
+ gl_api_->glMatrixLoadIdentityEXTFn(matrixMode);
+}
+
+void TraceGLApi::glPauseTransformFeedbackFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPauseTransformFeedback")
+ gl_api_->glPauseTransformFeedbackFn();
+}
+
+void TraceGLApi::glPixelStoreiFn(GLenum pname, GLint param) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPixelStorei")
+ gl_api_->glPixelStoreiFn(pname, param);
+}
+
+void TraceGLApi::glPointParameteriFn(GLenum pname, GLint param) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPointParameteri")
+ gl_api_->glPointParameteriFn(pname, param);
+}
+
+void TraceGLApi::glPolygonOffsetFn(GLfloat factor, GLfloat units) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPolygonOffset")
+ gl_api_->glPolygonOffsetFn(factor, units);
+}
+
+void TraceGLApi::glPopGroupMarkerEXTFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPopGroupMarkerEXT")
+ gl_api_->glPopGroupMarkerEXTFn();
+}
+
+void TraceGLApi::glProgramBinaryFn(GLuint program,
+ GLenum binaryFormat,
+ const GLvoid* binary,
+ GLsizei length) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramBinary")
+ gl_api_->glProgramBinaryFn(program, binaryFormat, binary, length);
+}
+
+void TraceGLApi::glProgramParameteriFn(GLuint program,
+ GLenum pname,
+ GLint value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramParameteri")
+ gl_api_->glProgramParameteriFn(program, pname, value);
+}
+
+void TraceGLApi::glPushGroupMarkerEXTFn(GLsizei length, const char* marker) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPushGroupMarkerEXT")
+ gl_api_->glPushGroupMarkerEXTFn(length, marker);
+}
+
+void TraceGLApi::glQueryCounterFn(GLuint id, GLenum target) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glQueryCounter")
+ gl_api_->glQueryCounterFn(id, target);
+}
+
+void TraceGLApi::glReadBufferFn(GLenum src) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glReadBuffer")
+ gl_api_->glReadBufferFn(src);
+}
+
+void TraceGLApi::glReadPixelsFn(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ void* pixels) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glReadPixels")
+ gl_api_->glReadPixelsFn(x, y, width, height, format, type, pixels);
+}
+
+void TraceGLApi::glReleaseShaderCompilerFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glReleaseShaderCompiler")
+ gl_api_->glReleaseShaderCompilerFn();
+}
+
+void TraceGLApi::glRenderbufferStorageEXTFn(GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glRenderbufferStorageEXT")
+ gl_api_->glRenderbufferStorageEXTFn(target, internalformat, width, height);
+}
+
+void TraceGLApi::glRenderbufferStorageMultisampleFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu",
+ "TraceGLAPI::glRenderbufferStorageMultisample")
+ gl_api_->glRenderbufferStorageMultisampleFn(target, samples, internalformat,
+ width, height);
+}
+
+void TraceGLApi::glRenderbufferStorageMultisampleANGLEFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ TRACE_EVENT_BINARY_EFFICIENT0(
+ "gpu", "TraceGLAPI::glRenderbufferStorageMultisampleANGLE")
+ gl_api_->glRenderbufferStorageMultisampleANGLEFn(
+ target, samples, internalformat, width, height);
+}
+
+void TraceGLApi::glRenderbufferStorageMultisampleEXTFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ TRACE_EVENT_BINARY_EFFICIENT0(
+ "gpu", "TraceGLAPI::glRenderbufferStorageMultisampleEXT")
+ gl_api_->glRenderbufferStorageMultisampleEXTFn(target, samples,
+ internalformat, width, height);
+}
+
+void TraceGLApi::glRenderbufferStorageMultisampleIMGFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ TRACE_EVENT_BINARY_EFFICIENT0(
+ "gpu", "TraceGLAPI::glRenderbufferStorageMultisampleIMG")
+ gl_api_->glRenderbufferStorageMultisampleIMGFn(target, samples,
+ internalformat, width, height);
+}
+
+void TraceGLApi::glResumeTransformFeedbackFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glResumeTransformFeedback")
+ gl_api_->glResumeTransformFeedbackFn();
+}
+
+void TraceGLApi::glSampleCoverageFn(GLclampf value, GLboolean invert) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSampleCoverage")
+ gl_api_->glSampleCoverageFn(value, invert);
+}
+
+void TraceGLApi::glSamplerParameterfFn(GLuint sampler,
+ GLenum pname,
+ GLfloat param) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSamplerParameterf")
+ gl_api_->glSamplerParameterfFn(sampler, pname, param);
+}
+
+void TraceGLApi::glSamplerParameterfvFn(GLuint sampler,
+ GLenum pname,
+ const GLfloat* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSamplerParameterfv")
+ gl_api_->glSamplerParameterfvFn(sampler, pname, params);
+}
+
+void TraceGLApi::glSamplerParameteriFn(GLuint sampler,
+ GLenum pname,
+ GLint param) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSamplerParameteri")
+ gl_api_->glSamplerParameteriFn(sampler, pname, param);
+}
+
+void TraceGLApi::glSamplerParameterivFn(GLuint sampler,
+ GLenum pname,
+ const GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSamplerParameteriv")
+ gl_api_->glSamplerParameterivFn(sampler, pname, params);
+}
+
+void TraceGLApi::glScissorFn(GLint x, GLint y, GLsizei width, GLsizei height) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glScissor")
+ gl_api_->glScissorFn(x, y, width, height);
+}
+
+void TraceGLApi::glSetFenceAPPLEFn(GLuint fence) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSetFenceAPPLE")
+ gl_api_->glSetFenceAPPLEFn(fence);
+}
+
+void TraceGLApi::glSetFenceNVFn(GLuint fence, GLenum condition) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSetFenceNV")
+ gl_api_->glSetFenceNVFn(fence, condition);
+}
+
+void TraceGLApi::glShaderBinaryFn(GLsizei n,
+ const GLuint* shaders,
+ GLenum binaryformat,
+ const void* binary,
+ GLsizei length) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glShaderBinary")
+ gl_api_->glShaderBinaryFn(n, shaders, binaryformat, binary, length);
+}
+
+void TraceGLApi::glShaderSourceFn(GLuint shader,
+ GLsizei count,
+ const char* const* str,
+ const GLint* length) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glShaderSource")
+ gl_api_->glShaderSourceFn(shader, count, str, length);
+}
+
+void TraceGLApi::glStencilFuncFn(GLenum func, GLint ref, GLuint mask) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilFunc")
+ gl_api_->glStencilFuncFn(func, ref, mask);
+}
+
+void TraceGLApi::glStencilFuncSeparateFn(GLenum face,
+ GLenum func,
+ GLint ref,
+ GLuint mask) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilFuncSeparate")
+ gl_api_->glStencilFuncSeparateFn(face, func, ref, mask);
+}
+
+void TraceGLApi::glStencilMaskFn(GLuint mask) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilMask")
+ gl_api_->glStencilMaskFn(mask);
+}
+
+void TraceGLApi::glStencilMaskSeparateFn(GLenum face, GLuint mask) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilMaskSeparate")
+ gl_api_->glStencilMaskSeparateFn(face, mask);
+}
+
+void TraceGLApi::glStencilOpFn(GLenum fail, GLenum zfail, GLenum zpass) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilOp")
+ gl_api_->glStencilOpFn(fail, zfail, zpass);
+}
+
+void TraceGLApi::glStencilOpSeparateFn(GLenum face,
+ GLenum fail,
+ GLenum zfail,
+ GLenum zpass) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilOpSeparate")
+ gl_api_->glStencilOpSeparateFn(face, fail, zfail, zpass);
+}
+
+GLboolean TraceGLApi::glTestFenceAPPLEFn(GLuint fence) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTestFenceAPPLE")
+ return gl_api_->glTestFenceAPPLEFn(fence);
+}
+
+GLboolean TraceGLApi::glTestFenceNVFn(GLuint fence) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTestFenceNV")
+ return gl_api_->glTestFenceNVFn(fence);
+}
+
+void TraceGLApi::glTexImage2DFn(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexImage2D")
+ gl_api_->glTexImage2DFn(target, level, internalformat, width, height, border,
+ format, type, pixels);
+}
+
+void TraceGLApi::glTexImage3DFn(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexImage3D")
+ gl_api_->glTexImage3DFn(target, level, internalformat, width, height, depth,
+ border, format, type, pixels);
+}
+
+void TraceGLApi::glTexParameterfFn(GLenum target, GLenum pname, GLfloat param) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexParameterf")
+ gl_api_->glTexParameterfFn(target, pname, param);
+}
+
+void TraceGLApi::glTexParameterfvFn(GLenum target,
+ GLenum pname,
+ const GLfloat* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexParameterfv")
+ gl_api_->glTexParameterfvFn(target, pname, params);
+}
+
+void TraceGLApi::glTexParameteriFn(GLenum target, GLenum pname, GLint param) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexParameteri")
+ gl_api_->glTexParameteriFn(target, pname, param);
+}
+
+void TraceGLApi::glTexParameterivFn(GLenum target,
+ GLenum pname,
+ const GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexParameteriv")
+ gl_api_->glTexParameterivFn(target, pname, params);
+}
+
+void TraceGLApi::glTexStorage2DEXTFn(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexStorage2DEXT")
+ gl_api_->glTexStorage2DEXTFn(target, levels, internalformat, width, height);
+}
+
+void TraceGLApi::glTexStorage3DFn(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexStorage3D")
+ gl_api_->glTexStorage3DFn(target, levels, internalformat, width, height,
+ depth);
+}
+
+void TraceGLApi::glTexSubImage2DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexSubImage2D")
+ gl_api_->glTexSubImage2DFn(target, level, xoffset, yoffset, width, height,
+ format, type, pixels);
+}
+
+void TraceGLApi::glTransformFeedbackVaryingsFn(GLuint program,
+ GLsizei count,
+ const char* const* varyings,
+ GLenum bufferMode) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu",
+ "TraceGLAPI::glTransformFeedbackVaryings")
+ gl_api_->glTransformFeedbackVaryingsFn(program, count, varyings, bufferMode);
+}
+
+void TraceGLApi::glUniform1fFn(GLint location, GLfloat x) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1f")
+ gl_api_->glUniform1fFn(location, x);
+}
+
+void TraceGLApi::glUniform1fvFn(GLint location,
+ GLsizei count,
+ const GLfloat* v) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1fv")
+ gl_api_->glUniform1fvFn(location, count, v);
+}
+
+void TraceGLApi::glUniform1iFn(GLint location, GLint x) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1i")
+ gl_api_->glUniform1iFn(location, x);
+}
+
+void TraceGLApi::glUniform1ivFn(GLint location, GLsizei count, const GLint* v) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1iv")
+ gl_api_->glUniform1ivFn(location, count, v);
+}
+
+void TraceGLApi::glUniform1uiFn(GLint location, GLuint v0) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1ui")
+ gl_api_->glUniform1uiFn(location, v0);
+}
+
+void TraceGLApi::glUniform1uivFn(GLint location,
+ GLsizei count,
+ const GLuint* v) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1uiv")
+ gl_api_->glUniform1uivFn(location, count, v);
+}
+
+void TraceGLApi::glUniform2fFn(GLint location, GLfloat x, GLfloat y) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2f")
+ gl_api_->glUniform2fFn(location, x, y);
+}
+
+void TraceGLApi::glUniform2fvFn(GLint location,
+ GLsizei count,
+ const GLfloat* v) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2fv")
+ gl_api_->glUniform2fvFn(location, count, v);
+}
+
+void TraceGLApi::glUniform2iFn(GLint location, GLint x, GLint y) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2i")
+ gl_api_->glUniform2iFn(location, x, y);
+}
+
+void TraceGLApi::glUniform2ivFn(GLint location, GLsizei count, const GLint* v) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2iv")
+ gl_api_->glUniform2ivFn(location, count, v);
+}
+
+void TraceGLApi::glUniform2uiFn(GLint location, GLuint v0, GLuint v1) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2ui")
+ gl_api_->glUniform2uiFn(location, v0, v1);
+}
+
+void TraceGLApi::glUniform2uivFn(GLint location,
+ GLsizei count,
+ const GLuint* v) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2uiv")
+ gl_api_->glUniform2uivFn(location, count, v);
+}
+
+void TraceGLApi::glUniform3fFn(GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3f")
+ gl_api_->glUniform3fFn(location, x, y, z);
+}
+
+void TraceGLApi::glUniform3fvFn(GLint location,
+ GLsizei count,
+ const GLfloat* v) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3fv")
+ gl_api_->glUniform3fvFn(location, count, v);
+}
+
+void TraceGLApi::glUniform3iFn(GLint location, GLint x, GLint y, GLint z) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3i")
+ gl_api_->glUniform3iFn(location, x, y, z);
+}
+
+void TraceGLApi::glUniform3ivFn(GLint location, GLsizei count, const GLint* v) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3iv")
+ gl_api_->glUniform3ivFn(location, count, v);
+}
+
+void TraceGLApi::glUniform3uiFn(GLint location,
+ GLuint v0,
+ GLuint v1,
+ GLuint v2) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3ui")
+ gl_api_->glUniform3uiFn(location, v0, v1, v2);
+}
+
+void TraceGLApi::glUniform3uivFn(GLint location,
+ GLsizei count,
+ const GLuint* v) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3uiv")
+ gl_api_->glUniform3uivFn(location, count, v);
+}
+
+void TraceGLApi::glUniform4fFn(GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4f")
+ gl_api_->glUniform4fFn(location, x, y, z, w);
+}
+
+void TraceGLApi::glUniform4fvFn(GLint location,
+ GLsizei count,
+ const GLfloat* v) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4fv")
+ gl_api_->glUniform4fvFn(location, count, v);
+}
+
+void TraceGLApi::glUniform4iFn(GLint location,
+ GLint x,
+ GLint y,
+ GLint z,
+ GLint w) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4i")
+ gl_api_->glUniform4iFn(location, x, y, z, w);
+}
+
+void TraceGLApi::glUniform4ivFn(GLint location, GLsizei count, const GLint* v) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4iv")
+ gl_api_->glUniform4ivFn(location, count, v);
+}
+
+void TraceGLApi::glUniform4uiFn(GLint location,
+ GLuint v0,
+ GLuint v1,
+ GLuint v2,
+ GLuint v3) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4ui")
+ gl_api_->glUniform4uiFn(location, v0, v1, v2, v3);
+}
+
+void TraceGLApi::glUniform4uivFn(GLint location,
+ GLsizei count,
+ const GLuint* v) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4uiv")
+ gl_api_->glUniform4uivFn(location, count, v);
+}
+
+void TraceGLApi::glUniformBlockBindingFn(GLuint program,
+ GLuint uniformBlockIndex,
+ GLuint uniformBlockBinding) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformBlockBinding")
+ gl_api_->glUniformBlockBindingFn(program, uniformBlockIndex,
+ uniformBlockBinding);
+}
+
+void TraceGLApi::glUniformMatrix2fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix2fv")
+ gl_api_->glUniformMatrix2fvFn(location, count, transpose, value);
+}
+
+void TraceGLApi::glUniformMatrix2x3fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix2x3fv")
+ gl_api_->glUniformMatrix2x3fvFn(location, count, transpose, value);
+}
+
+void TraceGLApi::glUniformMatrix2x4fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix2x4fv")
+ gl_api_->glUniformMatrix2x4fvFn(location, count, transpose, value);
+}
+
+void TraceGLApi::glUniformMatrix3fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix3fv")
+ gl_api_->glUniformMatrix3fvFn(location, count, transpose, value);
+}
+
+void TraceGLApi::glUniformMatrix3x2fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix3x2fv")
+ gl_api_->glUniformMatrix3x2fvFn(location, count, transpose, value);
+}
+
+void TraceGLApi::glUniformMatrix3x4fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix3x4fv")
+ gl_api_->glUniformMatrix3x4fvFn(location, count, transpose, value);
+}
+
+void TraceGLApi::glUniformMatrix4fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix4fv")
+ gl_api_->glUniformMatrix4fvFn(location, count, transpose, value);
+}
+
+void TraceGLApi::glUniformMatrix4x2fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix4x2fv")
+ gl_api_->glUniformMatrix4x2fvFn(location, count, transpose, value);
+}
+
+void TraceGLApi::glUniformMatrix4x3fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix4x3fv")
+ gl_api_->glUniformMatrix4x3fvFn(location, count, transpose, value);
+}
+
+GLboolean TraceGLApi::glUnmapBufferFn(GLenum target) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUnmapBuffer")
+ return gl_api_->glUnmapBufferFn(target);
+}
+
+void TraceGLApi::glUseProgramFn(GLuint program) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUseProgram")
+ gl_api_->glUseProgramFn(program);
+}
+
+void TraceGLApi::glValidateProgramFn(GLuint program) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glValidateProgram")
+ gl_api_->glValidateProgramFn(program);
+}
+
+void TraceGLApi::glVertexAttrib1fFn(GLuint indx, GLfloat x) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib1f")
+ gl_api_->glVertexAttrib1fFn(indx, x);
+}
+
+void TraceGLApi::glVertexAttrib1fvFn(GLuint indx, const GLfloat* values) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib1fv")
+ gl_api_->glVertexAttrib1fvFn(indx, values);
+}
+
+void TraceGLApi::glVertexAttrib2fFn(GLuint indx, GLfloat x, GLfloat y) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib2f")
+ gl_api_->glVertexAttrib2fFn(indx, x, y);
+}
+
+void TraceGLApi::glVertexAttrib2fvFn(GLuint indx, const GLfloat* values) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib2fv")
+ gl_api_->glVertexAttrib2fvFn(indx, values);
+}
+
+void TraceGLApi::glVertexAttrib3fFn(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib3f")
+ gl_api_->glVertexAttrib3fFn(indx, x, y, z);
+}
+
+void TraceGLApi::glVertexAttrib3fvFn(GLuint indx, const GLfloat* values) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib3fv")
+ gl_api_->glVertexAttrib3fvFn(indx, values);
+}
+
+void TraceGLApi::glVertexAttrib4fFn(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib4f")
+ gl_api_->glVertexAttrib4fFn(indx, x, y, z, w);
+}
+
+void TraceGLApi::glVertexAttrib4fvFn(GLuint indx, const GLfloat* values) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib4fv")
+ gl_api_->glVertexAttrib4fvFn(indx, values);
+}
+
+void TraceGLApi::glVertexAttribDivisorANGLEFn(GLuint index, GLuint divisor) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribDivisorANGLE")
+ gl_api_->glVertexAttribDivisorANGLEFn(index, divisor);
+}
+
+void TraceGLApi::glVertexAttribI4iFn(GLuint indx,
+ GLint x,
+ GLint y,
+ GLint z,
+ GLint w) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribI4i")
+ gl_api_->glVertexAttribI4iFn(indx, x, y, z, w);
+}
+
+void TraceGLApi::glVertexAttribI4ivFn(GLuint indx, const GLint* values) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribI4iv")
+ gl_api_->glVertexAttribI4ivFn(indx, values);
+}
+
+void TraceGLApi::glVertexAttribI4uiFn(GLuint indx,
+ GLuint x,
+ GLuint y,
+ GLuint z,
+ GLuint w) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribI4ui")
+ gl_api_->glVertexAttribI4uiFn(indx, x, y, z, w);
+}
+
+void TraceGLApi::glVertexAttribI4uivFn(GLuint indx, const GLuint* values) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribI4uiv")
+ gl_api_->glVertexAttribI4uivFn(indx, values);
+}
+
+void TraceGLApi::glVertexAttribIPointerFn(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLsizei stride,
+ const void* ptr) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribIPointer")
+ gl_api_->glVertexAttribIPointerFn(indx, size, type, stride, ptr);
+}
+
+void TraceGLApi::glVertexAttribPointerFn(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLboolean normalized,
+ GLsizei stride,
+ const void* ptr) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribPointer")
+ gl_api_->glVertexAttribPointerFn(indx, size, type, normalized, stride, ptr);
+}
+
+void TraceGLApi::glViewportFn(GLint x, GLint y, GLsizei width, GLsizei height) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glViewport")
+ gl_api_->glViewportFn(x, y, width, height);
+}
+
+GLenum TraceGLApi::glWaitSyncFn(GLsync sync,
+ GLbitfield flags,
+ GLuint64 timeout) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glWaitSync")
+ return gl_api_->glWaitSyncFn(sync, flags, timeout);
+}
+
+void NoContextGLApi::glActiveTextureFn(GLenum texture) {
+ NOTREACHED() << "Trying to call glActiveTexture() without current GL context";
+ LOG(ERROR) << "Trying to call glActiveTexture() without current GL context";
+}
+
+void NoContextGLApi::glAttachShaderFn(GLuint program, GLuint shader) {
+ NOTREACHED() << "Trying to call glAttachShader() without current GL context";
+ LOG(ERROR) << "Trying to call glAttachShader() without current GL context";
+}
+
+void NoContextGLApi::glBeginQueryFn(GLenum target, GLuint id) {
+ NOTREACHED() << "Trying to call glBeginQuery() without current GL context";
+ 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";
+ LOG(ERROR)
+ << "Trying to call glBeginTransformFeedback() without current GL context";
+}
+
+void NoContextGLApi::glBindAttribLocationFn(GLuint program,
+ GLuint index,
+ const char* name) {
+ NOTREACHED()
+ << "Trying to call glBindAttribLocation() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glBindAttribLocation() without current GL context";
+}
+
+void NoContextGLApi::glBindBufferFn(GLenum target, GLuint buffer) {
+ NOTREACHED() << "Trying to call glBindBuffer() without current GL context";
+ LOG(ERROR) << "Trying to call glBindBuffer() without current GL context";
+}
+
+void NoContextGLApi::glBindBufferBaseFn(GLenum target,
+ GLuint index,
+ GLuint buffer) {
+ NOTREACHED()
+ << "Trying to call glBindBufferBase() without current GL context";
+ LOG(ERROR) << "Trying to call glBindBufferBase() without current GL context";
+}
+
+void NoContextGLApi::glBindBufferRangeFn(GLenum target,
+ GLuint index,
+ GLuint buffer,
+ GLintptr offset,
+ GLsizeiptr size) {
+ NOTREACHED()
+ << "Trying to call glBindBufferRange() without current GL context";
+ LOG(ERROR) << "Trying to call glBindBufferRange() without current GL context";
+}
+
+void NoContextGLApi::glBindFragDataLocationFn(GLuint program,
+ GLuint colorNumber,
+ const char* name) {
+ NOTREACHED()
+ << "Trying to call glBindFragDataLocation() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glBindFragDataLocation() without current GL context";
+}
+
+void NoContextGLApi::glBindFragDataLocationIndexedFn(GLuint program,
+ GLuint colorNumber,
+ GLuint index,
+ const char* name) {
+ NOTREACHED() << "Trying to call glBindFragDataLocationIndexed() without "
+ "current GL context";
+ LOG(ERROR) << "Trying to call glBindFragDataLocationIndexed() without "
+ "current GL context";
+}
+
+void NoContextGLApi::glBindFramebufferEXTFn(GLenum target, GLuint framebuffer) {
+ NOTREACHED()
+ << "Trying to call glBindFramebufferEXT() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glBindFramebufferEXT() without current GL context";
+}
+
+void NoContextGLApi::glBindRenderbufferEXTFn(GLenum target,
+ GLuint renderbuffer) {
+ NOTREACHED()
+ << "Trying to call glBindRenderbufferEXT() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glBindRenderbufferEXT() without current GL context";
+}
+
+void NoContextGLApi::glBindSamplerFn(GLuint unit, GLuint sampler) {
+ NOTREACHED() << "Trying to call glBindSampler() without current GL context";
+ LOG(ERROR) << "Trying to call glBindSampler() without current GL context";
+}
+
+void NoContextGLApi::glBindTextureFn(GLenum target, GLuint texture) {
+ NOTREACHED() << "Trying to call glBindTexture() without current GL context";
+ LOG(ERROR) << "Trying to call glBindTexture() without current GL context";
+}
+
+void NoContextGLApi::glBindTransformFeedbackFn(GLenum target, GLuint id) {
+ NOTREACHED()
+ << "Trying to call glBindTransformFeedback() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glBindTransformFeedback() without current GL context";
+}
+
+void NoContextGLApi::glBindVertexArrayOESFn(GLuint array) {
+ NOTREACHED()
+ << "Trying to call glBindVertexArrayOES() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glBindVertexArrayOES() without current GL context";
+}
+
+void NoContextGLApi::glBlendBarrierKHRFn(void) {
+ NOTREACHED()
+ << "Trying to call glBlendBarrierKHR() without current GL context";
+ LOG(ERROR) << "Trying to call glBlendBarrierKHR() without current GL context";
+}
+
+void NoContextGLApi::glBlendColorFn(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) {
+ NOTREACHED() << "Trying to call glBlendColor() without current GL context";
+ LOG(ERROR) << "Trying to call glBlendColor() without current GL context";
+}
+
+void NoContextGLApi::glBlendEquationFn(GLenum mode) {
+ NOTREACHED() << "Trying to call glBlendEquation() without current GL context";
+ LOG(ERROR) << "Trying to call glBlendEquation() without current GL context";
+}
+
+void NoContextGLApi::glBlendEquationSeparateFn(GLenum modeRGB,
+ GLenum modeAlpha) {
+ NOTREACHED()
+ << "Trying to call glBlendEquationSeparate() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glBlendEquationSeparate() without current GL context";
+}
+
+void NoContextGLApi::glBlendFuncFn(GLenum sfactor, GLenum dfactor) {
+ NOTREACHED() << "Trying to call glBlendFunc() without current GL context";
+ LOG(ERROR) << "Trying to call glBlendFunc() without current GL context";
+}
+
+void NoContextGLApi::glBlendFuncSeparateFn(GLenum srcRGB,
+ GLenum dstRGB,
+ GLenum srcAlpha,
+ GLenum dstAlpha) {
+ NOTREACHED()
+ << "Trying to call glBlendFuncSeparate() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glBlendFuncSeparate() without current GL context";
+}
+
+void NoContextGLApi::glBlitFramebufferFn(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ NOTREACHED()
+ << "Trying to call glBlitFramebuffer() without current GL context";
+ LOG(ERROR) << "Trying to call glBlitFramebuffer() without current GL context";
+}
+
+void NoContextGLApi::glBlitFramebufferANGLEFn(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ NOTREACHED()
+ << "Trying to call glBlitFramebufferANGLE() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glBlitFramebufferANGLE() without current GL context";
+}
+
+void NoContextGLApi::glBlitFramebufferEXTFn(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ NOTREACHED()
+ << "Trying to call glBlitFramebufferEXT() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glBlitFramebufferEXT() without current GL context";
+}
+
+void NoContextGLApi::glBufferDataFn(GLenum target,
+ GLsizeiptr size,
+ const void* data,
+ GLenum usage) {
+ NOTREACHED() << "Trying to call glBufferData() without current GL context";
+ LOG(ERROR) << "Trying to call glBufferData() without current GL context";
+}
+
+void NoContextGLApi::glBufferSubDataFn(GLenum target,
+ GLintptr offset,
+ GLsizeiptr size,
+ const void* data) {
+ NOTREACHED() << "Trying to call glBufferSubData() without current GL context";
+ LOG(ERROR) << "Trying to call glBufferSubData() without current GL context";
+}
+
+GLenum NoContextGLApi::glCheckFramebufferStatusEXTFn(GLenum target) {
+ NOTREACHED() << "Trying to call glCheckFramebufferStatusEXT() without "
+ "current GL context";
+ LOG(ERROR) << "Trying to call glCheckFramebufferStatusEXT() without current "
+ "GL context";
+ return static_cast<GLenum>(0);
+}
+
+void NoContextGLApi::glClearFn(GLbitfield mask) {
+ NOTREACHED() << "Trying to call glClear() without current GL context";
+ LOG(ERROR) << "Trying to call glClear() without current GL context";
+}
+
+void NoContextGLApi::glClearBufferfiFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat depth,
+ GLint stencil) {
+ NOTREACHED() << "Trying to call glClearBufferfi() without current GL context";
+ LOG(ERROR) << "Trying to call glClearBufferfi() without current GL context";
+}
+
+void NoContextGLApi::glClearBufferfvFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat* value) {
+ NOTREACHED() << "Trying to call glClearBufferfv() without current GL context";
+ LOG(ERROR) << "Trying to call glClearBufferfv() without current GL context";
+}
+
+void NoContextGLApi::glClearBufferivFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLint* value) {
+ NOTREACHED() << "Trying to call glClearBufferiv() without current GL context";
+ LOG(ERROR) << "Trying to call glClearBufferiv() without current GL context";
+}
+
+void NoContextGLApi::glClearBufferuivFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLuint* value) {
+ NOTREACHED()
+ << "Trying to call glClearBufferuiv() without current GL context";
+ LOG(ERROR) << "Trying to call glClearBufferuiv() without current GL context";
+}
+
+void NoContextGLApi::glClearColorFn(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) {
+ NOTREACHED() << "Trying to call glClearColor() without current GL context";
+ LOG(ERROR) << "Trying to call glClearColor() without current GL context";
+}
+
+void NoContextGLApi::glClearDepthFn(GLclampd depth) {
+ NOTREACHED() << "Trying to call glClearDepth() without current GL context";
+ LOG(ERROR) << "Trying to call glClearDepth() without current GL context";
+}
+
+void NoContextGLApi::glClearDepthfFn(GLclampf depth) {
+ NOTREACHED() << "Trying to call glClearDepthf() without current GL context";
+ LOG(ERROR) << "Trying to call glClearDepthf() without current GL context";
+}
+
+void NoContextGLApi::glClearStencilFn(GLint s) {
+ NOTREACHED() << "Trying to call glClearStencil() without current GL context";
+ LOG(ERROR) << "Trying to call glClearStencil() without current GL context";
+}
+
+GLenum NoContextGLApi::glClientWaitSyncFn(GLsync sync,
+ GLbitfield flags,
+ GLuint64 timeout) {
+ NOTREACHED()
+ << "Trying to call glClientWaitSync() without current GL context";
+ LOG(ERROR) << "Trying to call glClientWaitSync() without current GL context";
+ return static_cast<GLenum>(0);
+}
+
+void NoContextGLApi::glColorMaskFn(GLboolean red,
+ GLboolean green,
+ GLboolean blue,
+ GLboolean alpha) {
+ NOTREACHED() << "Trying to call glColorMask() without current GL context";
+ LOG(ERROR) << "Trying to call glColorMask() without current GL context";
+}
+
+void NoContextGLApi::glCompileShaderFn(GLuint shader) {
+ NOTREACHED() << "Trying to call glCompileShader() without current GL context";
+ LOG(ERROR) << "Trying to call glCompileShader() without current GL context";
+}
+
+void NoContextGLApi::glCompressedTexImage2DFn(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) {
+ NOTREACHED()
+ << "Trying to call glCompressedTexImage2D() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glCompressedTexImage2D() without current GL context";
+}
+
+void NoContextGLApi::glCompressedTexImage3DFn(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) {
+ NOTREACHED()
+ << "Trying to call glCompressedTexImage3D() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glCompressedTexImage3D() without current GL context";
+}
+
+void NoContextGLApi::glCompressedTexSubImage2DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLsizei imageSize,
+ const void* data) {
+ NOTREACHED() << "Trying to call glCompressedTexSubImage2D() without current "
+ "GL context";
+ LOG(ERROR) << "Trying to call glCompressedTexSubImage2D() without current GL "
+ "context";
+}
+
+void NoContextGLApi::glCopyBufferSubDataFn(GLenum readTarget,
+ GLenum writeTarget,
+ GLintptr readOffset,
+ GLintptr writeOffset,
+ GLsizeiptr size) {
+ NOTREACHED()
+ << "Trying to call glCopyBufferSubData() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glCopyBufferSubData() without current GL context";
+}
+
+void NoContextGLApi::glCopyTexImage2DFn(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLint border) {
+ NOTREACHED()
+ << "Trying to call glCopyTexImage2D() without current GL context";
+ LOG(ERROR) << "Trying to call glCopyTexImage2D() without current GL context";
+}
+
+void NoContextGLApi::glCopyTexSubImage2DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) {
+ NOTREACHED()
+ << "Trying to call glCopyTexSubImage2D() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glCopyTexSubImage2D() without current GL context";
+}
+
+void NoContextGLApi::glCopyTexSubImage3DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint zoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) {
+ NOTREACHED()
+ << "Trying to call glCopyTexSubImage3D() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glCopyTexSubImage3D() without current GL context";
+}
+
+GLuint NoContextGLApi::glCreateProgramFn(void) {
+ NOTREACHED() << "Trying to call glCreateProgram() without current GL context";
+ LOG(ERROR) << "Trying to call glCreateProgram() without current GL context";
+ return 0U;
+}
+
+GLuint NoContextGLApi::glCreateShaderFn(GLenum type) {
+ NOTREACHED() << "Trying to call glCreateShader() without current GL context";
+ LOG(ERROR) << "Trying to call glCreateShader() without current GL context";
+ return 0U;
+}
+
+void NoContextGLApi::glCullFaceFn(GLenum mode) {
+ NOTREACHED() << "Trying to call glCullFace() without current GL context";
+ LOG(ERROR) << "Trying to call glCullFace() without current GL context";
+}
+
+void NoContextGLApi::glDeleteBuffersARBFn(GLsizei n, const GLuint* buffers) {
+ NOTREACHED()
+ << "Trying to call glDeleteBuffersARB() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glDeleteBuffersARB() without current GL context";
+}
+
+void NoContextGLApi::glDeleteFencesAPPLEFn(GLsizei n, const GLuint* fences) {
+ NOTREACHED()
+ << "Trying to call glDeleteFencesAPPLE() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glDeleteFencesAPPLE() without current GL context";
+}
+
+void NoContextGLApi::glDeleteFencesNVFn(GLsizei n, const GLuint* fences) {
+ NOTREACHED()
+ << "Trying to call glDeleteFencesNV() without current GL context";
+ LOG(ERROR) << "Trying to call glDeleteFencesNV() without current GL context";
+}
+
+void NoContextGLApi::glDeleteFramebuffersEXTFn(GLsizei n,
+ const GLuint* framebuffers) {
+ NOTREACHED()
+ << "Trying to call glDeleteFramebuffersEXT() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glDeleteFramebuffersEXT() without current GL context";
+}
+
+void NoContextGLApi::glDeleteProgramFn(GLuint program) {
+ NOTREACHED() << "Trying to call glDeleteProgram() without current GL context";
+ LOG(ERROR) << "Trying to call glDeleteProgram() without current GL context";
+}
+
+void NoContextGLApi::glDeleteQueriesFn(GLsizei n, const GLuint* ids) {
+ NOTREACHED() << "Trying to call glDeleteQueries() without current GL context";
+ 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()
+ << "Trying to call glDeleteRenderbuffersEXT() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glDeleteRenderbuffersEXT() without current GL context";
+}
+
+void NoContextGLApi::glDeleteSamplersFn(GLsizei n, const GLuint* samplers) {
+ NOTREACHED()
+ << "Trying to call glDeleteSamplers() without current GL context";
+ LOG(ERROR) << "Trying to call glDeleteSamplers() without current GL context";
+}
+
+void NoContextGLApi::glDeleteShaderFn(GLuint shader) {
+ NOTREACHED() << "Trying to call glDeleteShader() without current GL context";
+ LOG(ERROR) << "Trying to call glDeleteShader() without current GL context";
+}
+
+void NoContextGLApi::glDeleteSyncFn(GLsync sync) {
+ NOTREACHED() << "Trying to call glDeleteSync() without current GL context";
+ LOG(ERROR) << "Trying to call glDeleteSync() without current GL context";
+}
+
+void NoContextGLApi::glDeleteTexturesFn(GLsizei n, const GLuint* textures) {
+ NOTREACHED()
+ << "Trying to call glDeleteTextures() without current GL context";
+ LOG(ERROR) << "Trying to call glDeleteTextures() without current GL context";
+}
+
+void NoContextGLApi::glDeleteTransformFeedbacksFn(GLsizei n,
+ const GLuint* ids) {
+ NOTREACHED() << "Trying to call glDeleteTransformFeedbacks() without current "
+ "GL context";
+ LOG(ERROR) << "Trying to call glDeleteTransformFeedbacks() without current "
+ "GL context";
+}
+
+void NoContextGLApi::glDeleteVertexArraysOESFn(GLsizei n,
+ const GLuint* arrays) {
+ NOTREACHED()
+ << "Trying to call glDeleteVertexArraysOES() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glDeleteVertexArraysOES() without current GL context";
+}
+
+void NoContextGLApi::glDepthFuncFn(GLenum func) {
+ NOTREACHED() << "Trying to call glDepthFunc() without current GL context";
+ LOG(ERROR) << "Trying to call glDepthFunc() without current GL context";
+}
+
+void NoContextGLApi::glDepthMaskFn(GLboolean flag) {
+ NOTREACHED() << "Trying to call glDepthMask() without current GL context";
+ LOG(ERROR) << "Trying to call glDepthMask() without current GL context";
+}
+
+void NoContextGLApi::glDepthRangeFn(GLclampd zNear, GLclampd zFar) {
+ NOTREACHED() << "Trying to call glDepthRange() without current GL context";
+ LOG(ERROR) << "Trying to call glDepthRange() without current GL context";
+}
+
+void NoContextGLApi::glDepthRangefFn(GLclampf zNear, GLclampf zFar) {
+ NOTREACHED() << "Trying to call glDepthRangef() without current GL context";
+ LOG(ERROR) << "Trying to call glDepthRangef() without current GL context";
+}
+
+void NoContextGLApi::glDetachShaderFn(GLuint program, GLuint shader) {
+ NOTREACHED() << "Trying to call glDetachShader() without current GL context";
+ LOG(ERROR) << "Trying to call glDetachShader() without current GL context";
+}
+
+void NoContextGLApi::glDisableFn(GLenum cap) {
+ NOTREACHED() << "Trying to call glDisable() without current GL context";
+ LOG(ERROR) << "Trying to call glDisable() without current GL context";
+}
+
+void NoContextGLApi::glDisableVertexAttribArrayFn(GLuint index) {
+ NOTREACHED() << "Trying to call glDisableVertexAttribArray() without current "
+ "GL context";
+ LOG(ERROR) << "Trying to call glDisableVertexAttribArray() without current "
+ "GL context";
+}
+
+void NoContextGLApi::glDiscardFramebufferEXTFn(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments) {
+ NOTREACHED()
+ << "Trying to call glDiscardFramebufferEXT() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glDiscardFramebufferEXT() without current GL context";
+}
+
+void NoContextGLApi::glDrawArraysFn(GLenum mode, GLint first, GLsizei count) {
+ NOTREACHED() << "Trying to call glDrawArrays() without current GL context";
+ LOG(ERROR) << "Trying to call glDrawArrays() without current GL context";
+}
+
+void NoContextGLApi::glDrawArraysInstancedANGLEFn(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount) {
+ NOTREACHED() << "Trying to call glDrawArraysInstancedANGLE() without current "
+ "GL context";
+ LOG(ERROR) << "Trying to call glDrawArraysInstancedANGLE() without current "
+ "GL context";
+}
+
+void NoContextGLApi::glDrawBufferFn(GLenum mode) {
+ NOTREACHED() << "Trying to call glDrawBuffer() without current GL context";
+ LOG(ERROR) << "Trying to call glDrawBuffer() without current GL context";
+}
+
+void NoContextGLApi::glDrawBuffersARBFn(GLsizei n, const GLenum* bufs) {
+ NOTREACHED()
+ << "Trying to call glDrawBuffersARB() without current GL context";
+ LOG(ERROR) << "Trying to call glDrawBuffersARB() without current GL context";
+}
+
+void NoContextGLApi::glDrawElementsFn(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices) {
+ NOTREACHED() << "Trying to call glDrawElements() without current GL context";
+ LOG(ERROR) << "Trying to call glDrawElements() without current GL context";
+}
+
+void NoContextGLApi::glDrawElementsInstancedANGLEFn(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount) {
+ NOTREACHED() << "Trying to call glDrawElementsInstancedANGLE() without "
+ "current GL context";
+ LOG(ERROR) << "Trying to call glDrawElementsInstancedANGLE() without current "
+ "GL context";
+}
+
+void NoContextGLApi::glDrawRangeElementsFn(GLenum mode,
+ GLuint start,
+ GLuint end,
+ GLsizei count,
+ GLenum type,
+ const void* indices) {
+ NOTREACHED()
+ << "Trying to call glDrawRangeElements() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glDrawRangeElements() without current GL context";
+}
+
+void NoContextGLApi::glEGLImageTargetRenderbufferStorageOESFn(
+ GLenum target,
+ GLeglImageOES image) {
+ NOTREACHED() << "Trying to call glEGLImageTargetRenderbufferStorageOES() "
+ "without current GL context";
+ LOG(ERROR) << "Trying to call glEGLImageTargetRenderbufferStorageOES() "
+ "without current GL context";
+}
+
+void NoContextGLApi::glEGLImageTargetTexture2DOESFn(GLenum target,
+ GLeglImageOES image) {
+ NOTREACHED() << "Trying to call glEGLImageTargetTexture2DOES() without "
+ "current GL context";
+ LOG(ERROR) << "Trying to call glEGLImageTargetTexture2DOES() without current "
+ "GL context";
+}
+
+void NoContextGLApi::glEnableFn(GLenum cap) {
+ NOTREACHED() << "Trying to call glEnable() without current GL context";
+ LOG(ERROR) << "Trying to call glEnable() without current GL context";
+}
+
+void NoContextGLApi::glEnableVertexAttribArrayFn(GLuint index) {
+ NOTREACHED() << "Trying to call glEnableVertexAttribArray() without current "
+ "GL context";
+ LOG(ERROR) << "Trying to call glEnableVertexAttribArray() without current GL "
+ "context";
+}
+
+void NoContextGLApi::glEndQueryFn(GLenum target) {
+ NOTREACHED() << "Trying to call glEndQuery() without current GL context";
+ 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";
+ LOG(ERROR)
+ << "Trying to call glEndTransformFeedback() without current GL context";
+}
+
+GLsync NoContextGLApi::glFenceSyncFn(GLenum condition, GLbitfield flags) {
+ NOTREACHED() << "Trying to call glFenceSync() without current GL context";
+ LOG(ERROR) << "Trying to call glFenceSync() without current GL context";
+ return NULL;
+}
+
+void NoContextGLApi::glFinishFn(void) {
+ NOTREACHED() << "Trying to call glFinish() without current GL context";
+ LOG(ERROR) << "Trying to call glFinish() without current GL context";
+}
+
+void NoContextGLApi::glFinishFenceAPPLEFn(GLuint fence) {
+ NOTREACHED()
+ << "Trying to call glFinishFenceAPPLE() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glFinishFenceAPPLE() without current GL context";
+}
+
+void NoContextGLApi::glFinishFenceNVFn(GLuint fence) {
+ NOTREACHED() << "Trying to call glFinishFenceNV() without current GL context";
+ LOG(ERROR) << "Trying to call glFinishFenceNV() without current GL context";
+}
+
+void NoContextGLApi::glFlushFn(void) {
+ NOTREACHED() << "Trying to call glFlush() without current GL context";
+ LOG(ERROR) << "Trying to call glFlush() without current GL context";
+}
+
+void NoContextGLApi::glFlushMappedBufferRangeFn(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length) {
+ NOTREACHED()
+ << "Trying to call glFlushMappedBufferRange() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glFlushMappedBufferRange() without current GL context";
+}
+
+void NoContextGLApi::glFramebufferRenderbufferEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer) {
+ NOTREACHED() << "Trying to call glFramebufferRenderbufferEXT() without "
+ "current GL context";
+ LOG(ERROR) << "Trying to call glFramebufferRenderbufferEXT() without current "
+ "GL context";
+}
+
+void NoContextGLApi::glFramebufferTexture2DEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level) {
+ NOTREACHED() << "Trying to call glFramebufferTexture2DEXT() without current "
+ "GL context";
+ LOG(ERROR) << "Trying to call glFramebufferTexture2DEXT() without current GL "
+ "context";
+}
+
+void NoContextGLApi::glFramebufferTexture2DMultisampleEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) {
+ NOTREACHED() << "Trying to call glFramebufferTexture2DMultisampleEXT() "
+ "without current GL context";
+ LOG(ERROR) << "Trying to call glFramebufferTexture2DMultisampleEXT() without "
+ "current GL context";
+}
+
+void NoContextGLApi::glFramebufferTexture2DMultisampleIMGFn(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) {
+ NOTREACHED() << "Trying to call glFramebufferTexture2DMultisampleIMG() "
+ "without current GL context";
+ LOG(ERROR) << "Trying to call glFramebufferTexture2DMultisampleIMG() without "
+ "current GL context";
+}
+
+void NoContextGLApi::glFramebufferTextureLayerFn(GLenum target,
+ GLenum attachment,
+ GLuint texture,
+ GLint level,
+ GLint layer) {
+ NOTREACHED() << "Trying to call glFramebufferTextureLayer() without current "
+ "GL context";
+ LOG(ERROR) << "Trying to call glFramebufferTextureLayer() without current GL "
+ "context";
+}
+
+void NoContextGLApi::glFrontFaceFn(GLenum mode) {
+ NOTREACHED() << "Trying to call glFrontFace() without current GL context";
+ LOG(ERROR) << "Trying to call glFrontFace() without current GL context";
+}
+
+void NoContextGLApi::glGenBuffersARBFn(GLsizei n, GLuint* buffers) {
+ NOTREACHED() << "Trying to call glGenBuffersARB() without current GL context";
+ LOG(ERROR) << "Trying to call glGenBuffersARB() without current GL context";
+}
+
+void NoContextGLApi::glGenerateMipmapEXTFn(GLenum target) {
+ NOTREACHED()
+ << "Trying to call glGenerateMipmapEXT() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGenerateMipmapEXT() without current GL context";
+}
+
+void NoContextGLApi::glGenFencesAPPLEFn(GLsizei n, GLuint* fences) {
+ NOTREACHED()
+ << "Trying to call glGenFencesAPPLE() without current GL context";
+ LOG(ERROR) << "Trying to call glGenFencesAPPLE() without current GL context";
+}
+
+void NoContextGLApi::glGenFencesNVFn(GLsizei n, GLuint* fences) {
+ NOTREACHED() << "Trying to call glGenFencesNV() without current GL context";
+ LOG(ERROR) << "Trying to call glGenFencesNV() without current GL context";
+}
+
+void NoContextGLApi::glGenFramebuffersEXTFn(GLsizei n, GLuint* framebuffers) {
+ NOTREACHED()
+ << "Trying to call glGenFramebuffersEXT() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGenFramebuffersEXT() without current GL context";
+}
+
+void NoContextGLApi::glGenQueriesFn(GLsizei n, GLuint* ids) {
+ NOTREACHED() << "Trying to call glGenQueries() without current GL context";
+ 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";
+ LOG(ERROR)
+ << "Trying to call glGenRenderbuffersEXT() without current GL context";
+}
+
+void NoContextGLApi::glGenSamplersFn(GLsizei n, GLuint* samplers) {
+ NOTREACHED() << "Trying to call glGenSamplers() without current GL context";
+ LOG(ERROR) << "Trying to call glGenSamplers() without current GL context";
+}
+
+void NoContextGLApi::glGenTexturesFn(GLsizei n, GLuint* textures) {
+ NOTREACHED() << "Trying to call glGenTextures() without current GL context";
+ LOG(ERROR) << "Trying to call glGenTextures() without current GL context";
+}
+
+void NoContextGLApi::glGenTransformFeedbacksFn(GLsizei n, GLuint* ids) {
+ NOTREACHED()
+ << "Trying to call glGenTransformFeedbacks() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGenTransformFeedbacks() without current GL context";
+}
+
+void NoContextGLApi::glGenVertexArraysOESFn(GLsizei n, GLuint* arrays) {
+ NOTREACHED()
+ << "Trying to call glGenVertexArraysOES() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGenVertexArraysOES() without current GL context";
+}
+
+void NoContextGLApi::glGetActiveAttribFn(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) {
+ NOTREACHED()
+ << "Trying to call glGetActiveAttrib() without current GL context";
+ LOG(ERROR) << "Trying to call glGetActiveAttrib() without current GL context";
+}
+
+void NoContextGLApi::glGetActiveUniformFn(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) {
+ NOTREACHED()
+ << "Trying to call glGetActiveUniform() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetActiveUniform() without current GL context";
+}
+
+void NoContextGLApi::glGetActiveUniformBlockivFn(GLuint program,
+ GLuint uniformBlockIndex,
+ GLenum pname,
+ GLint* params) {
+ NOTREACHED() << "Trying to call glGetActiveUniformBlockiv() without current "
+ "GL context";
+ LOG(ERROR) << "Trying to call glGetActiveUniformBlockiv() without current GL "
+ "context";
+}
+
+void NoContextGLApi::glGetActiveUniformBlockNameFn(GLuint program,
+ GLuint uniformBlockIndex,
+ GLsizei bufSize,
+ GLsizei* length,
+ char* uniformBlockName) {
+ NOTREACHED() << "Trying to call glGetActiveUniformBlockName() without "
+ "current GL context";
+ LOG(ERROR) << "Trying to call glGetActiveUniformBlockName() without current "
+ "GL context";
+}
+
+void NoContextGLApi::glGetActiveUniformsivFn(GLuint program,
+ GLsizei uniformCount,
+ const GLuint* uniformIndices,
+ GLenum pname,
+ GLint* params) {
+ NOTREACHED()
+ << "Trying to call glGetActiveUniformsiv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetActiveUniformsiv() without current GL context";
+}
+
+void NoContextGLApi::glGetAttachedShadersFn(GLuint program,
+ GLsizei maxcount,
+ GLsizei* count,
+ GLuint* shaders) {
+ NOTREACHED()
+ << "Trying to call glGetAttachedShaders() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetAttachedShaders() without current GL context";
+}
+
+GLint NoContextGLApi::glGetAttribLocationFn(GLuint program, const char* name) {
+ NOTREACHED()
+ << "Trying to call glGetAttribLocation() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetAttribLocation() without current GL context";
+ return 0;
+}
+
+void NoContextGLApi::glGetBooleanvFn(GLenum pname, GLboolean* params) {
+ NOTREACHED() << "Trying to call glGetBooleanv() without current GL context";
+ LOG(ERROR) << "Trying to call glGetBooleanv() without current GL context";
+}
+
+void NoContextGLApi::glGetBufferParameterivFn(GLenum target,
+ GLenum pname,
+ GLint* params) {
+ NOTREACHED()
+ << "Trying to call glGetBufferParameteriv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetBufferParameteriv() without current GL context";
+}
+
+GLenum NoContextGLApi::glGetErrorFn(void) {
+ NOTREACHED() << "Trying to call glGetError() without current GL context";
+ LOG(ERROR) << "Trying to call glGetError() without current GL context";
+ return static_cast<GLenum>(0);
+}
+
+void NoContextGLApi::glGetFenceivNVFn(GLuint fence,
+ GLenum pname,
+ GLint* params) {
+ NOTREACHED() << "Trying to call glGetFenceivNV() without current GL context";
+ LOG(ERROR) << "Trying to call glGetFenceivNV() without current GL context";
+}
+
+void NoContextGLApi::glGetFloatvFn(GLenum pname, GLfloat* params) {
+ NOTREACHED() << "Trying to call glGetFloatv() without current GL context";
+ LOG(ERROR) << "Trying to call glGetFloatv() without current GL context";
+}
+
+GLint NoContextGLApi::glGetFragDataLocationFn(GLuint program,
+ const char* name) {
+ NOTREACHED()
+ << "Trying to call glGetFragDataLocation() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetFragDataLocation() without current GL context";
+ return 0;
+}
+
+void NoContextGLApi::glGetFramebufferAttachmentParameterivEXTFn(
+ GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* params) {
+ NOTREACHED() << "Trying to call glGetFramebufferAttachmentParameterivEXT() "
+ "without current GL context";
+ LOG(ERROR) << "Trying to call glGetFramebufferAttachmentParameterivEXT() "
+ "without current GL context";
+}
+
+GLenum NoContextGLApi::glGetGraphicsResetStatusARBFn(void) {
+ NOTREACHED() << "Trying to call glGetGraphicsResetStatusARB() without "
+ "current GL context";
+ LOG(ERROR) << "Trying to call glGetGraphicsResetStatusARB() without current "
+ "GL context";
+ return static_cast<GLenum>(0);
+}
+
+void NoContextGLApi::glGetInteger64i_vFn(GLenum target,
+ GLuint index,
+ GLint64* data) {
+ NOTREACHED()
+ << "Trying to call glGetInteger64i_v() without current GL context";
+ LOG(ERROR) << "Trying to call glGetInteger64i_v() without current GL context";
+}
+
+void NoContextGLApi::glGetInteger64vFn(GLenum pname, GLint64* params) {
+ NOTREACHED() << "Trying to call glGetInteger64v() without current GL context";
+ LOG(ERROR) << "Trying to call glGetInteger64v() without current GL context";
+}
+
+void NoContextGLApi::glGetIntegeri_vFn(GLenum target,
+ GLuint index,
+ GLint* data) {
+ NOTREACHED() << "Trying to call glGetIntegeri_v() without current GL context";
+ LOG(ERROR) << "Trying to call glGetIntegeri_v() without current GL context";
+}
+
+void NoContextGLApi::glGetIntegervFn(GLenum pname, GLint* params) {
+ NOTREACHED() << "Trying to call glGetIntegerv() without current GL context";
+ LOG(ERROR) << "Trying to call glGetIntegerv() without current GL context";
+}
+
+void NoContextGLApi::glGetInternalformativFn(GLenum target,
+ GLenum internalformat,
+ GLenum pname,
+ GLsizei bufSize,
+ GLint* params) {
+ NOTREACHED()
+ << "Trying to call glGetInternalformativ() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetInternalformativ() without current GL context";
+}
+
+void NoContextGLApi::glGetProgramBinaryFn(GLuint program,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* binaryFormat,
+ GLvoid* binary) {
+ NOTREACHED()
+ << "Trying to call glGetProgramBinary() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetProgramBinary() without current GL context";
+}
+
+void NoContextGLApi::glGetProgramInfoLogFn(GLuint program,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) {
+ NOTREACHED()
+ << "Trying to call glGetProgramInfoLog() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetProgramInfoLog() without current GL context";
+}
+
+void NoContextGLApi::glGetProgramivFn(GLuint program,
+ GLenum pname,
+ GLint* params) {
+ NOTREACHED() << "Trying to call glGetProgramiv() without current GL context";
+ LOG(ERROR) << "Trying to call glGetProgramiv() without current GL context";
+}
+
+void NoContextGLApi::glGetQueryivFn(GLenum target,
+ GLenum pname,
+ GLint* params) {
+ NOTREACHED() << "Trying to call glGetQueryiv() without current GL context";
+ 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) {
+ NOTREACHED()
+ << "Trying to call glGetQueryObjecti64v() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetQueryObjecti64v() without current GL context";
+}
+
+void NoContextGLApi::glGetQueryObjectivFn(GLuint id,
+ GLenum pname,
+ GLint* params) {
+ NOTREACHED()
+ << "Trying to call glGetQueryObjectiv() without current GL context";
+ LOG(ERROR)
+ << "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) {
+ NOTREACHED()
+ << "Trying to call glGetQueryObjectui64v() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetQueryObjectui64v() without current GL context";
+}
+
+void NoContextGLApi::glGetQueryObjectuivFn(GLuint id,
+ GLenum pname,
+ GLuint* params) {
+ NOTREACHED()
+ << "Trying to call glGetQueryObjectuiv() without current GL context";
+ LOG(ERROR)
+ << "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) {
+ NOTREACHED() << "Trying to call glGetRenderbufferParameterivEXT() without "
+ "current GL context";
+ LOG(ERROR) << "Trying to call glGetRenderbufferParameterivEXT() without "
+ "current GL context";
+}
+
+void NoContextGLApi::glGetSamplerParameterfvFn(GLuint sampler,
+ GLenum pname,
+ GLfloat* params) {
+ NOTREACHED()
+ << "Trying to call glGetSamplerParameterfv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetSamplerParameterfv() without current GL context";
+}
+
+void NoContextGLApi::glGetSamplerParameterivFn(GLuint sampler,
+ GLenum pname,
+ GLint* params) {
+ NOTREACHED()
+ << "Trying to call glGetSamplerParameteriv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetSamplerParameteriv() without current GL context";
+}
+
+void NoContextGLApi::glGetShaderInfoLogFn(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) {
+ NOTREACHED()
+ << "Trying to call glGetShaderInfoLog() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetShaderInfoLog() without current GL context";
+}
+
+void NoContextGLApi::glGetShaderivFn(GLuint shader,
+ GLenum pname,
+ GLint* params) {
+ NOTREACHED() << "Trying to call glGetShaderiv() without current GL context";
+ LOG(ERROR) << "Trying to call glGetShaderiv() without current GL context";
+}
+
+void NoContextGLApi::glGetShaderPrecisionFormatFn(GLenum shadertype,
+ GLenum precisiontype,
+ GLint* range,
+ GLint* precision) {
+ NOTREACHED() << "Trying to call glGetShaderPrecisionFormat() without current "
+ "GL context";
+ LOG(ERROR) << "Trying to call glGetShaderPrecisionFormat() without current "
+ "GL context";
+}
+
+void NoContextGLApi::glGetShaderSourceFn(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) {
+ NOTREACHED()
+ << "Trying to call glGetShaderSource() without current GL context";
+ LOG(ERROR) << "Trying to call glGetShaderSource() without current GL context";
+}
+
+const GLubyte* NoContextGLApi::glGetStringFn(GLenum name) {
+ NOTREACHED() << "Trying to call glGetString() without current GL context";
+ LOG(ERROR) << "Trying to call glGetString() without current GL context";
+ return NULL;
+}
+
+void NoContextGLApi::glGetSyncivFn(GLsync sync,
+ GLenum pname,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLint* values) {
+ NOTREACHED() << "Trying to call glGetSynciv() without current GL context";
+ LOG(ERROR) << "Trying to call glGetSynciv() without current GL context";
+}
+
+void NoContextGLApi::glGetTexLevelParameterfvFn(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLfloat* params) {
+ NOTREACHED()
+ << "Trying to call glGetTexLevelParameterfv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetTexLevelParameterfv() without current GL context";
+}
+
+void NoContextGLApi::glGetTexLevelParameterivFn(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLint* params) {
+ NOTREACHED()
+ << "Trying to call glGetTexLevelParameteriv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetTexLevelParameteriv() without current GL context";
+}
+
+void NoContextGLApi::glGetTexParameterfvFn(GLenum target,
+ GLenum pname,
+ GLfloat* params) {
+ NOTREACHED()
+ << "Trying to call glGetTexParameterfv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetTexParameterfv() without current GL context";
+}
+
+void NoContextGLApi::glGetTexParameterivFn(GLenum target,
+ GLenum pname,
+ GLint* params) {
+ NOTREACHED()
+ << "Trying to call glGetTexParameteriv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetTexParameteriv() without current GL context";
+}
+
+void NoContextGLApi::glGetTransformFeedbackVaryingFn(GLuint program,
+ GLuint index,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* type,
+ char* name) {
+ NOTREACHED() << "Trying to call glGetTransformFeedbackVarying() without "
+ "current GL context";
+ LOG(ERROR) << "Trying to call glGetTransformFeedbackVarying() without "
+ "current GL context";
+}
+
+void NoContextGLApi::glGetTranslatedShaderSourceANGLEFn(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) {
+ NOTREACHED() << "Trying to call glGetTranslatedShaderSourceANGLE() without "
+ "current GL context";
+ LOG(ERROR) << "Trying to call glGetTranslatedShaderSourceANGLE() without "
+ "current GL context";
+}
+
+GLuint NoContextGLApi::glGetUniformBlockIndexFn(GLuint program,
+ const char* uniformBlockName) {
+ NOTREACHED()
+ << "Trying to call glGetUniformBlockIndex() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetUniformBlockIndex() without current GL context";
+ return 0U;
+}
+
+void NoContextGLApi::glGetUniformfvFn(GLuint program,
+ GLint location,
+ GLfloat* params) {
+ NOTREACHED() << "Trying to call glGetUniformfv() without current GL context";
+ LOG(ERROR) << "Trying to call glGetUniformfv() without current GL context";
+}
+
+void NoContextGLApi::glGetUniformIndicesFn(GLuint program,
+ GLsizei uniformCount,
+ const char* const* uniformNames,
+ GLuint* uniformIndices) {
+ NOTREACHED()
+ << "Trying to call glGetUniformIndices() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetUniformIndices() without current GL context";
+}
+
+void NoContextGLApi::glGetUniformivFn(GLuint program,
+ GLint location,
+ GLint* params) {
+ NOTREACHED() << "Trying to call glGetUniformiv() without current GL context";
+ LOG(ERROR) << "Trying to call glGetUniformiv() without current GL context";
+}
+
+GLint NoContextGLApi::glGetUniformLocationFn(GLuint program, const char* name) {
+ NOTREACHED()
+ << "Trying to call glGetUniformLocation() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetUniformLocation() without current GL context";
+ return 0;
+}
+
+void NoContextGLApi::glGetVertexAttribfvFn(GLuint index,
+ GLenum pname,
+ GLfloat* params) {
+ NOTREACHED()
+ << "Trying to call glGetVertexAttribfv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetVertexAttribfv() without current GL context";
+}
+
+void NoContextGLApi::glGetVertexAttribivFn(GLuint index,
+ GLenum pname,
+ GLint* params) {
+ NOTREACHED()
+ << "Trying to call glGetVertexAttribiv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glGetVertexAttribiv() without current GL context";
+}
+
+void NoContextGLApi::glGetVertexAttribPointervFn(GLuint index,
+ GLenum pname,
+ void** pointer) {
+ NOTREACHED() << "Trying to call glGetVertexAttribPointerv() without current "
+ "GL context";
+ LOG(ERROR) << "Trying to call glGetVertexAttribPointerv() without current GL "
+ "context";
+}
+
+void NoContextGLApi::glHintFn(GLenum target, GLenum mode) {
+ NOTREACHED() << "Trying to call glHint() without current GL context";
+ LOG(ERROR) << "Trying to call glHint() without current GL context";
+}
+
+void NoContextGLApi::glInsertEventMarkerEXTFn(GLsizei length,
+ const char* marker) {
+ NOTREACHED()
+ << "Trying to call glInsertEventMarkerEXT() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glInsertEventMarkerEXT() without current GL context";
+}
+
+void NoContextGLApi::glInvalidateFramebufferFn(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments) {
+ NOTREACHED()
+ << "Trying to call glInvalidateFramebuffer() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glInvalidateFramebuffer() without current GL context";
+}
+
+void NoContextGLApi::glInvalidateSubFramebufferFn(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments,
+ GLint x,
+ GLint y,
+ GLint width,
+ GLint height) {
+ NOTREACHED() << "Trying to call glInvalidateSubFramebuffer() without current "
+ "GL context";
+ LOG(ERROR) << "Trying to call glInvalidateSubFramebuffer() without current "
+ "GL context";
+}
+
+GLboolean NoContextGLApi::glIsBufferFn(GLuint buffer) {
+ NOTREACHED() << "Trying to call glIsBuffer() without current GL context";
+ LOG(ERROR) << "Trying to call glIsBuffer() without current GL context";
+ return GL_FALSE;
+}
+
+GLboolean NoContextGLApi::glIsEnabledFn(GLenum cap) {
+ NOTREACHED() << "Trying to call glIsEnabled() without current GL context";
+ LOG(ERROR) << "Trying to call glIsEnabled() without current GL context";
+ return GL_FALSE;
+}
+
+GLboolean NoContextGLApi::glIsFenceAPPLEFn(GLuint fence) {
+ NOTREACHED() << "Trying to call glIsFenceAPPLE() without current GL context";
+ LOG(ERROR) << "Trying to call glIsFenceAPPLE() without current GL context";
+ return GL_FALSE;
+}
+
+GLboolean NoContextGLApi::glIsFenceNVFn(GLuint fence) {
+ NOTREACHED() << "Trying to call glIsFenceNV() without current GL context";
+ LOG(ERROR) << "Trying to call glIsFenceNV() without current GL context";
+ return GL_FALSE;
+}
+
+GLboolean NoContextGLApi::glIsFramebufferEXTFn(GLuint framebuffer) {
+ NOTREACHED()
+ << "Trying to call glIsFramebufferEXT() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glIsFramebufferEXT() without current GL context";
+ return GL_FALSE;
+}
+
+GLboolean NoContextGLApi::glIsProgramFn(GLuint program) {
+ NOTREACHED() << "Trying to call glIsProgram() without current GL context";
+ LOG(ERROR) << "Trying to call glIsProgram() without current GL context";
+ return GL_FALSE;
+}
+
+GLboolean NoContextGLApi::glIsQueryFn(GLuint query) {
+ NOTREACHED() << "Trying to call glIsQuery() without current GL context";
+ LOG(ERROR) << "Trying to call glIsQuery() without current GL context";
+ 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";
+ LOG(ERROR)
+ << "Trying to call glIsRenderbufferEXT() without current GL context";
+ return GL_FALSE;
+}
+
+GLboolean NoContextGLApi::glIsSamplerFn(GLuint sampler) {
+ NOTREACHED() << "Trying to call glIsSampler() without current GL context";
+ LOG(ERROR) << "Trying to call glIsSampler() without current GL context";
+ return GL_FALSE;
+}
+
+GLboolean NoContextGLApi::glIsShaderFn(GLuint shader) {
+ NOTREACHED() << "Trying to call glIsShader() without current GL context";
+ LOG(ERROR) << "Trying to call glIsShader() without current GL context";
+ return GL_FALSE;
+}
+
+GLboolean NoContextGLApi::glIsSyncFn(GLsync sync) {
+ NOTREACHED() << "Trying to call glIsSync() without current GL context";
+ LOG(ERROR) << "Trying to call glIsSync() without current GL context";
+ return GL_FALSE;
+}
+
+GLboolean NoContextGLApi::glIsTextureFn(GLuint texture) {
+ NOTREACHED() << "Trying to call glIsTexture() without current GL context";
+ LOG(ERROR) << "Trying to call glIsTexture() without current GL context";
+ return GL_FALSE;
+}
+
+GLboolean NoContextGLApi::glIsTransformFeedbackFn(GLuint id) {
+ NOTREACHED()
+ << "Trying to call glIsTransformFeedback() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glIsTransformFeedback() without current GL context";
+ return GL_FALSE;
+}
+
+GLboolean NoContextGLApi::glIsVertexArrayOESFn(GLuint array) {
+ NOTREACHED()
+ << "Trying to call glIsVertexArrayOES() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glIsVertexArrayOES() without current GL context";
+ return GL_FALSE;
+}
+
+void NoContextGLApi::glLineWidthFn(GLfloat width) {
+ NOTREACHED() << "Trying to call glLineWidth() without current GL context";
+ LOG(ERROR) << "Trying to call glLineWidth() without current GL context";
+}
+
+void NoContextGLApi::glLinkProgramFn(GLuint program) {
+ NOTREACHED() << "Trying to call glLinkProgram() without current GL context";
+ LOG(ERROR) << "Trying to call glLinkProgram() without current GL context";
+}
+
+void* NoContextGLApi::glMapBufferFn(GLenum target, GLenum access) {
+ NOTREACHED() << "Trying to call glMapBuffer() without current GL context";
+ LOG(ERROR) << "Trying to call glMapBuffer() without current GL context";
+ return NULL;
+}
+
+void* NoContextGLApi::glMapBufferRangeFn(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length,
+ GLbitfield access) {
+ NOTREACHED()
+ << "Trying to call glMapBufferRange() without current GL context";
+ LOG(ERROR) << "Trying to call glMapBufferRange() without current GL context";
+ return NULL;
+}
+
+void NoContextGLApi::glMatrixLoadfEXTFn(GLenum matrixMode, const GLfloat* m) {
+ NOTREACHED()
+ << "Trying to call glMatrixLoadfEXT() without current GL context";
+ LOG(ERROR) << "Trying to call glMatrixLoadfEXT() without current GL context";
+}
+
+void NoContextGLApi::glMatrixLoadIdentityEXTFn(GLenum matrixMode) {
+ NOTREACHED()
+ << "Trying to call glMatrixLoadIdentityEXT() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glMatrixLoadIdentityEXT() without current GL context";
+}
+
+void NoContextGLApi::glPauseTransformFeedbackFn(void) {
+ NOTREACHED()
+ << "Trying to call glPauseTransformFeedback() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glPauseTransformFeedback() without current GL context";
+}
+
+void NoContextGLApi::glPixelStoreiFn(GLenum pname, GLint param) {
+ NOTREACHED() << "Trying to call glPixelStorei() without current GL context";
+ LOG(ERROR) << "Trying to call glPixelStorei() without current GL context";
+}
+
+void NoContextGLApi::glPointParameteriFn(GLenum pname, GLint param) {
+ NOTREACHED()
+ << "Trying to call glPointParameteri() without current GL context";
+ LOG(ERROR) << "Trying to call glPointParameteri() without current GL context";
+}
+
+void NoContextGLApi::glPolygonOffsetFn(GLfloat factor, GLfloat units) {
+ NOTREACHED() << "Trying to call glPolygonOffset() without current GL context";
+ LOG(ERROR) << "Trying to call glPolygonOffset() without current GL context";
+}
+
+void NoContextGLApi::glPopGroupMarkerEXTFn(void) {
+ NOTREACHED()
+ << "Trying to call glPopGroupMarkerEXT() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glPopGroupMarkerEXT() without current GL context";
+}
+
+void NoContextGLApi::glProgramBinaryFn(GLuint program,
+ GLenum binaryFormat,
+ const GLvoid* binary,
+ GLsizei length) {
+ NOTREACHED() << "Trying to call glProgramBinary() without current GL context";
+ LOG(ERROR) << "Trying to call glProgramBinary() without current GL context";
+}
+
+void NoContextGLApi::glProgramParameteriFn(GLuint program,
+ GLenum pname,
+ GLint value) {
+ NOTREACHED()
+ << "Trying to call glProgramParameteri() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glProgramParameteri() without current GL context";
+}
+
+void NoContextGLApi::glPushGroupMarkerEXTFn(GLsizei length,
+ const char* marker) {
+ NOTREACHED()
+ << "Trying to call glPushGroupMarkerEXT() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glPushGroupMarkerEXT() without current GL context";
+}
+
+void NoContextGLApi::glQueryCounterFn(GLuint id, GLenum target) {
+ NOTREACHED() << "Trying to call glQueryCounter() without current GL context";
+ LOG(ERROR) << "Trying to call glQueryCounter() without current GL context";
+}
+
+void NoContextGLApi::glReadBufferFn(GLenum src) {
+ NOTREACHED() << "Trying to call glReadBuffer() without current GL context";
+ LOG(ERROR) << "Trying to call glReadBuffer() without current GL context";
+}
+
+void NoContextGLApi::glReadPixelsFn(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ void* pixels) {
+ NOTREACHED() << "Trying to call glReadPixels() without current GL context";
+ LOG(ERROR) << "Trying to call glReadPixels() without current GL context";
+}
+
+void NoContextGLApi::glReleaseShaderCompilerFn(void) {
+ NOTREACHED()
+ << "Trying to call glReleaseShaderCompiler() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glReleaseShaderCompiler() without current GL context";
+}
+
+void NoContextGLApi::glRenderbufferStorageEXTFn(GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ NOTREACHED()
+ << "Trying to call glRenderbufferStorageEXT() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glRenderbufferStorageEXT() without current GL context";
+}
+
+void NoContextGLApi::glRenderbufferStorageMultisampleFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ NOTREACHED() << "Trying to call glRenderbufferStorageMultisample() without "
+ "current GL context";
+ LOG(ERROR) << "Trying to call glRenderbufferStorageMultisample() without "
+ "current GL context";
+}
+
+void NoContextGLApi::glRenderbufferStorageMultisampleANGLEFn(
+ GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ NOTREACHED() << "Trying to call glRenderbufferStorageMultisampleANGLE() "
+ "without current GL context";
+ LOG(ERROR) << "Trying to call glRenderbufferStorageMultisampleANGLE() "
+ "without current GL context";
+}
+
+void NoContextGLApi::glRenderbufferStorageMultisampleEXTFn(
+ GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ NOTREACHED() << "Trying to call glRenderbufferStorageMultisampleEXT() "
+ "without current GL context";
+ LOG(ERROR) << "Trying to call glRenderbufferStorageMultisampleEXT() without "
+ "current GL context";
+}
+
+void NoContextGLApi::glRenderbufferStorageMultisampleIMGFn(
+ GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ NOTREACHED() << "Trying to call glRenderbufferStorageMultisampleIMG() "
+ "without current GL context";
+ LOG(ERROR) << "Trying to call glRenderbufferStorageMultisampleIMG() without "
+ "current GL context";
+}
+
+void NoContextGLApi::glResumeTransformFeedbackFn(void) {
+ NOTREACHED() << "Trying to call glResumeTransformFeedback() without current "
+ "GL context";
+ LOG(ERROR) << "Trying to call glResumeTransformFeedback() without current GL "
+ "context";
+}
+
+void NoContextGLApi::glSampleCoverageFn(GLclampf value, GLboolean invert) {
+ NOTREACHED()
+ << "Trying to call glSampleCoverage() without current GL context";
+ LOG(ERROR) << "Trying to call glSampleCoverage() without current GL context";
+}
+
+void NoContextGLApi::glSamplerParameterfFn(GLuint sampler,
+ GLenum pname,
+ GLfloat param) {
+ NOTREACHED()
+ << "Trying to call glSamplerParameterf() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glSamplerParameterf() without current GL context";
+}
+
+void NoContextGLApi::glSamplerParameterfvFn(GLuint sampler,
+ GLenum pname,
+ const GLfloat* params) {
+ NOTREACHED()
+ << "Trying to call glSamplerParameterfv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glSamplerParameterfv() without current GL context";
+}
+
+void NoContextGLApi::glSamplerParameteriFn(GLuint sampler,
+ GLenum pname,
+ GLint param) {
+ NOTREACHED()
+ << "Trying to call glSamplerParameteri() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glSamplerParameteri() without current GL context";
+}
+
+void NoContextGLApi::glSamplerParameterivFn(GLuint sampler,
+ GLenum pname,
+ const GLint* params) {
+ NOTREACHED()
+ << "Trying to call glSamplerParameteriv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glSamplerParameteriv() without current GL context";
+}
+
+void NoContextGLApi::glScissorFn(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) {
+ NOTREACHED() << "Trying to call glScissor() without current GL context";
+ LOG(ERROR) << "Trying to call glScissor() without current GL context";
+}
+
+void NoContextGLApi::glSetFenceAPPLEFn(GLuint fence) {
+ NOTREACHED() << "Trying to call glSetFenceAPPLE() without current GL context";
+ LOG(ERROR) << "Trying to call glSetFenceAPPLE() without current GL context";
+}
+
+void NoContextGLApi::glSetFenceNVFn(GLuint fence, GLenum condition) {
+ NOTREACHED() << "Trying to call glSetFenceNV() without current GL context";
+ LOG(ERROR) << "Trying to call glSetFenceNV() without current GL context";
+}
+
+void NoContextGLApi::glShaderBinaryFn(GLsizei n,
+ const GLuint* shaders,
+ GLenum binaryformat,
+ const void* binary,
+ GLsizei length) {
+ NOTREACHED() << "Trying to call glShaderBinary() without current GL context";
+ LOG(ERROR) << "Trying to call glShaderBinary() without current GL context";
+}
+
+void NoContextGLApi::glShaderSourceFn(GLuint shader,
+ GLsizei count,
+ const char* const* str,
+ const GLint* length) {
+ NOTREACHED() << "Trying to call glShaderSource() without current GL context";
+ LOG(ERROR) << "Trying to call glShaderSource() without current GL context";
+}
+
+void NoContextGLApi::glStencilFuncFn(GLenum func, GLint ref, GLuint mask) {
+ NOTREACHED() << "Trying to call glStencilFunc() without current GL context";
+ LOG(ERROR) << "Trying to call glStencilFunc() without current GL context";
+}
+
+void NoContextGLApi::glStencilFuncSeparateFn(GLenum face,
+ GLenum func,
+ GLint ref,
+ GLuint mask) {
+ NOTREACHED()
+ << "Trying to call glStencilFuncSeparate() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glStencilFuncSeparate() without current GL context";
+}
+
+void NoContextGLApi::glStencilMaskFn(GLuint mask) {
+ NOTREACHED() << "Trying to call glStencilMask() without current GL context";
+ LOG(ERROR) << "Trying to call glStencilMask() without current GL context";
+}
+
+void NoContextGLApi::glStencilMaskSeparateFn(GLenum face, GLuint mask) {
+ NOTREACHED()
+ << "Trying to call glStencilMaskSeparate() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glStencilMaskSeparate() without current GL context";
+}
+
+void NoContextGLApi::glStencilOpFn(GLenum fail, GLenum zfail, GLenum zpass) {
+ NOTREACHED() << "Trying to call glStencilOp() without current GL context";
+ LOG(ERROR) << "Trying to call glStencilOp() without current GL context";
+}
+
+void NoContextGLApi::glStencilOpSeparateFn(GLenum face,
+ GLenum fail,
+ GLenum zfail,
+ GLenum zpass) {
+ NOTREACHED()
+ << "Trying to call glStencilOpSeparate() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glStencilOpSeparate() without current GL context";
+}
+
+GLboolean NoContextGLApi::glTestFenceAPPLEFn(GLuint fence) {
+ NOTREACHED()
+ << "Trying to call glTestFenceAPPLE() without current GL context";
+ LOG(ERROR) << "Trying to call glTestFenceAPPLE() without current GL context";
+ return GL_FALSE;
+}
+
+GLboolean NoContextGLApi::glTestFenceNVFn(GLuint fence) {
+ NOTREACHED() << "Trying to call glTestFenceNV() without current GL context";
+ LOG(ERROR) << "Trying to call glTestFenceNV() without current GL context";
+ return GL_FALSE;
+}
+
+void NoContextGLApi::glTexImage2DFn(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) {
+ NOTREACHED() << "Trying to call glTexImage2D() without current GL context";
+ LOG(ERROR) << "Trying to call glTexImage2D() without current GL context";
+}
+
+void NoContextGLApi::glTexImage3DFn(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) {
+ NOTREACHED() << "Trying to call glTexImage3D() without current GL context";
+ LOG(ERROR) << "Trying to call glTexImage3D() without current GL context";
+}
+
+void NoContextGLApi::glTexParameterfFn(GLenum target,
+ GLenum pname,
+ GLfloat param) {
+ NOTREACHED() << "Trying to call glTexParameterf() without current GL context";
+ LOG(ERROR) << "Trying to call glTexParameterf() without current GL context";
+}
+
+void NoContextGLApi::glTexParameterfvFn(GLenum target,
+ GLenum pname,
+ const GLfloat* params) {
+ NOTREACHED()
+ << "Trying to call glTexParameterfv() without current GL context";
+ LOG(ERROR) << "Trying to call glTexParameterfv() without current GL context";
+}
+
+void NoContextGLApi::glTexParameteriFn(GLenum target,
+ GLenum pname,
+ GLint param) {
+ NOTREACHED() << "Trying to call glTexParameteri() without current GL context";
+ LOG(ERROR) << "Trying to call glTexParameteri() without current GL context";
+}
+
+void NoContextGLApi::glTexParameterivFn(GLenum target,
+ GLenum pname,
+ const GLint* params) {
+ NOTREACHED()
+ << "Trying to call glTexParameteriv() without current GL context";
+ LOG(ERROR) << "Trying to call glTexParameteriv() without current GL context";
+}
+
+void NoContextGLApi::glTexStorage2DEXTFn(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ NOTREACHED()
+ << "Trying to call glTexStorage2DEXT() without current GL context";
+ LOG(ERROR) << "Trying to call glTexStorage2DEXT() without current GL context";
+}
+
+void NoContextGLApi::glTexStorage3DFn(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth) {
+ NOTREACHED() << "Trying to call glTexStorage3D() without current GL context";
+ LOG(ERROR) << "Trying to call glTexStorage3D() without current GL context";
+}
+
+void NoContextGLApi::glTexSubImage2DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels) {
+ NOTREACHED() << "Trying to call glTexSubImage2D() without current GL context";
+ LOG(ERROR) << "Trying to call glTexSubImage2D() without current GL context";
+}
+
+void NoContextGLApi::glTransformFeedbackVaryingsFn(GLuint program,
+ GLsizei count,
+ const char* const* varyings,
+ GLenum bufferMode) {
+ NOTREACHED() << "Trying to call glTransformFeedbackVaryings() without "
+ "current GL context";
+ LOG(ERROR) << "Trying to call glTransformFeedbackVaryings() without current "
+ "GL context";
+}
+
+void NoContextGLApi::glUniform1fFn(GLint location, GLfloat x) {
+ NOTREACHED() << "Trying to call glUniform1f() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform1f() without current GL context";
+}
+
+void NoContextGLApi::glUniform1fvFn(GLint location,
+ GLsizei count,
+ const GLfloat* v) {
+ NOTREACHED() << "Trying to call glUniform1fv() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform1fv() without current GL context";
+}
+
+void NoContextGLApi::glUniform1iFn(GLint location, GLint x) {
+ NOTREACHED() << "Trying to call glUniform1i() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform1i() without current GL context";
+}
+
+void NoContextGLApi::glUniform1ivFn(GLint location,
+ GLsizei count,
+ const GLint* v) {
+ NOTREACHED() << "Trying to call glUniform1iv() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform1iv() without current GL context";
+}
+
+void NoContextGLApi::glUniform1uiFn(GLint location, GLuint v0) {
+ NOTREACHED() << "Trying to call glUniform1ui() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform1ui() without current GL context";
+}
+
+void NoContextGLApi::glUniform1uivFn(GLint location,
+ GLsizei count,
+ const GLuint* v) {
+ NOTREACHED() << "Trying to call glUniform1uiv() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform1uiv() without current GL context";
+}
+
+void NoContextGLApi::glUniform2fFn(GLint location, GLfloat x, GLfloat y) {
+ NOTREACHED() << "Trying to call glUniform2f() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform2f() without current GL context";
+}
+
+void NoContextGLApi::glUniform2fvFn(GLint location,
+ GLsizei count,
+ const GLfloat* v) {
+ NOTREACHED() << "Trying to call glUniform2fv() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform2fv() without current GL context";
+}
+
+void NoContextGLApi::glUniform2iFn(GLint location, GLint x, GLint y) {
+ NOTREACHED() << "Trying to call glUniform2i() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform2i() without current GL context";
+}
+
+void NoContextGLApi::glUniform2ivFn(GLint location,
+ GLsizei count,
+ const GLint* v) {
+ NOTREACHED() << "Trying to call glUniform2iv() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform2iv() without current GL context";
+}
+
+void NoContextGLApi::glUniform2uiFn(GLint location, GLuint v0, GLuint v1) {
+ NOTREACHED() << "Trying to call glUniform2ui() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform2ui() without current GL context";
+}
+
+void NoContextGLApi::glUniform2uivFn(GLint location,
+ GLsizei count,
+ const GLuint* v) {
+ NOTREACHED() << "Trying to call glUniform2uiv() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform2uiv() without current GL context";
+}
+
+void NoContextGLApi::glUniform3fFn(GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z) {
+ NOTREACHED() << "Trying to call glUniform3f() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform3f() without current GL context";
+}
+
+void NoContextGLApi::glUniform3fvFn(GLint location,
+ GLsizei count,
+ const GLfloat* v) {
+ NOTREACHED() << "Trying to call glUniform3fv() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform3fv() without current GL context";
+}
+
+void NoContextGLApi::glUniform3iFn(GLint location, GLint x, GLint y, GLint z) {
+ NOTREACHED() << "Trying to call glUniform3i() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform3i() without current GL context";
+}
+
+void NoContextGLApi::glUniform3ivFn(GLint location,
+ GLsizei count,
+ const GLint* v) {
+ NOTREACHED() << "Trying to call glUniform3iv() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform3iv() without current GL context";
+}
+
+void NoContextGLApi::glUniform3uiFn(GLint location,
+ GLuint v0,
+ GLuint v1,
+ GLuint v2) {
+ NOTREACHED() << "Trying to call glUniform3ui() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform3ui() without current GL context";
+}
+
+void NoContextGLApi::glUniform3uivFn(GLint location,
+ GLsizei count,
+ const GLuint* v) {
+ NOTREACHED() << "Trying to call glUniform3uiv() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform3uiv() without current GL context";
+}
+
+void NoContextGLApi::glUniform4fFn(GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) {
+ NOTREACHED() << "Trying to call glUniform4f() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform4f() without current GL context";
+}
+
+void NoContextGLApi::glUniform4fvFn(GLint location,
+ GLsizei count,
+ const GLfloat* v) {
+ NOTREACHED() << "Trying to call glUniform4fv() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform4fv() without current GL context";
+}
+
+void NoContextGLApi::glUniform4iFn(GLint location,
+ GLint x,
+ GLint y,
+ GLint z,
+ GLint w) {
+ NOTREACHED() << "Trying to call glUniform4i() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform4i() without current GL context";
+}
+
+void NoContextGLApi::glUniform4ivFn(GLint location,
+ GLsizei count,
+ const GLint* v) {
+ NOTREACHED() << "Trying to call glUniform4iv() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform4iv() without current GL context";
+}
+
+void NoContextGLApi::glUniform4uiFn(GLint location,
+ GLuint v0,
+ GLuint v1,
+ GLuint v2,
+ GLuint v3) {
+ NOTREACHED() << "Trying to call glUniform4ui() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform4ui() without current GL context";
+}
+
+void NoContextGLApi::glUniform4uivFn(GLint location,
+ GLsizei count,
+ const GLuint* v) {
+ NOTREACHED() << "Trying to call glUniform4uiv() without current GL context";
+ LOG(ERROR) << "Trying to call glUniform4uiv() without current GL context";
+}
+
+void NoContextGLApi::glUniformBlockBindingFn(GLuint program,
+ GLuint uniformBlockIndex,
+ GLuint uniformBlockBinding) {
+ NOTREACHED()
+ << "Trying to call glUniformBlockBinding() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glUniformBlockBinding() without current GL context";
+}
+
+void NoContextGLApi::glUniformMatrix2fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ NOTREACHED()
+ << "Trying to call glUniformMatrix2fv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glUniformMatrix2fv() without current GL context";
+}
+
+void NoContextGLApi::glUniformMatrix2x3fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ NOTREACHED()
+ << "Trying to call glUniformMatrix2x3fv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glUniformMatrix2x3fv() without current GL context";
+}
+
+void NoContextGLApi::glUniformMatrix2x4fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ NOTREACHED()
+ << "Trying to call glUniformMatrix2x4fv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glUniformMatrix2x4fv() without current GL context";
+}
+
+void NoContextGLApi::glUniformMatrix3fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ NOTREACHED()
+ << "Trying to call glUniformMatrix3fv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glUniformMatrix3fv() without current GL context";
+}
+
+void NoContextGLApi::glUniformMatrix3x2fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ NOTREACHED()
+ << "Trying to call glUniformMatrix3x2fv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glUniformMatrix3x2fv() without current GL context";
+}
+
+void NoContextGLApi::glUniformMatrix3x4fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ NOTREACHED()
+ << "Trying to call glUniformMatrix3x4fv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glUniformMatrix3x4fv() without current GL context";
+}
+
+void NoContextGLApi::glUniformMatrix4fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ NOTREACHED()
+ << "Trying to call glUniformMatrix4fv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glUniformMatrix4fv() without current GL context";
+}
+
+void NoContextGLApi::glUniformMatrix4x2fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ NOTREACHED()
+ << "Trying to call glUniformMatrix4x2fv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glUniformMatrix4x2fv() without current GL context";
+}
+
+void NoContextGLApi::glUniformMatrix4x3fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ NOTREACHED()
+ << "Trying to call glUniformMatrix4x3fv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glUniformMatrix4x3fv() without current GL context";
+}
+
+GLboolean NoContextGLApi::glUnmapBufferFn(GLenum target) {
+ NOTREACHED() << "Trying to call glUnmapBuffer() without current GL context";
+ LOG(ERROR) << "Trying to call glUnmapBuffer() without current GL context";
+ return GL_FALSE;
+}
+
+void NoContextGLApi::glUseProgramFn(GLuint program) {
+ NOTREACHED() << "Trying to call glUseProgram() without current GL context";
+ LOG(ERROR) << "Trying to call glUseProgram() without current GL context";
+}
+
+void NoContextGLApi::glValidateProgramFn(GLuint program) {
+ NOTREACHED()
+ << "Trying to call glValidateProgram() without current GL context";
+ LOG(ERROR) << "Trying to call glValidateProgram() without current GL context";
+}
+
+void NoContextGLApi::glVertexAttrib1fFn(GLuint indx, GLfloat x) {
+ NOTREACHED()
+ << "Trying to call glVertexAttrib1f() without current GL context";
+ LOG(ERROR) << "Trying to call glVertexAttrib1f() without current GL context";
+}
+
+void NoContextGLApi::glVertexAttrib1fvFn(GLuint indx, const GLfloat* values) {
+ NOTREACHED()
+ << "Trying to call glVertexAttrib1fv() without current GL context";
+ LOG(ERROR) << "Trying to call glVertexAttrib1fv() without current GL context";
+}
+
+void NoContextGLApi::glVertexAttrib2fFn(GLuint indx, GLfloat x, GLfloat y) {
+ NOTREACHED()
+ << "Trying to call glVertexAttrib2f() without current GL context";
+ LOG(ERROR) << "Trying to call glVertexAttrib2f() without current GL context";
+}
+
+void NoContextGLApi::glVertexAttrib2fvFn(GLuint indx, const GLfloat* values) {
+ NOTREACHED()
+ << "Trying to call glVertexAttrib2fv() without current GL context";
+ LOG(ERROR) << "Trying to call glVertexAttrib2fv() without current GL context";
+}
+
+void NoContextGLApi::glVertexAttrib3fFn(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z) {
+ NOTREACHED()
+ << "Trying to call glVertexAttrib3f() without current GL context";
+ LOG(ERROR) << "Trying to call glVertexAttrib3f() without current GL context";
+}
+
+void NoContextGLApi::glVertexAttrib3fvFn(GLuint indx, const GLfloat* values) {
+ NOTREACHED()
+ << "Trying to call glVertexAttrib3fv() without current GL context";
+ LOG(ERROR) << "Trying to call glVertexAttrib3fv() without current GL context";
+}
+
+void NoContextGLApi::glVertexAttrib4fFn(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) {
+ NOTREACHED()
+ << "Trying to call glVertexAttrib4f() without current GL context";
+ LOG(ERROR) << "Trying to call glVertexAttrib4f() without current GL context";
+}
+
+void NoContextGLApi::glVertexAttrib4fvFn(GLuint indx, const GLfloat* values) {
+ NOTREACHED()
+ << "Trying to call glVertexAttrib4fv() without current GL context";
+ LOG(ERROR) << "Trying to call glVertexAttrib4fv() without current GL context";
+}
+
+void NoContextGLApi::glVertexAttribDivisorANGLEFn(GLuint index,
+ GLuint divisor) {
+ NOTREACHED() << "Trying to call glVertexAttribDivisorANGLE() without current "
+ "GL context";
+ LOG(ERROR) << "Trying to call glVertexAttribDivisorANGLE() without current "
+ "GL context";
+}
+
+void NoContextGLApi::glVertexAttribI4iFn(GLuint indx,
+ GLint x,
+ GLint y,
+ GLint z,
+ GLint w) {
+ NOTREACHED()
+ << "Trying to call glVertexAttribI4i() without current GL context";
+ LOG(ERROR) << "Trying to call glVertexAttribI4i() without current GL context";
+}
+
+void NoContextGLApi::glVertexAttribI4ivFn(GLuint indx, const GLint* values) {
+ NOTREACHED()
+ << "Trying to call glVertexAttribI4iv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glVertexAttribI4iv() without current GL context";
+}
+
+void NoContextGLApi::glVertexAttribI4uiFn(GLuint indx,
+ GLuint x,
+ GLuint y,
+ GLuint z,
+ GLuint w) {
+ NOTREACHED()
+ << "Trying to call glVertexAttribI4ui() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glVertexAttribI4ui() without current GL context";
+}
+
+void NoContextGLApi::glVertexAttribI4uivFn(GLuint indx, const GLuint* values) {
+ NOTREACHED()
+ << "Trying to call glVertexAttribI4uiv() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glVertexAttribI4uiv() without current GL context";
+}
+
+void NoContextGLApi::glVertexAttribIPointerFn(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLsizei stride,
+ const void* ptr) {
+ NOTREACHED()
+ << "Trying to call glVertexAttribIPointer() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glVertexAttribIPointer() without current GL context";
+}
+
+void NoContextGLApi::glVertexAttribPointerFn(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLboolean normalized,
+ GLsizei stride,
+ const void* ptr) {
+ NOTREACHED()
+ << "Trying to call glVertexAttribPointer() without current GL context";
+ LOG(ERROR)
+ << "Trying to call glVertexAttribPointer() without current GL context";
+}
+
+void NoContextGLApi::glViewportFn(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) {
+ NOTREACHED() << "Trying to call glViewport() without current GL context";
+ LOG(ERROR) << "Trying to call glViewport() without current GL context";
+}
+
+GLenum NoContextGLApi::glWaitSyncFn(GLsync sync,
+ GLbitfield flags,
+ GLuint64 timeout) {
+ NOTREACHED() << "Trying to call glWaitSync() without current GL context";
+ LOG(ERROR) << "Trying to call glWaitSync() without current GL context";
+ return static_cast<GLenum>(0);
+}
+
+} // namespace gfx
diff --git a/ui/gl/gl_bindings_autogen_gl.h b/ui/gl/gl_bindings_autogen_gl.h
new file mode 100644
index 0000000..eb66b4a
--- /dev/null
+++ b/ui/gl/gl_bindings_autogen_gl.h
@@ -0,0 +1,2380 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+#ifndef UI_GFX_GL_GL_BINDINGS_AUTOGEN_GL_H_
+#define UI_GFX_GL_GL_BINDINGS_AUTOGEN_GL_H_
+
+namespace gfx {
+
+class GLContext;
+
+typedef void(GL_BINDING_CALL* glActiveTextureProc)(GLenum texture);
+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,
+ GLuint index,
+ const char* name);
+typedef void(GL_BINDING_CALL* glBindBufferProc)(GLenum target, GLuint buffer);
+typedef void(GL_BINDING_CALL* glBindBufferBaseProc)(GLenum target,
+ GLuint index,
+ GLuint buffer);
+typedef void(GL_BINDING_CALL* glBindBufferRangeProc)(GLenum target,
+ GLuint index,
+ GLuint buffer,
+ GLintptr offset,
+ GLsizeiptr size);
+typedef void(GL_BINDING_CALL* glBindFragDataLocationProc)(GLuint program,
+ GLuint colorNumber,
+ const char* name);
+typedef void(GL_BINDING_CALL* glBindFragDataLocationIndexedProc)(
+ GLuint program,
+ GLuint colorNumber,
+ GLuint index,
+ const char* name);
+typedef void(GL_BINDING_CALL* glBindFramebufferEXTProc)(GLenum target,
+ GLuint framebuffer);
+typedef void(GL_BINDING_CALL* glBindRenderbufferEXTProc)(GLenum target,
+ GLuint renderbuffer);
+typedef void(GL_BINDING_CALL* glBindSamplerProc)(GLuint unit, GLuint sampler);
+typedef void(GL_BINDING_CALL* glBindTextureProc)(GLenum target, GLuint texture);
+typedef void(GL_BINDING_CALL* glBindTransformFeedbackProc)(GLenum target,
+ GLuint id);
+typedef void(GL_BINDING_CALL* glBindVertexArrayOESProc)(GLuint array);
+typedef void(GL_BINDING_CALL* glBlendBarrierKHRProc)(void);
+typedef void(GL_BINDING_CALL* glBlendColorProc)(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha);
+typedef void(GL_BINDING_CALL* glBlendEquationProc)(GLenum mode);
+typedef void(GL_BINDING_CALL* glBlendEquationSeparateProc)(GLenum modeRGB,
+ GLenum modeAlpha);
+typedef void(GL_BINDING_CALL* glBlendFuncProc)(GLenum sfactor, GLenum dfactor);
+typedef void(GL_BINDING_CALL* glBlendFuncSeparateProc)(GLenum srcRGB,
+ GLenum dstRGB,
+ GLenum srcAlpha,
+ GLenum dstAlpha);
+typedef void(GL_BINDING_CALL* glBlitFramebufferProc)(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter);
+typedef void(GL_BINDING_CALL* glBlitFramebufferANGLEProc)(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter);
+typedef void(GL_BINDING_CALL* glBlitFramebufferEXTProc)(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter);
+typedef void(GL_BINDING_CALL* glBufferDataProc)(GLenum target,
+ GLsizeiptr size,
+ const void* data,
+ GLenum usage);
+typedef void(GL_BINDING_CALL* glBufferSubDataProc)(GLenum target,
+ GLintptr offset,
+ GLsizeiptr size,
+ const void* data);
+typedef GLenum(GL_BINDING_CALL* glCheckFramebufferStatusEXTProc)(GLenum target);
+typedef void(GL_BINDING_CALL* glClearProc)(GLbitfield mask);
+typedef void(GL_BINDING_CALL* glClearBufferfiProc)(GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat depth,
+ GLint stencil);
+typedef void(GL_BINDING_CALL* glClearBufferfvProc)(GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat* value);
+typedef void(GL_BINDING_CALL* glClearBufferivProc)(GLenum buffer,
+ GLint drawbuffer,
+ const GLint* value);
+typedef void(GL_BINDING_CALL* glClearBufferuivProc)(GLenum buffer,
+ GLint drawbuffer,
+ const GLuint* value);
+typedef void(GL_BINDING_CALL* glClearColorProc)(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha);
+typedef void(GL_BINDING_CALL* glClearDepthProc)(GLclampd depth);
+typedef void(GL_BINDING_CALL* glClearDepthfProc)(GLclampf depth);
+typedef void(GL_BINDING_CALL* glClearStencilProc)(GLint s);
+typedef GLenum(GL_BINDING_CALL* glClientWaitSyncProc)(GLsync sync,
+ GLbitfield flags,
+ GLuint64 timeout);
+typedef void(GL_BINDING_CALL* glColorMaskProc)(GLboolean red,
+ GLboolean green,
+ GLboolean blue,
+ GLboolean alpha);
+typedef void(GL_BINDING_CALL* glCompileShaderProc)(GLuint shader);
+typedef void(GL_BINDING_CALL* glCompressedTexImage2DProc)(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLsizei imageSize,
+ const void* data);
+typedef void(GL_BINDING_CALL* glCompressedTexImage3DProc)(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLsizei imageSize,
+ const void* data);
+typedef void(GL_BINDING_CALL* glCompressedTexSubImage2DProc)(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLsizei imageSize,
+ const void* data);
+typedef void(GL_BINDING_CALL* glCopyBufferSubDataProc)(GLenum readTarget,
+ GLenum writeTarget,
+ GLintptr readOffset,
+ GLintptr writeOffset,
+ GLsizeiptr size);
+typedef void(GL_BINDING_CALL* glCopyTexImage2DProc)(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLint border);
+typedef void(GL_BINDING_CALL* glCopyTexSubImage2DProc)(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height);
+typedef void(GL_BINDING_CALL* glCopyTexSubImage3DProc)(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint zoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height);
+typedef GLuint(GL_BINDING_CALL* glCreateProgramProc)(void);
+typedef GLuint(GL_BINDING_CALL* glCreateShaderProc)(GLenum type);
+typedef void(GL_BINDING_CALL* glCullFaceProc)(GLenum mode);
+typedef void(GL_BINDING_CALL* glDeleteBuffersARBProc)(GLsizei n,
+ const GLuint* buffers);
+typedef void(GL_BINDING_CALL* glDeleteFencesAPPLEProc)(GLsizei n,
+ const GLuint* fences);
+typedef void(GL_BINDING_CALL* glDeleteFencesNVProc)(GLsizei n,
+ const GLuint* fences);
+typedef void(GL_BINDING_CALL* glDeleteFramebuffersEXTProc)(
+ GLsizei n,
+ const GLuint* framebuffers);
+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);
+typedef void(GL_BINDING_CALL* glDeleteSamplersProc)(GLsizei n,
+ const GLuint* samplers);
+typedef void(GL_BINDING_CALL* glDeleteShaderProc)(GLuint shader);
+typedef void(GL_BINDING_CALL* glDeleteSyncProc)(GLsync sync);
+typedef void(GL_BINDING_CALL* glDeleteTexturesProc)(GLsizei n,
+ const GLuint* textures);
+typedef void(GL_BINDING_CALL* glDeleteTransformFeedbacksProc)(
+ GLsizei n,
+ const GLuint* ids);
+typedef void(GL_BINDING_CALL* glDeleteVertexArraysOESProc)(
+ GLsizei n,
+ const GLuint* arrays);
+typedef void(GL_BINDING_CALL* glDepthFuncProc)(GLenum func);
+typedef void(GL_BINDING_CALL* glDepthMaskProc)(GLboolean flag);
+typedef void(GL_BINDING_CALL* glDepthRangeProc)(GLclampd zNear, GLclampd zFar);
+typedef void(GL_BINDING_CALL* glDepthRangefProc)(GLclampf zNear, GLclampf zFar);
+typedef void(GL_BINDING_CALL* glDetachShaderProc)(GLuint program,
+ GLuint shader);
+typedef void(GL_BINDING_CALL* glDisableProc)(GLenum cap);
+typedef void(GL_BINDING_CALL* glDisableVertexAttribArrayProc)(GLuint index);
+typedef void(GL_BINDING_CALL* glDiscardFramebufferEXTProc)(
+ GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments);
+typedef void(GL_BINDING_CALL* glDrawArraysProc)(GLenum mode,
+ GLint first,
+ GLsizei count);
+typedef void(GL_BINDING_CALL* glDrawArraysInstancedANGLEProc)(
+ GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount);
+typedef void(GL_BINDING_CALL* glDrawBufferProc)(GLenum mode);
+typedef void(GL_BINDING_CALL* glDrawBuffersARBProc)(GLsizei n,
+ const GLenum* bufs);
+typedef void(GL_BINDING_CALL* glDrawElementsProc)(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices);
+typedef void(GL_BINDING_CALL* glDrawElementsInstancedANGLEProc)(
+ GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount);
+typedef void(GL_BINDING_CALL* glDrawRangeElementsProc)(GLenum mode,
+ GLuint start,
+ GLuint end,
+ GLsizei count,
+ GLenum type,
+ const void* indices);
+typedef void(GL_BINDING_CALL* glEGLImageTargetRenderbufferStorageOESProc)(
+ GLenum target,
+ GLeglImageOES image);
+typedef void(GL_BINDING_CALL* glEGLImageTargetTexture2DOESProc)(
+ GLenum target,
+ GLeglImageOES image);
+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);
+typedef void(GL_BINDING_CALL* glFinishProc)(void);
+typedef void(GL_BINDING_CALL* glFinishFenceAPPLEProc)(GLuint fence);
+typedef void(GL_BINDING_CALL* glFinishFenceNVProc)(GLuint fence);
+typedef void(GL_BINDING_CALL* glFlushProc)(void);
+typedef void(GL_BINDING_CALL* glFlushMappedBufferRangeProc)(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length);
+typedef void(GL_BINDING_CALL* glFramebufferRenderbufferEXTProc)(
+ GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer);
+typedef void(GL_BINDING_CALL* glFramebufferTexture2DEXTProc)(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level);
+typedef void(GL_BINDING_CALL* glFramebufferTexture2DMultisampleEXTProc)(
+ GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples);
+typedef void(GL_BINDING_CALL* glFramebufferTexture2DMultisampleIMGProc)(
+ GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples);
+typedef void(GL_BINDING_CALL* glFramebufferTextureLayerProc)(GLenum target,
+ GLenum attachment,
+ GLuint texture,
+ GLint level,
+ GLint layer);
+typedef void(GL_BINDING_CALL* glFrontFaceProc)(GLenum mode);
+typedef void(GL_BINDING_CALL* glGenBuffersARBProc)(GLsizei n, GLuint* buffers);
+typedef void(GL_BINDING_CALL* glGenerateMipmapEXTProc)(GLenum target);
+typedef void(GL_BINDING_CALL* glGenFencesAPPLEProc)(GLsizei n, GLuint* fences);
+typedef void(GL_BINDING_CALL* glGenFencesNVProc)(GLsizei n, GLuint* fences);
+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);
+typedef void(GL_BINDING_CALL* glGenTexturesProc)(GLsizei n, GLuint* textures);
+typedef void(GL_BINDING_CALL* glGenTransformFeedbacksProc)(GLsizei n,
+ GLuint* ids);
+typedef void(GL_BINDING_CALL* glGenVertexArraysOESProc)(GLsizei n,
+ GLuint* arrays);
+typedef void(GL_BINDING_CALL* glGetActiveAttribProc)(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name);
+typedef void(GL_BINDING_CALL* glGetActiveUniformProc)(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name);
+typedef void(GL_BINDING_CALL* glGetActiveUniformBlockivProc)(
+ GLuint program,
+ GLuint uniformBlockIndex,
+ GLenum pname,
+ GLint* params);
+typedef void(GL_BINDING_CALL* glGetActiveUniformBlockNameProc)(
+ GLuint program,
+ GLuint uniformBlockIndex,
+ GLsizei bufSize,
+ GLsizei* length,
+ char* uniformBlockName);
+typedef void(GL_BINDING_CALL* glGetActiveUniformsivProc)(
+ GLuint program,
+ GLsizei uniformCount,
+ const GLuint* uniformIndices,
+ GLenum pname,
+ GLint* params);
+typedef void(GL_BINDING_CALL* glGetAttachedShadersProc)(GLuint program,
+ GLsizei maxcount,
+ GLsizei* count,
+ GLuint* shaders);
+typedef GLint(GL_BINDING_CALL* glGetAttribLocationProc)(GLuint program,
+ const char* name);
+typedef void(GL_BINDING_CALL* glGetBooleanvProc)(GLenum pname,
+ GLboolean* params);
+typedef void(GL_BINDING_CALL* glGetBufferParameterivProc)(GLenum target,
+ GLenum pname,
+ GLint* params);
+typedef GLenum(GL_BINDING_CALL* glGetErrorProc)(void);
+typedef void(GL_BINDING_CALL* glGetFenceivNVProc)(GLuint fence,
+ GLenum pname,
+ GLint* params);
+typedef void(GL_BINDING_CALL* glGetFloatvProc)(GLenum pname, GLfloat* params);
+typedef GLint(GL_BINDING_CALL* glGetFragDataLocationProc)(GLuint program,
+ const char* name);
+typedef void(GL_BINDING_CALL* glGetFramebufferAttachmentParameterivEXTProc)(
+ GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* params);
+typedef GLenum(GL_BINDING_CALL* glGetGraphicsResetStatusARBProc)(void);
+typedef void(GL_BINDING_CALL* glGetInteger64i_vProc)(GLenum target,
+ GLuint index,
+ GLint64* data);
+typedef void(GL_BINDING_CALL* glGetInteger64vProc)(GLenum pname,
+ GLint64* params);
+typedef void(GL_BINDING_CALL* glGetIntegeri_vProc)(GLenum target,
+ GLuint index,
+ GLint* data);
+typedef void(GL_BINDING_CALL* glGetIntegervProc)(GLenum pname, GLint* params);
+typedef void(GL_BINDING_CALL* glGetInternalformativProc)(GLenum target,
+ GLenum internalformat,
+ GLenum pname,
+ GLsizei bufSize,
+ GLint* params);
+typedef void(GL_BINDING_CALL* glGetProgramBinaryProc)(GLuint program,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* binaryFormat,
+ GLvoid* binary);
+typedef void(GL_BINDING_CALL* glGetProgramInfoLogProc)(GLuint program,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog);
+typedef void(GL_BINDING_CALL* glGetProgramivProc)(GLuint program,
+ GLenum pname,
+ GLint* params);
+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,
+ GLint* params);
+typedef void(GL_BINDING_CALL* glGetSamplerParameterfvProc)(GLuint sampler,
+ GLenum pname,
+ GLfloat* params);
+typedef void(GL_BINDING_CALL* glGetSamplerParameterivProc)(GLuint sampler,
+ GLenum pname,
+ GLint* params);
+typedef void(GL_BINDING_CALL* glGetShaderInfoLogProc)(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog);
+typedef void(GL_BINDING_CALL* glGetShaderivProc)(GLuint shader,
+ GLenum pname,
+ GLint* params);
+typedef void(GL_BINDING_CALL* glGetShaderPrecisionFormatProc)(
+ GLenum shadertype,
+ GLenum precisiontype,
+ GLint* range,
+ GLint* precision);
+typedef void(GL_BINDING_CALL* glGetShaderSourceProc)(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source);
+typedef const GLubyte*(GL_BINDING_CALL* glGetStringProc)(GLenum name);
+typedef void(GL_BINDING_CALL* glGetSyncivProc)(GLsync sync,
+ GLenum pname,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLint* values);
+typedef void(GL_BINDING_CALL* glGetTexLevelParameterfvProc)(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLfloat* params);
+typedef void(GL_BINDING_CALL* glGetTexLevelParameterivProc)(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLint* params);
+typedef void(GL_BINDING_CALL* glGetTexParameterfvProc)(GLenum target,
+ GLenum pname,
+ GLfloat* params);
+typedef void(GL_BINDING_CALL* glGetTexParameterivProc)(GLenum target,
+ GLenum pname,
+ GLint* params);
+typedef void(GL_BINDING_CALL* glGetTransformFeedbackVaryingProc)(
+ GLuint program,
+ GLuint index,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* type,
+ char* name);
+typedef void(GL_BINDING_CALL* glGetTranslatedShaderSourceANGLEProc)(
+ GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source);
+typedef GLuint(GL_BINDING_CALL* glGetUniformBlockIndexProc)(
+ GLuint program,
+ const char* uniformBlockName);
+typedef void(GL_BINDING_CALL* glGetUniformfvProc)(GLuint program,
+ GLint location,
+ GLfloat* params);
+typedef void(GL_BINDING_CALL* glGetUniformIndicesProc)(
+ GLuint program,
+ GLsizei uniformCount,
+ const char* const* uniformNames,
+ GLuint* uniformIndices);
+typedef void(GL_BINDING_CALL* glGetUniformivProc)(GLuint program,
+ GLint location,
+ GLint* params);
+typedef GLint(GL_BINDING_CALL* glGetUniformLocationProc)(GLuint program,
+ const char* name);
+typedef void(GL_BINDING_CALL* glGetVertexAttribfvProc)(GLuint index,
+ GLenum pname,
+ GLfloat* params);
+typedef void(GL_BINDING_CALL* glGetVertexAttribivProc)(GLuint index,
+ GLenum pname,
+ GLint* params);
+typedef void(GL_BINDING_CALL* glGetVertexAttribPointervProc)(GLuint index,
+ GLenum pname,
+ void** pointer);
+typedef void(GL_BINDING_CALL* glHintProc)(GLenum target, GLenum mode);
+typedef void(GL_BINDING_CALL* glInsertEventMarkerEXTProc)(GLsizei length,
+ const char* marker);
+typedef void(GL_BINDING_CALL* glInvalidateFramebufferProc)(
+ GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments);
+typedef void(GL_BINDING_CALL* glInvalidateSubFramebufferProc)(
+ GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments,
+ GLint x,
+ GLint y,
+ GLint width,
+ GLint height);
+typedef GLboolean(GL_BINDING_CALL* glIsBufferProc)(GLuint buffer);
+typedef GLboolean(GL_BINDING_CALL* glIsEnabledProc)(GLenum cap);
+typedef GLboolean(GL_BINDING_CALL* glIsFenceAPPLEProc)(GLuint fence);
+typedef GLboolean(GL_BINDING_CALL* glIsFenceNVProc)(GLuint fence);
+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);
+typedef GLboolean(GL_BINDING_CALL* glIsShaderProc)(GLuint shader);
+typedef GLboolean(GL_BINDING_CALL* glIsSyncProc)(GLsync sync);
+typedef GLboolean(GL_BINDING_CALL* glIsTextureProc)(GLuint texture);
+typedef GLboolean(GL_BINDING_CALL* glIsTransformFeedbackProc)(GLuint id);
+typedef GLboolean(GL_BINDING_CALL* glIsVertexArrayOESProc)(GLuint array);
+typedef void(GL_BINDING_CALL* glLineWidthProc)(GLfloat width);
+typedef void(GL_BINDING_CALL* glLinkProgramProc)(GLuint program);
+typedef void*(GL_BINDING_CALL* glMapBufferProc)(GLenum target, GLenum access);
+typedef void*(GL_BINDING_CALL* glMapBufferRangeProc)(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length,
+ GLbitfield access);
+typedef void(GL_BINDING_CALL* glMatrixLoadfEXTProc)(GLenum matrixMode,
+ const GLfloat* m);
+typedef void(GL_BINDING_CALL* glMatrixLoadIdentityEXTProc)(GLenum matrixMode);
+typedef void(GL_BINDING_CALL* glPauseTransformFeedbackProc)(void);
+typedef void(GL_BINDING_CALL* glPixelStoreiProc)(GLenum pname, GLint param);
+typedef void(GL_BINDING_CALL* glPointParameteriProc)(GLenum pname, GLint param);
+typedef void(GL_BINDING_CALL* glPolygonOffsetProc)(GLfloat factor,
+ GLfloat units);
+typedef void(GL_BINDING_CALL* glPopGroupMarkerEXTProc)(void);
+typedef void(GL_BINDING_CALL* glProgramBinaryProc)(GLuint program,
+ GLenum binaryFormat,
+ const GLvoid* binary,
+ GLsizei length);
+typedef void(GL_BINDING_CALL* glProgramParameteriProc)(GLuint program,
+ GLenum pname,
+ GLint value);
+typedef void(GL_BINDING_CALL* glPushGroupMarkerEXTProc)(GLsizei length,
+ const char* marker);
+typedef void(GL_BINDING_CALL* glQueryCounterProc)(GLuint id, GLenum target);
+typedef void(GL_BINDING_CALL* glReadBufferProc)(GLenum src);
+typedef void(GL_BINDING_CALL* glReadPixelsProc)(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ void* pixels);
+typedef void(GL_BINDING_CALL* glReleaseShaderCompilerProc)(void);
+typedef void(GL_BINDING_CALL* glRenderbufferStorageEXTProc)(
+ GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height);
+typedef void(GL_BINDING_CALL* glRenderbufferStorageMultisampleProc)(
+ GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height);
+typedef void(GL_BINDING_CALL* glRenderbufferStorageMultisampleANGLEProc)(
+ GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height);
+typedef void(GL_BINDING_CALL* glRenderbufferStorageMultisampleEXTProc)(
+ GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height);
+typedef void(GL_BINDING_CALL* glRenderbufferStorageMultisampleIMGProc)(
+ GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height);
+typedef void(GL_BINDING_CALL* glResumeTransformFeedbackProc)(void);
+typedef void(GL_BINDING_CALL* glSampleCoverageProc)(GLclampf value,
+ GLboolean invert);
+typedef void(GL_BINDING_CALL* glSamplerParameterfProc)(GLuint sampler,
+ GLenum pname,
+ GLfloat param);
+typedef void(GL_BINDING_CALL* glSamplerParameterfvProc)(GLuint sampler,
+ GLenum pname,
+ const GLfloat* params);
+typedef void(GL_BINDING_CALL* glSamplerParameteriProc)(GLuint sampler,
+ GLenum pname,
+ GLint param);
+typedef void(GL_BINDING_CALL* glSamplerParameterivProc)(GLuint sampler,
+ GLenum pname,
+ const GLint* params);
+typedef void(GL_BINDING_CALL* glScissorProc)(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height);
+typedef void(GL_BINDING_CALL* glSetFenceAPPLEProc)(GLuint fence);
+typedef void(GL_BINDING_CALL* glSetFenceNVProc)(GLuint fence, GLenum condition);
+typedef void(GL_BINDING_CALL* glShaderBinaryProc)(GLsizei n,
+ const GLuint* shaders,
+ GLenum binaryformat,
+ const void* binary,
+ GLsizei length);
+typedef void(GL_BINDING_CALL* glShaderSourceProc)(GLuint shader,
+ GLsizei count,
+ const char* const* str,
+ const GLint* length);
+typedef void(GL_BINDING_CALL* glStencilFuncProc)(GLenum func,
+ GLint ref,
+ GLuint mask);
+typedef void(GL_BINDING_CALL* glStencilFuncSeparateProc)(GLenum face,
+ GLenum func,
+ GLint ref,
+ GLuint mask);
+typedef void(GL_BINDING_CALL* glStencilMaskProc)(GLuint mask);
+typedef void(GL_BINDING_CALL* glStencilMaskSeparateProc)(GLenum face,
+ GLuint mask);
+typedef void(GL_BINDING_CALL* glStencilOpProc)(GLenum fail,
+ GLenum zfail,
+ GLenum zpass);
+typedef void(GL_BINDING_CALL* glStencilOpSeparateProc)(GLenum face,
+ GLenum fail,
+ GLenum zfail,
+ GLenum zpass);
+typedef GLboolean(GL_BINDING_CALL* glTestFenceAPPLEProc)(GLuint fence);
+typedef GLboolean(GL_BINDING_CALL* glTestFenceNVProc)(GLuint fence);
+typedef void(GL_BINDING_CALL* glTexImage2DProc)(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels);
+typedef void(GL_BINDING_CALL* glTexImage3DProc)(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels);
+typedef void(GL_BINDING_CALL* glTexParameterfProc)(GLenum target,
+ GLenum pname,
+ GLfloat param);
+typedef void(GL_BINDING_CALL* glTexParameterfvProc)(GLenum target,
+ GLenum pname,
+ const GLfloat* params);
+typedef void(GL_BINDING_CALL* glTexParameteriProc)(GLenum target,
+ GLenum pname,
+ GLint param);
+typedef void(GL_BINDING_CALL* glTexParameterivProc)(GLenum target,
+ GLenum pname,
+ const GLint* params);
+typedef void(GL_BINDING_CALL* glTexStorage2DEXTProc)(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height);
+typedef void(GL_BINDING_CALL* glTexStorage3DProc)(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth);
+typedef void(GL_BINDING_CALL* glTexSubImage2DProc)(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels);
+typedef void(GL_BINDING_CALL* glTransformFeedbackVaryingsProc)(
+ GLuint program,
+ GLsizei count,
+ const char* const* varyings,
+ GLenum bufferMode);
+typedef void(GL_BINDING_CALL* glUniform1fProc)(GLint location, GLfloat x);
+typedef void(GL_BINDING_CALL* glUniform1fvProc)(GLint location,
+ GLsizei count,
+ const GLfloat* v);
+typedef void(GL_BINDING_CALL* glUniform1iProc)(GLint location, GLint x);
+typedef void(GL_BINDING_CALL* glUniform1ivProc)(GLint location,
+ GLsizei count,
+ const GLint* v);
+typedef void(GL_BINDING_CALL* glUniform1uiProc)(GLint location, GLuint v0);
+typedef void(GL_BINDING_CALL* glUniform1uivProc)(GLint location,
+ GLsizei count,
+ const GLuint* v);
+typedef void(GL_BINDING_CALL* glUniform2fProc)(GLint location,
+ GLfloat x,
+ GLfloat y);
+typedef void(GL_BINDING_CALL* glUniform2fvProc)(GLint location,
+ GLsizei count,
+ const GLfloat* v);
+typedef void(GL_BINDING_CALL* glUniform2iProc)(GLint location,
+ GLint x,
+ GLint y);
+typedef void(GL_BINDING_CALL* glUniform2ivProc)(GLint location,
+ GLsizei count,
+ const GLint* v);
+typedef void(GL_BINDING_CALL* glUniform2uiProc)(GLint location,
+ GLuint v0,
+ GLuint v1);
+typedef void(GL_BINDING_CALL* glUniform2uivProc)(GLint location,
+ GLsizei count,
+ const GLuint* v);
+typedef void(GL_BINDING_CALL* glUniform3fProc)(GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z);
+typedef void(GL_BINDING_CALL* glUniform3fvProc)(GLint location,
+ GLsizei count,
+ const GLfloat* v);
+typedef void(GL_BINDING_CALL* glUniform3iProc)(GLint location,
+ GLint x,
+ GLint y,
+ GLint z);
+typedef void(GL_BINDING_CALL* glUniform3ivProc)(GLint location,
+ GLsizei count,
+ const GLint* v);
+typedef void(GL_BINDING_CALL* glUniform3uiProc)(GLint location,
+ GLuint v0,
+ GLuint v1,
+ GLuint v2);
+typedef void(GL_BINDING_CALL* glUniform3uivProc)(GLint location,
+ GLsizei count,
+ const GLuint* v);
+typedef void(GL_BINDING_CALL* glUniform4fProc)(GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w);
+typedef void(GL_BINDING_CALL* glUniform4fvProc)(GLint location,
+ GLsizei count,
+ const GLfloat* v);
+typedef void(GL_BINDING_CALL* glUniform4iProc)(GLint location,
+ GLint x,
+ GLint y,
+ GLint z,
+ GLint w);
+typedef void(GL_BINDING_CALL* glUniform4ivProc)(GLint location,
+ GLsizei count,
+ const GLint* v);
+typedef void(GL_BINDING_CALL* glUniform4uiProc)(GLint location,
+ GLuint v0,
+ GLuint v1,
+ GLuint v2,
+ GLuint v3);
+typedef void(GL_BINDING_CALL* glUniform4uivProc)(GLint location,
+ GLsizei count,
+ const GLuint* v);
+typedef void(GL_BINDING_CALL* glUniformBlockBindingProc)(
+ GLuint program,
+ GLuint uniformBlockIndex,
+ GLuint uniformBlockBinding);
+typedef void(GL_BINDING_CALL* glUniformMatrix2fvProc)(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+typedef void(GL_BINDING_CALL* glUniformMatrix2x3fvProc)(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+typedef void(GL_BINDING_CALL* glUniformMatrix2x4fvProc)(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+typedef void(GL_BINDING_CALL* glUniformMatrix3fvProc)(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+typedef void(GL_BINDING_CALL* glUniformMatrix3x2fvProc)(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+typedef void(GL_BINDING_CALL* glUniformMatrix3x4fvProc)(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+typedef void(GL_BINDING_CALL* glUniformMatrix4fvProc)(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+typedef void(GL_BINDING_CALL* glUniformMatrix4x2fvProc)(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+typedef void(GL_BINDING_CALL* glUniformMatrix4x3fvProc)(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+typedef GLboolean(GL_BINDING_CALL* glUnmapBufferProc)(GLenum target);
+typedef void(GL_BINDING_CALL* glUseProgramProc)(GLuint program);
+typedef void(GL_BINDING_CALL* glValidateProgramProc)(GLuint program);
+typedef void(GL_BINDING_CALL* glVertexAttrib1fProc)(GLuint indx, GLfloat x);
+typedef void(GL_BINDING_CALL* glVertexAttrib1fvProc)(GLuint indx,
+ const GLfloat* values);
+typedef void(GL_BINDING_CALL* glVertexAttrib2fProc)(GLuint indx,
+ GLfloat x,
+ GLfloat y);
+typedef void(GL_BINDING_CALL* glVertexAttrib2fvProc)(GLuint indx,
+ const GLfloat* values);
+typedef void(GL_BINDING_CALL* glVertexAttrib3fProc)(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z);
+typedef void(GL_BINDING_CALL* glVertexAttrib3fvProc)(GLuint indx,
+ const GLfloat* values);
+typedef void(GL_BINDING_CALL* glVertexAttrib4fProc)(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w);
+typedef void(GL_BINDING_CALL* glVertexAttrib4fvProc)(GLuint indx,
+ const GLfloat* values);
+typedef void(GL_BINDING_CALL* glVertexAttribDivisorANGLEProc)(GLuint index,
+ GLuint divisor);
+typedef void(GL_BINDING_CALL* glVertexAttribI4iProc)(GLuint indx,
+ GLint x,
+ GLint y,
+ GLint z,
+ GLint w);
+typedef void(GL_BINDING_CALL* glVertexAttribI4ivProc)(GLuint indx,
+ const GLint* values);
+typedef void(GL_BINDING_CALL* glVertexAttribI4uiProc)(GLuint indx,
+ GLuint x,
+ GLuint y,
+ GLuint z,
+ GLuint w);
+typedef void(GL_BINDING_CALL* glVertexAttribI4uivProc)(GLuint indx,
+ const GLuint* values);
+typedef void(GL_BINDING_CALL* glVertexAttribIPointerProc)(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLsizei stride,
+ const void* ptr);
+typedef void(GL_BINDING_CALL* glVertexAttribPointerProc)(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLboolean normalized,
+ GLsizei stride,
+ const void* ptr);
+typedef void(GL_BINDING_CALL* glViewportProc)(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height);
+typedef GLenum(GL_BINDING_CALL* glWaitSyncProc)(GLsync sync,
+ GLbitfield flags,
+ GLuint64 timeout);
+
+struct ExtensionsGL {
+ bool b_GL_ANGLE_framebuffer_blit;
+ bool b_GL_ANGLE_framebuffer_multisample;
+ bool b_GL_ANGLE_instanced_arrays;
+ bool b_GL_ANGLE_translated_shader_source;
+ bool b_GL_APPLE_fence;
+ bool b_GL_APPLE_vertex_array_object;
+ bool b_GL_ARB_ES2_compatibility;
+ bool b_GL_ARB_blend_func_extended;
+ bool b_GL_ARB_copy_buffer;
+ bool b_GL_ARB_draw_buffers;
+ bool b_GL_ARB_draw_instanced;
+ bool b_GL_ARB_framebuffer_object;
+ bool b_GL_ARB_get_program_binary;
+ bool b_GL_ARB_instanced_arrays;
+ bool b_GL_ARB_internalformat_query;
+ bool b_GL_ARB_invalidate_subdata;
+ bool b_GL_ARB_map_buffer_range;
+ bool b_GL_ARB_occlusion_query;
+ bool b_GL_ARB_robustness;
+ bool b_GL_ARB_sampler_objects;
+ bool b_GL_ARB_sync;
+ bool b_GL_ARB_texture_storage;
+ bool b_GL_ARB_timer_query;
+ bool b_GL_ARB_transform_feedback2;
+ bool b_GL_ARB_uniform_buffer_object;
+ bool b_GL_ARB_vertex_array_object;
+ bool b_GL_ARB_vertex_buffer_object;
+ bool b_GL_EXT_debug_marker;
+ bool b_GL_EXT_direct_state_access;
+ bool b_GL_EXT_discard_framebuffer;
+ bool b_GL_EXT_disjoint_timer_query;
+ bool b_GL_EXT_draw_buffers;
+ bool b_GL_EXT_framebuffer_blit;
+ bool b_GL_EXT_framebuffer_multisample;
+ bool b_GL_EXT_framebuffer_object;
+ bool b_GL_EXT_map_buffer_range;
+ bool b_GL_EXT_multisampled_render_to_texture;
+ bool b_GL_EXT_robustness;
+ bool b_GL_EXT_texture_storage;
+ bool b_GL_EXT_timer_query;
+ bool b_GL_IMG_multisampled_render_to_texture;
+ bool b_GL_KHR_blend_equation_advanced;
+ bool b_GL_KHR_robustness;
+ bool b_GL_NV_blend_equation_advanced;
+ bool b_GL_NV_fence;
+ bool b_GL_NV_path_rendering;
+ bool b_GL_OES_EGL_image;
+ bool b_GL_OES_get_program_binary;
+ bool b_GL_OES_mapbuffer;
+ bool b_GL_OES_vertex_array_object;
+};
+
+struct ProcsGL {
+ glActiveTextureProc glActiveTextureFn;
+ glAttachShaderProc glAttachShaderFn;
+ glBeginQueryProc glBeginQueryFn;
+ glBeginQueryARBProc glBeginQueryARBFn;
+ glBeginTransformFeedbackProc glBeginTransformFeedbackFn;
+ glBindAttribLocationProc glBindAttribLocationFn;
+ glBindBufferProc glBindBufferFn;
+ glBindBufferBaseProc glBindBufferBaseFn;
+ glBindBufferRangeProc glBindBufferRangeFn;
+ glBindFragDataLocationProc glBindFragDataLocationFn;
+ glBindFragDataLocationIndexedProc glBindFragDataLocationIndexedFn;
+ glBindFramebufferEXTProc glBindFramebufferEXTFn;
+ glBindRenderbufferEXTProc glBindRenderbufferEXTFn;
+ glBindSamplerProc glBindSamplerFn;
+ glBindTextureProc glBindTextureFn;
+ glBindTransformFeedbackProc glBindTransformFeedbackFn;
+ glBindVertexArrayOESProc glBindVertexArrayOESFn;
+ glBlendBarrierKHRProc glBlendBarrierKHRFn;
+ glBlendColorProc glBlendColorFn;
+ glBlendEquationProc glBlendEquationFn;
+ glBlendEquationSeparateProc glBlendEquationSeparateFn;
+ glBlendFuncProc glBlendFuncFn;
+ glBlendFuncSeparateProc glBlendFuncSeparateFn;
+ glBlitFramebufferProc glBlitFramebufferFn;
+ glBlitFramebufferANGLEProc glBlitFramebufferANGLEFn;
+ glBlitFramebufferEXTProc glBlitFramebufferEXTFn;
+ glBufferDataProc glBufferDataFn;
+ glBufferSubDataProc glBufferSubDataFn;
+ glCheckFramebufferStatusEXTProc glCheckFramebufferStatusEXTFn;
+ glClearProc glClearFn;
+ glClearBufferfiProc glClearBufferfiFn;
+ glClearBufferfvProc glClearBufferfvFn;
+ glClearBufferivProc glClearBufferivFn;
+ glClearBufferuivProc glClearBufferuivFn;
+ glClearColorProc glClearColorFn;
+ glClearDepthProc glClearDepthFn;
+ glClearDepthfProc glClearDepthfFn;
+ glClearStencilProc glClearStencilFn;
+ glClientWaitSyncProc glClientWaitSyncFn;
+ glColorMaskProc glColorMaskFn;
+ glCompileShaderProc glCompileShaderFn;
+ glCompressedTexImage2DProc glCompressedTexImage2DFn;
+ glCompressedTexImage3DProc glCompressedTexImage3DFn;
+ glCompressedTexSubImage2DProc glCompressedTexSubImage2DFn;
+ glCopyBufferSubDataProc glCopyBufferSubDataFn;
+ glCopyTexImage2DProc glCopyTexImage2DFn;
+ glCopyTexSubImage2DProc glCopyTexSubImage2DFn;
+ glCopyTexSubImage3DProc glCopyTexSubImage3DFn;
+ glCreateProgramProc glCreateProgramFn;
+ glCreateShaderProc glCreateShaderFn;
+ glCullFaceProc glCullFaceFn;
+ glDeleteBuffersARBProc glDeleteBuffersARBFn;
+ glDeleteFencesAPPLEProc glDeleteFencesAPPLEFn;
+ glDeleteFencesNVProc glDeleteFencesNVFn;
+ glDeleteFramebuffersEXTProc glDeleteFramebuffersEXTFn;
+ glDeleteProgramProc glDeleteProgramFn;
+ glDeleteQueriesProc glDeleteQueriesFn;
+ glDeleteQueriesARBProc glDeleteQueriesARBFn;
+ glDeleteRenderbuffersEXTProc glDeleteRenderbuffersEXTFn;
+ glDeleteSamplersProc glDeleteSamplersFn;
+ glDeleteShaderProc glDeleteShaderFn;
+ glDeleteSyncProc glDeleteSyncFn;
+ glDeleteTexturesProc glDeleteTexturesFn;
+ glDeleteTransformFeedbacksProc glDeleteTransformFeedbacksFn;
+ glDeleteVertexArraysOESProc glDeleteVertexArraysOESFn;
+ glDepthFuncProc glDepthFuncFn;
+ glDepthMaskProc glDepthMaskFn;
+ glDepthRangeProc glDepthRangeFn;
+ glDepthRangefProc glDepthRangefFn;
+ glDetachShaderProc glDetachShaderFn;
+ glDisableProc glDisableFn;
+ glDisableVertexAttribArrayProc glDisableVertexAttribArrayFn;
+ glDiscardFramebufferEXTProc glDiscardFramebufferEXTFn;
+ glDrawArraysProc glDrawArraysFn;
+ glDrawArraysInstancedANGLEProc glDrawArraysInstancedANGLEFn;
+ glDrawBufferProc glDrawBufferFn;
+ glDrawBuffersARBProc glDrawBuffersARBFn;
+ glDrawElementsProc glDrawElementsFn;
+ glDrawElementsInstancedANGLEProc glDrawElementsInstancedANGLEFn;
+ glDrawRangeElementsProc glDrawRangeElementsFn;
+ glEGLImageTargetRenderbufferStorageOESProc
+ glEGLImageTargetRenderbufferStorageOESFn;
+ glEGLImageTargetTexture2DOESProc glEGLImageTargetTexture2DOESFn;
+ glEnableProc glEnableFn;
+ glEnableVertexAttribArrayProc glEnableVertexAttribArrayFn;
+ glEndQueryProc glEndQueryFn;
+ glEndQueryARBProc glEndQueryARBFn;
+ glEndTransformFeedbackProc glEndTransformFeedbackFn;
+ glFenceSyncProc glFenceSyncFn;
+ glFinishProc glFinishFn;
+ glFinishFenceAPPLEProc glFinishFenceAPPLEFn;
+ glFinishFenceNVProc glFinishFenceNVFn;
+ glFlushProc glFlushFn;
+ glFlushMappedBufferRangeProc glFlushMappedBufferRangeFn;
+ glFramebufferRenderbufferEXTProc glFramebufferRenderbufferEXTFn;
+ glFramebufferTexture2DEXTProc glFramebufferTexture2DEXTFn;
+ glFramebufferTexture2DMultisampleEXTProc
+ glFramebufferTexture2DMultisampleEXTFn;
+ glFramebufferTexture2DMultisampleIMGProc
+ glFramebufferTexture2DMultisampleIMGFn;
+ glFramebufferTextureLayerProc glFramebufferTextureLayerFn;
+ glFrontFaceProc glFrontFaceFn;
+ glGenBuffersARBProc glGenBuffersARBFn;
+ glGenerateMipmapEXTProc glGenerateMipmapEXTFn;
+ glGenFencesAPPLEProc glGenFencesAPPLEFn;
+ glGenFencesNVProc glGenFencesNVFn;
+ glGenFramebuffersEXTProc glGenFramebuffersEXTFn;
+ glGenQueriesProc glGenQueriesFn;
+ glGenQueriesARBProc glGenQueriesARBFn;
+ glGenRenderbuffersEXTProc glGenRenderbuffersEXTFn;
+ glGenSamplersProc glGenSamplersFn;
+ glGenTexturesProc glGenTexturesFn;
+ glGenTransformFeedbacksProc glGenTransformFeedbacksFn;
+ glGenVertexArraysOESProc glGenVertexArraysOESFn;
+ glGetActiveAttribProc glGetActiveAttribFn;
+ glGetActiveUniformProc glGetActiveUniformFn;
+ glGetActiveUniformBlockivProc glGetActiveUniformBlockivFn;
+ glGetActiveUniformBlockNameProc glGetActiveUniformBlockNameFn;
+ glGetActiveUniformsivProc glGetActiveUniformsivFn;
+ glGetAttachedShadersProc glGetAttachedShadersFn;
+ glGetAttribLocationProc glGetAttribLocationFn;
+ glGetBooleanvProc glGetBooleanvFn;
+ glGetBufferParameterivProc glGetBufferParameterivFn;
+ glGetErrorProc glGetErrorFn;
+ glGetFenceivNVProc glGetFenceivNVFn;
+ glGetFloatvProc glGetFloatvFn;
+ glGetFragDataLocationProc glGetFragDataLocationFn;
+ glGetFramebufferAttachmentParameterivEXTProc
+ glGetFramebufferAttachmentParameterivEXTFn;
+ glGetGraphicsResetStatusARBProc glGetGraphicsResetStatusARBFn;
+ glGetInteger64i_vProc glGetInteger64i_vFn;
+ glGetInteger64vProc glGetInteger64vFn;
+ glGetIntegeri_vProc glGetIntegeri_vFn;
+ glGetIntegervProc glGetIntegervFn;
+ glGetInternalformativProc glGetInternalformativFn;
+ glGetProgramBinaryProc glGetProgramBinaryFn;
+ glGetProgramInfoLogProc glGetProgramInfoLogFn;
+ glGetProgramivProc glGetProgramivFn;
+ glGetQueryivProc glGetQueryivFn;
+ glGetQueryivARBProc glGetQueryivARBFn;
+ glGetQueryObjecti64vProc glGetQueryObjecti64vFn;
+ glGetQueryObjectivProc glGetQueryObjectivFn;
+ glGetQueryObjectivARBProc glGetQueryObjectivARBFn;
+ glGetQueryObjectui64vProc glGetQueryObjectui64vFn;
+ glGetQueryObjectuivProc glGetQueryObjectuivFn;
+ glGetQueryObjectuivARBProc glGetQueryObjectuivARBFn;
+ glGetRenderbufferParameterivEXTProc glGetRenderbufferParameterivEXTFn;
+ glGetSamplerParameterfvProc glGetSamplerParameterfvFn;
+ glGetSamplerParameterivProc glGetSamplerParameterivFn;
+ glGetShaderInfoLogProc glGetShaderInfoLogFn;
+ glGetShaderivProc glGetShaderivFn;
+ glGetShaderPrecisionFormatProc glGetShaderPrecisionFormatFn;
+ glGetShaderSourceProc glGetShaderSourceFn;
+ glGetStringProc glGetStringFn;
+ glGetSyncivProc glGetSyncivFn;
+ glGetTexLevelParameterfvProc glGetTexLevelParameterfvFn;
+ glGetTexLevelParameterivProc glGetTexLevelParameterivFn;
+ glGetTexParameterfvProc glGetTexParameterfvFn;
+ glGetTexParameterivProc glGetTexParameterivFn;
+ glGetTransformFeedbackVaryingProc glGetTransformFeedbackVaryingFn;
+ glGetTranslatedShaderSourceANGLEProc glGetTranslatedShaderSourceANGLEFn;
+ glGetUniformBlockIndexProc glGetUniformBlockIndexFn;
+ glGetUniformfvProc glGetUniformfvFn;
+ glGetUniformIndicesProc glGetUniformIndicesFn;
+ glGetUniformivProc glGetUniformivFn;
+ glGetUniformLocationProc glGetUniformLocationFn;
+ glGetVertexAttribfvProc glGetVertexAttribfvFn;
+ glGetVertexAttribivProc glGetVertexAttribivFn;
+ glGetVertexAttribPointervProc glGetVertexAttribPointervFn;
+ glHintProc glHintFn;
+ glInsertEventMarkerEXTProc glInsertEventMarkerEXTFn;
+ glInvalidateFramebufferProc glInvalidateFramebufferFn;
+ glInvalidateSubFramebufferProc glInvalidateSubFramebufferFn;
+ glIsBufferProc glIsBufferFn;
+ glIsEnabledProc glIsEnabledFn;
+ glIsFenceAPPLEProc glIsFenceAPPLEFn;
+ glIsFenceNVProc glIsFenceNVFn;
+ glIsFramebufferEXTProc glIsFramebufferEXTFn;
+ glIsProgramProc glIsProgramFn;
+ glIsQueryProc glIsQueryFn;
+ glIsQueryARBProc glIsQueryARBFn;
+ glIsRenderbufferEXTProc glIsRenderbufferEXTFn;
+ glIsSamplerProc glIsSamplerFn;
+ glIsShaderProc glIsShaderFn;
+ glIsSyncProc glIsSyncFn;
+ glIsTextureProc glIsTextureFn;
+ glIsTransformFeedbackProc glIsTransformFeedbackFn;
+ glIsVertexArrayOESProc glIsVertexArrayOESFn;
+ glLineWidthProc glLineWidthFn;
+ glLinkProgramProc glLinkProgramFn;
+ glMapBufferProc glMapBufferFn;
+ glMapBufferRangeProc glMapBufferRangeFn;
+ glMatrixLoadfEXTProc glMatrixLoadfEXTFn;
+ glMatrixLoadIdentityEXTProc glMatrixLoadIdentityEXTFn;
+ glPauseTransformFeedbackProc glPauseTransformFeedbackFn;
+ glPixelStoreiProc glPixelStoreiFn;
+ glPointParameteriProc glPointParameteriFn;
+ glPolygonOffsetProc glPolygonOffsetFn;
+ glPopGroupMarkerEXTProc glPopGroupMarkerEXTFn;
+ glProgramBinaryProc glProgramBinaryFn;
+ glProgramParameteriProc glProgramParameteriFn;
+ glPushGroupMarkerEXTProc glPushGroupMarkerEXTFn;
+ glQueryCounterProc glQueryCounterFn;
+ glReadBufferProc glReadBufferFn;
+ glReadPixelsProc glReadPixelsFn;
+ glReleaseShaderCompilerProc glReleaseShaderCompilerFn;
+ glRenderbufferStorageEXTProc glRenderbufferStorageEXTFn;
+ glRenderbufferStorageMultisampleProc glRenderbufferStorageMultisampleFn;
+ glRenderbufferStorageMultisampleANGLEProc
+ glRenderbufferStorageMultisampleANGLEFn;
+ glRenderbufferStorageMultisampleEXTProc glRenderbufferStorageMultisampleEXTFn;
+ glRenderbufferStorageMultisampleIMGProc glRenderbufferStorageMultisampleIMGFn;
+ glResumeTransformFeedbackProc glResumeTransformFeedbackFn;
+ glSampleCoverageProc glSampleCoverageFn;
+ glSamplerParameterfProc glSamplerParameterfFn;
+ glSamplerParameterfvProc glSamplerParameterfvFn;
+ glSamplerParameteriProc glSamplerParameteriFn;
+ glSamplerParameterivProc glSamplerParameterivFn;
+ glScissorProc glScissorFn;
+ glSetFenceAPPLEProc glSetFenceAPPLEFn;
+ glSetFenceNVProc glSetFenceNVFn;
+ glShaderBinaryProc glShaderBinaryFn;
+ glShaderSourceProc glShaderSourceFn;
+ glStencilFuncProc glStencilFuncFn;
+ glStencilFuncSeparateProc glStencilFuncSeparateFn;
+ glStencilMaskProc glStencilMaskFn;
+ glStencilMaskSeparateProc glStencilMaskSeparateFn;
+ glStencilOpProc glStencilOpFn;
+ glStencilOpSeparateProc glStencilOpSeparateFn;
+ glTestFenceAPPLEProc glTestFenceAPPLEFn;
+ glTestFenceNVProc glTestFenceNVFn;
+ glTexImage2DProc glTexImage2DFn;
+ glTexImage3DProc glTexImage3DFn;
+ glTexParameterfProc glTexParameterfFn;
+ glTexParameterfvProc glTexParameterfvFn;
+ glTexParameteriProc glTexParameteriFn;
+ glTexParameterivProc glTexParameterivFn;
+ glTexStorage2DEXTProc glTexStorage2DEXTFn;
+ glTexStorage3DProc glTexStorage3DFn;
+ glTexSubImage2DProc glTexSubImage2DFn;
+ glTransformFeedbackVaryingsProc glTransformFeedbackVaryingsFn;
+ glUniform1fProc glUniform1fFn;
+ glUniform1fvProc glUniform1fvFn;
+ glUniform1iProc glUniform1iFn;
+ glUniform1ivProc glUniform1ivFn;
+ glUniform1uiProc glUniform1uiFn;
+ glUniform1uivProc glUniform1uivFn;
+ glUniform2fProc glUniform2fFn;
+ glUniform2fvProc glUniform2fvFn;
+ glUniform2iProc glUniform2iFn;
+ glUniform2ivProc glUniform2ivFn;
+ glUniform2uiProc glUniform2uiFn;
+ glUniform2uivProc glUniform2uivFn;
+ glUniform3fProc glUniform3fFn;
+ glUniform3fvProc glUniform3fvFn;
+ glUniform3iProc glUniform3iFn;
+ glUniform3ivProc glUniform3ivFn;
+ glUniform3uiProc glUniform3uiFn;
+ glUniform3uivProc glUniform3uivFn;
+ glUniform4fProc glUniform4fFn;
+ glUniform4fvProc glUniform4fvFn;
+ glUniform4iProc glUniform4iFn;
+ glUniform4ivProc glUniform4ivFn;
+ glUniform4uiProc glUniform4uiFn;
+ glUniform4uivProc glUniform4uivFn;
+ glUniformBlockBindingProc glUniformBlockBindingFn;
+ glUniformMatrix2fvProc glUniformMatrix2fvFn;
+ glUniformMatrix2x3fvProc glUniformMatrix2x3fvFn;
+ glUniformMatrix2x4fvProc glUniformMatrix2x4fvFn;
+ glUniformMatrix3fvProc glUniformMatrix3fvFn;
+ glUniformMatrix3x2fvProc glUniformMatrix3x2fvFn;
+ glUniformMatrix3x4fvProc glUniformMatrix3x4fvFn;
+ glUniformMatrix4fvProc glUniformMatrix4fvFn;
+ glUniformMatrix4x2fvProc glUniformMatrix4x2fvFn;
+ glUniformMatrix4x3fvProc glUniformMatrix4x3fvFn;
+ glUnmapBufferProc glUnmapBufferFn;
+ glUseProgramProc glUseProgramFn;
+ glValidateProgramProc glValidateProgramFn;
+ glVertexAttrib1fProc glVertexAttrib1fFn;
+ glVertexAttrib1fvProc glVertexAttrib1fvFn;
+ glVertexAttrib2fProc glVertexAttrib2fFn;
+ glVertexAttrib2fvProc glVertexAttrib2fvFn;
+ glVertexAttrib3fProc glVertexAttrib3fFn;
+ glVertexAttrib3fvProc glVertexAttrib3fvFn;
+ glVertexAttrib4fProc glVertexAttrib4fFn;
+ glVertexAttrib4fvProc glVertexAttrib4fvFn;
+ glVertexAttribDivisorANGLEProc glVertexAttribDivisorANGLEFn;
+ glVertexAttribI4iProc glVertexAttribI4iFn;
+ glVertexAttribI4ivProc glVertexAttribI4ivFn;
+ glVertexAttribI4uiProc glVertexAttribI4uiFn;
+ glVertexAttribI4uivProc glVertexAttribI4uivFn;
+ glVertexAttribIPointerProc glVertexAttribIPointerFn;
+ glVertexAttribPointerProc glVertexAttribPointerFn;
+ glViewportProc glViewportFn;
+ glWaitSyncProc glWaitSyncFn;
+};
+
+class GL_EXPORT GLApi {
+ public:
+ GLApi();
+ virtual ~GLApi();
+
+ 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,
+ const char* name) = 0;
+ virtual void glBindBufferFn(GLenum target, GLuint buffer) = 0;
+ virtual void glBindBufferBaseFn(GLenum target,
+ GLuint index,
+ GLuint buffer) = 0;
+ virtual void glBindBufferRangeFn(GLenum target,
+ GLuint index,
+ GLuint buffer,
+ GLintptr offset,
+ GLsizeiptr size) = 0;
+ virtual void glBindFragDataLocationFn(GLuint program,
+ GLuint colorNumber,
+ const char* name) = 0;
+ virtual void glBindFragDataLocationIndexedFn(GLuint program,
+ GLuint colorNumber,
+ GLuint index,
+ const char* name) = 0;
+ virtual void glBindFramebufferEXTFn(GLenum target, GLuint framebuffer) = 0;
+ virtual void glBindRenderbufferEXTFn(GLenum target, GLuint renderbuffer) = 0;
+ virtual void glBindSamplerFn(GLuint unit, GLuint sampler) = 0;
+ virtual void glBindTextureFn(GLenum target, GLuint texture) = 0;
+ virtual void glBindTransformFeedbackFn(GLenum target, GLuint id) = 0;
+ virtual void glBindVertexArrayOESFn(GLuint array) = 0;
+ virtual void glBlendBarrierKHRFn(void) = 0;
+ virtual void glBlendColorFn(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) = 0;
+ virtual void glBlendEquationFn(GLenum mode) = 0;
+ virtual void glBlendEquationSeparateFn(GLenum modeRGB, GLenum modeAlpha) = 0;
+ virtual void glBlendFuncFn(GLenum sfactor, GLenum dfactor) = 0;
+ virtual void glBlendFuncSeparateFn(GLenum srcRGB,
+ GLenum dstRGB,
+ GLenum srcAlpha,
+ GLenum dstAlpha) = 0;
+ virtual void glBlitFramebufferFn(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) = 0;
+ virtual void glBlitFramebufferANGLEFn(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) = 0;
+ virtual void glBlitFramebufferEXTFn(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) = 0;
+ virtual void glBufferDataFn(GLenum target,
+ GLsizeiptr size,
+ const void* data,
+ GLenum usage) = 0;
+ virtual void glBufferSubDataFn(GLenum target,
+ GLintptr offset,
+ GLsizeiptr size,
+ const void* data) = 0;
+ virtual GLenum glCheckFramebufferStatusEXTFn(GLenum target) = 0;
+ virtual void glClearFn(GLbitfield mask) = 0;
+ virtual void glClearBufferfiFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat depth,
+ GLint stencil) = 0;
+ virtual void glClearBufferfvFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat* value) = 0;
+ virtual void glClearBufferivFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLint* value) = 0;
+ virtual void glClearBufferuivFn(GLenum buffer,
+ GLint drawbuffer,
+ const GLuint* value) = 0;
+ virtual void glClearColorFn(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) = 0;
+ virtual void glClearDepthFn(GLclampd depth) = 0;
+ virtual void glClearDepthfFn(GLclampf depth) = 0;
+ virtual void glClearStencilFn(GLint s) = 0;
+ virtual GLenum glClientWaitSyncFn(GLsync sync,
+ GLbitfield flags,
+ GLuint64 timeout) = 0;
+ virtual void glColorMaskFn(GLboolean red,
+ GLboolean green,
+ GLboolean blue,
+ GLboolean alpha) = 0;
+ virtual void glCompileShaderFn(GLuint shader) = 0;
+ virtual void glCompressedTexImage2DFn(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) = 0;
+ virtual void glCompressedTexImage3DFn(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) = 0;
+ virtual void glCompressedTexSubImage2DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLsizei imageSize,
+ const void* data) = 0;
+ virtual void glCopyBufferSubDataFn(GLenum readTarget,
+ GLenum writeTarget,
+ GLintptr readOffset,
+ GLintptr writeOffset,
+ GLsizeiptr size) = 0;
+ virtual void glCopyTexImage2DFn(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLint border) = 0;
+ virtual void glCopyTexSubImage2DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) = 0;
+ virtual void glCopyTexSubImage3DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint zoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) = 0;
+ virtual GLuint glCreateProgramFn(void) = 0;
+ virtual GLuint glCreateShaderFn(GLenum type) = 0;
+ virtual void glCullFaceFn(GLenum mode) = 0;
+ virtual void glDeleteBuffersARBFn(GLsizei n, const GLuint* buffers) = 0;
+ virtual void glDeleteFencesAPPLEFn(GLsizei n, const GLuint* fences) = 0;
+ virtual void glDeleteFencesNVFn(GLsizei n, const GLuint* fences) = 0;
+ virtual void glDeleteFramebuffersEXTFn(GLsizei n,
+ 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;
+ virtual void glDeleteShaderFn(GLuint shader) = 0;
+ virtual void glDeleteSyncFn(GLsync sync) = 0;
+ virtual void glDeleteTexturesFn(GLsizei n, const GLuint* textures) = 0;
+ virtual void glDeleteTransformFeedbacksFn(GLsizei n, const GLuint* ids) = 0;
+ virtual void glDeleteVertexArraysOESFn(GLsizei n, const GLuint* arrays) = 0;
+ virtual void glDepthFuncFn(GLenum func) = 0;
+ virtual void glDepthMaskFn(GLboolean flag) = 0;
+ virtual void glDepthRangeFn(GLclampd zNear, GLclampd zFar) = 0;
+ virtual void glDepthRangefFn(GLclampf zNear, GLclampf zFar) = 0;
+ virtual void glDetachShaderFn(GLuint program, GLuint shader) = 0;
+ virtual void glDisableFn(GLenum cap) = 0;
+ virtual void glDisableVertexAttribArrayFn(GLuint index) = 0;
+ virtual void glDiscardFramebufferEXTFn(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments) = 0;
+ virtual void glDrawArraysFn(GLenum mode, GLint first, GLsizei count) = 0;
+ virtual void glDrawArraysInstancedANGLEFn(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount) = 0;
+ virtual void glDrawBufferFn(GLenum mode) = 0;
+ virtual void glDrawBuffersARBFn(GLsizei n, const GLenum* bufs) = 0;
+ virtual void glDrawElementsFn(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices) = 0;
+ virtual void glDrawElementsInstancedANGLEFn(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount) = 0;
+ virtual void glDrawRangeElementsFn(GLenum mode,
+ GLuint start,
+ GLuint end,
+ GLsizei count,
+ GLenum type,
+ const void* indices) = 0;
+ virtual void glEGLImageTargetRenderbufferStorageOESFn(
+ GLenum target,
+ GLeglImageOES image) = 0;
+ virtual void glEGLImageTargetTexture2DOESFn(GLenum target,
+ GLeglImageOES image) = 0;
+ 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;
+ virtual void glFinishFenceAPPLEFn(GLuint fence) = 0;
+ virtual void glFinishFenceNVFn(GLuint fence) = 0;
+ virtual void glFlushFn(void) = 0;
+ virtual void glFlushMappedBufferRangeFn(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length) = 0;
+ virtual void glFramebufferRenderbufferEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer) = 0;
+ virtual void glFramebufferTexture2DEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level) = 0;
+ virtual void glFramebufferTexture2DMultisampleEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) = 0;
+ virtual void glFramebufferTexture2DMultisampleIMGFn(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) = 0;
+ virtual void glFramebufferTextureLayerFn(GLenum target,
+ GLenum attachment,
+ GLuint texture,
+ GLint level,
+ GLint layer) = 0;
+ virtual void glFrontFaceFn(GLenum mode) = 0;
+ virtual void glGenBuffersARBFn(GLsizei n, GLuint* buffers) = 0;
+ virtual void glGenerateMipmapEXTFn(GLenum target) = 0;
+ virtual void glGenFencesAPPLEFn(GLsizei n, GLuint* fences) = 0;
+ 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;
+ virtual void glGenTransformFeedbacksFn(GLsizei n, GLuint* ids) = 0;
+ virtual void glGenVertexArraysOESFn(GLsizei n, GLuint* arrays) = 0;
+ virtual void glGetActiveAttribFn(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) = 0;
+ virtual void glGetActiveUniformFn(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) = 0;
+ virtual void glGetActiveUniformBlockivFn(GLuint program,
+ GLuint uniformBlockIndex,
+ GLenum pname,
+ GLint* params) = 0;
+ virtual void glGetActiveUniformBlockNameFn(GLuint program,
+ GLuint uniformBlockIndex,
+ GLsizei bufSize,
+ GLsizei* length,
+ char* uniformBlockName) = 0;
+ virtual void glGetActiveUniformsivFn(GLuint program,
+ GLsizei uniformCount,
+ const GLuint* uniformIndices,
+ GLenum pname,
+ GLint* params) = 0;
+ virtual void glGetAttachedShadersFn(GLuint program,
+ GLsizei maxcount,
+ GLsizei* count,
+ GLuint* shaders) = 0;
+ virtual GLint glGetAttribLocationFn(GLuint program, const char* name) = 0;
+ virtual void glGetBooleanvFn(GLenum pname, GLboolean* params) = 0;
+ virtual void glGetBufferParameterivFn(GLenum target,
+ GLenum pname,
+ GLint* params) = 0;
+ virtual GLenum glGetErrorFn(void) = 0;
+ virtual void glGetFenceivNVFn(GLuint fence, GLenum pname, GLint* params) = 0;
+ virtual void glGetFloatvFn(GLenum pname, GLfloat* params) = 0;
+ virtual GLint glGetFragDataLocationFn(GLuint program, const char* name) = 0;
+ virtual void glGetFramebufferAttachmentParameterivEXTFn(GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* params) = 0;
+ virtual GLenum glGetGraphicsResetStatusARBFn(void) = 0;
+ virtual void glGetInteger64i_vFn(GLenum target,
+ GLuint index,
+ GLint64* data) = 0;
+ virtual void glGetInteger64vFn(GLenum pname, GLint64* params) = 0;
+ virtual void glGetIntegeri_vFn(GLenum target, GLuint index, GLint* data) = 0;
+ virtual void glGetIntegervFn(GLenum pname, GLint* params) = 0;
+ virtual void glGetInternalformativFn(GLenum target,
+ GLenum internalformat,
+ GLenum pname,
+ GLsizei bufSize,
+ GLint* params) = 0;
+ virtual void glGetProgramBinaryFn(GLuint program,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* binaryFormat,
+ GLvoid* binary) = 0;
+ virtual void glGetProgramInfoLogFn(GLuint program,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) = 0;
+ virtual void glGetProgramivFn(GLuint program,
+ GLenum pname,
+ GLint* params) = 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;
+ virtual void glGetSamplerParameterfvFn(GLuint sampler,
+ GLenum pname,
+ GLfloat* params) = 0;
+ virtual void glGetSamplerParameterivFn(GLuint sampler,
+ GLenum pname,
+ GLint* params) = 0;
+ virtual void glGetShaderInfoLogFn(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) = 0;
+ virtual void glGetShaderivFn(GLuint shader, GLenum pname, GLint* params) = 0;
+ virtual void glGetShaderPrecisionFormatFn(GLenum shadertype,
+ GLenum precisiontype,
+ GLint* range,
+ GLint* precision) = 0;
+ virtual void glGetShaderSourceFn(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) = 0;
+ virtual const GLubyte* glGetStringFn(GLenum name) = 0;
+ virtual void glGetSyncivFn(GLsync sync,
+ GLenum pname,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLint* values) = 0;
+ virtual void glGetTexLevelParameterfvFn(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLfloat* params) = 0;
+ virtual void glGetTexLevelParameterivFn(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLint* params) = 0;
+ virtual void glGetTexParameterfvFn(GLenum target,
+ GLenum pname,
+ GLfloat* params) = 0;
+ virtual void glGetTexParameterivFn(GLenum target,
+ GLenum pname,
+ GLint* params) = 0;
+ virtual void glGetTransformFeedbackVaryingFn(GLuint program,
+ GLuint index,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* type,
+ char* name) = 0;
+ virtual void glGetTranslatedShaderSourceANGLEFn(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) = 0;
+ virtual GLuint glGetUniformBlockIndexFn(GLuint program,
+ const char* uniformBlockName) = 0;
+ virtual void glGetUniformfvFn(GLuint program,
+ GLint location,
+ GLfloat* params) = 0;
+ virtual void glGetUniformIndicesFn(GLuint program,
+ GLsizei uniformCount,
+ const char* const* uniformNames,
+ GLuint* uniformIndices) = 0;
+ virtual void glGetUniformivFn(GLuint program,
+ GLint location,
+ GLint* params) = 0;
+ virtual GLint glGetUniformLocationFn(GLuint program, const char* name) = 0;
+ virtual void glGetVertexAttribfvFn(GLuint index,
+ GLenum pname,
+ GLfloat* params) = 0;
+ virtual void glGetVertexAttribivFn(GLuint index,
+ GLenum pname,
+ GLint* params) = 0;
+ virtual void glGetVertexAttribPointervFn(GLuint index,
+ GLenum pname,
+ void** pointer) = 0;
+ virtual void glHintFn(GLenum target, GLenum mode) = 0;
+ virtual void glInsertEventMarkerEXTFn(GLsizei length, const char* marker) = 0;
+ virtual void glInvalidateFramebufferFn(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments) = 0;
+ virtual void glInvalidateSubFramebufferFn(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments,
+ GLint x,
+ GLint y,
+ GLint width,
+ GLint height) = 0;
+ virtual GLboolean glIsBufferFn(GLuint buffer) = 0;
+ virtual GLboolean glIsEnabledFn(GLenum cap) = 0;
+ virtual GLboolean glIsFenceAPPLEFn(GLuint fence) = 0;
+ virtual GLboolean glIsFenceNVFn(GLuint fence) = 0;
+ 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;
+ virtual GLboolean glIsSyncFn(GLsync sync) = 0;
+ virtual GLboolean glIsTextureFn(GLuint texture) = 0;
+ virtual GLboolean glIsTransformFeedbackFn(GLuint id) = 0;
+ virtual GLboolean glIsVertexArrayOESFn(GLuint array) = 0;
+ virtual void glLineWidthFn(GLfloat width) = 0;
+ virtual void glLinkProgramFn(GLuint program) = 0;
+ virtual void* glMapBufferFn(GLenum target, GLenum access) = 0;
+ virtual void* glMapBufferRangeFn(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length,
+ GLbitfield access) = 0;
+ virtual void glMatrixLoadfEXTFn(GLenum matrixMode, const GLfloat* m) = 0;
+ virtual void glMatrixLoadIdentityEXTFn(GLenum matrixMode) = 0;
+ virtual void glPauseTransformFeedbackFn(void) = 0;
+ virtual void glPixelStoreiFn(GLenum pname, GLint param) = 0;
+ virtual void glPointParameteriFn(GLenum pname, GLint param) = 0;
+ virtual void glPolygonOffsetFn(GLfloat factor, GLfloat units) = 0;
+ virtual void glPopGroupMarkerEXTFn(void) = 0;
+ virtual void glProgramBinaryFn(GLuint program,
+ GLenum binaryFormat,
+ const GLvoid* binary,
+ GLsizei length) = 0;
+ virtual void glProgramParameteriFn(GLuint program,
+ GLenum pname,
+ GLint value) = 0;
+ virtual void glPushGroupMarkerEXTFn(GLsizei length, const char* marker) = 0;
+ virtual void glQueryCounterFn(GLuint id, GLenum target) = 0;
+ virtual void glReadBufferFn(GLenum src) = 0;
+ virtual void glReadPixelsFn(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ void* pixels) = 0;
+ virtual void glReleaseShaderCompilerFn(void) = 0;
+ virtual void glRenderbufferStorageEXTFn(GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) = 0;
+ virtual void glRenderbufferStorageMultisampleFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) = 0;
+ virtual void glRenderbufferStorageMultisampleANGLEFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) = 0;
+ virtual void glRenderbufferStorageMultisampleEXTFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) = 0;
+ virtual void glRenderbufferStorageMultisampleIMGFn(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) = 0;
+ virtual void glResumeTransformFeedbackFn(void) = 0;
+ virtual void glSampleCoverageFn(GLclampf value, GLboolean invert) = 0;
+ virtual void glSamplerParameterfFn(GLuint sampler,
+ GLenum pname,
+ GLfloat param) = 0;
+ virtual void glSamplerParameterfvFn(GLuint sampler,
+ GLenum pname,
+ const GLfloat* params) = 0;
+ virtual void glSamplerParameteriFn(GLuint sampler,
+ GLenum pname,
+ GLint param) = 0;
+ virtual void glSamplerParameterivFn(GLuint sampler,
+ GLenum pname,
+ const GLint* params) = 0;
+ virtual void glScissorFn(GLint x, GLint y, GLsizei width, GLsizei height) = 0;
+ virtual void glSetFenceAPPLEFn(GLuint fence) = 0;
+ virtual void glSetFenceNVFn(GLuint fence, GLenum condition) = 0;
+ virtual void glShaderBinaryFn(GLsizei n,
+ const GLuint* shaders,
+ GLenum binaryformat,
+ const void* binary,
+ GLsizei length) = 0;
+ virtual void glShaderSourceFn(GLuint shader,
+ GLsizei count,
+ const char* const* str,
+ const GLint* length) = 0;
+ virtual void glStencilFuncFn(GLenum func, GLint ref, GLuint mask) = 0;
+ virtual void glStencilFuncSeparateFn(GLenum face,
+ GLenum func,
+ GLint ref,
+ GLuint mask) = 0;
+ virtual void glStencilMaskFn(GLuint mask) = 0;
+ virtual void glStencilMaskSeparateFn(GLenum face, GLuint mask) = 0;
+ virtual void glStencilOpFn(GLenum fail, GLenum zfail, GLenum zpass) = 0;
+ virtual void glStencilOpSeparateFn(GLenum face,
+ GLenum fail,
+ GLenum zfail,
+ GLenum zpass) = 0;
+ virtual GLboolean glTestFenceAPPLEFn(GLuint fence) = 0;
+ virtual GLboolean glTestFenceNVFn(GLuint fence) = 0;
+ virtual void glTexImage2DFn(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) = 0;
+ virtual void glTexImage3DFn(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) = 0;
+ virtual void glTexParameterfFn(GLenum target,
+ GLenum pname,
+ GLfloat param) = 0;
+ virtual void glTexParameterfvFn(GLenum target,
+ GLenum pname,
+ const GLfloat* params) = 0;
+ virtual void glTexParameteriFn(GLenum target, GLenum pname, GLint param) = 0;
+ virtual void glTexParameterivFn(GLenum target,
+ GLenum pname,
+ const GLint* params) = 0;
+ virtual void glTexStorage2DEXTFn(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) = 0;
+ virtual void glTexStorage3DFn(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth) = 0;
+ virtual void glTexSubImage2DFn(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels) = 0;
+ virtual void glTransformFeedbackVaryingsFn(GLuint program,
+ GLsizei count,
+ const char* const* varyings,
+ GLenum bufferMode) = 0;
+ virtual void glUniform1fFn(GLint location, GLfloat x) = 0;
+ virtual void glUniform1fvFn(GLint location,
+ GLsizei count,
+ const GLfloat* v) = 0;
+ virtual void glUniform1iFn(GLint location, GLint x) = 0;
+ virtual void glUniform1ivFn(GLint location,
+ GLsizei count,
+ const GLint* v) = 0;
+ virtual void glUniform1uiFn(GLint location, GLuint v0) = 0;
+ virtual void glUniform1uivFn(GLint location,
+ GLsizei count,
+ const GLuint* v) = 0;
+ virtual void glUniform2fFn(GLint location, GLfloat x, GLfloat y) = 0;
+ virtual void glUniform2fvFn(GLint location,
+ GLsizei count,
+ const GLfloat* v) = 0;
+ virtual void glUniform2iFn(GLint location, GLint x, GLint y) = 0;
+ virtual void glUniform2ivFn(GLint location,
+ GLsizei count,
+ const GLint* v) = 0;
+ virtual void glUniform2uiFn(GLint location, GLuint v0, GLuint v1) = 0;
+ virtual void glUniform2uivFn(GLint location,
+ GLsizei count,
+ const GLuint* v) = 0;
+ virtual void glUniform3fFn(GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z) = 0;
+ virtual void glUniform3fvFn(GLint location,
+ GLsizei count,
+ const GLfloat* v) = 0;
+ virtual void glUniform3iFn(GLint location, GLint x, GLint y, GLint z) = 0;
+ virtual void glUniform3ivFn(GLint location,
+ GLsizei count,
+ const GLint* v) = 0;
+ virtual void glUniform3uiFn(GLint location,
+ GLuint v0,
+ GLuint v1,
+ GLuint v2) = 0;
+ virtual void glUniform3uivFn(GLint location,
+ GLsizei count,
+ const GLuint* v) = 0;
+ virtual void glUniform4fFn(GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) = 0;
+ virtual void glUniform4fvFn(GLint location,
+ GLsizei count,
+ const GLfloat* v) = 0;
+ virtual void glUniform4iFn(GLint location,
+ GLint x,
+ GLint y,
+ GLint z,
+ GLint w) = 0;
+ virtual void glUniform4ivFn(GLint location,
+ GLsizei count,
+ const GLint* v) = 0;
+ virtual void glUniform4uiFn(GLint location,
+ GLuint v0,
+ GLuint v1,
+ GLuint v2,
+ GLuint v3) = 0;
+ virtual void glUniform4uivFn(GLint location,
+ GLsizei count,
+ const GLuint* v) = 0;
+ virtual void glUniformBlockBindingFn(GLuint program,
+ GLuint uniformBlockIndex,
+ GLuint uniformBlockBinding) = 0;
+ virtual void glUniformMatrix2fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) = 0;
+ virtual void glUniformMatrix2x3fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) = 0;
+ virtual void glUniformMatrix2x4fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) = 0;
+ virtual void glUniformMatrix3fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) = 0;
+ virtual void glUniformMatrix3x2fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) = 0;
+ virtual void glUniformMatrix3x4fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) = 0;
+ virtual void glUniformMatrix4fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) = 0;
+ virtual void glUniformMatrix4x2fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) = 0;
+ virtual void glUniformMatrix4x3fvFn(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) = 0;
+ virtual GLboolean glUnmapBufferFn(GLenum target) = 0;
+ virtual void glUseProgramFn(GLuint program) = 0;
+ virtual void glValidateProgramFn(GLuint program) = 0;
+ virtual void glVertexAttrib1fFn(GLuint indx, GLfloat x) = 0;
+ virtual void glVertexAttrib1fvFn(GLuint indx, const GLfloat* values) = 0;
+ virtual void glVertexAttrib2fFn(GLuint indx, GLfloat x, GLfloat y) = 0;
+ virtual void glVertexAttrib2fvFn(GLuint indx, const GLfloat* values) = 0;
+ virtual void glVertexAttrib3fFn(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z) = 0;
+ virtual void glVertexAttrib3fvFn(GLuint indx, const GLfloat* values) = 0;
+ virtual void glVertexAttrib4fFn(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) = 0;
+ virtual void glVertexAttrib4fvFn(GLuint indx, const GLfloat* values) = 0;
+ virtual void glVertexAttribDivisorANGLEFn(GLuint index, GLuint divisor) = 0;
+ virtual void glVertexAttribI4iFn(GLuint indx,
+ GLint x,
+ GLint y,
+ GLint z,
+ GLint w) = 0;
+ virtual void glVertexAttribI4ivFn(GLuint indx, const GLint* values) = 0;
+ virtual void glVertexAttribI4uiFn(GLuint indx,
+ GLuint x,
+ GLuint y,
+ GLuint z,
+ GLuint w) = 0;
+ virtual void glVertexAttribI4uivFn(GLuint indx, const GLuint* values) = 0;
+ virtual void glVertexAttribIPointerFn(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLsizei stride,
+ const void* ptr) = 0;
+ virtual void glVertexAttribPointerFn(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLboolean normalized,
+ GLsizei stride,
+ const void* ptr) = 0;
+ virtual void glViewportFn(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) = 0;
+ virtual GLenum glWaitSyncFn(GLsync sync,
+ GLbitfield flags,
+ GLuint64 timeout) = 0;
+};
+
+} // namespace gfx
+
+#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
+#define glBindBuffer ::gfx::g_current_gl_context->glBindBufferFn
+#define glBindBufferBase ::gfx::g_current_gl_context->glBindBufferBaseFn
+#define glBindBufferRange ::gfx::g_current_gl_context->glBindBufferRangeFn
+#define glBindFragDataLocation \
+ ::gfx::g_current_gl_context->glBindFragDataLocationFn
+#define glBindFragDataLocationIndexed \
+ ::gfx::g_current_gl_context->glBindFragDataLocationIndexedFn
+#define glBindFramebufferEXT ::gfx::g_current_gl_context->glBindFramebufferEXTFn
+#define glBindRenderbufferEXT \
+ ::gfx::g_current_gl_context->glBindRenderbufferEXTFn
+#define glBindSampler ::gfx::g_current_gl_context->glBindSamplerFn
+#define glBindTexture ::gfx::g_current_gl_context->glBindTextureFn
+#define glBindTransformFeedback \
+ ::gfx::g_current_gl_context->glBindTransformFeedbackFn
+#define glBindVertexArrayOES ::gfx::g_current_gl_context->glBindVertexArrayOESFn
+#define glBlendBarrierKHR ::gfx::g_current_gl_context->glBlendBarrierKHRFn
+#define glBlendColor ::gfx::g_current_gl_context->glBlendColorFn
+#define glBlendEquation ::gfx::g_current_gl_context->glBlendEquationFn
+#define glBlendEquationSeparate \
+ ::gfx::g_current_gl_context->glBlendEquationSeparateFn
+#define glBlendFunc ::gfx::g_current_gl_context->glBlendFuncFn
+#define glBlendFuncSeparate ::gfx::g_current_gl_context->glBlendFuncSeparateFn
+#define glBlitFramebuffer ::gfx::g_current_gl_context->glBlitFramebufferFn
+#define glBlitFramebufferANGLE \
+ ::gfx::g_current_gl_context->glBlitFramebufferANGLEFn
+#define glBlitFramebufferEXT ::gfx::g_current_gl_context->glBlitFramebufferEXTFn
+#define glBufferData ::gfx::g_current_gl_context->glBufferDataFn
+#define glBufferSubData ::gfx::g_current_gl_context->glBufferSubDataFn
+#define glCheckFramebufferStatusEXT \
+ ::gfx::g_current_gl_context->glCheckFramebufferStatusEXTFn
+#define glClear ::gfx::g_current_gl_context->glClearFn
+#define glClearBufferfi ::gfx::g_current_gl_context->glClearBufferfiFn
+#define glClearBufferfv ::gfx::g_current_gl_context->glClearBufferfvFn
+#define glClearBufferiv ::gfx::g_current_gl_context->glClearBufferivFn
+#define glClearBufferuiv ::gfx::g_current_gl_context->glClearBufferuivFn
+#define glClearColor ::gfx::g_current_gl_context->glClearColorFn
+#define glClearDepth ::gfx::g_current_gl_context->glClearDepthFn
+#define glClearDepthf ::gfx::g_current_gl_context->glClearDepthfFn
+#define glClearStencil ::gfx::g_current_gl_context->glClearStencilFn
+#define glClientWaitSync ::gfx::g_current_gl_context->glClientWaitSyncFn
+#define glColorMask ::gfx::g_current_gl_context->glColorMaskFn
+#define glCompileShader ::gfx::g_current_gl_context->glCompileShaderFn
+#define glCompressedTexImage2D \
+ ::gfx::g_current_gl_context->glCompressedTexImage2DFn
+#define glCompressedTexImage3D \
+ ::gfx::g_current_gl_context->glCompressedTexImage3DFn
+#define glCompressedTexSubImage2D \
+ ::gfx::g_current_gl_context->glCompressedTexSubImage2DFn
+#define glCopyBufferSubData ::gfx::g_current_gl_context->glCopyBufferSubDataFn
+#define glCopyTexImage2D ::gfx::g_current_gl_context->glCopyTexImage2DFn
+#define glCopyTexSubImage2D ::gfx::g_current_gl_context->glCopyTexSubImage2DFn
+#define glCopyTexSubImage3D ::gfx::g_current_gl_context->glCopyTexSubImage3DFn
+#define glCreateProgram ::gfx::g_current_gl_context->glCreateProgramFn
+#define glCreateShader ::gfx::g_current_gl_context->glCreateShaderFn
+#define glCullFace ::gfx::g_current_gl_context->glCullFaceFn
+#define glDeleteBuffersARB ::gfx::g_current_gl_context->glDeleteBuffersARBFn
+#define glDeleteFencesAPPLE ::gfx::g_current_gl_context->glDeleteFencesAPPLEFn
+#define glDeleteFencesNV ::gfx::g_current_gl_context->glDeleteFencesNVFn
+#define glDeleteFramebuffersEXT \
+ ::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
+#define glDeleteShader ::gfx::g_current_gl_context->glDeleteShaderFn
+#define glDeleteSync ::gfx::g_current_gl_context->glDeleteSyncFn
+#define glDeleteTextures ::gfx::g_current_gl_context->glDeleteTexturesFn
+#define glDeleteTransformFeedbacks \
+ ::gfx::g_current_gl_context->glDeleteTransformFeedbacksFn
+#define glDeleteVertexArraysOES \
+ ::gfx::g_current_gl_context->glDeleteVertexArraysOESFn
+#define glDepthFunc ::gfx::g_current_gl_context->glDepthFuncFn
+#define glDepthMask ::gfx::g_current_gl_context->glDepthMaskFn
+#define glDepthRange ::gfx::g_current_gl_context->glDepthRangeFn
+#define glDepthRangef ::gfx::g_current_gl_context->glDepthRangefFn
+#define glDetachShader ::gfx::g_current_gl_context->glDetachShaderFn
+#define glDisable ::gfx::g_current_gl_context->glDisableFn
+#define glDisableVertexAttribArray \
+ ::gfx::g_current_gl_context->glDisableVertexAttribArrayFn
+#define glDiscardFramebufferEXT \
+ ::gfx::g_current_gl_context->glDiscardFramebufferEXTFn
+#define glDrawArrays ::gfx::g_current_gl_context->glDrawArraysFn
+#define glDrawArraysInstancedANGLE \
+ ::gfx::g_current_gl_context->glDrawArraysInstancedANGLEFn
+#define glDrawBuffer ::gfx::g_current_gl_context->glDrawBufferFn
+#define glDrawBuffersARB ::gfx::g_current_gl_context->glDrawBuffersARBFn
+#define glDrawElements ::gfx::g_current_gl_context->glDrawElementsFn
+#define glDrawElementsInstancedANGLE \
+ ::gfx::g_current_gl_context->glDrawElementsInstancedANGLEFn
+#define glDrawRangeElements ::gfx::g_current_gl_context->glDrawRangeElementsFn
+#define glEGLImageTargetRenderbufferStorageOES \
+ ::gfx::g_current_gl_context->glEGLImageTargetRenderbufferStorageOESFn
+#define glEGLImageTargetTexture2DOES \
+ ::gfx::g_current_gl_context->glEGLImageTargetTexture2DOESFn
+#define glEnable ::gfx::g_current_gl_context->glEnableFn
+#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
+#define glFinish ::gfx::g_current_gl_context->glFinishFn
+#define glFinishFenceAPPLE ::gfx::g_current_gl_context->glFinishFenceAPPLEFn
+#define glFinishFenceNV ::gfx::g_current_gl_context->glFinishFenceNVFn
+#define glFlush ::gfx::g_current_gl_context->glFlushFn
+#define glFlushMappedBufferRange \
+ ::gfx::g_current_gl_context->glFlushMappedBufferRangeFn
+#define glFramebufferRenderbufferEXT \
+ ::gfx::g_current_gl_context->glFramebufferRenderbufferEXTFn
+#define glFramebufferTexture2DEXT \
+ ::gfx::g_current_gl_context->glFramebufferTexture2DEXTFn
+#define glFramebufferTexture2DMultisampleEXT \
+ ::gfx::g_current_gl_context->glFramebufferTexture2DMultisampleEXTFn
+#define glFramebufferTexture2DMultisampleIMG \
+ ::gfx::g_current_gl_context->glFramebufferTexture2DMultisampleIMGFn
+#define glFramebufferTextureLayer \
+ ::gfx::g_current_gl_context->glFramebufferTextureLayerFn
+#define glFrontFace ::gfx::g_current_gl_context->glFrontFaceFn
+#define glGenBuffersARB ::gfx::g_current_gl_context->glGenBuffersARBFn
+#define glGenerateMipmapEXT ::gfx::g_current_gl_context->glGenerateMipmapEXTFn
+#define glGenFencesAPPLE ::gfx::g_current_gl_context->glGenFencesAPPLEFn
+#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
+#define glGenTextures ::gfx::g_current_gl_context->glGenTexturesFn
+#define glGenTransformFeedbacks \
+ ::gfx::g_current_gl_context->glGenTransformFeedbacksFn
+#define glGenVertexArraysOES ::gfx::g_current_gl_context->glGenVertexArraysOESFn
+#define glGetActiveAttrib ::gfx::g_current_gl_context->glGetActiveAttribFn
+#define glGetActiveUniform ::gfx::g_current_gl_context->glGetActiveUniformFn
+#define glGetActiveUniformBlockiv \
+ ::gfx::g_current_gl_context->glGetActiveUniformBlockivFn
+#define glGetActiveUniformBlockName \
+ ::gfx::g_current_gl_context->glGetActiveUniformBlockNameFn
+#define glGetActiveUniformsiv \
+ ::gfx::g_current_gl_context->glGetActiveUniformsivFn
+#define glGetAttachedShaders ::gfx::g_current_gl_context->glGetAttachedShadersFn
+#define glGetAttribLocation ::gfx::g_current_gl_context->glGetAttribLocationFn
+#define glGetBooleanv ::gfx::g_current_gl_context->glGetBooleanvFn
+#define glGetBufferParameteriv \
+ ::gfx::g_current_gl_context->glGetBufferParameterivFn
+#define glGetError ::gfx::g_current_gl_context->glGetErrorFn
+#define glGetFenceivNV ::gfx::g_current_gl_context->glGetFenceivNVFn
+#define glGetFloatv ::gfx::g_current_gl_context->glGetFloatvFn
+#define glGetFragDataLocation \
+ ::gfx::g_current_gl_context->glGetFragDataLocationFn
+#define glGetFramebufferAttachmentParameterivEXT \
+ ::gfx::g_current_gl_context->glGetFramebufferAttachmentParameterivEXTFn
+#define glGetGraphicsResetStatusARB \
+ ::gfx::g_current_gl_context->glGetGraphicsResetStatusARBFn
+#define glGetInteger64i_v ::gfx::g_current_gl_context->glGetInteger64i_vFn
+#define glGetInteger64v ::gfx::g_current_gl_context->glGetInteger64vFn
+#define glGetIntegeri_v ::gfx::g_current_gl_context->glGetIntegeri_vFn
+#define glGetIntegerv ::gfx::g_current_gl_context->glGetIntegervFn
+#define glGetInternalformativ \
+ ::gfx::g_current_gl_context->glGetInternalformativFn
+#define glGetProgramBinary ::gfx::g_current_gl_context->glGetProgramBinaryFn
+#define glGetProgramInfoLog ::gfx::g_current_gl_context->glGetProgramInfoLogFn
+#define glGetProgramiv ::gfx::g_current_gl_context->glGetProgramivFn
+#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 \
+ ::gfx::g_current_gl_context->glGetSamplerParameterfvFn
+#define glGetSamplerParameteriv \
+ ::gfx::g_current_gl_context->glGetSamplerParameterivFn
+#define glGetShaderInfoLog ::gfx::g_current_gl_context->glGetShaderInfoLogFn
+#define glGetShaderiv ::gfx::g_current_gl_context->glGetShaderivFn
+#define glGetShaderPrecisionFormat \
+ ::gfx::g_current_gl_context->glGetShaderPrecisionFormatFn
+#define glGetShaderSource ::gfx::g_current_gl_context->glGetShaderSourceFn
+#define glGetString ::gfx::g_current_gl_context->glGetStringFn
+#define glGetSynciv ::gfx::g_current_gl_context->glGetSyncivFn
+#define glGetTexLevelParameterfv \
+ ::gfx::g_current_gl_context->glGetTexLevelParameterfvFn
+#define glGetTexLevelParameteriv \
+ ::gfx::g_current_gl_context->glGetTexLevelParameterivFn
+#define glGetTexParameterfv ::gfx::g_current_gl_context->glGetTexParameterfvFn
+#define glGetTexParameteriv ::gfx::g_current_gl_context->glGetTexParameterivFn
+#define glGetTransformFeedbackVarying \
+ ::gfx::g_current_gl_context->glGetTransformFeedbackVaryingFn
+#define glGetTranslatedShaderSourceANGLE \
+ ::gfx::g_current_gl_context->glGetTranslatedShaderSourceANGLEFn
+#define glGetUniformBlockIndex \
+ ::gfx::g_current_gl_context->glGetUniformBlockIndexFn
+#define glGetUniformfv ::gfx::g_current_gl_context->glGetUniformfvFn
+#define glGetUniformIndices ::gfx::g_current_gl_context->glGetUniformIndicesFn
+#define glGetUniformiv ::gfx::g_current_gl_context->glGetUniformivFn
+#define glGetUniformLocation ::gfx::g_current_gl_context->glGetUniformLocationFn
+#define glGetVertexAttribfv ::gfx::g_current_gl_context->glGetVertexAttribfvFn
+#define glGetVertexAttribiv ::gfx::g_current_gl_context->glGetVertexAttribivFn
+#define glGetVertexAttribPointerv \
+ ::gfx::g_current_gl_context->glGetVertexAttribPointervFn
+#define glHint ::gfx::g_current_gl_context->glHintFn
+#define glInsertEventMarkerEXT \
+ ::gfx::g_current_gl_context->glInsertEventMarkerEXTFn
+#define glInvalidateFramebuffer \
+ ::gfx::g_current_gl_context->glInvalidateFramebufferFn
+#define glInvalidateSubFramebuffer \
+ ::gfx::g_current_gl_context->glInvalidateSubFramebufferFn
+#define glIsBuffer ::gfx::g_current_gl_context->glIsBufferFn
+#define glIsEnabled ::gfx::g_current_gl_context->glIsEnabledFn
+#define glIsFenceAPPLE ::gfx::g_current_gl_context->glIsFenceAPPLEFn
+#define glIsFenceNV ::gfx::g_current_gl_context->glIsFenceNVFn
+#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
+#define glIsSync ::gfx::g_current_gl_context->glIsSyncFn
+#define glIsTexture ::gfx::g_current_gl_context->glIsTextureFn
+#define glIsTransformFeedback \
+ ::gfx::g_current_gl_context->glIsTransformFeedbackFn
+#define glIsVertexArrayOES ::gfx::g_current_gl_context->glIsVertexArrayOESFn
+#define glLineWidth ::gfx::g_current_gl_context->glLineWidthFn
+#define glLinkProgram ::gfx::g_current_gl_context->glLinkProgramFn
+#define glMapBuffer ::gfx::g_current_gl_context->glMapBufferFn
+#define glMapBufferRange ::gfx::g_current_gl_context->glMapBufferRangeFn
+#define glMatrixLoadfEXT ::gfx::g_current_gl_context->glMatrixLoadfEXTFn
+#define glMatrixLoadIdentityEXT \
+ ::gfx::g_current_gl_context->glMatrixLoadIdentityEXTFn
+#define glPauseTransformFeedback \
+ ::gfx::g_current_gl_context->glPauseTransformFeedbackFn
+#define glPixelStorei ::gfx::g_current_gl_context->glPixelStoreiFn
+#define glPointParameteri ::gfx::g_current_gl_context->glPointParameteriFn
+#define glPolygonOffset ::gfx::g_current_gl_context->glPolygonOffsetFn
+#define glPopGroupMarkerEXT ::gfx::g_current_gl_context->glPopGroupMarkerEXTFn
+#define glProgramBinary ::gfx::g_current_gl_context->glProgramBinaryFn
+#define glProgramParameteri ::gfx::g_current_gl_context->glProgramParameteriFn
+#define glPushGroupMarkerEXT ::gfx::g_current_gl_context->glPushGroupMarkerEXTFn
+#define glQueryCounter ::gfx::g_current_gl_context->glQueryCounterFn
+#define glReadBuffer ::gfx::g_current_gl_context->glReadBufferFn
+#define glReadPixels ::gfx::g_current_gl_context->glReadPixelsFn
+#define glReleaseShaderCompiler \
+ ::gfx::g_current_gl_context->glReleaseShaderCompilerFn
+#define glRenderbufferStorageEXT \
+ ::gfx::g_current_gl_context->glRenderbufferStorageEXTFn
+#define glRenderbufferStorageMultisample \
+ ::gfx::g_current_gl_context->glRenderbufferStorageMultisampleFn
+#define glRenderbufferStorageMultisampleANGLE \
+ ::gfx::g_current_gl_context->glRenderbufferStorageMultisampleANGLEFn
+#define glRenderbufferStorageMultisampleEXT \
+ ::gfx::g_current_gl_context->glRenderbufferStorageMultisampleEXTFn
+#define glRenderbufferStorageMultisampleIMG \
+ ::gfx::g_current_gl_context->glRenderbufferStorageMultisampleIMGFn
+#define glResumeTransformFeedback \
+ ::gfx::g_current_gl_context->glResumeTransformFeedbackFn
+#define glSampleCoverage ::gfx::g_current_gl_context->glSampleCoverageFn
+#define glSamplerParameterf ::gfx::g_current_gl_context->glSamplerParameterfFn
+#define glSamplerParameterfv ::gfx::g_current_gl_context->glSamplerParameterfvFn
+#define glSamplerParameteri ::gfx::g_current_gl_context->glSamplerParameteriFn
+#define glSamplerParameteriv ::gfx::g_current_gl_context->glSamplerParameterivFn
+#define glScissor ::gfx::g_current_gl_context->glScissorFn
+#define glSetFenceAPPLE ::gfx::g_current_gl_context->glSetFenceAPPLEFn
+#define glSetFenceNV ::gfx::g_current_gl_context->glSetFenceNVFn
+#define glShaderBinary ::gfx::g_current_gl_context->glShaderBinaryFn
+#define glShaderSource ::gfx::g_current_gl_context->glShaderSourceFn
+#define glStencilFunc ::gfx::g_current_gl_context->glStencilFuncFn
+#define glStencilFuncSeparate \
+ ::gfx::g_current_gl_context->glStencilFuncSeparateFn
+#define glStencilMask ::gfx::g_current_gl_context->glStencilMaskFn
+#define glStencilMaskSeparate \
+ ::gfx::g_current_gl_context->glStencilMaskSeparateFn
+#define glStencilOp ::gfx::g_current_gl_context->glStencilOpFn
+#define glStencilOpSeparate ::gfx::g_current_gl_context->glStencilOpSeparateFn
+#define glTestFenceAPPLE ::gfx::g_current_gl_context->glTestFenceAPPLEFn
+#define glTestFenceNV ::gfx::g_current_gl_context->glTestFenceNVFn
+#define glTexImage2D ::gfx::g_current_gl_context->glTexImage2DFn
+#define glTexImage3D ::gfx::g_current_gl_context->glTexImage3DFn
+#define glTexParameterf ::gfx::g_current_gl_context->glTexParameterfFn
+#define glTexParameterfv ::gfx::g_current_gl_context->glTexParameterfvFn
+#define glTexParameteri ::gfx::g_current_gl_context->glTexParameteriFn
+#define glTexParameteriv ::gfx::g_current_gl_context->glTexParameterivFn
+#define glTexStorage2DEXT ::gfx::g_current_gl_context->glTexStorage2DEXTFn
+#define glTexStorage3D ::gfx::g_current_gl_context->glTexStorage3DFn
+#define glTexSubImage2D ::gfx::g_current_gl_context->glTexSubImage2DFn
+#define glTransformFeedbackVaryings \
+ ::gfx::g_current_gl_context->glTransformFeedbackVaryingsFn
+#define glUniform1f ::gfx::g_current_gl_context->glUniform1fFn
+#define glUniform1fv ::gfx::g_current_gl_context->glUniform1fvFn
+#define glUniform1i ::gfx::g_current_gl_context->glUniform1iFn
+#define glUniform1iv ::gfx::g_current_gl_context->glUniform1ivFn
+#define glUniform1ui ::gfx::g_current_gl_context->glUniform1uiFn
+#define glUniform1uiv ::gfx::g_current_gl_context->glUniform1uivFn
+#define glUniform2f ::gfx::g_current_gl_context->glUniform2fFn
+#define glUniform2fv ::gfx::g_current_gl_context->glUniform2fvFn
+#define glUniform2i ::gfx::g_current_gl_context->glUniform2iFn
+#define glUniform2iv ::gfx::g_current_gl_context->glUniform2ivFn
+#define glUniform2ui ::gfx::g_current_gl_context->glUniform2uiFn
+#define glUniform2uiv ::gfx::g_current_gl_context->glUniform2uivFn
+#define glUniform3f ::gfx::g_current_gl_context->glUniform3fFn
+#define glUniform3fv ::gfx::g_current_gl_context->glUniform3fvFn
+#define glUniform3i ::gfx::g_current_gl_context->glUniform3iFn
+#define glUniform3iv ::gfx::g_current_gl_context->glUniform3ivFn
+#define glUniform3ui ::gfx::g_current_gl_context->glUniform3uiFn
+#define glUniform3uiv ::gfx::g_current_gl_context->glUniform3uivFn
+#define glUniform4f ::gfx::g_current_gl_context->glUniform4fFn
+#define glUniform4fv ::gfx::g_current_gl_context->glUniform4fvFn
+#define glUniform4i ::gfx::g_current_gl_context->glUniform4iFn
+#define glUniform4iv ::gfx::g_current_gl_context->glUniform4ivFn
+#define glUniform4ui ::gfx::g_current_gl_context->glUniform4uiFn
+#define glUniform4uiv ::gfx::g_current_gl_context->glUniform4uivFn
+#define glUniformBlockBinding \
+ ::gfx::g_current_gl_context->glUniformBlockBindingFn
+#define glUniformMatrix2fv ::gfx::g_current_gl_context->glUniformMatrix2fvFn
+#define glUniformMatrix2x3fv ::gfx::g_current_gl_context->glUniformMatrix2x3fvFn
+#define glUniformMatrix2x4fv ::gfx::g_current_gl_context->glUniformMatrix2x4fvFn
+#define glUniformMatrix3fv ::gfx::g_current_gl_context->glUniformMatrix3fvFn
+#define glUniformMatrix3x2fv ::gfx::g_current_gl_context->glUniformMatrix3x2fvFn
+#define glUniformMatrix3x4fv ::gfx::g_current_gl_context->glUniformMatrix3x4fvFn
+#define glUniformMatrix4fv ::gfx::g_current_gl_context->glUniformMatrix4fvFn
+#define glUniformMatrix4x2fv ::gfx::g_current_gl_context->glUniformMatrix4x2fvFn
+#define glUniformMatrix4x3fv ::gfx::g_current_gl_context->glUniformMatrix4x3fvFn
+#define glUnmapBuffer ::gfx::g_current_gl_context->glUnmapBufferFn
+#define glUseProgram ::gfx::g_current_gl_context->glUseProgramFn
+#define glValidateProgram ::gfx::g_current_gl_context->glValidateProgramFn
+#define glVertexAttrib1f ::gfx::g_current_gl_context->glVertexAttrib1fFn
+#define glVertexAttrib1fv ::gfx::g_current_gl_context->glVertexAttrib1fvFn
+#define glVertexAttrib2f ::gfx::g_current_gl_context->glVertexAttrib2fFn
+#define glVertexAttrib2fv ::gfx::g_current_gl_context->glVertexAttrib2fvFn
+#define glVertexAttrib3f ::gfx::g_current_gl_context->glVertexAttrib3fFn
+#define glVertexAttrib3fv ::gfx::g_current_gl_context->glVertexAttrib3fvFn
+#define glVertexAttrib4f ::gfx::g_current_gl_context->glVertexAttrib4fFn
+#define glVertexAttrib4fv ::gfx::g_current_gl_context->glVertexAttrib4fvFn
+#define glVertexAttribDivisorANGLE \
+ ::gfx::g_current_gl_context->glVertexAttribDivisorANGLEFn
+#define glVertexAttribI4i ::gfx::g_current_gl_context->glVertexAttribI4iFn
+#define glVertexAttribI4iv ::gfx::g_current_gl_context->glVertexAttribI4ivFn
+#define glVertexAttribI4ui ::gfx::g_current_gl_context->glVertexAttribI4uiFn
+#define glVertexAttribI4uiv ::gfx::g_current_gl_context->glVertexAttribI4uivFn
+#define glVertexAttribIPointer \
+ ::gfx::g_current_gl_context->glVertexAttribIPointerFn
+#define glVertexAttribPointer \
+ ::gfx::g_current_gl_context->glVertexAttribPointerFn
+#define glViewport ::gfx::g_current_gl_context->glViewportFn
+#define glWaitSync ::gfx::g_current_gl_context->glWaitSyncFn
+
+#endif // UI_GFX_GL_GL_BINDINGS_AUTOGEN_GL_H_
diff --git a/ui/gl/gl_bindings_autogen_glx.cc b/ui/gl/gl_bindings_autogen_glx.cc
new file mode 100644
index 0000000..617ff5f
--- /dev/null
+++ b/ui/gl/gl_bindings_autogen_glx.cc
@@ -0,0 +1,1463 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+#include <string>
+
+#include "base/debug/trace_event.h"
+#include "ui/gl/gl_bindings.h"
+#include "ui/gl/gl_context.h"
+#include "ui/gl/gl_enums.h"
+#include "ui/gl/gl_glx_api_implementation.h"
+#include "ui/gl/gl_implementation.h"
+#include "ui/gl/gl_version_info.h"
+
+namespace gfx {
+
+static bool g_debugBindingsInitialized;
+DriverGLX g_driver_glx;
+
+void DriverGLX::InitializeStaticBindings() {
+ fn.glXBindTexImageEXTFn = reinterpret_cast<glXBindTexImageEXTProc>(
+ GetGLProcAddress("glXBindTexImageEXT"));
+ fn.glXChooseFBConfigFn = reinterpret_cast<glXChooseFBConfigProc>(
+ GetGLProcAddress("glXChooseFBConfig"));
+ fn.glXChooseVisualFn = reinterpret_cast<glXChooseVisualProc>(
+ GetGLProcAddress("glXChooseVisual"));
+ fn.glXCopyContextFn =
+ reinterpret_cast<glXCopyContextProc>(GetGLProcAddress("glXCopyContext"));
+ fn.glXCopySubBufferMESAFn = reinterpret_cast<glXCopySubBufferMESAProc>(
+ GetGLProcAddress("glXCopySubBufferMESA"));
+ fn.glXCreateContextFn = reinterpret_cast<glXCreateContextProc>(
+ GetGLProcAddress("glXCreateContext"));
+ fn.glXCreateContextAttribsARBFn =
+ reinterpret_cast<glXCreateContextAttribsARBProc>(
+ GetGLProcAddress("glXCreateContextAttribsARB"));
+ fn.glXCreateGLXPixmapFn = reinterpret_cast<glXCreateGLXPixmapProc>(
+ GetGLProcAddress("glXCreateGLXPixmap"));
+ fn.glXCreateNewContextFn = reinterpret_cast<glXCreateNewContextProc>(
+ GetGLProcAddress("glXCreateNewContext"));
+ fn.glXCreatePbufferFn = reinterpret_cast<glXCreatePbufferProc>(
+ GetGLProcAddress("glXCreatePbuffer"));
+ fn.glXCreatePixmapFn = reinterpret_cast<glXCreatePixmapProc>(
+ GetGLProcAddress("glXCreatePixmap"));
+ fn.glXCreateWindowFn = reinterpret_cast<glXCreateWindowProc>(
+ GetGLProcAddress("glXCreateWindow"));
+ fn.glXDestroyContextFn = reinterpret_cast<glXDestroyContextProc>(
+ GetGLProcAddress("glXDestroyContext"));
+ fn.glXDestroyGLXPixmapFn = reinterpret_cast<glXDestroyGLXPixmapProc>(
+ GetGLProcAddress("glXDestroyGLXPixmap"));
+ fn.glXDestroyPbufferFn = reinterpret_cast<glXDestroyPbufferProc>(
+ GetGLProcAddress("glXDestroyPbuffer"));
+ fn.glXDestroyPixmapFn = reinterpret_cast<glXDestroyPixmapProc>(
+ GetGLProcAddress("glXDestroyPixmap"));
+ fn.glXDestroyWindowFn = reinterpret_cast<glXDestroyWindowProc>(
+ GetGLProcAddress("glXDestroyWindow"));
+ fn.glXGetClientStringFn = reinterpret_cast<glXGetClientStringProc>(
+ GetGLProcAddress("glXGetClientString"));
+ fn.glXGetConfigFn =
+ reinterpret_cast<glXGetConfigProc>(GetGLProcAddress("glXGetConfig"));
+ fn.glXGetCurrentContextFn = reinterpret_cast<glXGetCurrentContextProc>(
+ GetGLProcAddress("glXGetCurrentContext"));
+ fn.glXGetCurrentDisplayFn = reinterpret_cast<glXGetCurrentDisplayProc>(
+ GetGLProcAddress("glXGetCurrentDisplay"));
+ fn.glXGetCurrentDrawableFn = reinterpret_cast<glXGetCurrentDrawableProc>(
+ GetGLProcAddress("glXGetCurrentDrawable"));
+ fn.glXGetCurrentReadDrawableFn =
+ reinterpret_cast<glXGetCurrentReadDrawableProc>(
+ GetGLProcAddress("glXGetCurrentReadDrawable"));
+ fn.glXGetFBConfigAttribFn = reinterpret_cast<glXGetFBConfigAttribProc>(
+ GetGLProcAddress("glXGetFBConfigAttrib"));
+ fn.glXGetFBConfigFromVisualSGIXFn =
+ reinterpret_cast<glXGetFBConfigFromVisualSGIXProc>(
+ GetGLProcAddress("glXGetFBConfigFromVisualSGIX"));
+ fn.glXGetFBConfigsFn = reinterpret_cast<glXGetFBConfigsProc>(
+ GetGLProcAddress("glXGetFBConfigs"));
+ fn.glXGetMscRateOMLFn = reinterpret_cast<glXGetMscRateOMLProc>(
+ GetGLProcAddress("glXGetMscRateOML"));
+ fn.glXGetSelectedEventFn = reinterpret_cast<glXGetSelectedEventProc>(
+ GetGLProcAddress("glXGetSelectedEvent"));
+ fn.glXGetSyncValuesOMLFn = reinterpret_cast<glXGetSyncValuesOMLProc>(
+ GetGLProcAddress("glXGetSyncValuesOML"));
+ fn.glXGetVisualFromFBConfigFn =
+ reinterpret_cast<glXGetVisualFromFBConfigProc>(
+ GetGLProcAddress("glXGetVisualFromFBConfig"));
+ fn.glXIsDirectFn =
+ reinterpret_cast<glXIsDirectProc>(GetGLProcAddress("glXIsDirect"));
+ fn.glXMakeContextCurrentFn = reinterpret_cast<glXMakeContextCurrentProc>(
+ GetGLProcAddress("glXMakeContextCurrent"));
+ fn.glXMakeCurrentFn =
+ reinterpret_cast<glXMakeCurrentProc>(GetGLProcAddress("glXMakeCurrent"));
+ fn.glXQueryContextFn = reinterpret_cast<glXQueryContextProc>(
+ GetGLProcAddress("glXQueryContext"));
+ fn.glXQueryDrawableFn = reinterpret_cast<glXQueryDrawableProc>(
+ GetGLProcAddress("glXQueryDrawable"));
+ fn.glXQueryExtensionFn = reinterpret_cast<glXQueryExtensionProc>(
+ GetGLProcAddress("glXQueryExtension"));
+ fn.glXQueryExtensionsStringFn =
+ reinterpret_cast<glXQueryExtensionsStringProc>(
+ GetGLProcAddress("glXQueryExtensionsString"));
+ fn.glXQueryServerStringFn = reinterpret_cast<glXQueryServerStringProc>(
+ GetGLProcAddress("glXQueryServerString"));
+ fn.glXQueryVersionFn = reinterpret_cast<glXQueryVersionProc>(
+ GetGLProcAddress("glXQueryVersion"));
+ fn.glXReleaseTexImageEXTFn = reinterpret_cast<glXReleaseTexImageEXTProc>(
+ GetGLProcAddress("glXReleaseTexImageEXT"));
+ fn.glXSelectEventFn =
+ reinterpret_cast<glXSelectEventProc>(GetGLProcAddress("glXSelectEvent"));
+ fn.glXSwapBuffersFn =
+ reinterpret_cast<glXSwapBuffersProc>(GetGLProcAddress("glXSwapBuffers"));
+ fn.glXSwapIntervalEXTFn = reinterpret_cast<glXSwapIntervalEXTProc>(
+ GetGLProcAddress("glXSwapIntervalEXT"));
+ fn.glXSwapIntervalMESAFn = reinterpret_cast<glXSwapIntervalMESAProc>(
+ GetGLProcAddress("glXSwapIntervalMESA"));
+ fn.glXUseXFontFn =
+ reinterpret_cast<glXUseXFontProc>(GetGLProcAddress("glXUseXFont"));
+ fn.glXWaitGLFn =
+ reinterpret_cast<glXWaitGLProc>(GetGLProcAddress("glXWaitGL"));
+ fn.glXWaitVideoSyncSGIFn = reinterpret_cast<glXWaitVideoSyncSGIProc>(
+ GetGLProcAddress("glXWaitVideoSyncSGI"));
+ fn.glXWaitXFn = reinterpret_cast<glXWaitXProc>(GetGLProcAddress("glXWaitX"));
+}
+
+void DriverGLX::InitializeDynamicBindings(GLContext* context) {
+ DCHECK(context && context->IsCurrent(NULL));
+ const GLVersionInfo* ver = context->GetVersionInfo();
+ ALLOW_UNUSED_LOCAL(ver);
+ std::string extensions = context->GetExtensions() + " ";
+ ALLOW_UNUSED_LOCAL(extensions);
+
+ ext.b_GLX_ARB_create_context =
+ extensions.find("GLX_ARB_create_context ") != std::string::npos;
+ ext.b_GLX_EXT_swap_control =
+ extensions.find("GLX_EXT_swap_control ") != std::string::npos;
+ ext.b_GLX_EXT_texture_from_pixmap =
+ extensions.find("GLX_EXT_texture_from_pixmap ") != std::string::npos;
+ ext.b_GLX_MESA_copy_sub_buffer =
+ extensions.find("GLX_MESA_copy_sub_buffer ") != std::string::npos;
+ ext.b_GLX_MESA_swap_control =
+ extensions.find("GLX_MESA_swap_control ") != std::string::npos;
+ ext.b_GLX_OML_sync_control =
+ extensions.find("GLX_OML_sync_control ") != std::string::npos;
+ ext.b_GLX_SGIX_fbconfig =
+ extensions.find("GLX_SGIX_fbconfig ") != std::string::npos;
+ ext.b_GLX_SGI_video_sync =
+ extensions.find("GLX_SGI_video_sync ") != std::string::npos;
+
+ if (g_debugBindingsInitialized)
+ InitializeDebugBindings();
+}
+
+extern "C" {
+
+static void GL_BINDING_CALL Debug_glXBindTexImageEXT(Display* dpy,
+ GLXDrawable drawable,
+ int buffer,
+ int* attribList) {
+ GL_SERVICE_LOG("glXBindTexImageEXT"
+ << "(" << static_cast<const void*>(dpy) << ", " << drawable
+ << ", " << buffer << ", "
+ << static_cast<const void*>(attribList) << ")");
+ g_driver_glx.debug_fn.glXBindTexImageEXTFn(dpy, drawable, buffer, attribList);
+}
+
+static GLXFBConfig* GL_BINDING_CALL
+Debug_glXChooseFBConfig(Display* dpy,
+ int screen,
+ const int* attribList,
+ int* nitems) {
+ GL_SERVICE_LOG("glXChooseFBConfig"
+ << "(" << static_cast<const void*>(dpy) << ", " << screen
+ << ", " << static_cast<const void*>(attribList) << ", "
+ << static_cast<const void*>(nitems) << ")");
+ GLXFBConfig* result = g_driver_glx.debug_fn.glXChooseFBConfigFn(
+ dpy, screen, attribList, nitems);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static XVisualInfo* GL_BINDING_CALL
+Debug_glXChooseVisual(Display* dpy, int screen, int* attribList) {
+ GL_SERVICE_LOG("glXChooseVisual"
+ << "(" << static_cast<const void*>(dpy) << ", " << screen
+ << ", " << static_cast<const void*>(attribList) << ")");
+ XVisualInfo* result =
+ g_driver_glx.debug_fn.glXChooseVisualFn(dpy, screen, attribList);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL Debug_glXCopyContext(Display* dpy,
+ GLXContext src,
+ GLXContext dst,
+ unsigned long mask) {
+ GL_SERVICE_LOG("glXCopyContext"
+ << "(" << static_cast<const void*>(dpy) << ", " << src << ", "
+ << dst << ", " << mask << ")");
+ g_driver_glx.debug_fn.glXCopyContextFn(dpy, src, dst, mask);
+}
+
+static void GL_BINDING_CALL Debug_glXCopySubBufferMESA(Display* dpy,
+ GLXDrawable drawable,
+ int x,
+ int y,
+ int width,
+ int height) {
+ GL_SERVICE_LOG("glXCopySubBufferMESA"
+ << "(" << static_cast<const void*>(dpy) << ", " << drawable
+ << ", " << x << ", " << y << ", " << width << ", " << height
+ << ")");
+ g_driver_glx.debug_fn.glXCopySubBufferMESAFn(dpy, drawable, x, y, width,
+ height);
+}
+
+static GLXContext GL_BINDING_CALL Debug_glXCreateContext(Display* dpy,
+ XVisualInfo* vis,
+ GLXContext shareList,
+ int direct) {
+ GL_SERVICE_LOG("glXCreateContext"
+ << "(" << static_cast<const void*>(dpy) << ", "
+ << static_cast<const void*>(vis) << ", " << shareList << ", "
+ << direct << ")");
+ GLXContext result =
+ g_driver_glx.debug_fn.glXCreateContextFn(dpy, vis, shareList, direct);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLXContext GL_BINDING_CALL
+Debug_glXCreateContextAttribsARB(Display* dpy,
+ GLXFBConfig config,
+ GLXContext share_context,
+ int direct,
+ const int* attrib_list) {
+ GL_SERVICE_LOG("glXCreateContextAttribsARB"
+ << "(" << static_cast<const void*>(dpy) << ", " << config
+ << ", " << share_context << ", " << direct << ", "
+ << static_cast<const void*>(attrib_list) << ")");
+ GLXContext result = g_driver_glx.debug_fn.glXCreateContextAttribsARBFn(
+ dpy, config, share_context, direct, attrib_list);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLXPixmap GL_BINDING_CALL
+Debug_glXCreateGLXPixmap(Display* dpy, XVisualInfo* visual, Pixmap pixmap) {
+ GL_SERVICE_LOG("glXCreateGLXPixmap"
+ << "(" << static_cast<const void*>(dpy) << ", "
+ << static_cast<const void*>(visual) << ", " << pixmap << ")");
+ GLXPixmap result =
+ g_driver_glx.debug_fn.glXCreateGLXPixmapFn(dpy, visual, pixmap);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLXContext GL_BINDING_CALL
+Debug_glXCreateNewContext(Display* dpy,
+ GLXFBConfig config,
+ int renderType,
+ GLXContext shareList,
+ int direct) {
+ GL_SERVICE_LOG("glXCreateNewContext"
+ << "(" << static_cast<const void*>(dpy) << ", " << config
+ << ", " << renderType << ", " << shareList << ", " << direct
+ << ")");
+ GLXContext result = g_driver_glx.debug_fn.glXCreateNewContextFn(
+ dpy, config, renderType, shareList, direct);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLXPbuffer GL_BINDING_CALL
+Debug_glXCreatePbuffer(Display* dpy,
+ GLXFBConfig config,
+ const int* attribList) {
+ GL_SERVICE_LOG("glXCreatePbuffer"
+ << "(" << static_cast<const void*>(dpy) << ", " << config
+ << ", " << static_cast<const void*>(attribList) << ")");
+ GLXPbuffer result =
+ g_driver_glx.debug_fn.glXCreatePbufferFn(dpy, config, attribList);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLXPixmap GL_BINDING_CALL Debug_glXCreatePixmap(Display* dpy,
+ GLXFBConfig config,
+ Pixmap pixmap,
+ const int* attribList) {
+ GL_SERVICE_LOG("glXCreatePixmap"
+ << "(" << static_cast<const void*>(dpy) << ", " << config
+ << ", " << pixmap << ", "
+ << static_cast<const void*>(attribList) << ")");
+ GLXPixmap result =
+ g_driver_glx.debug_fn.glXCreatePixmapFn(dpy, config, pixmap, attribList);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLXWindow GL_BINDING_CALL Debug_glXCreateWindow(Display* dpy,
+ GLXFBConfig config,
+ Window win,
+ const int* attribList) {
+ GL_SERVICE_LOG("glXCreateWindow"
+ << "(" << static_cast<const void*>(dpy) << ", " << config
+ << ", " << win << ", " << static_cast<const void*>(attribList)
+ << ")");
+ GLXWindow result =
+ g_driver_glx.debug_fn.glXCreateWindowFn(dpy, config, win, attribList);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL
+Debug_glXDestroyContext(Display* dpy, GLXContext ctx) {
+ GL_SERVICE_LOG("glXDestroyContext"
+ << "(" << static_cast<const void*>(dpy) << ", " << ctx << ")");
+ g_driver_glx.debug_fn.glXDestroyContextFn(dpy, ctx);
+}
+
+static void GL_BINDING_CALL
+Debug_glXDestroyGLXPixmap(Display* dpy, GLXPixmap pixmap) {
+ GL_SERVICE_LOG("glXDestroyGLXPixmap"
+ << "(" << static_cast<const void*>(dpy) << ", " << pixmap
+ << ")");
+ g_driver_glx.debug_fn.glXDestroyGLXPixmapFn(dpy, pixmap);
+}
+
+static void GL_BINDING_CALL
+Debug_glXDestroyPbuffer(Display* dpy, GLXPbuffer pbuf) {
+ GL_SERVICE_LOG("glXDestroyPbuffer"
+ << "(" << static_cast<const void*>(dpy) << ", " << pbuf
+ << ")");
+ g_driver_glx.debug_fn.glXDestroyPbufferFn(dpy, pbuf);
+}
+
+static void GL_BINDING_CALL
+Debug_glXDestroyPixmap(Display* dpy, GLXPixmap pixmap) {
+ GL_SERVICE_LOG("glXDestroyPixmap"
+ << "(" << static_cast<const void*>(dpy) << ", " << pixmap
+ << ")");
+ g_driver_glx.debug_fn.glXDestroyPixmapFn(dpy, pixmap);
+}
+
+static void GL_BINDING_CALL
+Debug_glXDestroyWindow(Display* dpy, GLXWindow window) {
+ GL_SERVICE_LOG("glXDestroyWindow"
+ << "(" << static_cast<const void*>(dpy) << ", " << window
+ << ")");
+ g_driver_glx.debug_fn.glXDestroyWindowFn(dpy, window);
+}
+
+static const char* GL_BINDING_CALL
+Debug_glXGetClientString(Display* dpy, int name) {
+ GL_SERVICE_LOG("glXGetClientString"
+ << "(" << static_cast<const void*>(dpy) << ", " << name
+ << ")");
+ const char* result = g_driver_glx.debug_fn.glXGetClientStringFn(dpy, name);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static int GL_BINDING_CALL
+Debug_glXGetConfig(Display* dpy, XVisualInfo* visual, int attrib, int* value) {
+ GL_SERVICE_LOG("glXGetConfig"
+ << "(" << static_cast<const void*>(dpy) << ", "
+ << static_cast<const void*>(visual) << ", " << attrib << ", "
+ << static_cast<const void*>(value) << ")");
+ int result = g_driver_glx.debug_fn.glXGetConfigFn(dpy, visual, attrib, value);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLXContext GL_BINDING_CALL Debug_glXGetCurrentContext(void) {
+ GL_SERVICE_LOG("glXGetCurrentContext"
+ << "("
+ << ")");
+ GLXContext result = g_driver_glx.debug_fn.glXGetCurrentContextFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static Display* GL_BINDING_CALL Debug_glXGetCurrentDisplay(void) {
+ GL_SERVICE_LOG("glXGetCurrentDisplay"
+ << "("
+ << ")");
+ Display* result = g_driver_glx.debug_fn.glXGetCurrentDisplayFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLXDrawable GL_BINDING_CALL Debug_glXGetCurrentDrawable(void) {
+ GL_SERVICE_LOG("glXGetCurrentDrawable"
+ << "("
+ << ")");
+ GLXDrawable result = g_driver_glx.debug_fn.glXGetCurrentDrawableFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLXDrawable GL_BINDING_CALL Debug_glXGetCurrentReadDrawable(void) {
+ GL_SERVICE_LOG("glXGetCurrentReadDrawable"
+ << "("
+ << ")");
+ GLXDrawable result = g_driver_glx.debug_fn.glXGetCurrentReadDrawableFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static int GL_BINDING_CALL Debug_glXGetFBConfigAttrib(Display* dpy,
+ GLXFBConfig config,
+ int attribute,
+ int* value) {
+ GL_SERVICE_LOG("glXGetFBConfigAttrib"
+ << "(" << static_cast<const void*>(dpy) << ", " << config
+ << ", " << attribute << ", " << static_cast<const void*>(value)
+ << ")");
+ int result = g_driver_glx.debug_fn.glXGetFBConfigAttribFn(dpy, config,
+ attribute, value);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLXFBConfig GL_BINDING_CALL
+Debug_glXGetFBConfigFromVisualSGIX(Display* dpy, XVisualInfo* visualInfo) {
+ GL_SERVICE_LOG("glXGetFBConfigFromVisualSGIX"
+ << "(" << static_cast<const void*>(dpy) << ", "
+ << static_cast<const void*>(visualInfo) << ")");
+ GLXFBConfig result =
+ g_driver_glx.debug_fn.glXGetFBConfigFromVisualSGIXFn(dpy, visualInfo);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLXFBConfig* GL_BINDING_CALL
+Debug_glXGetFBConfigs(Display* dpy, int screen, int* nelements) {
+ GL_SERVICE_LOG("glXGetFBConfigs"
+ << "(" << static_cast<const void*>(dpy) << ", " << screen
+ << ", " << static_cast<const void*>(nelements) << ")");
+ GLXFBConfig* result =
+ g_driver_glx.debug_fn.glXGetFBConfigsFn(dpy, screen, nelements);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static bool GL_BINDING_CALL Debug_glXGetMscRateOML(Display* dpy,
+ GLXDrawable drawable,
+ int32* numerator,
+ int32* denominator) {
+ GL_SERVICE_LOG("glXGetMscRateOML"
+ << "(" << static_cast<const void*>(dpy) << ", " << drawable
+ << ", " << static_cast<const void*>(numerator) << ", "
+ << static_cast<const void*>(denominator) << ")");
+ bool result = g_driver_glx.debug_fn.glXGetMscRateOMLFn(
+ dpy, drawable, numerator, denominator);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL Debug_glXGetSelectedEvent(Display* dpy,
+ GLXDrawable drawable,
+ unsigned long* mask) {
+ GL_SERVICE_LOG("glXGetSelectedEvent"
+ << "(" << static_cast<const void*>(dpy) << ", " << drawable
+ << ", " << static_cast<const void*>(mask) << ")");
+ g_driver_glx.debug_fn.glXGetSelectedEventFn(dpy, drawable, mask);
+}
+
+static bool GL_BINDING_CALL Debug_glXGetSyncValuesOML(Display* dpy,
+ GLXDrawable drawable,
+ int64* ust,
+ int64* msc,
+ int64* sbc) {
+ GL_SERVICE_LOG("glXGetSyncValuesOML"
+ << "(" << static_cast<const void*>(dpy) << ", " << drawable
+ << ", " << static_cast<const void*>(ust) << ", "
+ << static_cast<const void*>(msc) << ", "
+ << static_cast<const void*>(sbc) << ")");
+ bool result =
+ g_driver_glx.debug_fn.glXGetSyncValuesOMLFn(dpy, drawable, ust, msc, sbc);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static XVisualInfo* GL_BINDING_CALL
+Debug_glXGetVisualFromFBConfig(Display* dpy, GLXFBConfig config) {
+ GL_SERVICE_LOG("glXGetVisualFromFBConfig"
+ << "(" << static_cast<const void*>(dpy) << ", " << config
+ << ")");
+ XVisualInfo* result =
+ g_driver_glx.debug_fn.glXGetVisualFromFBConfigFn(dpy, config);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static int GL_BINDING_CALL Debug_glXIsDirect(Display* dpy, GLXContext ctx) {
+ GL_SERVICE_LOG("glXIsDirect"
+ << "(" << static_cast<const void*>(dpy) << ", " << ctx << ")");
+ int result = g_driver_glx.debug_fn.glXIsDirectFn(dpy, ctx);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static int GL_BINDING_CALL Debug_glXMakeContextCurrent(Display* dpy,
+ GLXDrawable draw,
+ GLXDrawable read,
+ GLXContext ctx) {
+ GL_SERVICE_LOG("glXMakeContextCurrent"
+ << "(" << static_cast<const void*>(dpy) << ", " << draw << ", "
+ << read << ", " << ctx << ")");
+ int result =
+ g_driver_glx.debug_fn.glXMakeContextCurrentFn(dpy, draw, read, ctx);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static int GL_BINDING_CALL
+Debug_glXMakeCurrent(Display* dpy, GLXDrawable drawable, GLXContext ctx) {
+ GL_SERVICE_LOG("glXMakeCurrent"
+ << "(" << static_cast<const void*>(dpy) << ", " << drawable
+ << ", " << ctx << ")");
+ int result = g_driver_glx.debug_fn.glXMakeCurrentFn(dpy, drawable, ctx);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static int GL_BINDING_CALL
+Debug_glXQueryContext(Display* dpy, GLXContext ctx, int attribute, int* value) {
+ GL_SERVICE_LOG("glXQueryContext"
+ << "(" << static_cast<const void*>(dpy) << ", " << ctx << ", "
+ << attribute << ", " << static_cast<const void*>(value)
+ << ")");
+ int result =
+ g_driver_glx.debug_fn.glXQueryContextFn(dpy, ctx, attribute, value);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL Debug_glXQueryDrawable(Display* dpy,
+ GLXDrawable draw,
+ int attribute,
+ unsigned int* value) {
+ GL_SERVICE_LOG("glXQueryDrawable"
+ << "(" << static_cast<const void*>(dpy) << ", " << draw << ", "
+ << attribute << ", " << static_cast<const void*>(value)
+ << ")");
+ g_driver_glx.debug_fn.glXQueryDrawableFn(dpy, draw, attribute, value);
+}
+
+static int GL_BINDING_CALL
+Debug_glXQueryExtension(Display* dpy, int* errorb, int* event) {
+ GL_SERVICE_LOG("glXQueryExtension"
+ << "(" << static_cast<const void*>(dpy) << ", "
+ << static_cast<const void*>(errorb) << ", "
+ << static_cast<const void*>(event) << ")");
+ int result = g_driver_glx.debug_fn.glXQueryExtensionFn(dpy, errorb, event);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static const char* GL_BINDING_CALL
+Debug_glXQueryExtensionsString(Display* dpy, int screen) {
+ GL_SERVICE_LOG("glXQueryExtensionsString"
+ << "(" << static_cast<const void*>(dpy) << ", " << screen
+ << ")");
+ const char* result =
+ g_driver_glx.debug_fn.glXQueryExtensionsStringFn(dpy, screen);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static const char* GL_BINDING_CALL
+Debug_glXQueryServerString(Display* dpy, int screen, int name) {
+ GL_SERVICE_LOG("glXQueryServerString"
+ << "(" << static_cast<const void*>(dpy) << ", " << screen
+ << ", " << name << ")");
+ const char* result =
+ g_driver_glx.debug_fn.glXQueryServerStringFn(dpy, screen, name);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static int GL_BINDING_CALL
+Debug_glXQueryVersion(Display* dpy, int* maj, int* min) {
+ GL_SERVICE_LOG("glXQueryVersion"
+ << "(" << static_cast<const void*>(dpy) << ", "
+ << static_cast<const void*>(maj) << ", "
+ << static_cast<const void*>(min) << ")");
+ int result = g_driver_glx.debug_fn.glXQueryVersionFn(dpy, maj, min);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL
+Debug_glXReleaseTexImageEXT(Display* dpy, GLXDrawable drawable, int buffer) {
+ GL_SERVICE_LOG("glXReleaseTexImageEXT"
+ << "(" << static_cast<const void*>(dpy) << ", " << drawable
+ << ", " << buffer << ")");
+ g_driver_glx.debug_fn.glXReleaseTexImageEXTFn(dpy, drawable, buffer);
+}
+
+static void GL_BINDING_CALL
+Debug_glXSelectEvent(Display* dpy, GLXDrawable drawable, unsigned long mask) {
+ GL_SERVICE_LOG("glXSelectEvent"
+ << "(" << static_cast<const void*>(dpy) << ", " << drawable
+ << ", " << mask << ")");
+ g_driver_glx.debug_fn.glXSelectEventFn(dpy, drawable, mask);
+}
+
+static void GL_BINDING_CALL
+Debug_glXSwapBuffers(Display* dpy, GLXDrawable drawable) {
+ GL_SERVICE_LOG("glXSwapBuffers"
+ << "(" << static_cast<const void*>(dpy) << ", " << drawable
+ << ")");
+ g_driver_glx.debug_fn.glXSwapBuffersFn(dpy, drawable);
+}
+
+static void GL_BINDING_CALL
+Debug_glXSwapIntervalEXT(Display* dpy, GLXDrawable drawable, int interval) {
+ GL_SERVICE_LOG("glXSwapIntervalEXT"
+ << "(" << static_cast<const void*>(dpy) << ", " << drawable
+ << ", " << interval << ")");
+ g_driver_glx.debug_fn.glXSwapIntervalEXTFn(dpy, drawable, interval);
+}
+
+static void GL_BINDING_CALL Debug_glXSwapIntervalMESA(unsigned int interval) {
+ GL_SERVICE_LOG("glXSwapIntervalMESA"
+ << "(" << interval << ")");
+ g_driver_glx.debug_fn.glXSwapIntervalMESAFn(interval);
+}
+
+static void GL_BINDING_CALL
+Debug_glXUseXFont(Font font, int first, int count, int list) {
+ GL_SERVICE_LOG("glXUseXFont"
+ << "(" << font << ", " << first << ", " << count << ", "
+ << list << ")");
+ g_driver_glx.debug_fn.glXUseXFontFn(font, first, count, list);
+}
+
+static void GL_BINDING_CALL Debug_glXWaitGL(void) {
+ GL_SERVICE_LOG("glXWaitGL"
+ << "("
+ << ")");
+ g_driver_glx.debug_fn.glXWaitGLFn();
+}
+
+static int GL_BINDING_CALL
+Debug_glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int* count) {
+ GL_SERVICE_LOG("glXWaitVideoSyncSGI"
+ << "(" << divisor << ", " << remainder << ", "
+ << static_cast<const void*>(count) << ")");
+ int result =
+ g_driver_glx.debug_fn.glXWaitVideoSyncSGIFn(divisor, remainder, count);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL Debug_glXWaitX(void) {
+ GL_SERVICE_LOG("glXWaitX"
+ << "("
+ << ")");
+ g_driver_glx.debug_fn.glXWaitXFn();
+}
+} // extern "C"
+
+void DriverGLX::InitializeDebugBindings() {
+ if (!debug_fn.glXBindTexImageEXTFn) {
+ debug_fn.glXBindTexImageEXTFn = fn.glXBindTexImageEXTFn;
+ fn.glXBindTexImageEXTFn = Debug_glXBindTexImageEXT;
+ }
+ if (!debug_fn.glXChooseFBConfigFn) {
+ debug_fn.glXChooseFBConfigFn = fn.glXChooseFBConfigFn;
+ fn.glXChooseFBConfigFn = Debug_glXChooseFBConfig;
+ }
+ if (!debug_fn.glXChooseVisualFn) {
+ debug_fn.glXChooseVisualFn = fn.glXChooseVisualFn;
+ fn.glXChooseVisualFn = Debug_glXChooseVisual;
+ }
+ if (!debug_fn.glXCopyContextFn) {
+ debug_fn.glXCopyContextFn = fn.glXCopyContextFn;
+ fn.glXCopyContextFn = Debug_glXCopyContext;
+ }
+ if (!debug_fn.glXCopySubBufferMESAFn) {
+ debug_fn.glXCopySubBufferMESAFn = fn.glXCopySubBufferMESAFn;
+ fn.glXCopySubBufferMESAFn = Debug_glXCopySubBufferMESA;
+ }
+ if (!debug_fn.glXCreateContextFn) {
+ debug_fn.glXCreateContextFn = fn.glXCreateContextFn;
+ fn.glXCreateContextFn = Debug_glXCreateContext;
+ }
+ if (!debug_fn.glXCreateContextAttribsARBFn) {
+ debug_fn.glXCreateContextAttribsARBFn = fn.glXCreateContextAttribsARBFn;
+ fn.glXCreateContextAttribsARBFn = Debug_glXCreateContextAttribsARB;
+ }
+ if (!debug_fn.glXCreateGLXPixmapFn) {
+ debug_fn.glXCreateGLXPixmapFn = fn.glXCreateGLXPixmapFn;
+ fn.glXCreateGLXPixmapFn = Debug_glXCreateGLXPixmap;
+ }
+ if (!debug_fn.glXCreateNewContextFn) {
+ debug_fn.glXCreateNewContextFn = fn.glXCreateNewContextFn;
+ fn.glXCreateNewContextFn = Debug_glXCreateNewContext;
+ }
+ if (!debug_fn.glXCreatePbufferFn) {
+ debug_fn.glXCreatePbufferFn = fn.glXCreatePbufferFn;
+ fn.glXCreatePbufferFn = Debug_glXCreatePbuffer;
+ }
+ if (!debug_fn.glXCreatePixmapFn) {
+ debug_fn.glXCreatePixmapFn = fn.glXCreatePixmapFn;
+ fn.glXCreatePixmapFn = Debug_glXCreatePixmap;
+ }
+ if (!debug_fn.glXCreateWindowFn) {
+ debug_fn.glXCreateWindowFn = fn.glXCreateWindowFn;
+ fn.glXCreateWindowFn = Debug_glXCreateWindow;
+ }
+ if (!debug_fn.glXDestroyContextFn) {
+ debug_fn.glXDestroyContextFn = fn.glXDestroyContextFn;
+ fn.glXDestroyContextFn = Debug_glXDestroyContext;
+ }
+ if (!debug_fn.glXDestroyGLXPixmapFn) {
+ debug_fn.glXDestroyGLXPixmapFn = fn.glXDestroyGLXPixmapFn;
+ fn.glXDestroyGLXPixmapFn = Debug_glXDestroyGLXPixmap;
+ }
+ if (!debug_fn.glXDestroyPbufferFn) {
+ debug_fn.glXDestroyPbufferFn = fn.glXDestroyPbufferFn;
+ fn.glXDestroyPbufferFn = Debug_glXDestroyPbuffer;
+ }
+ if (!debug_fn.glXDestroyPixmapFn) {
+ debug_fn.glXDestroyPixmapFn = fn.glXDestroyPixmapFn;
+ fn.glXDestroyPixmapFn = Debug_glXDestroyPixmap;
+ }
+ if (!debug_fn.glXDestroyWindowFn) {
+ debug_fn.glXDestroyWindowFn = fn.glXDestroyWindowFn;
+ fn.glXDestroyWindowFn = Debug_glXDestroyWindow;
+ }
+ if (!debug_fn.glXGetClientStringFn) {
+ debug_fn.glXGetClientStringFn = fn.glXGetClientStringFn;
+ fn.glXGetClientStringFn = Debug_glXGetClientString;
+ }
+ if (!debug_fn.glXGetConfigFn) {
+ debug_fn.glXGetConfigFn = fn.glXGetConfigFn;
+ fn.glXGetConfigFn = Debug_glXGetConfig;
+ }
+ if (!debug_fn.glXGetCurrentContextFn) {
+ debug_fn.glXGetCurrentContextFn = fn.glXGetCurrentContextFn;
+ fn.glXGetCurrentContextFn = Debug_glXGetCurrentContext;
+ }
+ if (!debug_fn.glXGetCurrentDisplayFn) {
+ debug_fn.glXGetCurrentDisplayFn = fn.glXGetCurrentDisplayFn;
+ fn.glXGetCurrentDisplayFn = Debug_glXGetCurrentDisplay;
+ }
+ if (!debug_fn.glXGetCurrentDrawableFn) {
+ debug_fn.glXGetCurrentDrawableFn = fn.glXGetCurrentDrawableFn;
+ fn.glXGetCurrentDrawableFn = Debug_glXGetCurrentDrawable;
+ }
+ if (!debug_fn.glXGetCurrentReadDrawableFn) {
+ debug_fn.glXGetCurrentReadDrawableFn = fn.glXGetCurrentReadDrawableFn;
+ fn.glXGetCurrentReadDrawableFn = Debug_glXGetCurrentReadDrawable;
+ }
+ if (!debug_fn.glXGetFBConfigAttribFn) {
+ debug_fn.glXGetFBConfigAttribFn = fn.glXGetFBConfigAttribFn;
+ fn.glXGetFBConfigAttribFn = Debug_glXGetFBConfigAttrib;
+ }
+ if (!debug_fn.glXGetFBConfigFromVisualSGIXFn) {
+ debug_fn.glXGetFBConfigFromVisualSGIXFn = fn.glXGetFBConfigFromVisualSGIXFn;
+ fn.glXGetFBConfigFromVisualSGIXFn = Debug_glXGetFBConfigFromVisualSGIX;
+ }
+ if (!debug_fn.glXGetFBConfigsFn) {
+ debug_fn.glXGetFBConfigsFn = fn.glXGetFBConfigsFn;
+ fn.glXGetFBConfigsFn = Debug_glXGetFBConfigs;
+ }
+ if (!debug_fn.glXGetMscRateOMLFn) {
+ debug_fn.glXGetMscRateOMLFn = fn.glXGetMscRateOMLFn;
+ fn.glXGetMscRateOMLFn = Debug_glXGetMscRateOML;
+ }
+ if (!debug_fn.glXGetSelectedEventFn) {
+ debug_fn.glXGetSelectedEventFn = fn.glXGetSelectedEventFn;
+ fn.glXGetSelectedEventFn = Debug_glXGetSelectedEvent;
+ }
+ if (!debug_fn.glXGetSyncValuesOMLFn) {
+ debug_fn.glXGetSyncValuesOMLFn = fn.glXGetSyncValuesOMLFn;
+ fn.glXGetSyncValuesOMLFn = Debug_glXGetSyncValuesOML;
+ }
+ if (!debug_fn.glXGetVisualFromFBConfigFn) {
+ debug_fn.glXGetVisualFromFBConfigFn = fn.glXGetVisualFromFBConfigFn;
+ fn.glXGetVisualFromFBConfigFn = Debug_glXGetVisualFromFBConfig;
+ }
+ if (!debug_fn.glXIsDirectFn) {
+ debug_fn.glXIsDirectFn = fn.glXIsDirectFn;
+ fn.glXIsDirectFn = Debug_glXIsDirect;
+ }
+ if (!debug_fn.glXMakeContextCurrentFn) {
+ debug_fn.glXMakeContextCurrentFn = fn.glXMakeContextCurrentFn;
+ fn.glXMakeContextCurrentFn = Debug_glXMakeContextCurrent;
+ }
+ if (!debug_fn.glXMakeCurrentFn) {
+ debug_fn.glXMakeCurrentFn = fn.glXMakeCurrentFn;
+ fn.glXMakeCurrentFn = Debug_glXMakeCurrent;
+ }
+ if (!debug_fn.glXQueryContextFn) {
+ debug_fn.glXQueryContextFn = fn.glXQueryContextFn;
+ fn.glXQueryContextFn = Debug_glXQueryContext;
+ }
+ if (!debug_fn.glXQueryDrawableFn) {
+ debug_fn.glXQueryDrawableFn = fn.glXQueryDrawableFn;
+ fn.glXQueryDrawableFn = Debug_glXQueryDrawable;
+ }
+ if (!debug_fn.glXQueryExtensionFn) {
+ debug_fn.glXQueryExtensionFn = fn.glXQueryExtensionFn;
+ fn.glXQueryExtensionFn = Debug_glXQueryExtension;
+ }
+ if (!debug_fn.glXQueryExtensionsStringFn) {
+ debug_fn.glXQueryExtensionsStringFn = fn.glXQueryExtensionsStringFn;
+ fn.glXQueryExtensionsStringFn = Debug_glXQueryExtensionsString;
+ }
+ if (!debug_fn.glXQueryServerStringFn) {
+ debug_fn.glXQueryServerStringFn = fn.glXQueryServerStringFn;
+ fn.glXQueryServerStringFn = Debug_glXQueryServerString;
+ }
+ if (!debug_fn.glXQueryVersionFn) {
+ debug_fn.glXQueryVersionFn = fn.glXQueryVersionFn;
+ fn.glXQueryVersionFn = Debug_glXQueryVersion;
+ }
+ if (!debug_fn.glXReleaseTexImageEXTFn) {
+ debug_fn.glXReleaseTexImageEXTFn = fn.glXReleaseTexImageEXTFn;
+ fn.glXReleaseTexImageEXTFn = Debug_glXReleaseTexImageEXT;
+ }
+ if (!debug_fn.glXSelectEventFn) {
+ debug_fn.glXSelectEventFn = fn.glXSelectEventFn;
+ fn.glXSelectEventFn = Debug_glXSelectEvent;
+ }
+ if (!debug_fn.glXSwapBuffersFn) {
+ debug_fn.glXSwapBuffersFn = fn.glXSwapBuffersFn;
+ fn.glXSwapBuffersFn = Debug_glXSwapBuffers;
+ }
+ if (!debug_fn.glXSwapIntervalEXTFn) {
+ debug_fn.glXSwapIntervalEXTFn = fn.glXSwapIntervalEXTFn;
+ fn.glXSwapIntervalEXTFn = Debug_glXSwapIntervalEXT;
+ }
+ if (!debug_fn.glXSwapIntervalMESAFn) {
+ debug_fn.glXSwapIntervalMESAFn = fn.glXSwapIntervalMESAFn;
+ fn.glXSwapIntervalMESAFn = Debug_glXSwapIntervalMESA;
+ }
+ if (!debug_fn.glXUseXFontFn) {
+ debug_fn.glXUseXFontFn = fn.glXUseXFontFn;
+ fn.glXUseXFontFn = Debug_glXUseXFont;
+ }
+ if (!debug_fn.glXWaitGLFn) {
+ debug_fn.glXWaitGLFn = fn.glXWaitGLFn;
+ fn.glXWaitGLFn = Debug_glXWaitGL;
+ }
+ if (!debug_fn.glXWaitVideoSyncSGIFn) {
+ debug_fn.glXWaitVideoSyncSGIFn = fn.glXWaitVideoSyncSGIFn;
+ fn.glXWaitVideoSyncSGIFn = Debug_glXWaitVideoSyncSGI;
+ }
+ if (!debug_fn.glXWaitXFn) {
+ debug_fn.glXWaitXFn = fn.glXWaitXFn;
+ fn.glXWaitXFn = Debug_glXWaitX;
+ }
+ g_debugBindingsInitialized = true;
+}
+
+void DriverGLX::ClearBindings() {
+ memset(this, 0, sizeof(*this));
+}
+
+void GLXApiBase::glXBindTexImageEXTFn(Display* dpy,
+ GLXDrawable drawable,
+ int buffer,
+ int* attribList) {
+ driver_->fn.glXBindTexImageEXTFn(dpy, drawable, buffer, attribList);
+}
+
+GLXFBConfig* GLXApiBase::glXChooseFBConfigFn(Display* dpy,
+ int screen,
+ const int* attribList,
+ int* nitems) {
+ return driver_->fn.glXChooseFBConfigFn(dpy, screen, attribList, nitems);
+}
+
+XVisualInfo* GLXApiBase::glXChooseVisualFn(Display* dpy,
+ int screen,
+ int* attribList) {
+ return driver_->fn.glXChooseVisualFn(dpy, screen, attribList);
+}
+
+void GLXApiBase::glXCopyContextFn(Display* dpy,
+ GLXContext src,
+ GLXContext dst,
+ unsigned long mask) {
+ driver_->fn.glXCopyContextFn(dpy, src, dst, mask);
+}
+
+void GLXApiBase::glXCopySubBufferMESAFn(Display* dpy,
+ GLXDrawable drawable,
+ int x,
+ int y,
+ int width,
+ int height) {
+ driver_->fn.glXCopySubBufferMESAFn(dpy, drawable, x, y, width, height);
+}
+
+GLXContext GLXApiBase::glXCreateContextFn(Display* dpy,
+ XVisualInfo* vis,
+ GLXContext shareList,
+ int direct) {
+ return driver_->fn.glXCreateContextFn(dpy, vis, shareList, direct);
+}
+
+GLXContext GLXApiBase::glXCreateContextAttribsARBFn(Display* dpy,
+ GLXFBConfig config,
+ GLXContext share_context,
+ int direct,
+ const int* attrib_list) {
+ return driver_->fn.glXCreateContextAttribsARBFn(dpy, config, share_context,
+ direct, attrib_list);
+}
+
+GLXPixmap GLXApiBase::glXCreateGLXPixmapFn(Display* dpy,
+ XVisualInfo* visual,
+ Pixmap pixmap) {
+ return driver_->fn.glXCreateGLXPixmapFn(dpy, visual, pixmap);
+}
+
+GLXContext GLXApiBase::glXCreateNewContextFn(Display* dpy,
+ GLXFBConfig config,
+ int renderType,
+ GLXContext shareList,
+ int direct) {
+ return driver_->fn.glXCreateNewContextFn(dpy, config, renderType, shareList,
+ direct);
+}
+
+GLXPbuffer GLXApiBase::glXCreatePbufferFn(Display* dpy,
+ GLXFBConfig config,
+ const int* attribList) {
+ return driver_->fn.glXCreatePbufferFn(dpy, config, attribList);
+}
+
+GLXPixmap GLXApiBase::glXCreatePixmapFn(Display* dpy,
+ GLXFBConfig config,
+ Pixmap pixmap,
+ const int* attribList) {
+ return driver_->fn.glXCreatePixmapFn(dpy, config, pixmap, attribList);
+}
+
+GLXWindow GLXApiBase::glXCreateWindowFn(Display* dpy,
+ GLXFBConfig config,
+ Window win,
+ const int* attribList) {
+ return driver_->fn.glXCreateWindowFn(dpy, config, win, attribList);
+}
+
+void GLXApiBase::glXDestroyContextFn(Display* dpy, GLXContext ctx) {
+ driver_->fn.glXDestroyContextFn(dpy, ctx);
+}
+
+void GLXApiBase::glXDestroyGLXPixmapFn(Display* dpy, GLXPixmap pixmap) {
+ driver_->fn.glXDestroyGLXPixmapFn(dpy, pixmap);
+}
+
+void GLXApiBase::glXDestroyPbufferFn(Display* dpy, GLXPbuffer pbuf) {
+ driver_->fn.glXDestroyPbufferFn(dpy, pbuf);
+}
+
+void GLXApiBase::glXDestroyPixmapFn(Display* dpy, GLXPixmap pixmap) {
+ driver_->fn.glXDestroyPixmapFn(dpy, pixmap);
+}
+
+void GLXApiBase::glXDestroyWindowFn(Display* dpy, GLXWindow window) {
+ driver_->fn.glXDestroyWindowFn(dpy, window);
+}
+
+const char* GLXApiBase::glXGetClientStringFn(Display* dpy, int name) {
+ return driver_->fn.glXGetClientStringFn(dpy, name);
+}
+
+int GLXApiBase::glXGetConfigFn(Display* dpy,
+ XVisualInfo* visual,
+ int attrib,
+ int* value) {
+ return driver_->fn.glXGetConfigFn(dpy, visual, attrib, value);
+}
+
+GLXContext GLXApiBase::glXGetCurrentContextFn(void) {
+ return driver_->fn.glXGetCurrentContextFn();
+}
+
+Display* GLXApiBase::glXGetCurrentDisplayFn(void) {
+ return driver_->fn.glXGetCurrentDisplayFn();
+}
+
+GLXDrawable GLXApiBase::glXGetCurrentDrawableFn(void) {
+ return driver_->fn.glXGetCurrentDrawableFn();
+}
+
+GLXDrawable GLXApiBase::glXGetCurrentReadDrawableFn(void) {
+ return driver_->fn.glXGetCurrentReadDrawableFn();
+}
+
+int GLXApiBase::glXGetFBConfigAttribFn(Display* dpy,
+ GLXFBConfig config,
+ int attribute,
+ int* value) {
+ return driver_->fn.glXGetFBConfigAttribFn(dpy, config, attribute, value);
+}
+
+GLXFBConfig GLXApiBase::glXGetFBConfigFromVisualSGIXFn(
+ Display* dpy,
+ XVisualInfo* visualInfo) {
+ return driver_->fn.glXGetFBConfigFromVisualSGIXFn(dpy, visualInfo);
+}
+
+GLXFBConfig* GLXApiBase::glXGetFBConfigsFn(Display* dpy,
+ int screen,
+ int* nelements) {
+ return driver_->fn.glXGetFBConfigsFn(dpy, screen, nelements);
+}
+
+bool GLXApiBase::glXGetMscRateOMLFn(Display* dpy,
+ GLXDrawable drawable,
+ int32* numerator,
+ int32* denominator) {
+ return driver_->fn.glXGetMscRateOMLFn(dpy, drawable, numerator, denominator);
+}
+
+void GLXApiBase::glXGetSelectedEventFn(Display* dpy,
+ GLXDrawable drawable,
+ unsigned long* mask) {
+ driver_->fn.glXGetSelectedEventFn(dpy, drawable, mask);
+}
+
+bool GLXApiBase::glXGetSyncValuesOMLFn(Display* dpy,
+ GLXDrawable drawable,
+ int64* ust,
+ int64* msc,
+ int64* sbc) {
+ return driver_->fn.glXGetSyncValuesOMLFn(dpy, drawable, ust, msc, sbc);
+}
+
+XVisualInfo* GLXApiBase::glXGetVisualFromFBConfigFn(Display* dpy,
+ GLXFBConfig config) {
+ return driver_->fn.glXGetVisualFromFBConfigFn(dpy, config);
+}
+
+int GLXApiBase::glXIsDirectFn(Display* dpy, GLXContext ctx) {
+ return driver_->fn.glXIsDirectFn(dpy, ctx);
+}
+
+int GLXApiBase::glXMakeContextCurrentFn(Display* dpy,
+ GLXDrawable draw,
+ GLXDrawable read,
+ GLXContext ctx) {
+ return driver_->fn.glXMakeContextCurrentFn(dpy, draw, read, ctx);
+}
+
+int GLXApiBase::glXMakeCurrentFn(Display* dpy,
+ GLXDrawable drawable,
+ GLXContext ctx) {
+ return driver_->fn.glXMakeCurrentFn(dpy, drawable, ctx);
+}
+
+int GLXApiBase::glXQueryContextFn(Display* dpy,
+ GLXContext ctx,
+ int attribute,
+ int* value) {
+ return driver_->fn.glXQueryContextFn(dpy, ctx, attribute, value);
+}
+
+void GLXApiBase::glXQueryDrawableFn(Display* dpy,
+ GLXDrawable draw,
+ int attribute,
+ unsigned int* value) {
+ driver_->fn.glXQueryDrawableFn(dpy, draw, attribute, value);
+}
+
+int GLXApiBase::glXQueryExtensionFn(Display* dpy, int* errorb, int* event) {
+ return driver_->fn.glXQueryExtensionFn(dpy, errorb, event);
+}
+
+const char* GLXApiBase::glXQueryExtensionsStringFn(Display* dpy, int screen) {
+ return driver_->fn.glXQueryExtensionsStringFn(dpy, screen);
+}
+
+const char* GLXApiBase::glXQueryServerStringFn(Display* dpy,
+ int screen,
+ int name) {
+ return driver_->fn.glXQueryServerStringFn(dpy, screen, name);
+}
+
+int GLXApiBase::glXQueryVersionFn(Display* dpy, int* maj, int* min) {
+ return driver_->fn.glXQueryVersionFn(dpy, maj, min);
+}
+
+void GLXApiBase::glXReleaseTexImageEXTFn(Display* dpy,
+ GLXDrawable drawable,
+ int buffer) {
+ driver_->fn.glXReleaseTexImageEXTFn(dpy, drawable, buffer);
+}
+
+void GLXApiBase::glXSelectEventFn(Display* dpy,
+ GLXDrawable drawable,
+ unsigned long mask) {
+ driver_->fn.glXSelectEventFn(dpy, drawable, mask);
+}
+
+void GLXApiBase::glXSwapBuffersFn(Display* dpy, GLXDrawable drawable) {
+ driver_->fn.glXSwapBuffersFn(dpy, drawable);
+}
+
+void GLXApiBase::glXSwapIntervalEXTFn(Display* dpy,
+ GLXDrawable drawable,
+ int interval) {
+ driver_->fn.glXSwapIntervalEXTFn(dpy, drawable, interval);
+}
+
+void GLXApiBase::glXSwapIntervalMESAFn(unsigned int interval) {
+ driver_->fn.glXSwapIntervalMESAFn(interval);
+}
+
+void GLXApiBase::glXUseXFontFn(Font font, int first, int count, int list) {
+ driver_->fn.glXUseXFontFn(font, first, count, list);
+}
+
+void GLXApiBase::glXWaitGLFn(void) {
+ driver_->fn.glXWaitGLFn();
+}
+
+int GLXApiBase::glXWaitVideoSyncSGIFn(int divisor,
+ int remainder,
+ unsigned int* count) {
+ return driver_->fn.glXWaitVideoSyncSGIFn(divisor, remainder, count);
+}
+
+void GLXApiBase::glXWaitXFn(void) {
+ driver_->fn.glXWaitXFn();
+}
+
+void TraceGLXApi::glXBindTexImageEXTFn(Display* dpy,
+ GLXDrawable drawable,
+ int buffer,
+ int* attribList) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXBindTexImageEXT")
+ glx_api_->glXBindTexImageEXTFn(dpy, drawable, buffer, attribList);
+}
+
+GLXFBConfig* TraceGLXApi::glXChooseFBConfigFn(Display* dpy,
+ int screen,
+ const int* attribList,
+ int* nitems) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXChooseFBConfig")
+ return glx_api_->glXChooseFBConfigFn(dpy, screen, attribList, nitems);
+}
+
+XVisualInfo* TraceGLXApi::glXChooseVisualFn(Display* dpy,
+ int screen,
+ int* attribList) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXChooseVisual")
+ return glx_api_->glXChooseVisualFn(dpy, screen, attribList);
+}
+
+void TraceGLXApi::glXCopyContextFn(Display* dpy,
+ GLXContext src,
+ GLXContext dst,
+ unsigned long mask) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCopyContext")
+ glx_api_->glXCopyContextFn(dpy, src, dst, mask);
+}
+
+void TraceGLXApi::glXCopySubBufferMESAFn(Display* dpy,
+ GLXDrawable drawable,
+ int x,
+ int y,
+ int width,
+ int height) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCopySubBufferMESA")
+ glx_api_->glXCopySubBufferMESAFn(dpy, drawable, x, y, width, height);
+}
+
+GLXContext TraceGLXApi::glXCreateContextFn(Display* dpy,
+ XVisualInfo* vis,
+ GLXContext shareList,
+ int direct) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCreateContext")
+ return glx_api_->glXCreateContextFn(dpy, vis, shareList, direct);
+}
+
+GLXContext TraceGLXApi::glXCreateContextAttribsARBFn(Display* dpy,
+ GLXFBConfig config,
+ GLXContext share_context,
+ int direct,
+ const int* attrib_list) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCreateContextAttribsARB")
+ return glx_api_->glXCreateContextAttribsARBFn(dpy, config, share_context,
+ direct, attrib_list);
+}
+
+GLXPixmap TraceGLXApi::glXCreateGLXPixmapFn(Display* dpy,
+ XVisualInfo* visual,
+ Pixmap pixmap) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCreateGLXPixmap")
+ return glx_api_->glXCreateGLXPixmapFn(dpy, visual, pixmap);
+}
+
+GLXContext TraceGLXApi::glXCreateNewContextFn(Display* dpy,
+ GLXFBConfig config,
+ int renderType,
+ GLXContext shareList,
+ int direct) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCreateNewContext")
+ return glx_api_->glXCreateNewContextFn(dpy, config, renderType, shareList,
+ direct);
+}
+
+GLXPbuffer TraceGLXApi::glXCreatePbufferFn(Display* dpy,
+ GLXFBConfig config,
+ const int* attribList) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCreatePbuffer")
+ return glx_api_->glXCreatePbufferFn(dpy, config, attribList);
+}
+
+GLXPixmap TraceGLXApi::glXCreatePixmapFn(Display* dpy,
+ GLXFBConfig config,
+ Pixmap pixmap,
+ const int* attribList) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCreatePixmap")
+ return glx_api_->glXCreatePixmapFn(dpy, config, pixmap, attribList);
+}
+
+GLXWindow TraceGLXApi::glXCreateWindowFn(Display* dpy,
+ GLXFBConfig config,
+ Window win,
+ const int* attribList) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCreateWindow")
+ return glx_api_->glXCreateWindowFn(dpy, config, win, attribList);
+}
+
+void TraceGLXApi::glXDestroyContextFn(Display* dpy, GLXContext ctx) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXDestroyContext")
+ glx_api_->glXDestroyContextFn(dpy, ctx);
+}
+
+void TraceGLXApi::glXDestroyGLXPixmapFn(Display* dpy, GLXPixmap pixmap) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXDestroyGLXPixmap")
+ glx_api_->glXDestroyGLXPixmapFn(dpy, pixmap);
+}
+
+void TraceGLXApi::glXDestroyPbufferFn(Display* dpy, GLXPbuffer pbuf) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXDestroyPbuffer")
+ glx_api_->glXDestroyPbufferFn(dpy, pbuf);
+}
+
+void TraceGLXApi::glXDestroyPixmapFn(Display* dpy, GLXPixmap pixmap) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXDestroyPixmap")
+ glx_api_->glXDestroyPixmapFn(dpy, pixmap);
+}
+
+void TraceGLXApi::glXDestroyWindowFn(Display* dpy, GLXWindow window) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXDestroyWindow")
+ glx_api_->glXDestroyWindowFn(dpy, window);
+}
+
+const char* TraceGLXApi::glXGetClientStringFn(Display* dpy, int name) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetClientString")
+ return glx_api_->glXGetClientStringFn(dpy, name);
+}
+
+int TraceGLXApi::glXGetConfigFn(Display* dpy,
+ XVisualInfo* visual,
+ int attrib,
+ int* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetConfig")
+ return glx_api_->glXGetConfigFn(dpy, visual, attrib, value);
+}
+
+GLXContext TraceGLXApi::glXGetCurrentContextFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetCurrentContext")
+ return glx_api_->glXGetCurrentContextFn();
+}
+
+Display* TraceGLXApi::glXGetCurrentDisplayFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetCurrentDisplay")
+ return glx_api_->glXGetCurrentDisplayFn();
+}
+
+GLXDrawable TraceGLXApi::glXGetCurrentDrawableFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetCurrentDrawable")
+ return glx_api_->glXGetCurrentDrawableFn();
+}
+
+GLXDrawable TraceGLXApi::glXGetCurrentReadDrawableFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetCurrentReadDrawable")
+ return glx_api_->glXGetCurrentReadDrawableFn();
+}
+
+int TraceGLXApi::glXGetFBConfigAttribFn(Display* dpy,
+ GLXFBConfig config,
+ int attribute,
+ int* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetFBConfigAttrib")
+ return glx_api_->glXGetFBConfigAttribFn(dpy, config, attribute, value);
+}
+
+GLXFBConfig TraceGLXApi::glXGetFBConfigFromVisualSGIXFn(
+ Display* dpy,
+ XVisualInfo* visualInfo) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu",
+ "TraceGLAPI::glXGetFBConfigFromVisualSGIX")
+ return glx_api_->glXGetFBConfigFromVisualSGIXFn(dpy, visualInfo);
+}
+
+GLXFBConfig* TraceGLXApi::glXGetFBConfigsFn(Display* dpy,
+ int screen,
+ int* nelements) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetFBConfigs")
+ return glx_api_->glXGetFBConfigsFn(dpy, screen, nelements);
+}
+
+bool TraceGLXApi::glXGetMscRateOMLFn(Display* dpy,
+ GLXDrawable drawable,
+ int32* numerator,
+ int32* denominator) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetMscRateOML")
+ return glx_api_->glXGetMscRateOMLFn(dpy, drawable, numerator, denominator);
+}
+
+void TraceGLXApi::glXGetSelectedEventFn(Display* dpy,
+ GLXDrawable drawable,
+ unsigned long* mask) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetSelectedEvent")
+ glx_api_->glXGetSelectedEventFn(dpy, drawable, mask);
+}
+
+bool TraceGLXApi::glXGetSyncValuesOMLFn(Display* dpy,
+ GLXDrawable drawable,
+ int64* ust,
+ int64* msc,
+ int64* sbc) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetSyncValuesOML")
+ return glx_api_->glXGetSyncValuesOMLFn(dpy, drawable, ust, msc, sbc);
+}
+
+XVisualInfo* TraceGLXApi::glXGetVisualFromFBConfigFn(Display* dpy,
+ GLXFBConfig config) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetVisualFromFBConfig")
+ return glx_api_->glXGetVisualFromFBConfigFn(dpy, config);
+}
+
+int TraceGLXApi::glXIsDirectFn(Display* dpy, GLXContext ctx) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXIsDirect")
+ return glx_api_->glXIsDirectFn(dpy, ctx);
+}
+
+int TraceGLXApi::glXMakeContextCurrentFn(Display* dpy,
+ GLXDrawable draw,
+ GLXDrawable read,
+ GLXContext ctx) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXMakeContextCurrent")
+ return glx_api_->glXMakeContextCurrentFn(dpy, draw, read, ctx);
+}
+
+int TraceGLXApi::glXMakeCurrentFn(Display* dpy,
+ GLXDrawable drawable,
+ GLXContext ctx) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXMakeCurrent")
+ return glx_api_->glXMakeCurrentFn(dpy, drawable, ctx);
+}
+
+int TraceGLXApi::glXQueryContextFn(Display* dpy,
+ GLXContext ctx,
+ int attribute,
+ int* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXQueryContext")
+ return glx_api_->glXQueryContextFn(dpy, ctx, attribute, value);
+}
+
+void TraceGLXApi::glXQueryDrawableFn(Display* dpy,
+ GLXDrawable draw,
+ int attribute,
+ unsigned int* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXQueryDrawable")
+ glx_api_->glXQueryDrawableFn(dpy, draw, attribute, value);
+}
+
+int TraceGLXApi::glXQueryExtensionFn(Display* dpy, int* errorb, int* event) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXQueryExtension")
+ return glx_api_->glXQueryExtensionFn(dpy, errorb, event);
+}
+
+const char* TraceGLXApi::glXQueryExtensionsStringFn(Display* dpy, int screen) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXQueryExtensionsString")
+ return glx_api_->glXQueryExtensionsStringFn(dpy, screen);
+}
+
+const char* TraceGLXApi::glXQueryServerStringFn(Display* dpy,
+ int screen,
+ int name) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXQueryServerString")
+ return glx_api_->glXQueryServerStringFn(dpy, screen, name);
+}
+
+int TraceGLXApi::glXQueryVersionFn(Display* dpy, int* maj, int* min) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXQueryVersion")
+ return glx_api_->glXQueryVersionFn(dpy, maj, min);
+}
+
+void TraceGLXApi::glXReleaseTexImageEXTFn(Display* dpy,
+ GLXDrawable drawable,
+ int buffer) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXReleaseTexImageEXT")
+ glx_api_->glXReleaseTexImageEXTFn(dpy, drawable, buffer);
+}
+
+void TraceGLXApi::glXSelectEventFn(Display* dpy,
+ GLXDrawable drawable,
+ unsigned long mask) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXSelectEvent")
+ glx_api_->glXSelectEventFn(dpy, drawable, mask);
+}
+
+void TraceGLXApi::glXSwapBuffersFn(Display* dpy, GLXDrawable drawable) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXSwapBuffers")
+ glx_api_->glXSwapBuffersFn(dpy, drawable);
+}
+
+void TraceGLXApi::glXSwapIntervalEXTFn(Display* dpy,
+ GLXDrawable drawable,
+ int interval) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXSwapIntervalEXT")
+ glx_api_->glXSwapIntervalEXTFn(dpy, drawable, interval);
+}
+
+void TraceGLXApi::glXSwapIntervalMESAFn(unsigned int interval) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXSwapIntervalMESA")
+ glx_api_->glXSwapIntervalMESAFn(interval);
+}
+
+void TraceGLXApi::glXUseXFontFn(Font font, int first, int count, int list) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXUseXFont")
+ glx_api_->glXUseXFontFn(font, first, count, list);
+}
+
+void TraceGLXApi::glXWaitGLFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXWaitGL")
+ glx_api_->glXWaitGLFn();
+}
+
+int TraceGLXApi::glXWaitVideoSyncSGIFn(int divisor,
+ int remainder,
+ unsigned int* count) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXWaitVideoSyncSGI")
+ return glx_api_->glXWaitVideoSyncSGIFn(divisor, remainder, count);
+}
+
+void TraceGLXApi::glXWaitXFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXWaitX")
+ glx_api_->glXWaitXFn();
+}
+
+} // namespace gfx
diff --git a/ui/gl/gl_bindings_autogen_glx.h b/ui/gl/gl_bindings_autogen_glx.h
new file mode 100644
index 0000000..41baf29
--- /dev/null
+++ b/ui/gl/gl_bindings_autogen_glx.h
@@ -0,0 +1,424 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+#ifndef UI_GFX_GL_GL_BINDINGS_AUTOGEN_GLX_H_
+#define UI_GFX_GL_GL_BINDINGS_AUTOGEN_GLX_H_
+
+namespace gfx {
+
+class GLContext;
+
+typedef void(GL_BINDING_CALL* glXBindTexImageEXTProc)(Display* dpy,
+ GLXDrawable drawable,
+ int buffer,
+ int* attribList);
+typedef GLXFBConfig*(GL_BINDING_CALL* glXChooseFBConfigProc)(
+ Display* dpy,
+ int screen,
+ const int* attribList,
+ int* nitems);
+typedef XVisualInfo*(GL_BINDING_CALL* glXChooseVisualProc)(Display* dpy,
+ int screen,
+ int* attribList);
+typedef void(GL_BINDING_CALL* glXCopyContextProc)(Display* dpy,
+ GLXContext src,
+ GLXContext dst,
+ unsigned long mask);
+typedef void(GL_BINDING_CALL* glXCopySubBufferMESAProc)(Display* dpy,
+ GLXDrawable drawable,
+ int x,
+ int y,
+ int width,
+ int height);
+typedef GLXContext(GL_BINDING_CALL* glXCreateContextProc)(Display* dpy,
+ XVisualInfo* vis,
+ GLXContext shareList,
+ int direct);
+typedef GLXContext(GL_BINDING_CALL* glXCreateContextAttribsARBProc)(
+ Display* dpy,
+ GLXFBConfig config,
+ GLXContext share_context,
+ int direct,
+ const int* attrib_list);
+typedef GLXPixmap(GL_BINDING_CALL* glXCreateGLXPixmapProc)(Display* dpy,
+ XVisualInfo* visual,
+ Pixmap pixmap);
+typedef GLXContext(GL_BINDING_CALL* glXCreateNewContextProc)(
+ Display* dpy,
+ GLXFBConfig config,
+ int renderType,
+ GLXContext shareList,
+ int direct);
+typedef GLXPbuffer(GL_BINDING_CALL* glXCreatePbufferProc)(
+ Display* dpy,
+ GLXFBConfig config,
+ const int* attribList);
+typedef GLXPixmap(GL_BINDING_CALL* glXCreatePixmapProc)(Display* dpy,
+ GLXFBConfig config,
+ Pixmap pixmap,
+ const int* attribList);
+typedef GLXWindow(GL_BINDING_CALL* glXCreateWindowProc)(Display* dpy,
+ GLXFBConfig config,
+ Window win,
+ const int* attribList);
+typedef void(GL_BINDING_CALL* glXDestroyContextProc)(Display* dpy,
+ GLXContext ctx);
+typedef void(GL_BINDING_CALL* glXDestroyGLXPixmapProc)(Display* dpy,
+ GLXPixmap pixmap);
+typedef void(GL_BINDING_CALL* glXDestroyPbufferProc)(Display* dpy,
+ GLXPbuffer pbuf);
+typedef void(GL_BINDING_CALL* glXDestroyPixmapProc)(Display* dpy,
+ GLXPixmap pixmap);
+typedef void(GL_BINDING_CALL* glXDestroyWindowProc)(Display* dpy,
+ GLXWindow window);
+typedef const char*(GL_BINDING_CALL* glXGetClientStringProc)(Display* dpy,
+ int name);
+typedef int(GL_BINDING_CALL* glXGetConfigProc)(Display* dpy,
+ XVisualInfo* visual,
+ int attrib,
+ int* value);
+typedef GLXContext(GL_BINDING_CALL* glXGetCurrentContextProc)(void);
+typedef Display*(GL_BINDING_CALL* glXGetCurrentDisplayProc)(void);
+typedef GLXDrawable(GL_BINDING_CALL* glXGetCurrentDrawableProc)(void);
+typedef GLXDrawable(GL_BINDING_CALL* glXGetCurrentReadDrawableProc)(void);
+typedef int(GL_BINDING_CALL* glXGetFBConfigAttribProc)(Display* dpy,
+ GLXFBConfig config,
+ int attribute,
+ int* value);
+typedef GLXFBConfig(GL_BINDING_CALL* glXGetFBConfigFromVisualSGIXProc)(
+ Display* dpy,
+ XVisualInfo* visualInfo);
+typedef GLXFBConfig*(GL_BINDING_CALL* glXGetFBConfigsProc)(Display* dpy,
+ int screen,
+ int* nelements);
+typedef bool(GL_BINDING_CALL* glXGetMscRateOMLProc)(Display* dpy,
+ GLXDrawable drawable,
+ int32* numerator,
+ int32* denominator);
+typedef void(GL_BINDING_CALL* glXGetSelectedEventProc)(Display* dpy,
+ GLXDrawable drawable,
+ unsigned long* mask);
+typedef bool(GL_BINDING_CALL* glXGetSyncValuesOMLProc)(Display* dpy,
+ GLXDrawable drawable,
+ int64* ust,
+ int64* msc,
+ int64* sbc);
+typedef XVisualInfo*(GL_BINDING_CALL* glXGetVisualFromFBConfigProc)(
+ Display* dpy,
+ GLXFBConfig config);
+typedef int(GL_BINDING_CALL* glXIsDirectProc)(Display* dpy, GLXContext ctx);
+typedef int(GL_BINDING_CALL* glXMakeContextCurrentProc)(Display* dpy,
+ GLXDrawable draw,
+ GLXDrawable read,
+ GLXContext ctx);
+typedef int(GL_BINDING_CALL* glXMakeCurrentProc)(Display* dpy,
+ GLXDrawable drawable,
+ GLXContext ctx);
+typedef int(GL_BINDING_CALL* glXQueryContextProc)(Display* dpy,
+ GLXContext ctx,
+ int attribute,
+ int* value);
+typedef void(GL_BINDING_CALL* glXQueryDrawableProc)(Display* dpy,
+ GLXDrawable draw,
+ int attribute,
+ unsigned int* value);
+typedef int(GL_BINDING_CALL* glXQueryExtensionProc)(Display* dpy,
+ int* errorb,
+ int* event);
+typedef const char*(GL_BINDING_CALL* glXQueryExtensionsStringProc)(Display* dpy,
+ int screen);
+typedef const char*(GL_BINDING_CALL* glXQueryServerStringProc)(Display* dpy,
+ int screen,
+ int name);
+typedef int(GL_BINDING_CALL* glXQueryVersionProc)(Display* dpy,
+ int* maj,
+ int* min);
+typedef void(GL_BINDING_CALL* glXReleaseTexImageEXTProc)(Display* dpy,
+ GLXDrawable drawable,
+ int buffer);
+typedef void(GL_BINDING_CALL* glXSelectEventProc)(Display* dpy,
+ GLXDrawable drawable,
+ unsigned long mask);
+typedef void(GL_BINDING_CALL* glXSwapBuffersProc)(Display* dpy,
+ GLXDrawable drawable);
+typedef void(GL_BINDING_CALL* glXSwapIntervalEXTProc)(Display* dpy,
+ GLXDrawable drawable,
+ int interval);
+typedef void(GL_BINDING_CALL* glXSwapIntervalMESAProc)(unsigned int interval);
+typedef void(GL_BINDING_CALL* glXUseXFontProc)(Font font,
+ int first,
+ int count,
+ int list);
+typedef void(GL_BINDING_CALL* glXWaitGLProc)(void);
+typedef int(GL_BINDING_CALL* glXWaitVideoSyncSGIProc)(int divisor,
+ int remainder,
+ unsigned int* count);
+typedef void(GL_BINDING_CALL* glXWaitXProc)(void);
+
+struct ExtensionsGLX {
+ bool b_GLX_ARB_create_context;
+ bool b_GLX_EXT_swap_control;
+ bool b_GLX_EXT_texture_from_pixmap;
+ bool b_GLX_MESA_copy_sub_buffer;
+ bool b_GLX_MESA_swap_control;
+ bool b_GLX_OML_sync_control;
+ bool b_GLX_SGIX_fbconfig;
+ bool b_GLX_SGI_video_sync;
+};
+
+struct ProcsGLX {
+ glXBindTexImageEXTProc glXBindTexImageEXTFn;
+ glXChooseFBConfigProc glXChooseFBConfigFn;
+ glXChooseVisualProc glXChooseVisualFn;
+ glXCopyContextProc glXCopyContextFn;
+ glXCopySubBufferMESAProc glXCopySubBufferMESAFn;
+ glXCreateContextProc glXCreateContextFn;
+ glXCreateContextAttribsARBProc glXCreateContextAttribsARBFn;
+ glXCreateGLXPixmapProc glXCreateGLXPixmapFn;
+ glXCreateNewContextProc glXCreateNewContextFn;
+ glXCreatePbufferProc glXCreatePbufferFn;
+ glXCreatePixmapProc glXCreatePixmapFn;
+ glXCreateWindowProc glXCreateWindowFn;
+ glXDestroyContextProc glXDestroyContextFn;
+ glXDestroyGLXPixmapProc glXDestroyGLXPixmapFn;
+ glXDestroyPbufferProc glXDestroyPbufferFn;
+ glXDestroyPixmapProc glXDestroyPixmapFn;
+ glXDestroyWindowProc glXDestroyWindowFn;
+ glXGetClientStringProc glXGetClientStringFn;
+ glXGetConfigProc glXGetConfigFn;
+ glXGetCurrentContextProc glXGetCurrentContextFn;
+ glXGetCurrentDisplayProc glXGetCurrentDisplayFn;
+ glXGetCurrentDrawableProc glXGetCurrentDrawableFn;
+ glXGetCurrentReadDrawableProc glXGetCurrentReadDrawableFn;
+ glXGetFBConfigAttribProc glXGetFBConfigAttribFn;
+ glXGetFBConfigFromVisualSGIXProc glXGetFBConfigFromVisualSGIXFn;
+ glXGetFBConfigsProc glXGetFBConfigsFn;
+ glXGetMscRateOMLProc glXGetMscRateOMLFn;
+ glXGetSelectedEventProc glXGetSelectedEventFn;
+ glXGetSyncValuesOMLProc glXGetSyncValuesOMLFn;
+ glXGetVisualFromFBConfigProc glXGetVisualFromFBConfigFn;
+ glXIsDirectProc glXIsDirectFn;
+ glXMakeContextCurrentProc glXMakeContextCurrentFn;
+ glXMakeCurrentProc glXMakeCurrentFn;
+ glXQueryContextProc glXQueryContextFn;
+ glXQueryDrawableProc glXQueryDrawableFn;
+ glXQueryExtensionProc glXQueryExtensionFn;
+ glXQueryExtensionsStringProc glXQueryExtensionsStringFn;
+ glXQueryServerStringProc glXQueryServerStringFn;
+ glXQueryVersionProc glXQueryVersionFn;
+ glXReleaseTexImageEXTProc glXReleaseTexImageEXTFn;
+ glXSelectEventProc glXSelectEventFn;
+ glXSwapBuffersProc glXSwapBuffersFn;
+ glXSwapIntervalEXTProc glXSwapIntervalEXTFn;
+ glXSwapIntervalMESAProc glXSwapIntervalMESAFn;
+ glXUseXFontProc glXUseXFontFn;
+ glXWaitGLProc glXWaitGLFn;
+ glXWaitVideoSyncSGIProc glXWaitVideoSyncSGIFn;
+ glXWaitXProc glXWaitXFn;
+};
+
+class GL_EXPORT GLXApi {
+ public:
+ GLXApi();
+ virtual ~GLXApi();
+
+ virtual void glXBindTexImageEXTFn(Display* dpy,
+ GLXDrawable drawable,
+ int buffer,
+ int* attribList) = 0;
+ virtual GLXFBConfig* glXChooseFBConfigFn(Display* dpy,
+ int screen,
+ const int* attribList,
+ int* nitems) = 0;
+ virtual XVisualInfo* glXChooseVisualFn(Display* dpy,
+ int screen,
+ int* attribList) = 0;
+ virtual void glXCopyContextFn(Display* dpy,
+ GLXContext src,
+ GLXContext dst,
+ unsigned long mask) = 0;
+ virtual void glXCopySubBufferMESAFn(Display* dpy,
+ GLXDrawable drawable,
+ int x,
+ int y,
+ int width,
+ int height) = 0;
+ virtual GLXContext glXCreateContextFn(Display* dpy,
+ XVisualInfo* vis,
+ GLXContext shareList,
+ int direct) = 0;
+ virtual GLXContext glXCreateContextAttribsARBFn(Display* dpy,
+ GLXFBConfig config,
+ GLXContext share_context,
+ int direct,
+ const int* attrib_list) = 0;
+ virtual GLXPixmap glXCreateGLXPixmapFn(Display* dpy,
+ XVisualInfo* visual,
+ Pixmap pixmap) = 0;
+ virtual GLXContext glXCreateNewContextFn(Display* dpy,
+ GLXFBConfig config,
+ int renderType,
+ GLXContext shareList,
+ int direct) = 0;
+ virtual GLXPbuffer glXCreatePbufferFn(Display* dpy,
+ GLXFBConfig config,
+ const int* attribList) = 0;
+ virtual GLXPixmap glXCreatePixmapFn(Display* dpy,
+ GLXFBConfig config,
+ Pixmap pixmap,
+ const int* attribList) = 0;
+ virtual GLXWindow glXCreateWindowFn(Display* dpy,
+ GLXFBConfig config,
+ Window win,
+ const int* attribList) = 0;
+ virtual void glXDestroyContextFn(Display* dpy, GLXContext ctx) = 0;
+ virtual void glXDestroyGLXPixmapFn(Display* dpy, GLXPixmap pixmap) = 0;
+ virtual void glXDestroyPbufferFn(Display* dpy, GLXPbuffer pbuf) = 0;
+ virtual void glXDestroyPixmapFn(Display* dpy, GLXPixmap pixmap) = 0;
+ virtual void glXDestroyWindowFn(Display* dpy, GLXWindow window) = 0;
+ virtual const char* glXGetClientStringFn(Display* dpy, int name) = 0;
+ virtual int glXGetConfigFn(Display* dpy,
+ XVisualInfo* visual,
+ int attrib,
+ int* value) = 0;
+ virtual GLXContext glXGetCurrentContextFn(void) = 0;
+ virtual Display* glXGetCurrentDisplayFn(void) = 0;
+ virtual GLXDrawable glXGetCurrentDrawableFn(void) = 0;
+ virtual GLXDrawable glXGetCurrentReadDrawableFn(void) = 0;
+ virtual int glXGetFBConfigAttribFn(Display* dpy,
+ GLXFBConfig config,
+ int attribute,
+ int* value) = 0;
+ virtual GLXFBConfig glXGetFBConfigFromVisualSGIXFn(
+ Display* dpy,
+ XVisualInfo* visualInfo) = 0;
+ virtual GLXFBConfig* glXGetFBConfigsFn(Display* dpy,
+ int screen,
+ int* nelements) = 0;
+ virtual bool glXGetMscRateOMLFn(Display* dpy,
+ GLXDrawable drawable,
+ int32* numerator,
+ int32* denominator) = 0;
+ virtual void glXGetSelectedEventFn(Display* dpy,
+ GLXDrawable drawable,
+ unsigned long* mask) = 0;
+ virtual bool glXGetSyncValuesOMLFn(Display* dpy,
+ GLXDrawable drawable,
+ int64* ust,
+ int64* msc,
+ int64* sbc) = 0;
+ virtual XVisualInfo* glXGetVisualFromFBConfigFn(Display* dpy,
+ GLXFBConfig config) = 0;
+ virtual int glXIsDirectFn(Display* dpy, GLXContext ctx) = 0;
+ virtual int glXMakeContextCurrentFn(Display* dpy,
+ GLXDrawable draw,
+ GLXDrawable read,
+ GLXContext ctx) = 0;
+ virtual int glXMakeCurrentFn(Display* dpy,
+ GLXDrawable drawable,
+ GLXContext ctx) = 0;
+ virtual int glXQueryContextFn(Display* dpy,
+ GLXContext ctx,
+ int attribute,
+ int* value) = 0;
+ virtual void glXQueryDrawableFn(Display* dpy,
+ GLXDrawable draw,
+ int attribute,
+ unsigned int* value) = 0;
+ virtual int glXQueryExtensionFn(Display* dpy, int* errorb, int* event) = 0;
+ virtual const char* glXQueryExtensionsStringFn(Display* dpy, int screen) = 0;
+ virtual const char* glXQueryServerStringFn(Display* dpy,
+ int screen,
+ int name) = 0;
+ virtual int glXQueryVersionFn(Display* dpy, int* maj, int* min) = 0;
+ virtual void glXReleaseTexImageEXTFn(Display* dpy,
+ GLXDrawable drawable,
+ int buffer) = 0;
+ virtual void glXSelectEventFn(Display* dpy,
+ GLXDrawable drawable,
+ unsigned long mask) = 0;
+ virtual void glXSwapBuffersFn(Display* dpy, GLXDrawable drawable) = 0;
+ virtual void glXSwapIntervalEXTFn(Display* dpy,
+ GLXDrawable drawable,
+ int interval) = 0;
+ virtual void glXSwapIntervalMESAFn(unsigned int interval) = 0;
+ virtual void glXUseXFontFn(Font font, int first, int count, int list) = 0;
+ virtual void glXWaitGLFn(void) = 0;
+ virtual int glXWaitVideoSyncSGIFn(int divisor,
+ int remainder,
+ unsigned int* count) = 0;
+ virtual void glXWaitXFn(void) = 0;
+};
+
+} // namespace gfx
+
+#define glXBindTexImageEXT ::gfx::g_current_glx_context->glXBindTexImageEXTFn
+#define glXChooseFBConfig ::gfx::g_current_glx_context->glXChooseFBConfigFn
+#define glXChooseVisual ::gfx::g_current_glx_context->glXChooseVisualFn
+#define glXCopyContext ::gfx::g_current_glx_context->glXCopyContextFn
+#define glXCopySubBufferMESA \
+ ::gfx::g_current_glx_context->glXCopySubBufferMESAFn
+#define glXCreateContext ::gfx::g_current_glx_context->glXCreateContextFn
+#define glXCreateContextAttribsARB \
+ ::gfx::g_current_glx_context->glXCreateContextAttribsARBFn
+#define glXCreateGLXPixmap ::gfx::g_current_glx_context->glXCreateGLXPixmapFn
+#define glXCreateNewContext ::gfx::g_current_glx_context->glXCreateNewContextFn
+#define glXCreatePbuffer ::gfx::g_current_glx_context->glXCreatePbufferFn
+#define glXCreatePixmap ::gfx::g_current_glx_context->glXCreatePixmapFn
+#define glXCreateWindow ::gfx::g_current_glx_context->glXCreateWindowFn
+#define glXDestroyContext ::gfx::g_current_glx_context->glXDestroyContextFn
+#define glXDestroyGLXPixmap ::gfx::g_current_glx_context->glXDestroyGLXPixmapFn
+#define glXDestroyPbuffer ::gfx::g_current_glx_context->glXDestroyPbufferFn
+#define glXDestroyPixmap ::gfx::g_current_glx_context->glXDestroyPixmapFn
+#define glXDestroyWindow ::gfx::g_current_glx_context->glXDestroyWindowFn
+#define glXGetClientString ::gfx::g_current_glx_context->glXGetClientStringFn
+#define glXGetConfig ::gfx::g_current_glx_context->glXGetConfigFn
+#define glXGetCurrentContext \
+ ::gfx::g_current_glx_context->glXGetCurrentContextFn
+#define glXGetCurrentDisplay \
+ ::gfx::g_current_glx_context->glXGetCurrentDisplayFn
+#define glXGetCurrentDrawable \
+ ::gfx::g_current_glx_context->glXGetCurrentDrawableFn
+#define glXGetCurrentReadDrawable \
+ ::gfx::g_current_glx_context->glXGetCurrentReadDrawableFn
+#define glXGetFBConfigAttrib \
+ ::gfx::g_current_glx_context->glXGetFBConfigAttribFn
+#define glXGetFBConfigFromVisualSGIX \
+ ::gfx::g_current_glx_context->glXGetFBConfigFromVisualSGIXFn
+#define glXGetFBConfigs ::gfx::g_current_glx_context->glXGetFBConfigsFn
+#define glXGetMscRateOML ::gfx::g_current_glx_context->glXGetMscRateOMLFn
+#define glXGetSelectedEvent ::gfx::g_current_glx_context->glXGetSelectedEventFn
+#define glXGetSyncValuesOML ::gfx::g_current_glx_context->glXGetSyncValuesOMLFn
+#define glXGetVisualFromFBConfig \
+ ::gfx::g_current_glx_context->glXGetVisualFromFBConfigFn
+#define glXIsDirect ::gfx::g_current_glx_context->glXIsDirectFn
+#define glXMakeContextCurrent \
+ ::gfx::g_current_glx_context->glXMakeContextCurrentFn
+#define glXMakeCurrent ::gfx::g_current_glx_context->glXMakeCurrentFn
+#define glXQueryContext ::gfx::g_current_glx_context->glXQueryContextFn
+#define glXQueryDrawable ::gfx::g_current_glx_context->glXQueryDrawableFn
+#define glXQueryExtension ::gfx::g_current_glx_context->glXQueryExtensionFn
+#define glXQueryExtensionsString \
+ ::gfx::g_current_glx_context->glXQueryExtensionsStringFn
+#define glXQueryServerString \
+ ::gfx::g_current_glx_context->glXQueryServerStringFn
+#define glXQueryVersion ::gfx::g_current_glx_context->glXQueryVersionFn
+#define glXReleaseTexImageEXT \
+ ::gfx::g_current_glx_context->glXReleaseTexImageEXTFn
+#define glXSelectEvent ::gfx::g_current_glx_context->glXSelectEventFn
+#define glXSwapBuffers ::gfx::g_current_glx_context->glXSwapBuffersFn
+#define glXSwapIntervalEXT ::gfx::g_current_glx_context->glXSwapIntervalEXTFn
+#define glXSwapIntervalMESA ::gfx::g_current_glx_context->glXSwapIntervalMESAFn
+#define glXUseXFont ::gfx::g_current_glx_context->glXUseXFontFn
+#define glXWaitGL ::gfx::g_current_glx_context->glXWaitGLFn
+#define glXWaitVideoSyncSGI ::gfx::g_current_glx_context->glXWaitVideoSyncSGIFn
+#define glXWaitX ::gfx::g_current_glx_context->glXWaitXFn
+
+#endif // UI_GFX_GL_GL_BINDINGS_AUTOGEN_GLX_H_
diff --git a/ui/gl/gl_bindings_autogen_mock.cc b/ui/gl/gl_bindings_autogen_mock.cc
new file mode 100644
index 0000000..f424696
--- /dev/null
+++ b/ui/gl/gl_bindings_autogen_mock.cc
@@ -0,0 +1,3225 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+#include <string.h>
+
+#include "ui/gl/gl_mock.h"
+
+namespace gfx {
+
+// This is called mainly to prevent the compiler combining the code of mock
+// functions with identical contents, so that their function pointers will be
+// different.
+void MakeFunctionUnique(const char* func_name) {
+ VLOG(2) << "Calling mock " << func_name;
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glActiveTexture(GLenum texture) {
+ MakeFunctionUnique("glActiveTexture");
+ interface_->ActiveTexture(texture);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glAttachShader(GLuint program, GLuint shader) {
+ MakeFunctionUnique("glAttachShader");
+ interface_->AttachShader(program, shader);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBeginQuery(GLenum target, GLuint id) {
+ MakeFunctionUnique("glBeginQuery");
+ interface_->BeginQuery(target, id);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBeginQueryARB(GLenum target, GLuint id) {
+ MakeFunctionUnique("glBeginQueryARB");
+ interface_->BeginQueryARB(target, id);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBeginQueryEXT(GLenum target, GLuint id) {
+ MakeFunctionUnique("glBeginQueryEXT");
+ interface_->BeginQueryARB(target, id);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBeginTransformFeedback(GLenum primitiveMode) {
+ MakeFunctionUnique("glBeginTransformFeedback");
+ interface_->BeginTransformFeedback(primitiveMode);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBindAttribLocation(GLuint program,
+ GLuint index,
+ const char* name) {
+ MakeFunctionUnique("glBindAttribLocation");
+ interface_->BindAttribLocation(program, index, name);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBindBuffer(GLenum target, GLuint buffer) {
+ MakeFunctionUnique("glBindBuffer");
+ interface_->BindBuffer(target, buffer);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glBindBufferBase(GLenum target,
+ GLuint index,
+ GLuint buffer) {
+ MakeFunctionUnique("glBindBufferBase");
+ interface_->BindBufferBase(target, index, buffer);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glBindBufferRange(GLenum target,
+ GLuint index,
+ GLuint buffer,
+ GLintptr offset,
+ GLsizeiptr size) {
+ MakeFunctionUnique("glBindBufferRange");
+ interface_->BindBufferRange(target, index, buffer, offset, size);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBindFragDataLocation(GLuint program,
+ GLuint colorNumber,
+ const char* name) {
+ MakeFunctionUnique("glBindFragDataLocation");
+ interface_->BindFragDataLocation(program, colorNumber, name);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBindFragDataLocationIndexed(GLuint program,
+ GLuint colorNumber,
+ GLuint index,
+ const char* name) {
+ MakeFunctionUnique("glBindFragDataLocationIndexed");
+ interface_->BindFragDataLocationIndexed(program, colorNumber, index, name);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBindFramebuffer(GLenum target, GLuint framebuffer) {
+ MakeFunctionUnique("glBindFramebuffer");
+ interface_->BindFramebufferEXT(target, framebuffer);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBindFramebufferEXT(GLenum target, GLuint framebuffer) {
+ MakeFunctionUnique("glBindFramebufferEXT");
+ interface_->BindFramebufferEXT(target, framebuffer);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBindRenderbuffer(GLenum target, GLuint renderbuffer) {
+ MakeFunctionUnique("glBindRenderbuffer");
+ interface_->BindRenderbufferEXT(target, renderbuffer);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBindRenderbufferEXT(GLenum target,
+ GLuint renderbuffer) {
+ MakeFunctionUnique("glBindRenderbufferEXT");
+ interface_->BindRenderbufferEXT(target, renderbuffer);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBindSampler(GLuint unit, GLuint sampler) {
+ MakeFunctionUnique("glBindSampler");
+ interface_->BindSampler(unit, sampler);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBindTexture(GLenum target, GLuint texture) {
+ MakeFunctionUnique("glBindTexture");
+ interface_->BindTexture(target, texture);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBindTransformFeedback(GLenum target, GLuint id) {
+ MakeFunctionUnique("glBindTransformFeedback");
+ interface_->BindTransformFeedback(target, id);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glBindVertexArray(GLuint array) {
+ MakeFunctionUnique("glBindVertexArray");
+ interface_->BindVertexArrayOES(array);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBindVertexArrayAPPLE(GLuint array) {
+ MakeFunctionUnique("glBindVertexArrayAPPLE");
+ interface_->BindVertexArrayOES(array);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glBindVertexArrayOES(GLuint array) {
+ MakeFunctionUnique("glBindVertexArrayOES");
+ interface_->BindVertexArrayOES(array);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glBlendBarrierKHR(void) {
+ MakeFunctionUnique("glBlendBarrierKHR");
+ interface_->BlendBarrierKHR();
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glBlendBarrierNV(void) {
+ MakeFunctionUnique("glBlendBarrierNV");
+ interface_->BlendBarrierKHR();
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glBlendColor(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) {
+ MakeFunctionUnique("glBlendColor");
+ interface_->BlendColor(red, green, blue, alpha);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glBlendEquation(GLenum mode) {
+ MakeFunctionUnique("glBlendEquation");
+ interface_->BlendEquation(mode);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBlendEquationSeparate(GLenum modeRGB,
+ GLenum modeAlpha) {
+ MakeFunctionUnique("glBlendEquationSeparate");
+ interface_->BlendEquationSeparate(modeRGB, modeAlpha);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBlendFunc(GLenum sfactor, GLenum dfactor) {
+ MakeFunctionUnique("glBlendFunc");
+ interface_->BlendFunc(sfactor, dfactor);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBlendFuncSeparate(GLenum srcRGB,
+ GLenum dstRGB,
+ GLenum srcAlpha,
+ GLenum dstAlpha) {
+ MakeFunctionUnique("glBlendFuncSeparate");
+ interface_->BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glBlitFramebuffer(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ MakeFunctionUnique("glBlitFramebuffer");
+ interface_->BlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0,
+ dstX1, dstY1, mask, filter);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glBlitFramebufferANGLE(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ MakeFunctionUnique("glBlitFramebufferANGLE");
+ interface_->BlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0,
+ dstX1, dstY1, mask, filter);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glBlitFramebufferEXT(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter) {
+ MakeFunctionUnique("glBlitFramebufferEXT");
+ interface_->BlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0,
+ dstX1, dstY1, mask, filter);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glBufferData(GLenum target,
+ GLsizeiptr size,
+ const void* data,
+ GLenum usage) {
+ MakeFunctionUnique("glBufferData");
+ interface_->BufferData(target, size, data, usage);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glBufferSubData(GLenum target,
+ GLintptr offset,
+ GLsizeiptr size,
+ const void* data) {
+ MakeFunctionUnique("glBufferSubData");
+ interface_->BufferSubData(target, offset, size, data);
+}
+
+GLenum GL_BINDING_CALL
+MockGLInterface::Mock_glCheckFramebufferStatus(GLenum target) {
+ MakeFunctionUnique("glCheckFramebufferStatus");
+ return interface_->CheckFramebufferStatusEXT(target);
+}
+
+GLenum GL_BINDING_CALL
+MockGLInterface::Mock_glCheckFramebufferStatusEXT(GLenum target) {
+ MakeFunctionUnique("glCheckFramebufferStatusEXT");
+ return interface_->CheckFramebufferStatusEXT(target);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glClear(GLbitfield mask) {
+ MakeFunctionUnique("glClear");
+ interface_->Clear(mask);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glClearBufferfi(GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat depth,
+ GLint stencil) {
+ MakeFunctionUnique("glClearBufferfi");
+ interface_->ClearBufferfi(buffer, drawbuffer, depth, stencil);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glClearBufferfv(GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat* value) {
+ MakeFunctionUnique("glClearBufferfv");
+ interface_->ClearBufferfv(buffer, drawbuffer, value);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glClearBufferiv(GLenum buffer,
+ GLint drawbuffer,
+ const GLint* value) {
+ MakeFunctionUnique("glClearBufferiv");
+ interface_->ClearBufferiv(buffer, drawbuffer, value);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glClearBufferuiv(GLenum buffer,
+ GLint drawbuffer,
+ const GLuint* value) {
+ MakeFunctionUnique("glClearBufferuiv");
+ interface_->ClearBufferuiv(buffer, drawbuffer, value);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glClearColor(GLclampf red,
+ GLclampf green,
+ GLclampf blue,
+ GLclampf alpha) {
+ MakeFunctionUnique("glClearColor");
+ interface_->ClearColor(red, green, blue, alpha);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glClearDepth(GLclampd depth) {
+ MakeFunctionUnique("glClearDepth");
+ interface_->ClearDepth(depth);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glClearDepthf(GLclampf depth) {
+ MakeFunctionUnique("glClearDepthf");
+ interface_->ClearDepthf(depth);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glClearStencil(GLint s) {
+ MakeFunctionUnique("glClearStencil");
+ interface_->ClearStencil(s);
+}
+
+GLenum GL_BINDING_CALL
+MockGLInterface::Mock_glClientWaitSync(GLsync sync,
+ GLbitfield flags,
+ GLuint64 timeout) {
+ MakeFunctionUnique("glClientWaitSync");
+ return interface_->ClientWaitSync(sync, flags, timeout);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glColorMask(GLboolean red,
+ GLboolean green,
+ GLboolean blue,
+ GLboolean alpha) {
+ MakeFunctionUnique("glColorMask");
+ interface_->ColorMask(red, green, blue, alpha);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glCompileShader(GLuint shader) {
+ MakeFunctionUnique("glCompileShader");
+ interface_->CompileShader(shader);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glCompressedTexImage2D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) {
+ MakeFunctionUnique("glCompressedTexImage2D");
+ interface_->CompressedTexImage2D(target, level, internalformat, width, height,
+ border, imageSize, data);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glCompressedTexImage3D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLsizei imageSize,
+ const void* data) {
+ MakeFunctionUnique("glCompressedTexImage3D");
+ interface_->CompressedTexImage3D(target, level, internalformat, width, height,
+ depth, border, imageSize, data);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glCompressedTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLsizei imageSize,
+ const void* data) {
+ MakeFunctionUnique("glCompressedTexSubImage2D");
+ interface_->CompressedTexSubImage2D(target, level, xoffset, yoffset, width,
+ height, format, imageSize, data);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glCopyBufferSubData(GLenum readTarget,
+ GLenum writeTarget,
+ GLintptr readOffset,
+ GLintptr writeOffset,
+ GLsizeiptr size) {
+ MakeFunctionUnique("glCopyBufferSubData");
+ interface_->CopyBufferSubData(readTarget, writeTarget, readOffset,
+ writeOffset, size);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glCopyTexImage2D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLint border) {
+ MakeFunctionUnique("glCopyTexImage2D");
+ interface_->CopyTexImage2D(target, level, internalformat, x, y, width, height,
+ border);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glCopyTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) {
+ MakeFunctionUnique("glCopyTexSubImage2D");
+ interface_->CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width,
+ height);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glCopyTexSubImage3D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint zoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) {
+ MakeFunctionUnique("glCopyTexSubImage3D");
+ interface_->CopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y,
+ width, height);
+}
+
+GLuint GL_BINDING_CALL MockGLInterface::Mock_glCreateProgram(void) {
+ MakeFunctionUnique("glCreateProgram");
+ return interface_->CreateProgram();
+}
+
+GLuint GL_BINDING_CALL MockGLInterface::Mock_glCreateShader(GLenum type) {
+ MakeFunctionUnique("glCreateShader");
+ return interface_->CreateShader(type);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glCullFace(GLenum mode) {
+ MakeFunctionUnique("glCullFace");
+ interface_->CullFace(mode);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteBuffers(GLsizei n, const GLuint* buffers) {
+ MakeFunctionUnique("glDeleteBuffers");
+ interface_->DeleteBuffersARB(n, buffers);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteBuffersARB(GLsizei n, const GLuint* buffers) {
+ MakeFunctionUnique("glDeleteBuffersARB");
+ interface_->DeleteBuffersARB(n, buffers);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteFencesAPPLE(GLsizei n, const GLuint* fences) {
+ MakeFunctionUnique("glDeleteFencesAPPLE");
+ interface_->DeleteFencesAPPLE(n, fences);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteFencesNV(GLsizei n, const GLuint* fences) {
+ MakeFunctionUnique("glDeleteFencesNV");
+ interface_->DeleteFencesNV(n, fences);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteFramebuffers(GLsizei n,
+ const GLuint* framebuffers) {
+ MakeFunctionUnique("glDeleteFramebuffers");
+ interface_->DeleteFramebuffersEXT(n, framebuffers);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteFramebuffersEXT(GLsizei n,
+ const GLuint* framebuffers) {
+ MakeFunctionUnique("glDeleteFramebuffersEXT");
+ interface_->DeleteFramebuffersEXT(n, framebuffers);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glDeleteProgram(GLuint program) {
+ MakeFunctionUnique("glDeleteProgram");
+ interface_->DeleteProgram(program);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteQueries(GLsizei n, const GLuint* ids) {
+ MakeFunctionUnique("glDeleteQueries");
+ interface_->DeleteQueries(n, ids);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteQueriesARB(GLsizei n, const GLuint* ids) {
+ MakeFunctionUnique("glDeleteQueriesARB");
+ interface_->DeleteQueriesARB(n, ids);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteQueriesEXT(GLsizei n, const GLuint* ids) {
+ MakeFunctionUnique("glDeleteQueriesEXT");
+ interface_->DeleteQueriesARB(n, ids);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteRenderbuffers(GLsizei n,
+ const GLuint* renderbuffers) {
+ MakeFunctionUnique("glDeleteRenderbuffers");
+ interface_->DeleteRenderbuffersEXT(n, renderbuffers);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteRenderbuffersEXT(GLsizei n,
+ const GLuint* renderbuffers) {
+ MakeFunctionUnique("glDeleteRenderbuffersEXT");
+ interface_->DeleteRenderbuffersEXT(n, renderbuffers);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteSamplers(GLsizei n, const GLuint* samplers) {
+ MakeFunctionUnique("glDeleteSamplers");
+ interface_->DeleteSamplers(n, samplers);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glDeleteShader(GLuint shader) {
+ MakeFunctionUnique("glDeleteShader");
+ interface_->DeleteShader(shader);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glDeleteSync(GLsync sync) {
+ MakeFunctionUnique("glDeleteSync");
+ interface_->DeleteSync(sync);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteTextures(GLsizei n, const GLuint* textures) {
+ MakeFunctionUnique("glDeleteTextures");
+ interface_->DeleteTextures(n, textures);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids) {
+ MakeFunctionUnique("glDeleteTransformFeedbacks");
+ interface_->DeleteTransformFeedbacks(n, ids);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteVertexArrays(GLsizei n, const GLuint* arrays) {
+ MakeFunctionUnique("glDeleteVertexArrays");
+ interface_->DeleteVertexArraysOES(n, arrays);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteVertexArraysAPPLE(GLsizei n,
+ const GLuint* arrays) {
+ MakeFunctionUnique("glDeleteVertexArraysAPPLE");
+ interface_->DeleteVertexArraysOES(n, arrays);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays) {
+ MakeFunctionUnique("glDeleteVertexArraysOES");
+ interface_->DeleteVertexArraysOES(n, arrays);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glDepthFunc(GLenum func) {
+ MakeFunctionUnique("glDepthFunc");
+ interface_->DepthFunc(func);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glDepthMask(GLboolean flag) {
+ MakeFunctionUnique("glDepthMask");
+ interface_->DepthMask(flag);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDepthRange(GLclampd zNear, GLclampd zFar) {
+ MakeFunctionUnique("glDepthRange");
+ interface_->DepthRange(zNear, zFar);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDepthRangef(GLclampf zNear, GLclampf zFar) {
+ MakeFunctionUnique("glDepthRangef");
+ interface_->DepthRangef(zNear, zFar);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDetachShader(GLuint program, GLuint shader) {
+ MakeFunctionUnique("glDetachShader");
+ interface_->DetachShader(program, shader);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glDisable(GLenum cap) {
+ MakeFunctionUnique("glDisable");
+ interface_->Disable(cap);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDisableVertexAttribArray(GLuint index) {
+ MakeFunctionUnique("glDisableVertexAttribArray");
+ interface_->DisableVertexAttribArray(index);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDiscardFramebufferEXT(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments) {
+ MakeFunctionUnique("glDiscardFramebufferEXT");
+ interface_->DiscardFramebufferEXT(target, numAttachments, attachments);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDrawArrays(GLenum mode, GLint first, GLsizei count) {
+ MakeFunctionUnique("glDrawArrays");
+ interface_->DrawArrays(mode, first, count);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDrawArraysInstanced(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount) {
+ MakeFunctionUnique("glDrawArraysInstanced");
+ interface_->DrawArraysInstancedANGLE(mode, first, count, primcount);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDrawArraysInstancedANGLE(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount) {
+ MakeFunctionUnique("glDrawArraysInstancedANGLE");
+ interface_->DrawArraysInstancedANGLE(mode, first, count, primcount);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDrawArraysInstancedARB(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount) {
+ MakeFunctionUnique("glDrawArraysInstancedARB");
+ interface_->DrawArraysInstancedANGLE(mode, first, count, primcount);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glDrawBuffer(GLenum mode) {
+ MakeFunctionUnique("glDrawBuffer");
+ interface_->DrawBuffer(mode);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDrawBuffers(GLsizei n, const GLenum* bufs) {
+ MakeFunctionUnique("glDrawBuffers");
+ interface_->DrawBuffersARB(n, bufs);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDrawBuffersARB(GLsizei n, const GLenum* bufs) {
+ MakeFunctionUnique("glDrawBuffersARB");
+ interface_->DrawBuffersARB(n, bufs);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDrawBuffersEXT(GLsizei n, const GLenum* bufs) {
+ MakeFunctionUnique("glDrawBuffersEXT");
+ interface_->DrawBuffersARB(n, bufs);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glDrawElements(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices) {
+ MakeFunctionUnique("glDrawElements");
+ interface_->DrawElements(mode, count, type, indices);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDrawElementsInstanced(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount) {
+ MakeFunctionUnique("glDrawElementsInstanced");
+ interface_->DrawElementsInstancedANGLE(mode, count, type, indices, primcount);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDrawElementsInstancedANGLE(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount) {
+ MakeFunctionUnique("glDrawElementsInstancedANGLE");
+ interface_->DrawElementsInstancedANGLE(mode, count, type, indices, primcount);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDrawElementsInstancedARB(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount) {
+ MakeFunctionUnique("glDrawElementsInstancedARB");
+ interface_->DrawElementsInstancedANGLE(mode, count, type, indices, primcount);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glDrawRangeElements(GLenum mode,
+ GLuint start,
+ GLuint end,
+ GLsizei count,
+ GLenum type,
+ const void* indices) {
+ MakeFunctionUnique("glDrawRangeElements");
+ interface_->DrawRangeElements(mode, start, end, count, type, indices);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glEGLImageTargetRenderbufferStorageOES(
+ GLenum target,
+ GLeglImageOES image) {
+ MakeFunctionUnique("glEGLImageTargetRenderbufferStorageOES");
+ interface_->EGLImageTargetRenderbufferStorageOES(target, image);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glEGLImageTargetTexture2DOES(GLenum target,
+ GLeglImageOES image) {
+ MakeFunctionUnique("glEGLImageTargetTexture2DOES");
+ interface_->EGLImageTargetTexture2DOES(target, image);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glEnable(GLenum cap) {
+ MakeFunctionUnique("glEnable");
+ interface_->Enable(cap);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glEnableVertexAttribArray(GLuint index) {
+ MakeFunctionUnique("glEnableVertexAttribArray");
+ interface_->EnableVertexAttribArray(index);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glEndQuery(GLenum target) {
+ MakeFunctionUnique("glEndQuery");
+ interface_->EndQuery(target);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glEndQueryARB(GLenum target) {
+ MakeFunctionUnique("glEndQueryARB");
+ interface_->EndQueryARB(target);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glEndQueryEXT(GLenum target) {
+ MakeFunctionUnique("glEndQueryEXT");
+ interface_->EndQueryARB(target);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glEndTransformFeedback(void) {
+ MakeFunctionUnique("glEndTransformFeedback");
+ interface_->EndTransformFeedback();
+}
+
+GLsync GL_BINDING_CALL
+MockGLInterface::Mock_glFenceSync(GLenum condition, GLbitfield flags) {
+ MakeFunctionUnique("glFenceSync");
+ return interface_->FenceSync(condition, flags);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glFinish(void) {
+ MakeFunctionUnique("glFinish");
+ interface_->Finish();
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glFinishFenceAPPLE(GLuint fence) {
+ MakeFunctionUnique("glFinishFenceAPPLE");
+ interface_->FinishFenceAPPLE(fence);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glFinishFenceNV(GLuint fence) {
+ MakeFunctionUnique("glFinishFenceNV");
+ interface_->FinishFenceNV(fence);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glFlush(void) {
+ MakeFunctionUnique("glFlush");
+ interface_->Flush();
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glFlushMappedBufferRange(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length) {
+ MakeFunctionUnique("glFlushMappedBufferRange");
+ interface_->FlushMappedBufferRange(target, offset, length);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glFramebufferRenderbuffer(GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer) {
+ MakeFunctionUnique("glFramebufferRenderbuffer");
+ interface_->FramebufferRenderbufferEXT(target, attachment, renderbuffertarget,
+ renderbuffer);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glFramebufferRenderbufferEXT(GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer) {
+ MakeFunctionUnique("glFramebufferRenderbufferEXT");
+ interface_->FramebufferRenderbufferEXT(target, attachment, renderbuffertarget,
+ renderbuffer);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glFramebufferTexture2D(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level) {
+ MakeFunctionUnique("glFramebufferTexture2D");
+ interface_->FramebufferTexture2DEXT(target, attachment, textarget, texture,
+ level);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glFramebufferTexture2DEXT(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level) {
+ MakeFunctionUnique("glFramebufferTexture2DEXT");
+ interface_->FramebufferTexture2DEXT(target, attachment, textarget, texture,
+ level);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glFramebufferTexture2DMultisampleEXT(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) {
+ MakeFunctionUnique("glFramebufferTexture2DMultisampleEXT");
+ interface_->FramebufferTexture2DMultisampleEXT(target, attachment, textarget,
+ texture, level, samples);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glFramebufferTexture2DMultisampleIMG(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples) {
+ MakeFunctionUnique("glFramebufferTexture2DMultisampleIMG");
+ interface_->FramebufferTexture2DMultisampleIMG(target, attachment, textarget,
+ texture, level, samples);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glFramebufferTextureLayer(GLenum target,
+ GLenum attachment,
+ GLuint texture,
+ GLint level,
+ GLint layer) {
+ MakeFunctionUnique("glFramebufferTextureLayer");
+ interface_->FramebufferTextureLayer(target, attachment, texture, level,
+ layer);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glFrontFace(GLenum mode) {
+ MakeFunctionUnique("glFrontFace");
+ interface_->FrontFace(mode);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenBuffers(GLsizei n, GLuint* buffers) {
+ MakeFunctionUnique("glGenBuffers");
+ interface_->GenBuffersARB(n, buffers);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenBuffersARB(GLsizei n, GLuint* buffers) {
+ MakeFunctionUnique("glGenBuffersARB");
+ interface_->GenBuffersARB(n, buffers);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenFencesAPPLE(GLsizei n, GLuint* fences) {
+ MakeFunctionUnique("glGenFencesAPPLE");
+ interface_->GenFencesAPPLE(n, fences);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenFencesNV(GLsizei n, GLuint* fences) {
+ MakeFunctionUnique("glGenFencesNV");
+ interface_->GenFencesNV(n, fences);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenFramebuffers(GLsizei n, GLuint* framebuffers) {
+ MakeFunctionUnique("glGenFramebuffers");
+ interface_->GenFramebuffersEXT(n, framebuffers);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenFramebuffersEXT(GLsizei n, GLuint* framebuffers) {
+ MakeFunctionUnique("glGenFramebuffersEXT");
+ interface_->GenFramebuffersEXT(n, framebuffers);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenQueries(GLsizei n, GLuint* ids) {
+ MakeFunctionUnique("glGenQueries");
+ interface_->GenQueries(n, ids);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenQueriesARB(GLsizei n, GLuint* ids) {
+ MakeFunctionUnique("glGenQueriesARB");
+ interface_->GenQueriesARB(n, ids);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenQueriesEXT(GLsizei n, GLuint* ids) {
+ MakeFunctionUnique("glGenQueriesEXT");
+ interface_->GenQueriesARB(n, ids);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) {
+ MakeFunctionUnique("glGenRenderbuffers");
+ interface_->GenRenderbuffersEXT(n, renderbuffers);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenRenderbuffersEXT(GLsizei n, GLuint* renderbuffers) {
+ MakeFunctionUnique("glGenRenderbuffersEXT");
+ interface_->GenRenderbuffersEXT(n, renderbuffers);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenSamplers(GLsizei n, GLuint* samplers) {
+ MakeFunctionUnique("glGenSamplers");
+ interface_->GenSamplers(n, samplers);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenTextures(GLsizei n, GLuint* textures) {
+ MakeFunctionUnique("glGenTextures");
+ interface_->GenTextures(n, textures);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenTransformFeedbacks(GLsizei n, GLuint* ids) {
+ MakeFunctionUnique("glGenTransformFeedbacks");
+ interface_->GenTransformFeedbacks(n, ids);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenVertexArrays(GLsizei n, GLuint* arrays) {
+ MakeFunctionUnique("glGenVertexArrays");
+ interface_->GenVertexArraysOES(n, arrays);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenVertexArraysAPPLE(GLsizei n, GLuint* arrays) {
+ MakeFunctionUnique("glGenVertexArraysAPPLE");
+ interface_->GenVertexArraysOES(n, arrays);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGenVertexArraysOES(GLsizei n, GLuint* arrays) {
+ MakeFunctionUnique("glGenVertexArraysOES");
+ interface_->GenVertexArraysOES(n, arrays);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGenerateMipmap(GLenum target) {
+ MakeFunctionUnique("glGenerateMipmap");
+ interface_->GenerateMipmapEXT(target);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGenerateMipmapEXT(GLenum target) {
+ MakeFunctionUnique("glGenerateMipmapEXT");
+ interface_->GenerateMipmapEXT(target);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetActiveAttrib(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) {
+ MakeFunctionUnique("glGetActiveAttrib");
+ interface_->GetActiveAttrib(program, index, bufsize, length, size, type,
+ name);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetActiveUniform(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name) {
+ MakeFunctionUnique("glGetActiveUniform");
+ interface_->GetActiveUniform(program, index, bufsize, length, size, type,
+ name);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetActiveUniformBlockName(GLuint program,
+ GLuint uniformBlockIndex,
+ GLsizei bufSize,
+ GLsizei* length,
+ char* uniformBlockName) {
+ MakeFunctionUnique("glGetActiveUniformBlockName");
+ interface_->GetActiveUniformBlockName(program, uniformBlockIndex, bufSize,
+ length, uniformBlockName);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetActiveUniformBlockiv(GLuint program,
+ GLuint uniformBlockIndex,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetActiveUniformBlockiv");
+ interface_->GetActiveUniformBlockiv(program, uniformBlockIndex, pname,
+ params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetActiveUniformsiv(GLuint program,
+ GLsizei uniformCount,
+ const GLuint* uniformIndices,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetActiveUniformsiv");
+ interface_->GetActiveUniformsiv(program, uniformCount, uniformIndices, pname,
+ params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetAttachedShaders(GLuint program,
+ GLsizei maxcount,
+ GLsizei* count,
+ GLuint* shaders) {
+ MakeFunctionUnique("glGetAttachedShaders");
+ interface_->GetAttachedShaders(program, maxcount, count, shaders);
+}
+
+GLint GL_BINDING_CALL
+MockGLInterface::Mock_glGetAttribLocation(GLuint program, const char* name) {
+ MakeFunctionUnique("glGetAttribLocation");
+ return interface_->GetAttribLocation(program, name);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetBooleanv(GLenum pname, GLboolean* params) {
+ MakeFunctionUnique("glGetBooleanv");
+ interface_->GetBooleanv(pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetBufferParameteriv(GLenum target,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetBufferParameteriv");
+ interface_->GetBufferParameteriv(target, pname, params);
+}
+
+GLenum GL_BINDING_CALL MockGLInterface::Mock_glGetError(void) {
+ MakeFunctionUnique("glGetError");
+ return interface_->GetError();
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetFenceivNV(GLuint fence,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetFenceivNV");
+ interface_->GetFenceivNV(fence, pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetFloatv(GLenum pname, GLfloat* params) {
+ MakeFunctionUnique("glGetFloatv");
+ interface_->GetFloatv(pname, params);
+}
+
+GLint GL_BINDING_CALL
+MockGLInterface::Mock_glGetFragDataLocation(GLuint program, const char* name) {
+ MakeFunctionUnique("glGetFragDataLocation");
+ return interface_->GetFragDataLocation(program, name);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetFramebufferAttachmentParameteriv(GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetFramebufferAttachmentParameteriv");
+ interface_->GetFramebufferAttachmentParameterivEXT(target, attachment, pname,
+ params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetFramebufferAttachmentParameterivEXT(
+ GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetFramebufferAttachmentParameterivEXT");
+ interface_->GetFramebufferAttachmentParameterivEXT(target, attachment, pname,
+ params);
+}
+
+GLenum GL_BINDING_CALL MockGLInterface::Mock_glGetGraphicsResetStatus(void) {
+ MakeFunctionUnique("glGetGraphicsResetStatus");
+ return interface_->GetGraphicsResetStatusARB();
+}
+
+GLenum GL_BINDING_CALL MockGLInterface::Mock_glGetGraphicsResetStatusARB(void) {
+ MakeFunctionUnique("glGetGraphicsResetStatusARB");
+ return interface_->GetGraphicsResetStatusARB();
+}
+
+GLenum GL_BINDING_CALL MockGLInterface::Mock_glGetGraphicsResetStatusEXT(void) {
+ MakeFunctionUnique("glGetGraphicsResetStatusEXT");
+ return interface_->GetGraphicsResetStatusARB();
+}
+
+GLenum GL_BINDING_CALL MockGLInterface::Mock_glGetGraphicsResetStatusKHR(void) {
+ MakeFunctionUnique("glGetGraphicsResetStatusKHR");
+ return interface_->GetGraphicsResetStatusARB();
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetInteger64i_v(GLenum target,
+ GLuint index,
+ GLint64* data) {
+ MakeFunctionUnique("glGetInteger64i_v");
+ interface_->GetInteger64i_v(target, index, data);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetInteger64v(GLenum pname, GLint64* params) {
+ MakeFunctionUnique("glGetInteger64v");
+ interface_->GetInteger64v(pname, params);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetIntegeri_v(GLenum target,
+ GLuint index,
+ GLint* data) {
+ MakeFunctionUnique("glGetIntegeri_v");
+ interface_->GetIntegeri_v(target, index, data);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetIntegerv(GLenum pname, GLint* params) {
+ MakeFunctionUnique("glGetIntegerv");
+ interface_->GetIntegerv(pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetInternalformativ(GLenum target,
+ GLenum internalformat,
+ GLenum pname,
+ GLsizei bufSize,
+ GLint* params) {
+ MakeFunctionUnique("glGetInternalformativ");
+ interface_->GetInternalformativ(target, internalformat, pname, bufSize,
+ params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetProgramBinary(GLuint program,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* binaryFormat,
+ GLvoid* binary) {
+ MakeFunctionUnique("glGetProgramBinary");
+ interface_->GetProgramBinary(program, bufSize, length, binaryFormat, binary);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetProgramBinaryOES(GLuint program,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* binaryFormat,
+ GLvoid* binary) {
+ MakeFunctionUnique("glGetProgramBinaryOES");
+ interface_->GetProgramBinary(program, bufSize, length, binaryFormat, binary);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetProgramInfoLog(GLuint program,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) {
+ MakeFunctionUnique("glGetProgramInfoLog");
+ interface_->GetProgramInfoLog(program, bufsize, length, infolog);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetProgramiv(GLuint program,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetProgramiv");
+ interface_->GetProgramiv(program, pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetQueryObjecti64v(GLuint id,
+ GLenum pname,
+ GLint64* params) {
+ MakeFunctionUnique("glGetQueryObjecti64v");
+ interface_->GetQueryObjecti64v(id, pname, params);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetQueryObjectiv(GLuint id,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetQueryObjectiv");
+ interface_->GetQueryObjectiv(id, pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetQueryObjectivARB(GLuint id,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetQueryObjectivARB");
+ interface_->GetQueryObjectivARB(id, pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetQueryObjectivEXT(GLuint id,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetQueryObjectivEXT");
+ interface_->GetQueryObjectivARB(id, pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetQueryObjectui64v(GLuint id,
+ GLenum pname,
+ GLuint64* params) {
+ MakeFunctionUnique("glGetQueryObjectui64v");
+ interface_->GetQueryObjectui64v(id, pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetQueryObjectui64vEXT(GLuint id,
+ GLenum pname,
+ GLuint64* params) {
+ MakeFunctionUnique("glGetQueryObjectui64vEXT");
+ interface_->GetQueryObjectui64v(id, pname, params);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetQueryObjectuiv(GLuint id,
+ GLenum pname,
+ GLuint* params) {
+ MakeFunctionUnique("glGetQueryObjectuiv");
+ interface_->GetQueryObjectuiv(id, pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetQueryObjectuivARB(GLuint id,
+ GLenum pname,
+ GLuint* params) {
+ MakeFunctionUnique("glGetQueryObjectuivARB");
+ interface_->GetQueryObjectuivARB(id, pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetQueryObjectuivEXT(GLuint id,
+ GLenum pname,
+ GLuint* params) {
+ MakeFunctionUnique("glGetQueryObjectuivEXT");
+ interface_->GetQueryObjectuivARB(id, pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetQueryiv(GLenum target, GLenum pname, GLint* params) {
+ MakeFunctionUnique("glGetQueryiv");
+ interface_->GetQueryiv(target, pname, params);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetQueryivARB(GLenum target,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetQueryivARB");
+ interface_->GetQueryivARB(target, pname, params);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetQueryivEXT(GLenum target,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetQueryivEXT");
+ interface_->GetQueryivARB(target, pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetRenderbufferParameteriv(GLenum target,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetRenderbufferParameteriv");
+ interface_->GetRenderbufferParameterivEXT(target, pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetRenderbufferParameterivEXT(GLenum target,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetRenderbufferParameterivEXT");
+ interface_->GetRenderbufferParameterivEXT(target, pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetSamplerParameterfv(GLuint sampler,
+ GLenum pname,
+ GLfloat* params) {
+ MakeFunctionUnique("glGetSamplerParameterfv");
+ interface_->GetSamplerParameterfv(sampler, pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetSamplerParameteriv(GLuint sampler,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetSamplerParameteriv");
+ interface_->GetSamplerParameteriv(sampler, pname, params);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetShaderInfoLog(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog) {
+ MakeFunctionUnique("glGetShaderInfoLog");
+ interface_->GetShaderInfoLog(shader, bufsize, length, infolog);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetShaderPrecisionFormat(GLenum shadertype,
+ GLenum precisiontype,
+ GLint* range,
+ GLint* precision) {
+ MakeFunctionUnique("glGetShaderPrecisionFormat");
+ interface_->GetShaderPrecisionFormat(shadertype, precisiontype, range,
+ precision);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetShaderSource(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) {
+ MakeFunctionUnique("glGetShaderSource");
+ interface_->GetShaderSource(shader, bufsize, length, source);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetShaderiv(GLuint shader,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetShaderiv");
+ interface_->GetShaderiv(shader, pname, params);
+}
+
+const GLubyte* GL_BINDING_CALL MockGLInterface::Mock_glGetString(GLenum name) {
+ MakeFunctionUnique("glGetString");
+ return interface_->GetString(name);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetSynciv(GLsync sync,
+ GLenum pname,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLint* values) {
+ MakeFunctionUnique("glGetSynciv");
+ interface_->GetSynciv(sync, pname, bufSize, length, values);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetTexLevelParameterfv(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLfloat* params) {
+ MakeFunctionUnique("glGetTexLevelParameterfv");
+ interface_->GetTexLevelParameterfv(target, level, pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetTexLevelParameteriv(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetTexLevelParameteriv");
+ interface_->GetTexLevelParameteriv(target, level, pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetTexParameterfv(GLenum target,
+ GLenum pname,
+ GLfloat* params) {
+ MakeFunctionUnique("glGetTexParameterfv");
+ interface_->GetTexParameterfv(target, pname, params);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetTexParameteriv(GLenum target,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetTexParameteriv");
+ interface_->GetTexParameteriv(target, pname, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetTransformFeedbackVarying(GLuint program,
+ GLuint index,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* type,
+ char* name) {
+ MakeFunctionUnique("glGetTransformFeedbackVarying");
+ interface_->GetTransformFeedbackVarying(program, index, bufSize, length, type,
+ name);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetTranslatedShaderSourceANGLE(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source) {
+ MakeFunctionUnique("glGetTranslatedShaderSourceANGLE");
+ interface_->GetTranslatedShaderSourceANGLE(shader, bufsize, length, source);
+}
+
+GLuint GL_BINDING_CALL
+MockGLInterface::Mock_glGetUniformBlockIndex(GLuint program,
+ const char* uniformBlockName) {
+ MakeFunctionUnique("glGetUniformBlockIndex");
+ return interface_->GetUniformBlockIndex(program, uniformBlockName);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetUniformIndices(GLuint program,
+ GLsizei uniformCount,
+ const char* const* uniformNames,
+ GLuint* uniformIndices) {
+ MakeFunctionUnique("glGetUniformIndices");
+ interface_->GetUniformIndices(program, uniformCount, uniformNames,
+ uniformIndices);
+}
+
+GLint GL_BINDING_CALL
+MockGLInterface::Mock_glGetUniformLocation(GLuint program, const char* name) {
+ MakeFunctionUnique("glGetUniformLocation");
+ return interface_->GetUniformLocation(program, name);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetUniformfv(GLuint program,
+ GLint location,
+ GLfloat* params) {
+ MakeFunctionUnique("glGetUniformfv");
+ interface_->GetUniformfv(program, location, params);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetUniformiv(GLuint program,
+ GLint location,
+ GLint* params) {
+ MakeFunctionUnique("glGetUniformiv");
+ interface_->GetUniformiv(program, location, params);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetVertexAttribPointerv(GLuint index,
+ GLenum pname,
+ void** pointer) {
+ MakeFunctionUnique("glGetVertexAttribPointerv");
+ interface_->GetVertexAttribPointerv(index, pname, pointer);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glGetVertexAttribfv(GLuint index,
+ GLenum pname,
+ GLfloat* params) {
+ MakeFunctionUnique("glGetVertexAttribfv");
+ interface_->GetVertexAttribfv(index, pname, params);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glGetVertexAttribiv(GLuint index,
+ GLenum pname,
+ GLint* params) {
+ MakeFunctionUnique("glGetVertexAttribiv");
+ interface_->GetVertexAttribiv(index, pname, params);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glHint(GLenum target, GLenum mode) {
+ MakeFunctionUnique("glHint");
+ interface_->Hint(target, mode);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glInsertEventMarkerEXT(GLsizei length,
+ const char* marker) {
+ MakeFunctionUnique("glInsertEventMarkerEXT");
+ interface_->InsertEventMarkerEXT(length, marker);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glInvalidateFramebuffer(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments) {
+ MakeFunctionUnique("glInvalidateFramebuffer");
+ interface_->InvalidateFramebuffer(target, numAttachments, attachments);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glInvalidateSubFramebuffer(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments,
+ GLint x,
+ GLint y,
+ GLint width,
+ GLint height) {
+ MakeFunctionUnique("glInvalidateSubFramebuffer");
+ interface_->InvalidateSubFramebuffer(target, numAttachments, attachments, x,
+ y, width, height);
+}
+
+GLboolean GL_BINDING_CALL MockGLInterface::Mock_glIsBuffer(GLuint buffer) {
+ MakeFunctionUnique("glIsBuffer");
+ return interface_->IsBuffer(buffer);
+}
+
+GLboolean GL_BINDING_CALL MockGLInterface::Mock_glIsEnabled(GLenum cap) {
+ MakeFunctionUnique("glIsEnabled");
+ return interface_->IsEnabled(cap);
+}
+
+GLboolean GL_BINDING_CALL MockGLInterface::Mock_glIsFenceAPPLE(GLuint fence) {
+ MakeFunctionUnique("glIsFenceAPPLE");
+ return interface_->IsFenceAPPLE(fence);
+}
+
+GLboolean GL_BINDING_CALL MockGLInterface::Mock_glIsFenceNV(GLuint fence) {
+ MakeFunctionUnique("glIsFenceNV");
+ return interface_->IsFenceNV(fence);
+}
+
+GLboolean GL_BINDING_CALL
+MockGLInterface::Mock_glIsFramebuffer(GLuint framebuffer) {
+ MakeFunctionUnique("glIsFramebuffer");
+ return interface_->IsFramebufferEXT(framebuffer);
+}
+
+GLboolean GL_BINDING_CALL
+MockGLInterface::Mock_glIsFramebufferEXT(GLuint framebuffer) {
+ MakeFunctionUnique("glIsFramebufferEXT");
+ return interface_->IsFramebufferEXT(framebuffer);
+}
+
+GLboolean GL_BINDING_CALL MockGLInterface::Mock_glIsProgram(GLuint program) {
+ MakeFunctionUnique("glIsProgram");
+ return interface_->IsProgram(program);
+}
+
+GLboolean GL_BINDING_CALL MockGLInterface::Mock_glIsQuery(GLuint query) {
+ MakeFunctionUnique("glIsQuery");
+ return interface_->IsQuery(query);
+}
+
+GLboolean GL_BINDING_CALL MockGLInterface::Mock_glIsQueryARB(GLuint query) {
+ MakeFunctionUnique("glIsQueryARB");
+ return interface_->IsQueryARB(query);
+}
+
+GLboolean GL_BINDING_CALL MockGLInterface::Mock_glIsQueryEXT(GLuint query) {
+ MakeFunctionUnique("glIsQueryEXT");
+ return interface_->IsQueryARB(query);
+}
+
+GLboolean GL_BINDING_CALL
+MockGLInterface::Mock_glIsRenderbuffer(GLuint renderbuffer) {
+ MakeFunctionUnique("glIsRenderbuffer");
+ return interface_->IsRenderbufferEXT(renderbuffer);
+}
+
+GLboolean GL_BINDING_CALL
+MockGLInterface::Mock_glIsRenderbufferEXT(GLuint renderbuffer) {
+ MakeFunctionUnique("glIsRenderbufferEXT");
+ return interface_->IsRenderbufferEXT(renderbuffer);
+}
+
+GLboolean GL_BINDING_CALL MockGLInterface::Mock_glIsSampler(GLuint sampler) {
+ MakeFunctionUnique("glIsSampler");
+ return interface_->IsSampler(sampler);
+}
+
+GLboolean GL_BINDING_CALL MockGLInterface::Mock_glIsShader(GLuint shader) {
+ MakeFunctionUnique("glIsShader");
+ return interface_->IsShader(shader);
+}
+
+GLboolean GL_BINDING_CALL MockGLInterface::Mock_glIsSync(GLsync sync) {
+ MakeFunctionUnique("glIsSync");
+ return interface_->IsSync(sync);
+}
+
+GLboolean GL_BINDING_CALL MockGLInterface::Mock_glIsTexture(GLuint texture) {
+ MakeFunctionUnique("glIsTexture");
+ return interface_->IsTexture(texture);
+}
+
+GLboolean GL_BINDING_CALL
+MockGLInterface::Mock_glIsTransformFeedback(GLuint id) {
+ MakeFunctionUnique("glIsTransformFeedback");
+ return interface_->IsTransformFeedback(id);
+}
+
+GLboolean GL_BINDING_CALL MockGLInterface::Mock_glIsVertexArray(GLuint array) {
+ MakeFunctionUnique("glIsVertexArray");
+ return interface_->IsVertexArrayOES(array);
+}
+
+GLboolean GL_BINDING_CALL
+MockGLInterface::Mock_glIsVertexArrayAPPLE(GLuint array) {
+ MakeFunctionUnique("glIsVertexArrayAPPLE");
+ return interface_->IsVertexArrayOES(array);
+}
+
+GLboolean GL_BINDING_CALL
+MockGLInterface::Mock_glIsVertexArrayOES(GLuint array) {
+ MakeFunctionUnique("glIsVertexArrayOES");
+ return interface_->IsVertexArrayOES(array);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glLineWidth(GLfloat width) {
+ MakeFunctionUnique("glLineWidth");
+ interface_->LineWidth(width);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glLinkProgram(GLuint program) {
+ MakeFunctionUnique("glLinkProgram");
+ interface_->LinkProgram(program);
+}
+
+void* GL_BINDING_CALL
+MockGLInterface::Mock_glMapBuffer(GLenum target, GLenum access) {
+ MakeFunctionUnique("glMapBuffer");
+ return interface_->MapBuffer(target, access);
+}
+
+void* GL_BINDING_CALL
+MockGLInterface::Mock_glMapBufferOES(GLenum target, GLenum access) {
+ MakeFunctionUnique("glMapBufferOES");
+ return interface_->MapBuffer(target, access);
+}
+
+void* GL_BINDING_CALL
+MockGLInterface::Mock_glMapBufferRange(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length,
+ GLbitfield access) {
+ MakeFunctionUnique("glMapBufferRange");
+ return interface_->MapBufferRange(target, offset, length, access);
+}
+
+void* GL_BINDING_CALL
+MockGLInterface::Mock_glMapBufferRangeEXT(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length,
+ GLbitfield access) {
+ MakeFunctionUnique("glMapBufferRangeEXT");
+ return interface_->MapBufferRange(target, offset, length, access);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glMatrixLoadIdentityEXT(GLenum matrixMode) {
+ MakeFunctionUnique("glMatrixLoadIdentityEXT");
+ interface_->MatrixLoadIdentityEXT(matrixMode);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glMatrixLoadfEXT(GLenum matrixMode, const GLfloat* m) {
+ MakeFunctionUnique("glMatrixLoadfEXT");
+ interface_->MatrixLoadfEXT(matrixMode, m);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glPauseTransformFeedback(void) {
+ MakeFunctionUnique("glPauseTransformFeedback");
+ interface_->PauseTransformFeedback();
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glPixelStorei(GLenum pname, GLint param) {
+ MakeFunctionUnique("glPixelStorei");
+ interface_->PixelStorei(pname, param);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glPointParameteri(GLenum pname, GLint param) {
+ MakeFunctionUnique("glPointParameteri");
+ interface_->PointParameteri(pname, param);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glPolygonOffset(GLfloat factor, GLfloat units) {
+ MakeFunctionUnique("glPolygonOffset");
+ interface_->PolygonOffset(factor, units);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glPopGroupMarkerEXT(void) {
+ MakeFunctionUnique("glPopGroupMarkerEXT");
+ interface_->PopGroupMarkerEXT();
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glProgramBinary(GLuint program,
+ GLenum binaryFormat,
+ const GLvoid* binary,
+ GLsizei length) {
+ MakeFunctionUnique("glProgramBinary");
+ interface_->ProgramBinary(program, binaryFormat, binary, length);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glProgramBinaryOES(GLuint program,
+ GLenum binaryFormat,
+ const GLvoid* binary,
+ GLsizei length) {
+ MakeFunctionUnique("glProgramBinaryOES");
+ interface_->ProgramBinary(program, binaryFormat, binary, length);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glProgramParameteri(GLuint program,
+ GLenum pname,
+ GLint value) {
+ MakeFunctionUnique("glProgramParameteri");
+ interface_->ProgramParameteri(program, pname, value);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glPushGroupMarkerEXT(GLsizei length, const char* marker) {
+ MakeFunctionUnique("glPushGroupMarkerEXT");
+ interface_->PushGroupMarkerEXT(length, marker);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glQueryCounter(GLuint id, GLenum target) {
+ MakeFunctionUnique("glQueryCounter");
+ interface_->QueryCounter(id, target);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glQueryCounterEXT(GLuint id, GLenum target) {
+ MakeFunctionUnique("glQueryCounterEXT");
+ interface_->QueryCounter(id, target);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glReadBuffer(GLenum src) {
+ MakeFunctionUnique("glReadBuffer");
+ interface_->ReadBuffer(src);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glReadPixels(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ void* pixels) {
+ MakeFunctionUnique("glReadPixels");
+ interface_->ReadPixels(x, y, width, height, format, type, pixels);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glReleaseShaderCompiler(void) {
+ MakeFunctionUnique("glReleaseShaderCompiler");
+ interface_->ReleaseShaderCompiler();
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glRenderbufferStorage(GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ MakeFunctionUnique("glRenderbufferStorage");
+ interface_->RenderbufferStorageEXT(target, internalformat, width, height);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glRenderbufferStorageEXT(GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ MakeFunctionUnique("glRenderbufferStorageEXT");
+ interface_->RenderbufferStorageEXT(target, internalformat, width, height);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glRenderbufferStorageMultisample(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ MakeFunctionUnique("glRenderbufferStorageMultisample");
+ interface_->RenderbufferStorageMultisampleEXT(target, samples, internalformat,
+ width, height);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glRenderbufferStorageMultisampleANGLE(
+ GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ MakeFunctionUnique("glRenderbufferStorageMultisampleANGLE");
+ interface_->RenderbufferStorageMultisampleANGLE(
+ target, samples, internalformat, width, height);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glRenderbufferStorageMultisampleEXT(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ MakeFunctionUnique("glRenderbufferStorageMultisampleEXT");
+ interface_->RenderbufferStorageMultisampleEXT(target, samples, internalformat,
+ width, height);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glRenderbufferStorageMultisampleIMG(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ MakeFunctionUnique("glRenderbufferStorageMultisampleIMG");
+ interface_->RenderbufferStorageMultisampleIMG(target, samples, internalformat,
+ width, height);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glResumeTransformFeedback(void) {
+ MakeFunctionUnique("glResumeTransformFeedback");
+ interface_->ResumeTransformFeedback();
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glSampleCoverage(GLclampf value, GLboolean invert) {
+ MakeFunctionUnique("glSampleCoverage");
+ interface_->SampleCoverage(value, invert);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glSamplerParameterf(GLuint sampler,
+ GLenum pname,
+ GLfloat param) {
+ MakeFunctionUnique("glSamplerParameterf");
+ interface_->SamplerParameterf(sampler, pname, param);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glSamplerParameterfv(GLuint sampler,
+ GLenum pname,
+ const GLfloat* params) {
+ MakeFunctionUnique("glSamplerParameterfv");
+ interface_->SamplerParameterfv(sampler, pname, params);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glSamplerParameteri(GLuint sampler,
+ GLenum pname,
+ GLint param) {
+ MakeFunctionUnique("glSamplerParameteri");
+ interface_->SamplerParameteri(sampler, pname, param);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glSamplerParameteriv(GLuint sampler,
+ GLenum pname,
+ const GLint* params) {
+ MakeFunctionUnique("glSamplerParameteriv");
+ interface_->SamplerParameteriv(sampler, pname, params);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glScissor(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) {
+ MakeFunctionUnique("glScissor");
+ interface_->Scissor(x, y, width, height);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glSetFenceAPPLE(GLuint fence) {
+ MakeFunctionUnique("glSetFenceAPPLE");
+ interface_->SetFenceAPPLE(fence);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glSetFenceNV(GLuint fence, GLenum condition) {
+ MakeFunctionUnique("glSetFenceNV");
+ interface_->SetFenceNV(fence, condition);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glShaderBinary(GLsizei n,
+ const GLuint* shaders,
+ GLenum binaryformat,
+ const void* binary,
+ GLsizei length) {
+ MakeFunctionUnique("glShaderBinary");
+ interface_->ShaderBinary(n, shaders, binaryformat, binary, length);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glShaderSource(GLuint shader,
+ GLsizei count,
+ const char* const* str,
+ const GLint* length) {
+ MakeFunctionUnique("glShaderSource");
+ interface_->ShaderSource(shader, count, str, length);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glStencilFunc(GLenum func, GLint ref, GLuint mask) {
+ MakeFunctionUnique("glStencilFunc");
+ interface_->StencilFunc(func, ref, mask);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glStencilFuncSeparate(GLenum face,
+ GLenum func,
+ GLint ref,
+ GLuint mask) {
+ MakeFunctionUnique("glStencilFuncSeparate");
+ interface_->StencilFuncSeparate(face, func, ref, mask);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glStencilMask(GLuint mask) {
+ MakeFunctionUnique("glStencilMask");
+ interface_->StencilMask(mask);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glStencilMaskSeparate(GLenum face, GLuint mask) {
+ MakeFunctionUnique("glStencilMaskSeparate");
+ interface_->StencilMaskSeparate(face, mask);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) {
+ MakeFunctionUnique("glStencilOp");
+ interface_->StencilOp(fail, zfail, zpass);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glStencilOpSeparate(GLenum face,
+ GLenum fail,
+ GLenum zfail,
+ GLenum zpass) {
+ MakeFunctionUnique("glStencilOpSeparate");
+ interface_->StencilOpSeparate(face, fail, zfail, zpass);
+}
+
+GLboolean GL_BINDING_CALL MockGLInterface::Mock_glTestFenceAPPLE(GLuint fence) {
+ MakeFunctionUnique("glTestFenceAPPLE");
+ return interface_->TestFenceAPPLE(fence);
+}
+
+GLboolean GL_BINDING_CALL MockGLInterface::Mock_glTestFenceNV(GLuint fence) {
+ MakeFunctionUnique("glTestFenceNV");
+ return interface_->TestFenceNV(fence);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glTexImage2D(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) {
+ MakeFunctionUnique("glTexImage2D");
+ interface_->TexImage2D(target, level, internalformat, width, height, border,
+ format, type, pixels);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glTexImage3D(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels) {
+ MakeFunctionUnique("glTexImage3D");
+ interface_->TexImage3D(target, level, internalformat, width, height, depth,
+ border, format, type, pixels);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glTexParameterf(GLenum target,
+ GLenum pname,
+ GLfloat param) {
+ MakeFunctionUnique("glTexParameterf");
+ interface_->TexParameterf(target, pname, param);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glTexParameterfv(GLenum target,
+ GLenum pname,
+ const GLfloat* params) {
+ MakeFunctionUnique("glTexParameterfv");
+ interface_->TexParameterfv(target, pname, params);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glTexParameteri(GLenum target,
+ GLenum pname,
+ GLint param) {
+ MakeFunctionUnique("glTexParameteri");
+ interface_->TexParameteri(target, pname, param);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glTexParameteriv(GLenum target,
+ GLenum pname,
+ const GLint* params) {
+ MakeFunctionUnique("glTexParameteriv");
+ interface_->TexParameteriv(target, pname, params);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glTexStorage2D(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ MakeFunctionUnique("glTexStorage2D");
+ interface_->TexStorage2DEXT(target, levels, internalformat, width, height);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glTexStorage2DEXT(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height) {
+ MakeFunctionUnique("glTexStorage2DEXT");
+ interface_->TexStorage2DEXT(target, levels, internalformat, width, height);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glTexStorage3D(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth) {
+ MakeFunctionUnique("glTexStorage3D");
+ interface_->TexStorage3D(target, levels, internalformat, width, height,
+ depth);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels) {
+ MakeFunctionUnique("glTexSubImage2D");
+ interface_->TexSubImage2D(target, level, xoffset, yoffset, width, height,
+ format, type, pixels);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glTransformFeedbackVaryings(GLuint program,
+ GLsizei count,
+ const char* const* varyings,
+ GLenum bufferMode) {
+ MakeFunctionUnique("glTransformFeedbackVaryings");
+ interface_->TransformFeedbackVaryings(program, count, varyings, bufferMode);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniform1f(GLint location, GLfloat x) {
+ MakeFunctionUnique("glUniform1f");
+ interface_->Uniform1f(location, x);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform1fv(GLint location,
+ GLsizei count,
+ const GLfloat* v) {
+ MakeFunctionUnique("glUniform1fv");
+ interface_->Uniform1fv(location, count, v);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniform1i(GLint location, GLint x) {
+ MakeFunctionUnique("glUniform1i");
+ interface_->Uniform1i(location, x);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform1iv(GLint location,
+ GLsizei count,
+ const GLint* v) {
+ MakeFunctionUnique("glUniform1iv");
+ interface_->Uniform1iv(location, count, v);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniform1ui(GLint location, GLuint v0) {
+ MakeFunctionUnique("glUniform1ui");
+ interface_->Uniform1ui(location, v0);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform1uiv(GLint location,
+ GLsizei count,
+ const GLuint* v) {
+ MakeFunctionUnique("glUniform1uiv");
+ interface_->Uniform1uiv(location, count, v);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniform2f(GLint location, GLfloat x, GLfloat y) {
+ MakeFunctionUnique("glUniform2f");
+ interface_->Uniform2f(location, x, y);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform2fv(GLint location,
+ GLsizei count,
+ const GLfloat* v) {
+ MakeFunctionUnique("glUniform2fv");
+ interface_->Uniform2fv(location, count, v);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniform2i(GLint location, GLint x, GLint y) {
+ MakeFunctionUnique("glUniform2i");
+ interface_->Uniform2i(location, x, y);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform2iv(GLint location,
+ GLsizei count,
+ const GLint* v) {
+ MakeFunctionUnique("glUniform2iv");
+ interface_->Uniform2iv(location, count, v);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniform2ui(GLint location, GLuint v0, GLuint v1) {
+ MakeFunctionUnique("glUniform2ui");
+ interface_->Uniform2ui(location, v0, v1);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform2uiv(GLint location,
+ GLsizei count,
+ const GLuint* v) {
+ MakeFunctionUnique("glUniform2uiv");
+ interface_->Uniform2uiv(location, count, v);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform3f(GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z) {
+ MakeFunctionUnique("glUniform3f");
+ interface_->Uniform3f(location, x, y, z);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform3fv(GLint location,
+ GLsizei count,
+ const GLfloat* v) {
+ MakeFunctionUnique("glUniform3fv");
+ interface_->Uniform3fv(location, count, v);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniform3i(GLint location, GLint x, GLint y, GLint z) {
+ MakeFunctionUnique("glUniform3i");
+ interface_->Uniform3i(location, x, y, z);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform3iv(GLint location,
+ GLsizei count,
+ const GLint* v) {
+ MakeFunctionUnique("glUniform3iv");
+ interface_->Uniform3iv(location, count, v);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform3ui(GLint location,
+ GLuint v0,
+ GLuint v1,
+ GLuint v2) {
+ MakeFunctionUnique("glUniform3ui");
+ interface_->Uniform3ui(location, v0, v1, v2);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform3uiv(GLint location,
+ GLsizei count,
+ const GLuint* v) {
+ MakeFunctionUnique("glUniform3uiv");
+ interface_->Uniform3uiv(location, count, v);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform4f(GLint location,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) {
+ MakeFunctionUnique("glUniform4f");
+ interface_->Uniform4f(location, x, y, z, w);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform4fv(GLint location,
+ GLsizei count,
+ const GLfloat* v) {
+ MakeFunctionUnique("glUniform4fv");
+ interface_->Uniform4fv(location, count, v);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform4i(GLint location,
+ GLint x,
+ GLint y,
+ GLint z,
+ GLint w) {
+ MakeFunctionUnique("glUniform4i");
+ interface_->Uniform4i(location, x, y, z, w);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform4iv(GLint location,
+ GLsizei count,
+ const GLint* v) {
+ MakeFunctionUnique("glUniform4iv");
+ interface_->Uniform4iv(location, count, v);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform4ui(GLint location,
+ GLuint v0,
+ GLuint v1,
+ GLuint v2,
+ GLuint v3) {
+ MakeFunctionUnique("glUniform4ui");
+ interface_->Uniform4ui(location, v0, v1, v2, v3);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUniform4uiv(GLint location,
+ GLsizei count,
+ const GLuint* v) {
+ MakeFunctionUnique("glUniform4uiv");
+ interface_->Uniform4uiv(location, count, v);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniformBlockBinding(GLuint program,
+ GLuint uniformBlockIndex,
+ GLuint uniformBlockBinding) {
+ MakeFunctionUnique("glUniformBlockBinding");
+ interface_->UniformBlockBinding(program, uniformBlockIndex,
+ uniformBlockBinding);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniformMatrix2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ MakeFunctionUnique("glUniformMatrix2fv");
+ interface_->UniformMatrix2fv(location, count, transpose, value);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniformMatrix2x3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ MakeFunctionUnique("glUniformMatrix2x3fv");
+ interface_->UniformMatrix2x3fv(location, count, transpose, value);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniformMatrix2x4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ MakeFunctionUnique("glUniformMatrix2x4fv");
+ interface_->UniformMatrix2x4fv(location, count, transpose, value);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniformMatrix3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ MakeFunctionUnique("glUniformMatrix3fv");
+ interface_->UniformMatrix3fv(location, count, transpose, value);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniformMatrix3x2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ MakeFunctionUnique("glUniformMatrix3x2fv");
+ interface_->UniformMatrix3x2fv(location, count, transpose, value);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniformMatrix3x4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ MakeFunctionUnique("glUniformMatrix3x4fv");
+ interface_->UniformMatrix3x4fv(location, count, transpose, value);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniformMatrix4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ MakeFunctionUnique("glUniformMatrix4fv");
+ interface_->UniformMatrix4fv(location, count, transpose, value);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniformMatrix4x2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ MakeFunctionUnique("glUniformMatrix4x2fv");
+ interface_->UniformMatrix4x2fv(location, count, transpose, value);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glUniformMatrix4x3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value) {
+ MakeFunctionUnique("glUniformMatrix4x3fv");
+ interface_->UniformMatrix4x3fv(location, count, transpose, value);
+}
+
+GLboolean GL_BINDING_CALL MockGLInterface::Mock_glUnmapBuffer(GLenum target) {
+ MakeFunctionUnique("glUnmapBuffer");
+ return interface_->UnmapBuffer(target);
+}
+
+GLboolean GL_BINDING_CALL
+MockGLInterface::Mock_glUnmapBufferOES(GLenum target) {
+ MakeFunctionUnique("glUnmapBufferOES");
+ return interface_->UnmapBuffer(target);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glUseProgram(GLuint program) {
+ MakeFunctionUnique("glUseProgram");
+ interface_->UseProgram(program);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glValidateProgram(GLuint program) {
+ MakeFunctionUnique("glValidateProgram");
+ interface_->ValidateProgram(program);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glVertexAttrib1f(GLuint indx, GLfloat x) {
+ MakeFunctionUnique("glVertexAttrib1f");
+ interface_->VertexAttrib1f(indx, x);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glVertexAttrib1fv(GLuint indx, const GLfloat* values) {
+ MakeFunctionUnique("glVertexAttrib1fv");
+ interface_->VertexAttrib1fv(indx, values);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) {
+ MakeFunctionUnique("glVertexAttrib2f");
+ interface_->VertexAttrib2f(indx, x, y);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glVertexAttrib2fv(GLuint indx, const GLfloat* values) {
+ MakeFunctionUnique("glVertexAttrib2fv");
+ interface_->VertexAttrib2fv(indx, values);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glVertexAttrib3f(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z) {
+ MakeFunctionUnique("glVertexAttrib3f");
+ interface_->VertexAttrib3f(indx, x, y, z);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glVertexAttrib3fv(GLuint indx, const GLfloat* values) {
+ MakeFunctionUnique("glVertexAttrib3fv");
+ interface_->VertexAttrib3fv(indx, values);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glVertexAttrib4f(GLuint indx,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w) {
+ MakeFunctionUnique("glVertexAttrib4f");
+ interface_->VertexAttrib4f(indx, x, y, z, w);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glVertexAttrib4fv(GLuint indx, const GLfloat* values) {
+ MakeFunctionUnique("glVertexAttrib4fv");
+ interface_->VertexAttrib4fv(indx, values);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glVertexAttribDivisor(GLuint index, GLuint divisor) {
+ MakeFunctionUnique("glVertexAttribDivisor");
+ interface_->VertexAttribDivisorANGLE(index, divisor);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glVertexAttribDivisorANGLE(GLuint index, GLuint divisor) {
+ MakeFunctionUnique("glVertexAttribDivisorANGLE");
+ interface_->VertexAttribDivisorANGLE(index, divisor);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glVertexAttribDivisorARB(GLuint index, GLuint divisor) {
+ MakeFunctionUnique("glVertexAttribDivisorARB");
+ interface_->VertexAttribDivisorANGLE(index, divisor);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glVertexAttribI4i(GLuint indx,
+ GLint x,
+ GLint y,
+ GLint z,
+ GLint w) {
+ MakeFunctionUnique("glVertexAttribI4i");
+ interface_->VertexAttribI4i(indx, x, y, z, w);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glVertexAttribI4iv(GLuint indx, const GLint* values) {
+ MakeFunctionUnique("glVertexAttribI4iv");
+ interface_->VertexAttribI4iv(indx, values);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glVertexAttribI4ui(GLuint indx,
+ GLuint x,
+ GLuint y,
+ GLuint z,
+ GLuint w) {
+ MakeFunctionUnique("glVertexAttribI4ui");
+ interface_->VertexAttribI4ui(indx, x, y, z, w);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glVertexAttribI4uiv(GLuint indx, const GLuint* values) {
+ MakeFunctionUnique("glVertexAttribI4uiv");
+ interface_->VertexAttribI4uiv(indx, values);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glVertexAttribIPointer(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLsizei stride,
+ const void* ptr) {
+ MakeFunctionUnique("glVertexAttribIPointer");
+ interface_->VertexAttribIPointer(indx, size, type, stride, ptr);
+}
+
+void GL_BINDING_CALL
+MockGLInterface::Mock_glVertexAttribPointer(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLboolean normalized,
+ GLsizei stride,
+ const void* ptr) {
+ MakeFunctionUnique("glVertexAttribPointer");
+ interface_->VertexAttribPointer(indx, size, type, normalized, stride, ptr);
+}
+
+void GL_BINDING_CALL MockGLInterface::Mock_glViewport(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height) {
+ MakeFunctionUnique("glViewport");
+ interface_->Viewport(x, y, width, height);
+}
+
+GLenum GL_BINDING_CALL MockGLInterface::Mock_glWaitSync(GLsync sync,
+ GLbitfield flags,
+ GLuint64 timeout) {
+ MakeFunctionUnique("glWaitSync");
+ return interface_->WaitSync(sync, flags, timeout);
+}
+
+static void MockInvalidFunction() {
+ NOTREACHED();
+}
+
+void* GL_BINDING_CALL MockGLInterface::GetGLProcAddress(const char* name) {
+ if (strcmp(name, "glActiveTexture") == 0)
+ return reinterpret_cast<void*>(Mock_glActiveTexture);
+ if (strcmp(name, "glAttachShader") == 0)
+ return reinterpret_cast<void*>(Mock_glAttachShader);
+ if (strcmp(name, "glBeginQuery") == 0)
+ return reinterpret_cast<void*>(Mock_glBeginQuery);
+ if (strcmp(name, "glBeginQueryARB") == 0)
+ return reinterpret_cast<void*>(Mock_glBeginQueryARB);
+ if (strcmp(name, "glBeginQueryEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glBeginQueryEXT);
+ if (strcmp(name, "glBeginTransformFeedback") == 0)
+ return reinterpret_cast<void*>(Mock_glBeginTransformFeedback);
+ if (strcmp(name, "glBindAttribLocation") == 0)
+ return reinterpret_cast<void*>(Mock_glBindAttribLocation);
+ if (strcmp(name, "glBindBuffer") == 0)
+ return reinterpret_cast<void*>(Mock_glBindBuffer);
+ if (strcmp(name, "glBindBufferBase") == 0)
+ return reinterpret_cast<void*>(Mock_glBindBufferBase);
+ if (strcmp(name, "glBindBufferRange") == 0)
+ return reinterpret_cast<void*>(Mock_glBindBufferRange);
+ if (strcmp(name, "glBindFragDataLocation") == 0)
+ return reinterpret_cast<void*>(Mock_glBindFragDataLocation);
+ if (strcmp(name, "glBindFragDataLocationIndexed") == 0)
+ return reinterpret_cast<void*>(Mock_glBindFragDataLocationIndexed);
+ if (strcmp(name, "glBindFramebuffer") == 0)
+ return reinterpret_cast<void*>(Mock_glBindFramebuffer);
+ if (strcmp(name, "glBindFramebufferEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glBindFramebufferEXT);
+ if (strcmp(name, "glBindRenderbuffer") == 0)
+ return reinterpret_cast<void*>(Mock_glBindRenderbuffer);
+ if (strcmp(name, "glBindRenderbufferEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glBindRenderbufferEXT);
+ if (strcmp(name, "glBindSampler") == 0)
+ return reinterpret_cast<void*>(Mock_glBindSampler);
+ if (strcmp(name, "glBindTexture") == 0)
+ return reinterpret_cast<void*>(Mock_glBindTexture);
+ if (strcmp(name, "glBindTransformFeedback") == 0)
+ return reinterpret_cast<void*>(Mock_glBindTransformFeedback);
+ if (strcmp(name, "glBindVertexArray") == 0)
+ return reinterpret_cast<void*>(Mock_glBindVertexArray);
+ if (strcmp(name, "glBindVertexArrayAPPLE") == 0)
+ return reinterpret_cast<void*>(Mock_glBindVertexArrayAPPLE);
+ if (strcmp(name, "glBindVertexArrayOES") == 0)
+ return reinterpret_cast<void*>(Mock_glBindVertexArrayOES);
+ if (strcmp(name, "glBlendBarrierKHR") == 0)
+ return reinterpret_cast<void*>(Mock_glBlendBarrierKHR);
+ if (strcmp(name, "glBlendBarrierNV") == 0)
+ return reinterpret_cast<void*>(Mock_glBlendBarrierNV);
+ if (strcmp(name, "glBlendColor") == 0)
+ return reinterpret_cast<void*>(Mock_glBlendColor);
+ if (strcmp(name, "glBlendEquation") == 0)
+ return reinterpret_cast<void*>(Mock_glBlendEquation);
+ if (strcmp(name, "glBlendEquationSeparate") == 0)
+ return reinterpret_cast<void*>(Mock_glBlendEquationSeparate);
+ if (strcmp(name, "glBlendFunc") == 0)
+ return reinterpret_cast<void*>(Mock_glBlendFunc);
+ if (strcmp(name, "glBlendFuncSeparate") == 0)
+ return reinterpret_cast<void*>(Mock_glBlendFuncSeparate);
+ if (strcmp(name, "glBlitFramebuffer") == 0)
+ return reinterpret_cast<void*>(Mock_glBlitFramebuffer);
+ if (strcmp(name, "glBlitFramebufferANGLE") == 0)
+ return reinterpret_cast<void*>(Mock_glBlitFramebufferANGLE);
+ if (strcmp(name, "glBlitFramebufferEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glBlitFramebufferEXT);
+ if (strcmp(name, "glBufferData") == 0)
+ return reinterpret_cast<void*>(Mock_glBufferData);
+ if (strcmp(name, "glBufferSubData") == 0)
+ return reinterpret_cast<void*>(Mock_glBufferSubData);
+ if (strcmp(name, "glCheckFramebufferStatus") == 0)
+ return reinterpret_cast<void*>(Mock_glCheckFramebufferStatus);
+ if (strcmp(name, "glCheckFramebufferStatusEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glCheckFramebufferStatusEXT);
+ if (strcmp(name, "glClear") == 0)
+ return reinterpret_cast<void*>(Mock_glClear);
+ if (strcmp(name, "glClearBufferfi") == 0)
+ return reinterpret_cast<void*>(Mock_glClearBufferfi);
+ if (strcmp(name, "glClearBufferfv") == 0)
+ return reinterpret_cast<void*>(Mock_glClearBufferfv);
+ if (strcmp(name, "glClearBufferiv") == 0)
+ return reinterpret_cast<void*>(Mock_glClearBufferiv);
+ if (strcmp(name, "glClearBufferuiv") == 0)
+ return reinterpret_cast<void*>(Mock_glClearBufferuiv);
+ if (strcmp(name, "glClearColor") == 0)
+ return reinterpret_cast<void*>(Mock_glClearColor);
+ if (strcmp(name, "glClearDepth") == 0)
+ return reinterpret_cast<void*>(Mock_glClearDepth);
+ if (strcmp(name, "glClearDepthf") == 0)
+ return reinterpret_cast<void*>(Mock_glClearDepthf);
+ if (strcmp(name, "glClearStencil") == 0)
+ return reinterpret_cast<void*>(Mock_glClearStencil);
+ if (strcmp(name, "glClientWaitSync") == 0)
+ return reinterpret_cast<void*>(Mock_glClientWaitSync);
+ if (strcmp(name, "glColorMask") == 0)
+ return reinterpret_cast<void*>(Mock_glColorMask);
+ if (strcmp(name, "glCompileShader") == 0)
+ return reinterpret_cast<void*>(Mock_glCompileShader);
+ if (strcmp(name, "glCompressedTexImage2D") == 0)
+ return reinterpret_cast<void*>(Mock_glCompressedTexImage2D);
+ if (strcmp(name, "glCompressedTexImage3D") == 0)
+ return reinterpret_cast<void*>(Mock_glCompressedTexImage3D);
+ if (strcmp(name, "glCompressedTexSubImage2D") == 0)
+ return reinterpret_cast<void*>(Mock_glCompressedTexSubImage2D);
+ if (strcmp(name, "glCopyBufferSubData") == 0)
+ return reinterpret_cast<void*>(Mock_glCopyBufferSubData);
+ if (strcmp(name, "glCopyTexImage2D") == 0)
+ return reinterpret_cast<void*>(Mock_glCopyTexImage2D);
+ if (strcmp(name, "glCopyTexSubImage2D") == 0)
+ return reinterpret_cast<void*>(Mock_glCopyTexSubImage2D);
+ if (strcmp(name, "glCopyTexSubImage3D") == 0)
+ return reinterpret_cast<void*>(Mock_glCopyTexSubImage3D);
+ if (strcmp(name, "glCreateProgram") == 0)
+ return reinterpret_cast<void*>(Mock_glCreateProgram);
+ if (strcmp(name, "glCreateShader") == 0)
+ return reinterpret_cast<void*>(Mock_glCreateShader);
+ if (strcmp(name, "glCullFace") == 0)
+ return reinterpret_cast<void*>(Mock_glCullFace);
+ if (strcmp(name, "glDeleteBuffers") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteBuffers);
+ if (strcmp(name, "glDeleteBuffersARB") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteBuffersARB);
+ if (strcmp(name, "glDeleteFencesAPPLE") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteFencesAPPLE);
+ if (strcmp(name, "glDeleteFencesNV") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteFencesNV);
+ if (strcmp(name, "glDeleteFramebuffers") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteFramebuffers);
+ if (strcmp(name, "glDeleteFramebuffersEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteFramebuffersEXT);
+ if (strcmp(name, "glDeleteProgram") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteProgram);
+ if (strcmp(name, "glDeleteQueries") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteQueries);
+ if (strcmp(name, "glDeleteQueriesARB") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteQueriesARB);
+ if (strcmp(name, "glDeleteQueriesEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteQueriesEXT);
+ if (strcmp(name, "glDeleteRenderbuffers") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteRenderbuffers);
+ if (strcmp(name, "glDeleteRenderbuffersEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteRenderbuffersEXT);
+ if (strcmp(name, "glDeleteSamplers") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteSamplers);
+ if (strcmp(name, "glDeleteShader") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteShader);
+ if (strcmp(name, "glDeleteSync") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteSync);
+ if (strcmp(name, "glDeleteTextures") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteTextures);
+ if (strcmp(name, "glDeleteTransformFeedbacks") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteTransformFeedbacks);
+ if (strcmp(name, "glDeleteVertexArrays") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteVertexArrays);
+ if (strcmp(name, "glDeleteVertexArraysAPPLE") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteVertexArraysAPPLE);
+ if (strcmp(name, "glDeleteVertexArraysOES") == 0)
+ return reinterpret_cast<void*>(Mock_glDeleteVertexArraysOES);
+ if (strcmp(name, "glDepthFunc") == 0)
+ return reinterpret_cast<void*>(Mock_glDepthFunc);
+ if (strcmp(name, "glDepthMask") == 0)
+ return reinterpret_cast<void*>(Mock_glDepthMask);
+ if (strcmp(name, "glDepthRange") == 0)
+ return reinterpret_cast<void*>(Mock_glDepthRange);
+ if (strcmp(name, "glDepthRangef") == 0)
+ return reinterpret_cast<void*>(Mock_glDepthRangef);
+ if (strcmp(name, "glDetachShader") == 0)
+ return reinterpret_cast<void*>(Mock_glDetachShader);
+ if (strcmp(name, "glDisable") == 0)
+ return reinterpret_cast<void*>(Mock_glDisable);
+ if (strcmp(name, "glDisableVertexAttribArray") == 0)
+ return reinterpret_cast<void*>(Mock_glDisableVertexAttribArray);
+ if (strcmp(name, "glDiscardFramebufferEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glDiscardFramebufferEXT);
+ if (strcmp(name, "glDrawArrays") == 0)
+ return reinterpret_cast<void*>(Mock_glDrawArrays);
+ if (strcmp(name, "glDrawArraysInstanced") == 0)
+ return reinterpret_cast<void*>(Mock_glDrawArraysInstanced);
+ if (strcmp(name, "glDrawArraysInstancedANGLE") == 0)
+ return reinterpret_cast<void*>(Mock_glDrawArraysInstancedANGLE);
+ if (strcmp(name, "glDrawArraysInstancedARB") == 0)
+ return reinterpret_cast<void*>(Mock_glDrawArraysInstancedARB);
+ if (strcmp(name, "glDrawBuffer") == 0)
+ return reinterpret_cast<void*>(Mock_glDrawBuffer);
+ if (strcmp(name, "glDrawBuffers") == 0)
+ return reinterpret_cast<void*>(Mock_glDrawBuffers);
+ if (strcmp(name, "glDrawBuffersARB") == 0)
+ return reinterpret_cast<void*>(Mock_glDrawBuffersARB);
+ if (strcmp(name, "glDrawBuffersEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glDrawBuffersEXT);
+ if (strcmp(name, "glDrawElements") == 0)
+ return reinterpret_cast<void*>(Mock_glDrawElements);
+ if (strcmp(name, "glDrawElementsInstanced") == 0)
+ return reinterpret_cast<void*>(Mock_glDrawElementsInstanced);
+ if (strcmp(name, "glDrawElementsInstancedANGLE") == 0)
+ return reinterpret_cast<void*>(Mock_glDrawElementsInstancedANGLE);
+ if (strcmp(name, "glDrawElementsInstancedARB") == 0)
+ return reinterpret_cast<void*>(Mock_glDrawElementsInstancedARB);
+ if (strcmp(name, "glDrawRangeElements") == 0)
+ return reinterpret_cast<void*>(Mock_glDrawRangeElements);
+ if (strcmp(name, "glEGLImageTargetRenderbufferStorageOES") == 0)
+ return reinterpret_cast<void*>(Mock_glEGLImageTargetRenderbufferStorageOES);
+ if (strcmp(name, "glEGLImageTargetTexture2DOES") == 0)
+ return reinterpret_cast<void*>(Mock_glEGLImageTargetTexture2DOES);
+ if (strcmp(name, "glEnable") == 0)
+ return reinterpret_cast<void*>(Mock_glEnable);
+ if (strcmp(name, "glEnableVertexAttribArray") == 0)
+ return reinterpret_cast<void*>(Mock_glEnableVertexAttribArray);
+ if (strcmp(name, "glEndQuery") == 0)
+ return reinterpret_cast<void*>(Mock_glEndQuery);
+ if (strcmp(name, "glEndQueryARB") == 0)
+ return reinterpret_cast<void*>(Mock_glEndQueryARB);
+ if (strcmp(name, "glEndQueryEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glEndQueryEXT);
+ if (strcmp(name, "glEndTransformFeedback") == 0)
+ return reinterpret_cast<void*>(Mock_glEndTransformFeedback);
+ if (strcmp(name, "glFenceSync") == 0)
+ return reinterpret_cast<void*>(Mock_glFenceSync);
+ if (strcmp(name, "glFinish") == 0)
+ return reinterpret_cast<void*>(Mock_glFinish);
+ if (strcmp(name, "glFinishFenceAPPLE") == 0)
+ return reinterpret_cast<void*>(Mock_glFinishFenceAPPLE);
+ if (strcmp(name, "glFinishFenceNV") == 0)
+ return reinterpret_cast<void*>(Mock_glFinishFenceNV);
+ if (strcmp(name, "glFlush") == 0)
+ return reinterpret_cast<void*>(Mock_glFlush);
+ if (strcmp(name, "glFlushMappedBufferRange") == 0)
+ return reinterpret_cast<void*>(Mock_glFlushMappedBufferRange);
+ if (strcmp(name, "glFramebufferRenderbuffer") == 0)
+ return reinterpret_cast<void*>(Mock_glFramebufferRenderbuffer);
+ if (strcmp(name, "glFramebufferRenderbufferEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glFramebufferRenderbufferEXT);
+ if (strcmp(name, "glFramebufferTexture2D") == 0)
+ return reinterpret_cast<void*>(Mock_glFramebufferTexture2D);
+ if (strcmp(name, "glFramebufferTexture2DEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glFramebufferTexture2DEXT);
+ if (strcmp(name, "glFramebufferTexture2DMultisampleEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glFramebufferTexture2DMultisampleEXT);
+ if (strcmp(name, "glFramebufferTexture2DMultisampleIMG") == 0)
+ return reinterpret_cast<void*>(Mock_glFramebufferTexture2DMultisampleIMG);
+ if (strcmp(name, "glFramebufferTextureLayer") == 0)
+ return reinterpret_cast<void*>(Mock_glFramebufferTextureLayer);
+ if (strcmp(name, "glFrontFace") == 0)
+ return reinterpret_cast<void*>(Mock_glFrontFace);
+ if (strcmp(name, "glGenBuffers") == 0)
+ return reinterpret_cast<void*>(Mock_glGenBuffers);
+ if (strcmp(name, "glGenBuffersARB") == 0)
+ return reinterpret_cast<void*>(Mock_glGenBuffersARB);
+ if (strcmp(name, "glGenFencesAPPLE") == 0)
+ return reinterpret_cast<void*>(Mock_glGenFencesAPPLE);
+ if (strcmp(name, "glGenFencesNV") == 0)
+ return reinterpret_cast<void*>(Mock_glGenFencesNV);
+ if (strcmp(name, "glGenFramebuffers") == 0)
+ return reinterpret_cast<void*>(Mock_glGenFramebuffers);
+ if (strcmp(name, "glGenFramebuffersEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glGenFramebuffersEXT);
+ if (strcmp(name, "glGenQueries") == 0)
+ return reinterpret_cast<void*>(Mock_glGenQueries);
+ if (strcmp(name, "glGenQueriesARB") == 0)
+ return reinterpret_cast<void*>(Mock_glGenQueriesARB);
+ if (strcmp(name, "glGenQueriesEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glGenQueriesEXT);
+ if (strcmp(name, "glGenRenderbuffers") == 0)
+ return reinterpret_cast<void*>(Mock_glGenRenderbuffers);
+ if (strcmp(name, "glGenRenderbuffersEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glGenRenderbuffersEXT);
+ if (strcmp(name, "glGenSamplers") == 0)
+ return reinterpret_cast<void*>(Mock_glGenSamplers);
+ if (strcmp(name, "glGenTextures") == 0)
+ return reinterpret_cast<void*>(Mock_glGenTextures);
+ if (strcmp(name, "glGenTransformFeedbacks") == 0)
+ return reinterpret_cast<void*>(Mock_glGenTransformFeedbacks);
+ if (strcmp(name, "glGenVertexArrays") == 0)
+ return reinterpret_cast<void*>(Mock_glGenVertexArrays);
+ if (strcmp(name, "glGenVertexArraysAPPLE") == 0)
+ return reinterpret_cast<void*>(Mock_glGenVertexArraysAPPLE);
+ if (strcmp(name, "glGenVertexArraysOES") == 0)
+ return reinterpret_cast<void*>(Mock_glGenVertexArraysOES);
+ if (strcmp(name, "glGenerateMipmap") == 0)
+ return reinterpret_cast<void*>(Mock_glGenerateMipmap);
+ if (strcmp(name, "glGenerateMipmapEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glGenerateMipmapEXT);
+ if (strcmp(name, "glGetActiveAttrib") == 0)
+ return reinterpret_cast<void*>(Mock_glGetActiveAttrib);
+ if (strcmp(name, "glGetActiveUniform") == 0)
+ return reinterpret_cast<void*>(Mock_glGetActiveUniform);
+ if (strcmp(name, "glGetActiveUniformBlockName") == 0)
+ return reinterpret_cast<void*>(Mock_glGetActiveUniformBlockName);
+ if (strcmp(name, "glGetActiveUniformBlockiv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetActiveUniformBlockiv);
+ if (strcmp(name, "glGetActiveUniformsiv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetActiveUniformsiv);
+ if (strcmp(name, "glGetAttachedShaders") == 0)
+ return reinterpret_cast<void*>(Mock_glGetAttachedShaders);
+ if (strcmp(name, "glGetAttribLocation") == 0)
+ return reinterpret_cast<void*>(Mock_glGetAttribLocation);
+ if (strcmp(name, "glGetBooleanv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetBooleanv);
+ if (strcmp(name, "glGetBufferParameteriv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetBufferParameteriv);
+ if (strcmp(name, "glGetError") == 0)
+ return reinterpret_cast<void*>(Mock_glGetError);
+ if (strcmp(name, "glGetFenceivNV") == 0)
+ return reinterpret_cast<void*>(Mock_glGetFenceivNV);
+ if (strcmp(name, "glGetFloatv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetFloatv);
+ if (strcmp(name, "glGetFragDataLocation") == 0)
+ return reinterpret_cast<void*>(Mock_glGetFragDataLocation);
+ if (strcmp(name, "glGetFramebufferAttachmentParameteriv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetFramebufferAttachmentParameteriv);
+ if (strcmp(name, "glGetFramebufferAttachmentParameterivEXT") == 0)
+ return reinterpret_cast<void*>(
+ Mock_glGetFramebufferAttachmentParameterivEXT);
+ if (strcmp(name, "glGetGraphicsResetStatus") == 0)
+ return reinterpret_cast<void*>(Mock_glGetGraphicsResetStatus);
+ if (strcmp(name, "glGetGraphicsResetStatusARB") == 0)
+ return reinterpret_cast<void*>(Mock_glGetGraphicsResetStatusARB);
+ if (strcmp(name, "glGetGraphicsResetStatusEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glGetGraphicsResetStatusEXT);
+ if (strcmp(name, "glGetGraphicsResetStatusKHR") == 0)
+ return reinterpret_cast<void*>(Mock_glGetGraphicsResetStatusKHR);
+ if (strcmp(name, "glGetInteger64i_v") == 0)
+ return reinterpret_cast<void*>(Mock_glGetInteger64i_v);
+ if (strcmp(name, "glGetInteger64v") == 0)
+ return reinterpret_cast<void*>(Mock_glGetInteger64v);
+ if (strcmp(name, "glGetIntegeri_v") == 0)
+ return reinterpret_cast<void*>(Mock_glGetIntegeri_v);
+ if (strcmp(name, "glGetIntegerv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetIntegerv);
+ if (strcmp(name, "glGetInternalformativ") == 0)
+ return reinterpret_cast<void*>(Mock_glGetInternalformativ);
+ if (strcmp(name, "glGetProgramBinary") == 0)
+ return reinterpret_cast<void*>(Mock_glGetProgramBinary);
+ if (strcmp(name, "glGetProgramBinaryOES") == 0)
+ return reinterpret_cast<void*>(Mock_glGetProgramBinaryOES);
+ if (strcmp(name, "glGetProgramInfoLog") == 0)
+ return reinterpret_cast<void*>(Mock_glGetProgramInfoLog);
+ if (strcmp(name, "glGetProgramiv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetProgramiv);
+ if (strcmp(name, "glGetQueryObjecti64v") == 0)
+ return reinterpret_cast<void*>(Mock_glGetQueryObjecti64v);
+ if (strcmp(name, "glGetQueryObjectiv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetQueryObjectiv);
+ if (strcmp(name, "glGetQueryObjectivARB") == 0)
+ return reinterpret_cast<void*>(Mock_glGetQueryObjectivARB);
+ if (strcmp(name, "glGetQueryObjectivEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glGetQueryObjectivEXT);
+ if (strcmp(name, "glGetQueryObjectui64v") == 0)
+ return reinterpret_cast<void*>(Mock_glGetQueryObjectui64v);
+ if (strcmp(name, "glGetQueryObjectui64vEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glGetQueryObjectui64vEXT);
+ if (strcmp(name, "glGetQueryObjectuiv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetQueryObjectuiv);
+ if (strcmp(name, "glGetQueryObjectuivARB") == 0)
+ return reinterpret_cast<void*>(Mock_glGetQueryObjectuivARB);
+ if (strcmp(name, "glGetQueryObjectuivEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glGetQueryObjectuivEXT);
+ if (strcmp(name, "glGetQueryiv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetQueryiv);
+ if (strcmp(name, "glGetQueryivARB") == 0)
+ return reinterpret_cast<void*>(Mock_glGetQueryivARB);
+ if (strcmp(name, "glGetQueryivEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glGetQueryivEXT);
+ if (strcmp(name, "glGetRenderbufferParameteriv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetRenderbufferParameteriv);
+ if (strcmp(name, "glGetRenderbufferParameterivEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glGetRenderbufferParameterivEXT);
+ if (strcmp(name, "glGetSamplerParameterfv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetSamplerParameterfv);
+ if (strcmp(name, "glGetSamplerParameteriv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetSamplerParameteriv);
+ if (strcmp(name, "glGetShaderInfoLog") == 0)
+ return reinterpret_cast<void*>(Mock_glGetShaderInfoLog);
+ if (strcmp(name, "glGetShaderPrecisionFormat") == 0)
+ return reinterpret_cast<void*>(Mock_glGetShaderPrecisionFormat);
+ if (strcmp(name, "glGetShaderSource") == 0)
+ return reinterpret_cast<void*>(Mock_glGetShaderSource);
+ if (strcmp(name, "glGetShaderiv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetShaderiv);
+ if (strcmp(name, "glGetString") == 0)
+ return reinterpret_cast<void*>(Mock_glGetString);
+ if (strcmp(name, "glGetSynciv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetSynciv);
+ if (strcmp(name, "glGetTexLevelParameterfv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetTexLevelParameterfv);
+ if (strcmp(name, "glGetTexLevelParameteriv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetTexLevelParameteriv);
+ if (strcmp(name, "glGetTexParameterfv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetTexParameterfv);
+ if (strcmp(name, "glGetTexParameteriv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetTexParameteriv);
+ if (strcmp(name, "glGetTransformFeedbackVarying") == 0)
+ return reinterpret_cast<void*>(Mock_glGetTransformFeedbackVarying);
+ if (strcmp(name, "glGetTranslatedShaderSourceANGLE") == 0)
+ return reinterpret_cast<void*>(Mock_glGetTranslatedShaderSourceANGLE);
+ if (strcmp(name, "glGetUniformBlockIndex") == 0)
+ return reinterpret_cast<void*>(Mock_glGetUniformBlockIndex);
+ if (strcmp(name, "glGetUniformIndices") == 0)
+ return reinterpret_cast<void*>(Mock_glGetUniformIndices);
+ if (strcmp(name, "glGetUniformLocation") == 0)
+ return reinterpret_cast<void*>(Mock_glGetUniformLocation);
+ if (strcmp(name, "glGetUniformfv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetUniformfv);
+ if (strcmp(name, "glGetUniformiv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetUniformiv);
+ if (strcmp(name, "glGetVertexAttribPointerv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetVertexAttribPointerv);
+ if (strcmp(name, "glGetVertexAttribfv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetVertexAttribfv);
+ if (strcmp(name, "glGetVertexAttribiv") == 0)
+ return reinterpret_cast<void*>(Mock_glGetVertexAttribiv);
+ if (strcmp(name, "glHint") == 0)
+ return reinterpret_cast<void*>(Mock_glHint);
+ if (strcmp(name, "glInsertEventMarkerEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glInsertEventMarkerEXT);
+ if (strcmp(name, "glInvalidateFramebuffer") == 0)
+ return reinterpret_cast<void*>(Mock_glInvalidateFramebuffer);
+ if (strcmp(name, "glInvalidateSubFramebuffer") == 0)
+ return reinterpret_cast<void*>(Mock_glInvalidateSubFramebuffer);
+ if (strcmp(name, "glIsBuffer") == 0)
+ return reinterpret_cast<void*>(Mock_glIsBuffer);
+ if (strcmp(name, "glIsEnabled") == 0)
+ return reinterpret_cast<void*>(Mock_glIsEnabled);
+ if (strcmp(name, "glIsFenceAPPLE") == 0)
+ return reinterpret_cast<void*>(Mock_glIsFenceAPPLE);
+ if (strcmp(name, "glIsFenceNV") == 0)
+ return reinterpret_cast<void*>(Mock_glIsFenceNV);
+ if (strcmp(name, "glIsFramebuffer") == 0)
+ return reinterpret_cast<void*>(Mock_glIsFramebuffer);
+ if (strcmp(name, "glIsFramebufferEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glIsFramebufferEXT);
+ if (strcmp(name, "glIsProgram") == 0)
+ return reinterpret_cast<void*>(Mock_glIsProgram);
+ if (strcmp(name, "glIsQuery") == 0)
+ return reinterpret_cast<void*>(Mock_glIsQuery);
+ if (strcmp(name, "glIsQueryARB") == 0)
+ return reinterpret_cast<void*>(Mock_glIsQueryARB);
+ if (strcmp(name, "glIsQueryEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glIsQueryEXT);
+ if (strcmp(name, "glIsRenderbuffer") == 0)
+ return reinterpret_cast<void*>(Mock_glIsRenderbuffer);
+ if (strcmp(name, "glIsRenderbufferEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glIsRenderbufferEXT);
+ if (strcmp(name, "glIsSampler") == 0)
+ return reinterpret_cast<void*>(Mock_glIsSampler);
+ if (strcmp(name, "glIsShader") == 0)
+ return reinterpret_cast<void*>(Mock_glIsShader);
+ if (strcmp(name, "glIsSync") == 0)
+ return reinterpret_cast<void*>(Mock_glIsSync);
+ if (strcmp(name, "glIsTexture") == 0)
+ return reinterpret_cast<void*>(Mock_glIsTexture);
+ if (strcmp(name, "glIsTransformFeedback") == 0)
+ return reinterpret_cast<void*>(Mock_glIsTransformFeedback);
+ if (strcmp(name, "glIsVertexArray") == 0)
+ return reinterpret_cast<void*>(Mock_glIsVertexArray);
+ if (strcmp(name, "glIsVertexArrayAPPLE") == 0)
+ return reinterpret_cast<void*>(Mock_glIsVertexArrayAPPLE);
+ if (strcmp(name, "glIsVertexArrayOES") == 0)
+ return reinterpret_cast<void*>(Mock_glIsVertexArrayOES);
+ if (strcmp(name, "glLineWidth") == 0)
+ return reinterpret_cast<void*>(Mock_glLineWidth);
+ if (strcmp(name, "glLinkProgram") == 0)
+ return reinterpret_cast<void*>(Mock_glLinkProgram);
+ if (strcmp(name, "glMapBuffer") == 0)
+ return reinterpret_cast<void*>(Mock_glMapBuffer);
+ if (strcmp(name, "glMapBufferOES") == 0)
+ return reinterpret_cast<void*>(Mock_glMapBufferOES);
+ if (strcmp(name, "glMapBufferRange") == 0)
+ return reinterpret_cast<void*>(Mock_glMapBufferRange);
+ if (strcmp(name, "glMapBufferRangeEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glMapBufferRangeEXT);
+ if (strcmp(name, "glMatrixLoadIdentityEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glMatrixLoadIdentityEXT);
+ if (strcmp(name, "glMatrixLoadfEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glMatrixLoadfEXT);
+ if (strcmp(name, "glPauseTransformFeedback") == 0)
+ return reinterpret_cast<void*>(Mock_glPauseTransformFeedback);
+ if (strcmp(name, "glPixelStorei") == 0)
+ return reinterpret_cast<void*>(Mock_glPixelStorei);
+ if (strcmp(name, "glPointParameteri") == 0)
+ return reinterpret_cast<void*>(Mock_glPointParameteri);
+ if (strcmp(name, "glPolygonOffset") == 0)
+ return reinterpret_cast<void*>(Mock_glPolygonOffset);
+ if (strcmp(name, "glPopGroupMarkerEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glPopGroupMarkerEXT);
+ if (strcmp(name, "glProgramBinary") == 0)
+ return reinterpret_cast<void*>(Mock_glProgramBinary);
+ if (strcmp(name, "glProgramBinaryOES") == 0)
+ return reinterpret_cast<void*>(Mock_glProgramBinaryOES);
+ if (strcmp(name, "glProgramParameteri") == 0)
+ return reinterpret_cast<void*>(Mock_glProgramParameteri);
+ if (strcmp(name, "glPushGroupMarkerEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glPushGroupMarkerEXT);
+ if (strcmp(name, "glQueryCounter") == 0)
+ return reinterpret_cast<void*>(Mock_glQueryCounter);
+ if (strcmp(name, "glQueryCounterEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glQueryCounterEXT);
+ if (strcmp(name, "glReadBuffer") == 0)
+ return reinterpret_cast<void*>(Mock_glReadBuffer);
+ if (strcmp(name, "glReadPixels") == 0)
+ return reinterpret_cast<void*>(Mock_glReadPixels);
+ if (strcmp(name, "glReleaseShaderCompiler") == 0)
+ return reinterpret_cast<void*>(Mock_glReleaseShaderCompiler);
+ if (strcmp(name, "glRenderbufferStorage") == 0)
+ return reinterpret_cast<void*>(Mock_glRenderbufferStorage);
+ if (strcmp(name, "glRenderbufferStorageEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glRenderbufferStorageEXT);
+ if (strcmp(name, "glRenderbufferStorageMultisample") == 0)
+ return reinterpret_cast<void*>(Mock_glRenderbufferStorageMultisample);
+ if (strcmp(name, "glRenderbufferStorageMultisampleANGLE") == 0)
+ return reinterpret_cast<void*>(Mock_glRenderbufferStorageMultisampleANGLE);
+ if (strcmp(name, "glRenderbufferStorageMultisampleEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glRenderbufferStorageMultisampleEXT);
+ if (strcmp(name, "glRenderbufferStorageMultisampleIMG") == 0)
+ return reinterpret_cast<void*>(Mock_glRenderbufferStorageMultisampleIMG);
+ if (strcmp(name, "glResumeTransformFeedback") == 0)
+ return reinterpret_cast<void*>(Mock_glResumeTransformFeedback);
+ if (strcmp(name, "glSampleCoverage") == 0)
+ return reinterpret_cast<void*>(Mock_glSampleCoverage);
+ if (strcmp(name, "glSamplerParameterf") == 0)
+ return reinterpret_cast<void*>(Mock_glSamplerParameterf);
+ if (strcmp(name, "glSamplerParameterfv") == 0)
+ return reinterpret_cast<void*>(Mock_glSamplerParameterfv);
+ if (strcmp(name, "glSamplerParameteri") == 0)
+ return reinterpret_cast<void*>(Mock_glSamplerParameteri);
+ if (strcmp(name, "glSamplerParameteriv") == 0)
+ return reinterpret_cast<void*>(Mock_glSamplerParameteriv);
+ if (strcmp(name, "glScissor") == 0)
+ return reinterpret_cast<void*>(Mock_glScissor);
+ if (strcmp(name, "glSetFenceAPPLE") == 0)
+ return reinterpret_cast<void*>(Mock_glSetFenceAPPLE);
+ if (strcmp(name, "glSetFenceNV") == 0)
+ return reinterpret_cast<void*>(Mock_glSetFenceNV);
+ if (strcmp(name, "glShaderBinary") == 0)
+ return reinterpret_cast<void*>(Mock_glShaderBinary);
+ if (strcmp(name, "glShaderSource") == 0)
+ return reinterpret_cast<void*>(Mock_glShaderSource);
+ if (strcmp(name, "glStencilFunc") == 0)
+ return reinterpret_cast<void*>(Mock_glStencilFunc);
+ if (strcmp(name, "glStencilFuncSeparate") == 0)
+ return reinterpret_cast<void*>(Mock_glStencilFuncSeparate);
+ if (strcmp(name, "glStencilMask") == 0)
+ return reinterpret_cast<void*>(Mock_glStencilMask);
+ if (strcmp(name, "glStencilMaskSeparate") == 0)
+ return reinterpret_cast<void*>(Mock_glStencilMaskSeparate);
+ if (strcmp(name, "glStencilOp") == 0)
+ return reinterpret_cast<void*>(Mock_glStencilOp);
+ if (strcmp(name, "glStencilOpSeparate") == 0)
+ return reinterpret_cast<void*>(Mock_glStencilOpSeparate);
+ if (strcmp(name, "glTestFenceAPPLE") == 0)
+ return reinterpret_cast<void*>(Mock_glTestFenceAPPLE);
+ if (strcmp(name, "glTestFenceNV") == 0)
+ return reinterpret_cast<void*>(Mock_glTestFenceNV);
+ if (strcmp(name, "glTexImage2D") == 0)
+ return reinterpret_cast<void*>(Mock_glTexImage2D);
+ if (strcmp(name, "glTexImage3D") == 0)
+ return reinterpret_cast<void*>(Mock_glTexImage3D);
+ if (strcmp(name, "glTexParameterf") == 0)
+ return reinterpret_cast<void*>(Mock_glTexParameterf);
+ if (strcmp(name, "glTexParameterfv") == 0)
+ return reinterpret_cast<void*>(Mock_glTexParameterfv);
+ if (strcmp(name, "glTexParameteri") == 0)
+ return reinterpret_cast<void*>(Mock_glTexParameteri);
+ if (strcmp(name, "glTexParameteriv") == 0)
+ return reinterpret_cast<void*>(Mock_glTexParameteriv);
+ if (strcmp(name, "glTexStorage2D") == 0)
+ return reinterpret_cast<void*>(Mock_glTexStorage2D);
+ if (strcmp(name, "glTexStorage2DEXT") == 0)
+ return reinterpret_cast<void*>(Mock_glTexStorage2DEXT);
+ if (strcmp(name, "glTexStorage3D") == 0)
+ return reinterpret_cast<void*>(Mock_glTexStorage3D);
+ if (strcmp(name, "glTexSubImage2D") == 0)
+ return reinterpret_cast<void*>(Mock_glTexSubImage2D);
+ if (strcmp(name, "glTransformFeedbackVaryings") == 0)
+ return reinterpret_cast<void*>(Mock_glTransformFeedbackVaryings);
+ if (strcmp(name, "glUniform1f") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform1f);
+ if (strcmp(name, "glUniform1fv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform1fv);
+ if (strcmp(name, "glUniform1i") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform1i);
+ if (strcmp(name, "glUniform1iv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform1iv);
+ if (strcmp(name, "glUniform1ui") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform1ui);
+ if (strcmp(name, "glUniform1uiv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform1uiv);
+ if (strcmp(name, "glUniform2f") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform2f);
+ if (strcmp(name, "glUniform2fv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform2fv);
+ if (strcmp(name, "glUniform2i") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform2i);
+ if (strcmp(name, "glUniform2iv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform2iv);
+ if (strcmp(name, "glUniform2ui") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform2ui);
+ if (strcmp(name, "glUniform2uiv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform2uiv);
+ if (strcmp(name, "glUniform3f") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform3f);
+ if (strcmp(name, "glUniform3fv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform3fv);
+ if (strcmp(name, "glUniform3i") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform3i);
+ if (strcmp(name, "glUniform3iv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform3iv);
+ if (strcmp(name, "glUniform3ui") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform3ui);
+ if (strcmp(name, "glUniform3uiv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform3uiv);
+ if (strcmp(name, "glUniform4f") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform4f);
+ if (strcmp(name, "glUniform4fv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform4fv);
+ if (strcmp(name, "glUniform4i") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform4i);
+ if (strcmp(name, "glUniform4iv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform4iv);
+ if (strcmp(name, "glUniform4ui") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform4ui);
+ if (strcmp(name, "glUniform4uiv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniform4uiv);
+ if (strcmp(name, "glUniformBlockBinding") == 0)
+ return reinterpret_cast<void*>(Mock_glUniformBlockBinding);
+ if (strcmp(name, "glUniformMatrix2fv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniformMatrix2fv);
+ if (strcmp(name, "glUniformMatrix2x3fv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniformMatrix2x3fv);
+ if (strcmp(name, "glUniformMatrix2x4fv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniformMatrix2x4fv);
+ if (strcmp(name, "glUniformMatrix3fv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniformMatrix3fv);
+ if (strcmp(name, "glUniformMatrix3x2fv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniformMatrix3x2fv);
+ if (strcmp(name, "glUniformMatrix3x4fv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniformMatrix3x4fv);
+ if (strcmp(name, "glUniformMatrix4fv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniformMatrix4fv);
+ if (strcmp(name, "glUniformMatrix4x2fv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniformMatrix4x2fv);
+ if (strcmp(name, "glUniformMatrix4x3fv") == 0)
+ return reinterpret_cast<void*>(Mock_glUniformMatrix4x3fv);
+ if (strcmp(name, "glUnmapBuffer") == 0)
+ return reinterpret_cast<void*>(Mock_glUnmapBuffer);
+ if (strcmp(name, "glUnmapBufferOES") == 0)
+ return reinterpret_cast<void*>(Mock_glUnmapBufferOES);
+ if (strcmp(name, "glUseProgram") == 0)
+ return reinterpret_cast<void*>(Mock_glUseProgram);
+ if (strcmp(name, "glValidateProgram") == 0)
+ return reinterpret_cast<void*>(Mock_glValidateProgram);
+ if (strcmp(name, "glVertexAttrib1f") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttrib1f);
+ if (strcmp(name, "glVertexAttrib1fv") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttrib1fv);
+ if (strcmp(name, "glVertexAttrib2f") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttrib2f);
+ if (strcmp(name, "glVertexAttrib2fv") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttrib2fv);
+ if (strcmp(name, "glVertexAttrib3f") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttrib3f);
+ if (strcmp(name, "glVertexAttrib3fv") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttrib3fv);
+ if (strcmp(name, "glVertexAttrib4f") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttrib4f);
+ if (strcmp(name, "glVertexAttrib4fv") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttrib4fv);
+ if (strcmp(name, "glVertexAttribDivisor") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttribDivisor);
+ if (strcmp(name, "glVertexAttribDivisorANGLE") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttribDivisorANGLE);
+ if (strcmp(name, "glVertexAttribDivisorARB") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttribDivisorARB);
+ if (strcmp(name, "glVertexAttribI4i") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttribI4i);
+ if (strcmp(name, "glVertexAttribI4iv") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttribI4iv);
+ if (strcmp(name, "glVertexAttribI4ui") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttribI4ui);
+ if (strcmp(name, "glVertexAttribI4uiv") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttribI4uiv);
+ if (strcmp(name, "glVertexAttribIPointer") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttribIPointer);
+ if (strcmp(name, "glVertexAttribPointer") == 0)
+ return reinterpret_cast<void*>(Mock_glVertexAttribPointer);
+ if (strcmp(name, "glViewport") == 0)
+ return reinterpret_cast<void*>(Mock_glViewport);
+ if (strcmp(name, "glWaitSync") == 0)
+ return reinterpret_cast<void*>(Mock_glWaitSync);
+ return reinterpret_cast<void*>(&MockInvalidFunction);
+}
+
+} // namespace gfx
diff --git a/ui/gl/gl_bindings_autogen_mock.h b/ui/gl/gl_bindings_autogen_mock.h
new file mode 100644
index 0000000..2ed1095
--- /dev/null
+++ b/ui/gl/gl_bindings_autogen_mock.h
@@ -0,0 +1,880 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+static void GL_BINDING_CALL Mock_glActiveTexture(GLenum texture);
+static void GL_BINDING_CALL Mock_glAttachShader(GLuint program, GLuint shader);
+static void GL_BINDING_CALL Mock_glBeginQuery(GLenum target, GLuint id);
+static void GL_BINDING_CALL Mock_glBeginQueryARB(GLenum target, GLuint id);
+static void GL_BINDING_CALL Mock_glBeginQueryEXT(GLenum target, GLuint id);
+static void GL_BINDING_CALL Mock_glBeginTransformFeedback(GLenum primitiveMode);
+static void GL_BINDING_CALL
+Mock_glBindAttribLocation(GLuint program, GLuint index, const char* name);
+static void GL_BINDING_CALL Mock_glBindBuffer(GLenum target, GLuint buffer);
+static void GL_BINDING_CALL
+Mock_glBindBufferBase(GLenum target, GLuint index, GLuint buffer);
+static void GL_BINDING_CALL Mock_glBindBufferRange(GLenum target,
+ GLuint index,
+ GLuint buffer,
+ GLintptr offset,
+ GLsizeiptr size);
+static void GL_BINDING_CALL Mock_glBindFragDataLocation(GLuint program,
+ GLuint colorNumber,
+ const char* name);
+static void GL_BINDING_CALL
+Mock_glBindFragDataLocationIndexed(GLuint program,
+ GLuint colorNumber,
+ GLuint index,
+ const char* name);
+static void GL_BINDING_CALL
+Mock_glBindFramebuffer(GLenum target, GLuint framebuffer);
+static void GL_BINDING_CALL
+Mock_glBindFramebufferEXT(GLenum target, GLuint framebuffer);
+static void GL_BINDING_CALL
+Mock_glBindRenderbuffer(GLenum target, GLuint renderbuffer);
+static void GL_BINDING_CALL
+Mock_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer);
+static void GL_BINDING_CALL Mock_glBindSampler(GLuint unit, GLuint sampler);
+static void GL_BINDING_CALL Mock_glBindTexture(GLenum target, GLuint texture);
+static void GL_BINDING_CALL
+Mock_glBindTransformFeedback(GLenum target, GLuint id);
+static void GL_BINDING_CALL Mock_glBindVertexArray(GLuint array);
+static void GL_BINDING_CALL Mock_glBindVertexArrayAPPLE(GLuint array);
+static void GL_BINDING_CALL Mock_glBindVertexArrayOES(GLuint array);
+static void GL_BINDING_CALL Mock_glBlendBarrierKHR(void);
+static void GL_BINDING_CALL Mock_glBlendBarrierNV(void);
+static void GL_BINDING_CALL
+Mock_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+static void GL_BINDING_CALL Mock_glBlendEquation(GLenum mode);
+static void GL_BINDING_CALL
+Mock_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
+static void GL_BINDING_CALL Mock_glBlendFunc(GLenum sfactor, GLenum dfactor);
+static void GL_BINDING_CALL Mock_glBlendFuncSeparate(GLenum srcRGB,
+ GLenum dstRGB,
+ GLenum srcAlpha,
+ GLenum dstAlpha);
+static void GL_BINDING_CALL Mock_glBlitFramebuffer(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter);
+static void GL_BINDING_CALL Mock_glBlitFramebufferANGLE(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter);
+static void GL_BINDING_CALL Mock_glBlitFramebufferEXT(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter);
+static void GL_BINDING_CALL Mock_glBufferData(GLenum target,
+ GLsizeiptr size,
+ const void* data,
+ GLenum usage);
+static void GL_BINDING_CALL Mock_glBufferSubData(GLenum target,
+ GLintptr offset,
+ GLsizeiptr size,
+ const void* data);
+static GLenum GL_BINDING_CALL Mock_glCheckFramebufferStatus(GLenum target);
+static GLenum GL_BINDING_CALL Mock_glCheckFramebufferStatusEXT(GLenum target);
+static void GL_BINDING_CALL Mock_glClear(GLbitfield mask);
+static void GL_BINDING_CALL Mock_glClearBufferfi(GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat depth,
+ GLint stencil);
+static void GL_BINDING_CALL
+Mock_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value);
+static void GL_BINDING_CALL
+Mock_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value);
+static void GL_BINDING_CALL
+Mock_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value);
+static void GL_BINDING_CALL
+Mock_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+static void GL_BINDING_CALL Mock_glClearDepth(GLclampd depth);
+static void GL_BINDING_CALL Mock_glClearDepthf(GLclampf depth);
+static void GL_BINDING_CALL Mock_glClearStencil(GLint s);
+static GLenum GL_BINDING_CALL
+Mock_glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
+static void GL_BINDING_CALL Mock_glColorMask(GLboolean red,
+ GLboolean green,
+ GLboolean blue,
+ GLboolean alpha);
+static void GL_BINDING_CALL Mock_glCompileShader(GLuint shader);
+static void GL_BINDING_CALL Mock_glCompressedTexImage2D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLsizei imageSize,
+ const void* data);
+static void GL_BINDING_CALL Mock_glCompressedTexImage3D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLsizei imageSize,
+ const void* data);
+static void GL_BINDING_CALL Mock_glCompressedTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLsizei imageSize,
+ const void* data);
+static void GL_BINDING_CALL Mock_glCopyBufferSubData(GLenum readTarget,
+ GLenum writeTarget,
+ GLintptr readOffset,
+ GLintptr writeOffset,
+ GLsizeiptr size);
+static void GL_BINDING_CALL Mock_glCopyTexImage2D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLint border);
+static void GL_BINDING_CALL Mock_glCopyTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height);
+static void GL_BINDING_CALL Mock_glCopyTexSubImage3D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint zoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height);
+static GLuint GL_BINDING_CALL Mock_glCreateProgram(void);
+static GLuint GL_BINDING_CALL Mock_glCreateShader(GLenum type);
+static void GL_BINDING_CALL Mock_glCullFace(GLenum mode);
+static void GL_BINDING_CALL
+Mock_glDeleteBuffers(GLsizei n, const GLuint* buffers);
+static void GL_BINDING_CALL
+Mock_glDeleteBuffersARB(GLsizei n, const GLuint* buffers);
+static void GL_BINDING_CALL
+Mock_glDeleteFencesAPPLE(GLsizei n, const GLuint* fences);
+static void GL_BINDING_CALL
+Mock_glDeleteFencesNV(GLsizei n, const GLuint* fences);
+static void GL_BINDING_CALL
+Mock_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
+static void GL_BINDING_CALL
+Mock_glDeleteFramebuffersEXT(GLsizei n, const GLuint* framebuffers);
+static void GL_BINDING_CALL Mock_glDeleteProgram(GLuint program);
+static void GL_BINDING_CALL Mock_glDeleteQueries(GLsizei n, const GLuint* ids);
+static void GL_BINDING_CALL
+Mock_glDeleteQueriesARB(GLsizei n, const GLuint* ids);
+static void GL_BINDING_CALL
+Mock_glDeleteQueriesEXT(GLsizei n, const GLuint* ids);
+static void GL_BINDING_CALL
+Mock_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
+static void GL_BINDING_CALL
+Mock_glDeleteRenderbuffersEXT(GLsizei n, const GLuint* renderbuffers);
+static void GL_BINDING_CALL
+Mock_glDeleteSamplers(GLsizei n, const GLuint* samplers);
+static void GL_BINDING_CALL Mock_glDeleteShader(GLuint shader);
+static void GL_BINDING_CALL Mock_glDeleteSync(GLsync sync);
+static void GL_BINDING_CALL
+Mock_glDeleteTextures(GLsizei n, const GLuint* textures);
+static void GL_BINDING_CALL
+Mock_glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids);
+static void GL_BINDING_CALL
+Mock_glDeleteVertexArrays(GLsizei n, const GLuint* arrays);
+static void GL_BINDING_CALL
+Mock_glDeleteVertexArraysAPPLE(GLsizei n, const GLuint* arrays);
+static void GL_BINDING_CALL
+Mock_glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays);
+static void GL_BINDING_CALL Mock_glDepthFunc(GLenum func);
+static void GL_BINDING_CALL Mock_glDepthMask(GLboolean flag);
+static void GL_BINDING_CALL Mock_glDepthRange(GLclampd zNear, GLclampd zFar);
+static void GL_BINDING_CALL Mock_glDepthRangef(GLclampf zNear, GLclampf zFar);
+static void GL_BINDING_CALL Mock_glDetachShader(GLuint program, GLuint shader);
+static void GL_BINDING_CALL Mock_glDisable(GLenum cap);
+static void GL_BINDING_CALL Mock_glDisableVertexAttribArray(GLuint index);
+static void GL_BINDING_CALL
+Mock_glDiscardFramebufferEXT(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments);
+static void GL_BINDING_CALL
+Mock_glDrawArrays(GLenum mode, GLint first, GLsizei count);
+static void GL_BINDING_CALL Mock_glDrawArraysInstanced(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount);
+static void GL_BINDING_CALL Mock_glDrawArraysInstancedANGLE(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount);
+static void GL_BINDING_CALL Mock_glDrawArraysInstancedARB(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount);
+static void GL_BINDING_CALL Mock_glDrawBuffer(GLenum mode);
+static void GL_BINDING_CALL Mock_glDrawBuffers(GLsizei n, const GLenum* bufs);
+static void GL_BINDING_CALL
+Mock_glDrawBuffersARB(GLsizei n, const GLenum* bufs);
+static void GL_BINDING_CALL
+Mock_glDrawBuffersEXT(GLsizei n, const GLenum* bufs);
+static void GL_BINDING_CALL Mock_glDrawElements(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices);
+static void GL_BINDING_CALL Mock_glDrawElementsInstanced(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount);
+static void GL_BINDING_CALL
+Mock_glDrawElementsInstancedANGLE(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount);
+static void GL_BINDING_CALL Mock_glDrawElementsInstancedARB(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount);
+static void GL_BINDING_CALL Mock_glDrawRangeElements(GLenum mode,
+ GLuint start,
+ GLuint end,
+ GLsizei count,
+ GLenum type,
+ const void* indices);
+static void GL_BINDING_CALL
+Mock_glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
+static void GL_BINDING_CALL
+Mock_glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
+static void GL_BINDING_CALL Mock_glEnable(GLenum cap);
+static void GL_BINDING_CALL Mock_glEnableVertexAttribArray(GLuint index);
+static void GL_BINDING_CALL Mock_glEndQuery(GLenum target);
+static void GL_BINDING_CALL Mock_glEndQueryARB(GLenum target);
+static void GL_BINDING_CALL Mock_glEndQueryEXT(GLenum target);
+static void GL_BINDING_CALL Mock_glEndTransformFeedback(void);
+static GLsync GL_BINDING_CALL
+Mock_glFenceSync(GLenum condition, GLbitfield flags);
+static void GL_BINDING_CALL Mock_glFinish(void);
+static void GL_BINDING_CALL Mock_glFinishFenceAPPLE(GLuint fence);
+static void GL_BINDING_CALL Mock_glFinishFenceNV(GLuint fence);
+static void GL_BINDING_CALL Mock_glFlush(void);
+static void GL_BINDING_CALL Mock_glFlushMappedBufferRange(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length);
+static void GL_BINDING_CALL
+Mock_glFramebufferRenderbuffer(GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer);
+static void GL_BINDING_CALL
+Mock_glFramebufferRenderbufferEXT(GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer);
+static void GL_BINDING_CALL Mock_glFramebufferTexture2D(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level);
+static void GL_BINDING_CALL Mock_glFramebufferTexture2DEXT(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level);
+static void GL_BINDING_CALL
+Mock_glFramebufferTexture2DMultisampleEXT(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples);
+static void GL_BINDING_CALL
+Mock_glFramebufferTexture2DMultisampleIMG(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples);
+static void GL_BINDING_CALL Mock_glFramebufferTextureLayer(GLenum target,
+ GLenum attachment,
+ GLuint texture,
+ GLint level,
+ GLint layer);
+static void GL_BINDING_CALL Mock_glFrontFace(GLenum mode);
+static void GL_BINDING_CALL Mock_glGenBuffers(GLsizei n, GLuint* buffers);
+static void GL_BINDING_CALL Mock_glGenBuffersARB(GLsizei n, GLuint* buffers);
+static void GL_BINDING_CALL Mock_glGenFencesAPPLE(GLsizei n, GLuint* fences);
+static void GL_BINDING_CALL Mock_glGenFencesNV(GLsizei n, GLuint* fences);
+static void GL_BINDING_CALL
+Mock_glGenFramebuffers(GLsizei n, GLuint* framebuffers);
+static void GL_BINDING_CALL
+Mock_glGenFramebuffersEXT(GLsizei n, GLuint* framebuffers);
+static void GL_BINDING_CALL Mock_glGenQueries(GLsizei n, GLuint* ids);
+static void GL_BINDING_CALL Mock_glGenQueriesARB(GLsizei n, GLuint* ids);
+static void GL_BINDING_CALL Mock_glGenQueriesEXT(GLsizei n, GLuint* ids);
+static void GL_BINDING_CALL
+Mock_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers);
+static void GL_BINDING_CALL
+Mock_glGenRenderbuffersEXT(GLsizei n, GLuint* renderbuffers);
+static void GL_BINDING_CALL Mock_glGenSamplers(GLsizei n, GLuint* samplers);
+static void GL_BINDING_CALL Mock_glGenTextures(GLsizei n, GLuint* textures);
+static void GL_BINDING_CALL
+Mock_glGenTransformFeedbacks(GLsizei n, GLuint* ids);
+static void GL_BINDING_CALL Mock_glGenVertexArrays(GLsizei n, GLuint* arrays);
+static void GL_BINDING_CALL
+Mock_glGenVertexArraysAPPLE(GLsizei n, GLuint* arrays);
+static void GL_BINDING_CALL
+Mock_glGenVertexArraysOES(GLsizei n, GLuint* arrays);
+static void GL_BINDING_CALL Mock_glGenerateMipmap(GLenum target);
+static void GL_BINDING_CALL Mock_glGenerateMipmapEXT(GLenum target);
+static void GL_BINDING_CALL Mock_glGetActiveAttrib(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name);
+static void GL_BINDING_CALL Mock_glGetActiveUniform(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name);
+static void GL_BINDING_CALL
+Mock_glGetActiveUniformBlockName(GLuint program,
+ GLuint uniformBlockIndex,
+ GLsizei bufSize,
+ GLsizei* length,
+ char* uniformBlockName);
+static void GL_BINDING_CALL
+Mock_glGetActiveUniformBlockiv(GLuint program,
+ GLuint uniformBlockIndex,
+ GLenum pname,
+ GLint* params);
+static void GL_BINDING_CALL
+Mock_glGetActiveUniformsiv(GLuint program,
+ GLsizei uniformCount,
+ const GLuint* uniformIndices,
+ GLenum pname,
+ GLint* params);
+static void GL_BINDING_CALL Mock_glGetAttachedShaders(GLuint program,
+ GLsizei maxcount,
+ GLsizei* count,
+ GLuint* shaders);
+static GLint GL_BINDING_CALL
+Mock_glGetAttribLocation(GLuint program, const char* name);
+static void GL_BINDING_CALL Mock_glGetBooleanv(GLenum pname, GLboolean* params);
+static void GL_BINDING_CALL
+Mock_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
+static GLenum GL_BINDING_CALL Mock_glGetError(void);
+static void GL_BINDING_CALL
+Mock_glGetFenceivNV(GLuint fence, GLenum pname, GLint* params);
+static void GL_BINDING_CALL Mock_glGetFloatv(GLenum pname, GLfloat* params);
+static GLint GL_BINDING_CALL
+Mock_glGetFragDataLocation(GLuint program, const char* name);
+static void GL_BINDING_CALL
+Mock_glGetFramebufferAttachmentParameteriv(GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* params);
+static void GL_BINDING_CALL
+Mock_glGetFramebufferAttachmentParameterivEXT(GLenum target,
+ GLenum attachment,
+ GLenum pname,
+ GLint* params);
+static GLenum GL_BINDING_CALL Mock_glGetGraphicsResetStatus(void);
+static GLenum GL_BINDING_CALL Mock_glGetGraphicsResetStatusARB(void);
+static GLenum GL_BINDING_CALL Mock_glGetGraphicsResetStatusEXT(void);
+static GLenum GL_BINDING_CALL Mock_glGetGraphicsResetStatusKHR(void);
+static void GL_BINDING_CALL
+Mock_glGetInteger64i_v(GLenum target, GLuint index, GLint64* data);
+static void GL_BINDING_CALL Mock_glGetInteger64v(GLenum pname, GLint64* params);
+static void GL_BINDING_CALL
+Mock_glGetIntegeri_v(GLenum target, GLuint index, GLint* data);
+static void GL_BINDING_CALL Mock_glGetIntegerv(GLenum pname, GLint* params);
+static void GL_BINDING_CALL Mock_glGetInternalformativ(GLenum target,
+ GLenum internalformat,
+ GLenum pname,
+ GLsizei bufSize,
+ GLint* params);
+static void GL_BINDING_CALL Mock_glGetProgramBinary(GLuint program,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* binaryFormat,
+ GLvoid* binary);
+static void GL_BINDING_CALL Mock_glGetProgramBinaryOES(GLuint program,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* binaryFormat,
+ GLvoid* binary);
+static void GL_BINDING_CALL Mock_glGetProgramInfoLog(GLuint program,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog);
+static void GL_BINDING_CALL
+Mock_glGetProgramiv(GLuint program, GLenum pname, GLint* params);
+static void GL_BINDING_CALL
+Mock_glGetQueryObjecti64v(GLuint id, GLenum pname, GLint64* params);
+static void GL_BINDING_CALL
+Mock_glGetQueryObjectiv(GLuint id, GLenum pname, GLint* params);
+static void GL_BINDING_CALL
+Mock_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint* params);
+static void GL_BINDING_CALL
+Mock_glGetQueryObjectivEXT(GLuint id, GLenum pname, GLint* params);
+static void GL_BINDING_CALL
+Mock_glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64* params);
+static void GL_BINDING_CALL
+Mock_glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64* params);
+static void GL_BINDING_CALL
+Mock_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params);
+static void GL_BINDING_CALL
+Mock_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint* params);
+static void GL_BINDING_CALL
+Mock_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params);
+static void GL_BINDING_CALL
+Mock_glGetQueryiv(GLenum target, GLenum pname, GLint* params);
+static void GL_BINDING_CALL
+Mock_glGetQueryivARB(GLenum target, GLenum pname, GLint* params);
+static void GL_BINDING_CALL
+Mock_glGetQueryivEXT(GLenum target, GLenum pname, GLint* params);
+static void GL_BINDING_CALL
+Mock_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
+static void GL_BINDING_CALL Mock_glGetRenderbufferParameterivEXT(GLenum target,
+ GLenum pname,
+ GLint* params);
+static void GL_BINDING_CALL
+Mock_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params);
+static void GL_BINDING_CALL
+Mock_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params);
+static void GL_BINDING_CALL Mock_glGetShaderInfoLog(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* infolog);
+static void GL_BINDING_CALL
+Mock_glGetShaderPrecisionFormat(GLenum shadertype,
+ GLenum precisiontype,
+ GLint* range,
+ GLint* precision);
+static void GL_BINDING_CALL Mock_glGetShaderSource(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source);
+static void GL_BINDING_CALL
+Mock_glGetShaderiv(GLuint shader, GLenum pname, GLint* params);
+static const GLubyte* GL_BINDING_CALL Mock_glGetString(GLenum name);
+static void GL_BINDING_CALL Mock_glGetSynciv(GLsync sync,
+ GLenum pname,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLint* values);
+static void GL_BINDING_CALL Mock_glGetTexLevelParameterfv(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLfloat* params);
+static void GL_BINDING_CALL Mock_glGetTexLevelParameteriv(GLenum target,
+ GLint level,
+ GLenum pname,
+ GLint* params);
+static void GL_BINDING_CALL
+Mock_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
+static void GL_BINDING_CALL
+Mock_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params);
+static void GL_BINDING_CALL Mock_glGetTransformFeedbackVarying(GLuint program,
+ GLuint index,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* type,
+ char* name);
+static void GL_BINDING_CALL
+Mock_glGetTranslatedShaderSourceANGLE(GLuint shader,
+ GLsizei bufsize,
+ GLsizei* length,
+ char* source);
+static GLuint GL_BINDING_CALL
+Mock_glGetUniformBlockIndex(GLuint program, const char* uniformBlockName);
+static void GL_BINDING_CALL
+Mock_glGetUniformIndices(GLuint program,
+ GLsizei uniformCount,
+ const char* const* uniformNames,
+ GLuint* uniformIndices);
+static GLint GL_BINDING_CALL
+Mock_glGetUniformLocation(GLuint program, const char* name);
+static void GL_BINDING_CALL
+Mock_glGetUniformfv(GLuint program, GLint location, GLfloat* params);
+static void GL_BINDING_CALL
+Mock_glGetUniformiv(GLuint program, GLint location, GLint* params);
+static void GL_BINDING_CALL
+Mock_glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer);
+static void GL_BINDING_CALL
+Mock_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
+static void GL_BINDING_CALL
+Mock_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
+static void GL_BINDING_CALL Mock_glHint(GLenum target, GLenum mode);
+static void GL_BINDING_CALL
+Mock_glInsertEventMarkerEXT(GLsizei length, const char* marker);
+static void GL_BINDING_CALL
+Mock_glInvalidateFramebuffer(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments);
+static void GL_BINDING_CALL
+Mock_glInvalidateSubFramebuffer(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments,
+ GLint x,
+ GLint y,
+ GLint width,
+ GLint height);
+static GLboolean GL_BINDING_CALL Mock_glIsBuffer(GLuint buffer);
+static GLboolean GL_BINDING_CALL Mock_glIsEnabled(GLenum cap);
+static GLboolean GL_BINDING_CALL Mock_glIsFenceAPPLE(GLuint fence);
+static GLboolean GL_BINDING_CALL Mock_glIsFenceNV(GLuint fence);
+static GLboolean GL_BINDING_CALL Mock_glIsFramebuffer(GLuint framebuffer);
+static GLboolean GL_BINDING_CALL Mock_glIsFramebufferEXT(GLuint framebuffer);
+static GLboolean GL_BINDING_CALL Mock_glIsProgram(GLuint program);
+static GLboolean GL_BINDING_CALL Mock_glIsQuery(GLuint query);
+static GLboolean GL_BINDING_CALL Mock_glIsQueryARB(GLuint query);
+static GLboolean GL_BINDING_CALL Mock_glIsQueryEXT(GLuint query);
+static GLboolean GL_BINDING_CALL Mock_glIsRenderbuffer(GLuint renderbuffer);
+static GLboolean GL_BINDING_CALL Mock_glIsRenderbufferEXT(GLuint renderbuffer);
+static GLboolean GL_BINDING_CALL Mock_glIsSampler(GLuint sampler);
+static GLboolean GL_BINDING_CALL Mock_glIsShader(GLuint shader);
+static GLboolean GL_BINDING_CALL Mock_glIsSync(GLsync sync);
+static GLboolean GL_BINDING_CALL Mock_glIsTexture(GLuint texture);
+static GLboolean GL_BINDING_CALL Mock_glIsTransformFeedback(GLuint id);
+static GLboolean GL_BINDING_CALL Mock_glIsVertexArray(GLuint array);
+static GLboolean GL_BINDING_CALL Mock_glIsVertexArrayAPPLE(GLuint array);
+static GLboolean GL_BINDING_CALL Mock_glIsVertexArrayOES(GLuint array);
+static void GL_BINDING_CALL Mock_glLineWidth(GLfloat width);
+static void GL_BINDING_CALL Mock_glLinkProgram(GLuint program);
+static void* GL_BINDING_CALL Mock_glMapBuffer(GLenum target, GLenum access);
+static void* GL_BINDING_CALL Mock_glMapBufferOES(GLenum target, GLenum access);
+static void* GL_BINDING_CALL Mock_glMapBufferRange(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length,
+ GLbitfield access);
+static void* GL_BINDING_CALL Mock_glMapBufferRangeEXT(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length,
+ GLbitfield access);
+static void GL_BINDING_CALL Mock_glMatrixLoadIdentityEXT(GLenum matrixMode);
+static void GL_BINDING_CALL
+Mock_glMatrixLoadfEXT(GLenum matrixMode, const GLfloat* m);
+static void GL_BINDING_CALL Mock_glPauseTransformFeedback(void);
+static void GL_BINDING_CALL Mock_glPixelStorei(GLenum pname, GLint param);
+static void GL_BINDING_CALL Mock_glPointParameteri(GLenum pname, GLint param);
+static void GL_BINDING_CALL Mock_glPolygonOffset(GLfloat factor, GLfloat units);
+static void GL_BINDING_CALL Mock_glPopGroupMarkerEXT(void);
+static void GL_BINDING_CALL Mock_glProgramBinary(GLuint program,
+ GLenum binaryFormat,
+ const GLvoid* binary,
+ GLsizei length);
+static void GL_BINDING_CALL Mock_glProgramBinaryOES(GLuint program,
+ GLenum binaryFormat,
+ const GLvoid* binary,
+ GLsizei length);
+static void GL_BINDING_CALL
+Mock_glProgramParameteri(GLuint program, GLenum pname, GLint value);
+static void GL_BINDING_CALL
+Mock_glPushGroupMarkerEXT(GLsizei length, const char* marker);
+static void GL_BINDING_CALL Mock_glQueryCounter(GLuint id, GLenum target);
+static void GL_BINDING_CALL Mock_glQueryCounterEXT(GLuint id, GLenum target);
+static void GL_BINDING_CALL Mock_glReadBuffer(GLenum src);
+static void GL_BINDING_CALL Mock_glReadPixels(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ void* pixels);
+static void GL_BINDING_CALL Mock_glReleaseShaderCompiler(void);
+static void GL_BINDING_CALL Mock_glRenderbufferStorage(GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height);
+static void GL_BINDING_CALL Mock_glRenderbufferStorageEXT(GLenum target,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height);
+static void GL_BINDING_CALL
+Mock_glRenderbufferStorageMultisample(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height);
+static void GL_BINDING_CALL
+Mock_glRenderbufferStorageMultisampleANGLE(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height);
+static void GL_BINDING_CALL
+Mock_glRenderbufferStorageMultisampleEXT(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height);
+static void GL_BINDING_CALL
+Mock_glRenderbufferStorageMultisampleIMG(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height);
+static void GL_BINDING_CALL Mock_glResumeTransformFeedback(void);
+static void GL_BINDING_CALL
+Mock_glSampleCoverage(GLclampf value, GLboolean invert);
+static void GL_BINDING_CALL
+Mock_glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param);
+static void GL_BINDING_CALL
+Mock_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* params);
+static void GL_BINDING_CALL
+Mock_glSamplerParameteri(GLuint sampler, GLenum pname, GLint param);
+static void GL_BINDING_CALL
+Mock_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* params);
+static void GL_BINDING_CALL
+Mock_glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
+static void GL_BINDING_CALL Mock_glSetFenceAPPLE(GLuint fence);
+static void GL_BINDING_CALL Mock_glSetFenceNV(GLuint fence, GLenum condition);
+static void GL_BINDING_CALL Mock_glShaderBinary(GLsizei n,
+ const GLuint* shaders,
+ GLenum binaryformat,
+ const void* binary,
+ GLsizei length);
+static void GL_BINDING_CALL Mock_glShaderSource(GLuint shader,
+ GLsizei count,
+ const char* const* str,
+ const GLint* length);
+static void GL_BINDING_CALL
+Mock_glStencilFunc(GLenum func, GLint ref, GLuint mask);
+static void GL_BINDING_CALL
+Mock_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
+static void GL_BINDING_CALL Mock_glStencilMask(GLuint mask);
+static void GL_BINDING_CALL
+Mock_glStencilMaskSeparate(GLenum face, GLuint mask);
+static void GL_BINDING_CALL
+Mock_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);
+static void GL_BINDING_CALL
+Mock_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
+static GLboolean GL_BINDING_CALL Mock_glTestFenceAPPLE(GLuint fence);
+static GLboolean GL_BINDING_CALL Mock_glTestFenceNV(GLuint fence);
+static void GL_BINDING_CALL Mock_glTexImage2D(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels);
+static void GL_BINDING_CALL Mock_glTexImage3D(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels);
+static void GL_BINDING_CALL
+Mock_glTexParameterf(GLenum target, GLenum pname, GLfloat param);
+static void GL_BINDING_CALL
+Mock_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params);
+static void GL_BINDING_CALL
+Mock_glTexParameteri(GLenum target, GLenum pname, GLint param);
+static void GL_BINDING_CALL
+Mock_glTexParameteriv(GLenum target, GLenum pname, const GLint* params);
+static void GL_BINDING_CALL Mock_glTexStorage2D(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height);
+static void GL_BINDING_CALL Mock_glTexStorage2DEXT(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height);
+static void GL_BINDING_CALL Mock_glTexStorage3D(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth);
+static void GL_BINDING_CALL Mock_glTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels);
+static void GL_BINDING_CALL
+Mock_glTransformFeedbackVaryings(GLuint program,
+ GLsizei count,
+ const char* const* varyings,
+ GLenum bufferMode);
+static void GL_BINDING_CALL Mock_glUniform1f(GLint location, GLfloat x);
+static void GL_BINDING_CALL
+Mock_glUniform1fv(GLint location, GLsizei count, const GLfloat* v);
+static void GL_BINDING_CALL Mock_glUniform1i(GLint location, GLint x);
+static void GL_BINDING_CALL
+Mock_glUniform1iv(GLint location, GLsizei count, const GLint* v);
+static void GL_BINDING_CALL Mock_glUniform1ui(GLint location, GLuint v0);
+static void GL_BINDING_CALL
+Mock_glUniform1uiv(GLint location, GLsizei count, const GLuint* v);
+static void GL_BINDING_CALL
+Mock_glUniform2f(GLint location, GLfloat x, GLfloat y);
+static void GL_BINDING_CALL
+Mock_glUniform2fv(GLint location, GLsizei count, const GLfloat* v);
+static void GL_BINDING_CALL Mock_glUniform2i(GLint location, GLint x, GLint y);
+static void GL_BINDING_CALL
+Mock_glUniform2iv(GLint location, GLsizei count, const GLint* v);
+static void GL_BINDING_CALL
+Mock_glUniform2ui(GLint location, GLuint v0, GLuint v1);
+static void GL_BINDING_CALL
+Mock_glUniform2uiv(GLint location, GLsizei count, const GLuint* v);
+static void GL_BINDING_CALL
+Mock_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
+static void GL_BINDING_CALL
+Mock_glUniform3fv(GLint location, GLsizei count, const GLfloat* v);
+static void GL_BINDING_CALL
+Mock_glUniform3i(GLint location, GLint x, GLint y, GLint z);
+static void GL_BINDING_CALL
+Mock_glUniform3iv(GLint location, GLsizei count, const GLint* v);
+static void GL_BINDING_CALL
+Mock_glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2);
+static void GL_BINDING_CALL
+Mock_glUniform3uiv(GLint location, GLsizei count, const GLuint* v);
+static void GL_BINDING_CALL
+Mock_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+static void GL_BINDING_CALL
+Mock_glUniform4fv(GLint location, GLsizei count, const GLfloat* v);
+static void GL_BINDING_CALL
+Mock_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
+static void GL_BINDING_CALL
+Mock_glUniform4iv(GLint location, GLsizei count, const GLint* v);
+static void GL_BINDING_CALL
+Mock_glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+static void GL_BINDING_CALL
+Mock_glUniform4uiv(GLint location, GLsizei count, const GLuint* v);
+static void GL_BINDING_CALL
+Mock_glUniformBlockBinding(GLuint program,
+ GLuint uniformBlockIndex,
+ GLuint uniformBlockBinding);
+static void GL_BINDING_CALL Mock_glUniformMatrix2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+static void GL_BINDING_CALL Mock_glUniformMatrix2x3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+static void GL_BINDING_CALL Mock_glUniformMatrix2x4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+static void GL_BINDING_CALL Mock_glUniformMatrix3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+static void GL_BINDING_CALL Mock_glUniformMatrix3x2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+static void GL_BINDING_CALL Mock_glUniformMatrix3x4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+static void GL_BINDING_CALL Mock_glUniformMatrix4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+static void GL_BINDING_CALL Mock_glUniformMatrix4x2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+static void GL_BINDING_CALL Mock_glUniformMatrix4x3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value);
+static GLboolean GL_BINDING_CALL Mock_glUnmapBuffer(GLenum target);
+static GLboolean GL_BINDING_CALL Mock_glUnmapBufferOES(GLenum target);
+static void GL_BINDING_CALL Mock_glUseProgram(GLuint program);
+static void GL_BINDING_CALL Mock_glValidateProgram(GLuint program);
+static void GL_BINDING_CALL Mock_glVertexAttrib1f(GLuint indx, GLfloat x);
+static void GL_BINDING_CALL
+Mock_glVertexAttrib1fv(GLuint indx, const GLfloat* values);
+static void GL_BINDING_CALL
+Mock_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
+static void GL_BINDING_CALL
+Mock_glVertexAttrib2fv(GLuint indx, const GLfloat* values);
+static void GL_BINDING_CALL
+Mock_glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
+static void GL_BINDING_CALL
+Mock_glVertexAttrib3fv(GLuint indx, const GLfloat* values);
+static void GL_BINDING_CALL
+Mock_glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+static void GL_BINDING_CALL
+Mock_glVertexAttrib4fv(GLuint indx, const GLfloat* values);
+static void GL_BINDING_CALL
+Mock_glVertexAttribDivisor(GLuint index, GLuint divisor);
+static void GL_BINDING_CALL
+Mock_glVertexAttribDivisorANGLE(GLuint index, GLuint divisor);
+static void GL_BINDING_CALL
+Mock_glVertexAttribDivisorARB(GLuint index, GLuint divisor);
+static void GL_BINDING_CALL
+Mock_glVertexAttribI4i(GLuint indx, GLint x, GLint y, GLint z, GLint w);
+static void GL_BINDING_CALL
+Mock_glVertexAttribI4iv(GLuint indx, const GLint* values);
+static void GL_BINDING_CALL
+Mock_glVertexAttribI4ui(GLuint indx, GLuint x, GLuint y, GLuint z, GLuint w);
+static void GL_BINDING_CALL
+Mock_glVertexAttribI4uiv(GLuint indx, const GLuint* values);
+static void GL_BINDING_CALL Mock_glVertexAttribIPointer(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLsizei stride,
+ const void* ptr);
+static void GL_BINDING_CALL Mock_glVertexAttribPointer(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLboolean normalized,
+ GLsizei stride,
+ const void* ptr);
+static void GL_BINDING_CALL
+Mock_glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
+static GLenum GL_BINDING_CALL
+Mock_glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
diff --git a/ui/gl/gl_bindings_autogen_osmesa.cc b/ui/gl/gl_bindings_autogen_osmesa.cc
new file mode 100644
index 0000000..c0c3ed2
--- /dev/null
+++ b/ui/gl/gl_bindings_autogen_osmesa.cc
@@ -0,0 +1,372 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+#include <string>
+
+#include "base/debug/trace_event.h"
+#include "ui/gl/gl_bindings.h"
+#include "ui/gl/gl_context.h"
+#include "ui/gl/gl_enums.h"
+#include "ui/gl/gl_implementation.h"
+#include "ui/gl/gl_osmesa_api_implementation.h"
+#include "ui/gl/gl_version_info.h"
+
+namespace gfx {
+
+static bool g_debugBindingsInitialized;
+DriverOSMESA g_driver_osmesa;
+
+void DriverOSMESA::InitializeStaticBindings() {
+ fn.OSMesaColorClampFn = reinterpret_cast<OSMesaColorClampProc>(
+ GetGLProcAddress("OSMesaColorClamp"));
+ fn.OSMesaCreateContextFn = reinterpret_cast<OSMesaCreateContextProc>(
+ GetGLProcAddress("OSMesaCreateContext"));
+ fn.OSMesaCreateContextExtFn = reinterpret_cast<OSMesaCreateContextExtProc>(
+ GetGLProcAddress("OSMesaCreateContextExt"));
+ fn.OSMesaDestroyContextFn = reinterpret_cast<OSMesaDestroyContextProc>(
+ GetGLProcAddress("OSMesaDestroyContext"));
+ fn.OSMesaGetColorBufferFn = reinterpret_cast<OSMesaGetColorBufferProc>(
+ GetGLProcAddress("OSMesaGetColorBuffer"));
+ fn.OSMesaGetCurrentContextFn = reinterpret_cast<OSMesaGetCurrentContextProc>(
+ GetGLProcAddress("OSMesaGetCurrentContext"));
+ fn.OSMesaGetDepthBufferFn = reinterpret_cast<OSMesaGetDepthBufferProc>(
+ GetGLProcAddress("OSMesaGetDepthBuffer"));
+ fn.OSMesaGetIntegervFn = reinterpret_cast<OSMesaGetIntegervProc>(
+ GetGLProcAddress("OSMesaGetIntegerv"));
+ fn.OSMesaGetProcAddressFn = reinterpret_cast<OSMesaGetProcAddressProc>(
+ GetGLProcAddress("OSMesaGetProcAddress"));
+ fn.OSMesaMakeCurrentFn = reinterpret_cast<OSMesaMakeCurrentProc>(
+ GetGLProcAddress("OSMesaMakeCurrent"));
+ fn.OSMesaPixelStoreFn = reinterpret_cast<OSMesaPixelStoreProc>(
+ GetGLProcAddress("OSMesaPixelStore"));
+}
+
+void DriverOSMESA::InitializeDynamicBindings(GLContext* context) {
+ DCHECK(context && context->IsCurrent(NULL));
+ const GLVersionInfo* ver = context->GetVersionInfo();
+ ALLOW_UNUSED_LOCAL(ver);
+ std::string extensions = context->GetExtensions() + " ";
+ ALLOW_UNUSED_LOCAL(extensions);
+
+ if (g_debugBindingsInitialized)
+ InitializeDebugBindings();
+}
+
+extern "C" {
+
+static void GL_BINDING_CALL Debug_OSMesaColorClamp(GLboolean enable) {
+ GL_SERVICE_LOG("OSMesaColorClamp"
+ << "(" << GLEnums::GetStringBool(enable) << ")");
+ g_driver_osmesa.debug_fn.OSMesaColorClampFn(enable);
+}
+
+static OSMesaContext GL_BINDING_CALL
+Debug_OSMesaCreateContext(GLenum format, OSMesaContext sharelist) {
+ GL_SERVICE_LOG("OSMesaCreateContext"
+ << "(" << GLEnums::GetStringEnum(format) << ", " << sharelist
+ << ")");
+ OSMesaContext result =
+ g_driver_osmesa.debug_fn.OSMesaCreateContextFn(format, sharelist);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static OSMesaContext GL_BINDING_CALL
+Debug_OSMesaCreateContextExt(GLenum format,
+ GLint depthBits,
+ GLint stencilBits,
+ GLint accumBits,
+ OSMesaContext sharelist) {
+ GL_SERVICE_LOG("OSMesaCreateContextExt"
+ << "(" << GLEnums::GetStringEnum(format) << ", " << depthBits
+ << ", " << stencilBits << ", " << accumBits << ", "
+ << sharelist << ")");
+ OSMesaContext result = g_driver_osmesa.debug_fn.OSMesaCreateContextExtFn(
+ format, depthBits, stencilBits, accumBits, sharelist);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL Debug_OSMesaDestroyContext(OSMesaContext ctx) {
+ GL_SERVICE_LOG("OSMesaDestroyContext"
+ << "(" << ctx << ")");
+ g_driver_osmesa.debug_fn.OSMesaDestroyContextFn(ctx);
+}
+
+static GLboolean GL_BINDING_CALL Debug_OSMesaGetColorBuffer(OSMesaContext c,
+ GLint* width,
+ GLint* height,
+ GLint* format,
+ void** buffer) {
+ GL_SERVICE_LOG("OSMesaGetColorBuffer"
+ << "(" << c << ", " << static_cast<const void*>(width) << ", "
+ << static_cast<const void*>(height) << ", "
+ << static_cast<const void*>(format) << ", " << buffer << ")");
+ GLboolean result = g_driver_osmesa.debug_fn.OSMesaGetColorBufferFn(
+ c, width, height, format, buffer);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static OSMesaContext GL_BINDING_CALL Debug_OSMesaGetCurrentContext(void) {
+ GL_SERVICE_LOG("OSMesaGetCurrentContext"
+ << "("
+ << ")");
+ OSMesaContext result = g_driver_osmesa.debug_fn.OSMesaGetCurrentContextFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLboolean GL_BINDING_CALL
+Debug_OSMesaGetDepthBuffer(OSMesaContext c,
+ GLint* width,
+ GLint* height,
+ GLint* bytesPerValue,
+ void** buffer) {
+ GL_SERVICE_LOG("OSMesaGetDepthBuffer"
+ << "(" << c << ", " << static_cast<const void*>(width) << ", "
+ << static_cast<const void*>(height) << ", "
+ << static_cast<const void*>(bytesPerValue) << ", " << buffer
+ << ")");
+ GLboolean result = g_driver_osmesa.debug_fn.OSMesaGetDepthBufferFn(
+ c, width, height, bytesPerValue, buffer);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL Debug_OSMesaGetIntegerv(GLint pname, GLint* value) {
+ GL_SERVICE_LOG("OSMesaGetIntegerv"
+ << "(" << pname << ", " << static_cast<const void*>(value)
+ << ")");
+ g_driver_osmesa.debug_fn.OSMesaGetIntegervFn(pname, value);
+}
+
+static OSMESAproc GL_BINDING_CALL
+Debug_OSMesaGetProcAddress(const char* funcName) {
+ GL_SERVICE_LOG("OSMesaGetProcAddress"
+ << "(" << funcName << ")");
+ OSMESAproc result = g_driver_osmesa.debug_fn.OSMesaGetProcAddressFn(funcName);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static GLboolean GL_BINDING_CALL Debug_OSMesaMakeCurrent(OSMesaContext ctx,
+ void* buffer,
+ GLenum type,
+ GLsizei width,
+ GLsizei height) {
+ GL_SERVICE_LOG("OSMesaMakeCurrent"
+ << "(" << ctx << ", " << static_cast<const void*>(buffer)
+ << ", " << GLEnums::GetStringEnum(type) << ", " << width
+ << ", " << height << ")");
+ GLboolean result = g_driver_osmesa.debug_fn.OSMesaMakeCurrentFn(
+ ctx, buffer, type, width, height);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static void GL_BINDING_CALL Debug_OSMesaPixelStore(GLint pname, GLint value) {
+ GL_SERVICE_LOG("OSMesaPixelStore"
+ << "(" << pname << ", " << value << ")");
+ g_driver_osmesa.debug_fn.OSMesaPixelStoreFn(pname, value);
+}
+} // extern "C"
+
+void DriverOSMESA::InitializeDebugBindings() {
+ if (!debug_fn.OSMesaColorClampFn) {
+ debug_fn.OSMesaColorClampFn = fn.OSMesaColorClampFn;
+ fn.OSMesaColorClampFn = Debug_OSMesaColorClamp;
+ }
+ if (!debug_fn.OSMesaCreateContextFn) {
+ debug_fn.OSMesaCreateContextFn = fn.OSMesaCreateContextFn;
+ fn.OSMesaCreateContextFn = Debug_OSMesaCreateContext;
+ }
+ if (!debug_fn.OSMesaCreateContextExtFn) {
+ debug_fn.OSMesaCreateContextExtFn = fn.OSMesaCreateContextExtFn;
+ fn.OSMesaCreateContextExtFn = Debug_OSMesaCreateContextExt;
+ }
+ if (!debug_fn.OSMesaDestroyContextFn) {
+ debug_fn.OSMesaDestroyContextFn = fn.OSMesaDestroyContextFn;
+ fn.OSMesaDestroyContextFn = Debug_OSMesaDestroyContext;
+ }
+ if (!debug_fn.OSMesaGetColorBufferFn) {
+ debug_fn.OSMesaGetColorBufferFn = fn.OSMesaGetColorBufferFn;
+ fn.OSMesaGetColorBufferFn = Debug_OSMesaGetColorBuffer;
+ }
+ if (!debug_fn.OSMesaGetCurrentContextFn) {
+ debug_fn.OSMesaGetCurrentContextFn = fn.OSMesaGetCurrentContextFn;
+ fn.OSMesaGetCurrentContextFn = Debug_OSMesaGetCurrentContext;
+ }
+ if (!debug_fn.OSMesaGetDepthBufferFn) {
+ debug_fn.OSMesaGetDepthBufferFn = fn.OSMesaGetDepthBufferFn;
+ fn.OSMesaGetDepthBufferFn = Debug_OSMesaGetDepthBuffer;
+ }
+ if (!debug_fn.OSMesaGetIntegervFn) {
+ debug_fn.OSMesaGetIntegervFn = fn.OSMesaGetIntegervFn;
+ fn.OSMesaGetIntegervFn = Debug_OSMesaGetIntegerv;
+ }
+ if (!debug_fn.OSMesaGetProcAddressFn) {
+ debug_fn.OSMesaGetProcAddressFn = fn.OSMesaGetProcAddressFn;
+ fn.OSMesaGetProcAddressFn = Debug_OSMesaGetProcAddress;
+ }
+ if (!debug_fn.OSMesaMakeCurrentFn) {
+ debug_fn.OSMesaMakeCurrentFn = fn.OSMesaMakeCurrentFn;
+ fn.OSMesaMakeCurrentFn = Debug_OSMesaMakeCurrent;
+ }
+ if (!debug_fn.OSMesaPixelStoreFn) {
+ debug_fn.OSMesaPixelStoreFn = fn.OSMesaPixelStoreFn;
+ fn.OSMesaPixelStoreFn = Debug_OSMesaPixelStore;
+ }
+ g_debugBindingsInitialized = true;
+}
+
+void DriverOSMESA::ClearBindings() {
+ memset(this, 0, sizeof(*this));
+}
+
+void OSMESAApiBase::OSMesaColorClampFn(GLboolean enable) {
+ driver_->fn.OSMesaColorClampFn(enable);
+}
+
+OSMesaContext OSMESAApiBase::OSMesaCreateContextFn(GLenum format,
+ OSMesaContext sharelist) {
+ return driver_->fn.OSMesaCreateContextFn(format, sharelist);
+}
+
+OSMesaContext OSMESAApiBase::OSMesaCreateContextExtFn(GLenum format,
+ GLint depthBits,
+ GLint stencilBits,
+ GLint accumBits,
+ OSMesaContext sharelist) {
+ return driver_->fn.OSMesaCreateContextExtFn(format, depthBits, stencilBits,
+ accumBits, sharelist);
+}
+
+void OSMESAApiBase::OSMesaDestroyContextFn(OSMesaContext ctx) {
+ driver_->fn.OSMesaDestroyContextFn(ctx);
+}
+
+GLboolean OSMESAApiBase::OSMesaGetColorBufferFn(OSMesaContext c,
+ GLint* width,
+ GLint* height,
+ GLint* format,
+ void** buffer) {
+ return driver_->fn.OSMesaGetColorBufferFn(c, width, height, format, buffer);
+}
+
+OSMesaContext OSMESAApiBase::OSMesaGetCurrentContextFn(void) {
+ return driver_->fn.OSMesaGetCurrentContextFn();
+}
+
+GLboolean OSMESAApiBase::OSMesaGetDepthBufferFn(OSMesaContext c,
+ GLint* width,
+ GLint* height,
+ GLint* bytesPerValue,
+ void** buffer) {
+ return driver_->fn.OSMesaGetDepthBufferFn(c, width, height, bytesPerValue,
+ buffer);
+}
+
+void OSMESAApiBase::OSMesaGetIntegervFn(GLint pname, GLint* value) {
+ driver_->fn.OSMesaGetIntegervFn(pname, value);
+}
+
+OSMESAproc OSMESAApiBase::OSMesaGetProcAddressFn(const char* funcName) {
+ return driver_->fn.OSMesaGetProcAddressFn(funcName);
+}
+
+GLboolean OSMESAApiBase::OSMesaMakeCurrentFn(OSMesaContext ctx,
+ void* buffer,
+ GLenum type,
+ GLsizei width,
+ GLsizei height) {
+ return driver_->fn.OSMesaMakeCurrentFn(ctx, buffer, type, width, height);
+}
+
+void OSMESAApiBase::OSMesaPixelStoreFn(GLint pname, GLint value) {
+ driver_->fn.OSMesaPixelStoreFn(pname, value);
+}
+
+void TraceOSMESAApi::OSMesaColorClampFn(GLboolean enable) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaColorClamp")
+ osmesa_api_->OSMesaColorClampFn(enable);
+}
+
+OSMesaContext TraceOSMESAApi::OSMesaCreateContextFn(GLenum format,
+ OSMesaContext sharelist) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaCreateContext")
+ return osmesa_api_->OSMesaCreateContextFn(format, sharelist);
+}
+
+OSMesaContext TraceOSMESAApi::OSMesaCreateContextExtFn(
+ GLenum format,
+ GLint depthBits,
+ GLint stencilBits,
+ GLint accumBits,
+ OSMesaContext sharelist) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaCreateContextExt")
+ return osmesa_api_->OSMesaCreateContextExtFn(format, depthBits, stencilBits,
+ accumBits, sharelist);
+}
+
+void TraceOSMESAApi::OSMesaDestroyContextFn(OSMesaContext ctx) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaDestroyContext")
+ osmesa_api_->OSMesaDestroyContextFn(ctx);
+}
+
+GLboolean TraceOSMESAApi::OSMesaGetColorBufferFn(OSMesaContext c,
+ GLint* width,
+ GLint* height,
+ GLint* format,
+ void** buffer) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaGetColorBuffer")
+ return osmesa_api_->OSMesaGetColorBufferFn(c, width, height, format, buffer);
+}
+
+OSMesaContext TraceOSMESAApi::OSMesaGetCurrentContextFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaGetCurrentContext")
+ return osmesa_api_->OSMesaGetCurrentContextFn();
+}
+
+GLboolean TraceOSMESAApi::OSMesaGetDepthBufferFn(OSMesaContext c,
+ GLint* width,
+ GLint* height,
+ GLint* bytesPerValue,
+ void** buffer) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaGetDepthBuffer")
+ return osmesa_api_->OSMesaGetDepthBufferFn(c, width, height, bytesPerValue,
+ buffer);
+}
+
+void TraceOSMESAApi::OSMesaGetIntegervFn(GLint pname, GLint* value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaGetIntegerv")
+ osmesa_api_->OSMesaGetIntegervFn(pname, value);
+}
+
+OSMESAproc TraceOSMESAApi::OSMesaGetProcAddressFn(const char* funcName) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaGetProcAddress")
+ return osmesa_api_->OSMesaGetProcAddressFn(funcName);
+}
+
+GLboolean TraceOSMESAApi::OSMesaMakeCurrentFn(OSMesaContext ctx,
+ void* buffer,
+ GLenum type,
+ GLsizei width,
+ GLsizei height) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaMakeCurrent")
+ return osmesa_api_->OSMesaMakeCurrentFn(ctx, buffer, type, width, height);
+}
+
+void TraceOSMESAApi::OSMesaPixelStoreFn(GLint pname, GLint value) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaPixelStore")
+ osmesa_api_->OSMesaPixelStoreFn(pname, value);
+}
+
+} // namespace gfx
diff --git a/ui/gl/gl_bindings_autogen_osmesa.h b/ui/gl/gl_bindings_autogen_osmesa.h
new file mode 100644
index 0000000..8a6bb66
--- /dev/null
+++ b/ui/gl/gl_bindings_autogen_osmesa.h
@@ -0,0 +1,123 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+#ifndef UI_GFX_GL_GL_BINDINGS_AUTOGEN_OSMESA_H_
+#define UI_GFX_GL_GL_BINDINGS_AUTOGEN_OSMESA_H_
+
+namespace gfx {
+
+class GLContext;
+
+typedef void(GL_BINDING_CALL* OSMesaColorClampProc)(GLboolean enable);
+typedef OSMesaContext(GL_BINDING_CALL* OSMesaCreateContextProc)(
+ GLenum format,
+ OSMesaContext sharelist);
+typedef OSMesaContext(GL_BINDING_CALL* OSMesaCreateContextExtProc)(
+ GLenum format,
+ GLint depthBits,
+ GLint stencilBits,
+ GLint accumBits,
+ OSMesaContext sharelist);
+typedef void(GL_BINDING_CALL* OSMesaDestroyContextProc)(OSMesaContext ctx);
+typedef GLboolean(GL_BINDING_CALL* OSMesaGetColorBufferProc)(OSMesaContext c,
+ GLint* width,
+ GLint* height,
+ GLint* format,
+ void** buffer);
+typedef OSMesaContext(GL_BINDING_CALL* OSMesaGetCurrentContextProc)(void);
+typedef GLboolean(GL_BINDING_CALL* OSMesaGetDepthBufferProc)(
+ OSMesaContext c,
+ GLint* width,
+ GLint* height,
+ GLint* bytesPerValue,
+ void** buffer);
+typedef void(GL_BINDING_CALL* OSMesaGetIntegervProc)(GLint pname, GLint* value);
+typedef OSMESAproc(GL_BINDING_CALL* OSMesaGetProcAddressProc)(
+ const char* funcName);
+typedef GLboolean(GL_BINDING_CALL* OSMesaMakeCurrentProc)(OSMesaContext ctx,
+ void* buffer,
+ GLenum type,
+ GLsizei width,
+ GLsizei height);
+typedef void(GL_BINDING_CALL* OSMesaPixelStoreProc)(GLint pname, GLint value);
+
+struct ExtensionsOSMESA {};
+
+struct ProcsOSMESA {
+ OSMesaColorClampProc OSMesaColorClampFn;
+ OSMesaCreateContextProc OSMesaCreateContextFn;
+ OSMesaCreateContextExtProc OSMesaCreateContextExtFn;
+ OSMesaDestroyContextProc OSMesaDestroyContextFn;
+ OSMesaGetColorBufferProc OSMesaGetColorBufferFn;
+ OSMesaGetCurrentContextProc OSMesaGetCurrentContextFn;
+ OSMesaGetDepthBufferProc OSMesaGetDepthBufferFn;
+ OSMesaGetIntegervProc OSMesaGetIntegervFn;
+ OSMesaGetProcAddressProc OSMesaGetProcAddressFn;
+ OSMesaMakeCurrentProc OSMesaMakeCurrentFn;
+ OSMesaPixelStoreProc OSMesaPixelStoreFn;
+};
+
+class GL_EXPORT OSMESAApi {
+ public:
+ OSMESAApi();
+ virtual ~OSMESAApi();
+
+ virtual void OSMesaColorClampFn(GLboolean enable) = 0;
+ virtual OSMesaContext OSMesaCreateContextFn(GLenum format,
+ OSMesaContext sharelist) = 0;
+ virtual OSMesaContext OSMesaCreateContextExtFn(GLenum format,
+ GLint depthBits,
+ GLint stencilBits,
+ GLint accumBits,
+ OSMesaContext sharelist) = 0;
+ virtual void OSMesaDestroyContextFn(OSMesaContext ctx) = 0;
+ virtual GLboolean OSMesaGetColorBufferFn(OSMesaContext c,
+ GLint* width,
+ GLint* height,
+ GLint* format,
+ void** buffer) = 0;
+ virtual OSMesaContext OSMesaGetCurrentContextFn(void) = 0;
+ virtual GLboolean OSMesaGetDepthBufferFn(OSMesaContext c,
+ GLint* width,
+ GLint* height,
+ GLint* bytesPerValue,
+ void** buffer) = 0;
+ virtual void OSMesaGetIntegervFn(GLint pname, GLint* value) = 0;
+ virtual OSMESAproc OSMesaGetProcAddressFn(const char* funcName) = 0;
+ virtual GLboolean OSMesaMakeCurrentFn(OSMesaContext ctx,
+ void* buffer,
+ GLenum type,
+ GLsizei width,
+ GLsizei height) = 0;
+ virtual void OSMesaPixelStoreFn(GLint pname, GLint value) = 0;
+};
+
+} // namespace gfx
+
+#define OSMesaColorClamp ::gfx::g_current_osmesa_context->OSMesaColorClampFn
+#define OSMesaCreateContext \
+ ::gfx::g_current_osmesa_context->OSMesaCreateContextFn
+#define OSMesaCreateContextExt \
+ ::gfx::g_current_osmesa_context->OSMesaCreateContextExtFn
+#define OSMesaDestroyContext \
+ ::gfx::g_current_osmesa_context->OSMesaDestroyContextFn
+#define OSMesaGetColorBuffer \
+ ::gfx::g_current_osmesa_context->OSMesaGetColorBufferFn
+#define OSMesaGetCurrentContext \
+ ::gfx::g_current_osmesa_context->OSMesaGetCurrentContextFn
+#define OSMesaGetDepthBuffer \
+ ::gfx::g_current_osmesa_context->OSMesaGetDepthBufferFn
+#define OSMesaGetIntegerv ::gfx::g_current_osmesa_context->OSMesaGetIntegervFn
+#define OSMesaGetProcAddress \
+ ::gfx::g_current_osmesa_context->OSMesaGetProcAddressFn
+#define OSMesaMakeCurrent ::gfx::g_current_osmesa_context->OSMesaMakeCurrentFn
+#define OSMesaPixelStore ::gfx::g_current_osmesa_context->OSMesaPixelStoreFn
+
+#endif // UI_GFX_GL_GL_BINDINGS_AUTOGEN_OSMESA_H_
diff --git a/ui/gl/gl_bindings_autogen_wgl.cc b/ui/gl/gl_bindings_autogen_wgl.cc
new file mode 100644
index 0000000..a28aaf6
--- /dev/null
+++ b/ui/gl/gl_bindings_autogen_wgl.cc
@@ -0,0 +1,537 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+#include <string>
+
+#include "base/debug/trace_event.h"
+#include "ui/gl/gl_bindings.h"
+#include "ui/gl/gl_context.h"
+#include "ui/gl/gl_enums.h"
+#include "ui/gl/gl_implementation.h"
+#include "ui/gl/gl_version_info.h"
+#include "ui/gl/gl_wgl_api_implementation.h"
+
+namespace gfx {
+
+static bool g_debugBindingsInitialized;
+DriverWGL g_driver_wgl;
+
+void DriverWGL::InitializeStaticBindings() {
+ fn.wglChoosePixelFormatARBFn = reinterpret_cast<wglChoosePixelFormatARBProc>(
+ GetGLProcAddress("wglChoosePixelFormatARB"));
+ fn.wglCopyContextFn =
+ reinterpret_cast<wglCopyContextProc>(GetGLProcAddress("wglCopyContext"));
+ fn.wglCreateContextFn = reinterpret_cast<wglCreateContextProc>(
+ GetGLProcAddress("wglCreateContext"));
+ fn.wglCreateLayerContextFn = reinterpret_cast<wglCreateLayerContextProc>(
+ GetGLProcAddress("wglCreateLayerContext"));
+ fn.wglCreatePbufferARBFn = reinterpret_cast<wglCreatePbufferARBProc>(
+ GetGLProcAddress("wglCreatePbufferARB"));
+ fn.wglDeleteContextFn = reinterpret_cast<wglDeleteContextProc>(
+ GetGLProcAddress("wglDeleteContext"));
+ fn.wglDestroyPbufferARBFn = reinterpret_cast<wglDestroyPbufferARBProc>(
+ GetGLProcAddress("wglDestroyPbufferARB"));
+ fn.wglGetCurrentContextFn = reinterpret_cast<wglGetCurrentContextProc>(
+ GetGLProcAddress("wglGetCurrentContext"));
+ fn.wglGetCurrentDCFn = reinterpret_cast<wglGetCurrentDCProc>(
+ GetGLProcAddress("wglGetCurrentDC"));
+ fn.wglGetExtensionsStringARBFn =
+ reinterpret_cast<wglGetExtensionsStringARBProc>(
+ GetGLProcAddress("wglGetExtensionsStringARB"));
+ fn.wglGetExtensionsStringEXTFn =
+ reinterpret_cast<wglGetExtensionsStringEXTProc>(
+ GetGLProcAddress("wglGetExtensionsStringEXT"));
+ fn.wglGetPbufferDCARBFn = reinterpret_cast<wglGetPbufferDCARBProc>(
+ GetGLProcAddress("wglGetPbufferDCARB"));
+ fn.wglMakeCurrentFn =
+ reinterpret_cast<wglMakeCurrentProc>(GetGLProcAddress("wglMakeCurrent"));
+ fn.wglQueryPbufferARBFn = reinterpret_cast<wglQueryPbufferARBProc>(
+ GetGLProcAddress("wglQueryPbufferARB"));
+ fn.wglReleasePbufferDCARBFn = reinterpret_cast<wglReleasePbufferDCARBProc>(
+ GetGLProcAddress("wglReleasePbufferDCARB"));
+ fn.wglShareListsFn =
+ reinterpret_cast<wglShareListsProc>(GetGLProcAddress("wglShareLists"));
+ fn.wglSwapIntervalEXTFn = reinterpret_cast<wglSwapIntervalEXTProc>(
+ GetGLProcAddress("wglSwapIntervalEXT"));
+ fn.wglSwapLayerBuffersFn = reinterpret_cast<wglSwapLayerBuffersProc>(
+ GetGLProcAddress("wglSwapLayerBuffers"));
+}
+
+void DriverWGL::InitializeDynamicBindings(GLContext* context) {
+ DCHECK(context && context->IsCurrent(NULL));
+ const GLVersionInfo* ver = context->GetVersionInfo();
+ ALLOW_UNUSED_LOCAL(ver);
+ std::string extensions = context->GetExtensions() + " ";
+ ALLOW_UNUSED_LOCAL(extensions);
+
+ ext.b_WGL_ARB_extensions_string =
+ extensions.find("WGL_ARB_extensions_string ") != std::string::npos;
+ ext.b_WGL_ARB_pbuffer =
+ extensions.find("WGL_ARB_pbuffer ") != std::string::npos;
+ ext.b_WGL_ARB_pixel_format =
+ extensions.find("WGL_ARB_pixel_format ") != std::string::npos;
+ ext.b_WGL_EXT_extensions_string =
+ extensions.find("WGL_EXT_extensions_string ") != std::string::npos;
+ ext.b_WGL_EXT_swap_control =
+ extensions.find("WGL_EXT_swap_control ") != std::string::npos;
+
+ if (g_debugBindingsInitialized)
+ InitializeDebugBindings();
+}
+
+extern "C" {
+
+static BOOL GL_BINDING_CALL
+Debug_wglChoosePixelFormatARB(HDC dc,
+ const int* int_attrib_list,
+ const float* float_attrib_list,
+ UINT max_formats,
+ int* formats,
+ UINT* num_formats) {
+ GL_SERVICE_LOG("wglChoosePixelFormatARB"
+ << "(" << dc << ", "
+ << static_cast<const void*>(int_attrib_list) << ", "
+ << static_cast<const void*>(float_attrib_list) << ", "
+ << max_formats << ", " << static_cast<const void*>(formats)
+ << ", " << static_cast<const void*>(num_formats) << ")");
+ BOOL result = g_driver_wgl.debug_fn.wglChoosePixelFormatARBFn(
+ dc, int_attrib_list, float_attrib_list, max_formats, formats,
+ num_formats);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static BOOL GL_BINDING_CALL
+Debug_wglCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) {
+ GL_SERVICE_LOG("wglCopyContext"
+ << "(" << hglrcSrc << ", " << hglrcDst << ", " << mask << ")");
+ BOOL result =
+ g_driver_wgl.debug_fn.wglCopyContextFn(hglrcSrc, hglrcDst, mask);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static HGLRC GL_BINDING_CALL Debug_wglCreateContext(HDC hdc) {
+ GL_SERVICE_LOG("wglCreateContext"
+ << "(" << hdc << ")");
+ HGLRC result = g_driver_wgl.debug_fn.wglCreateContextFn(hdc);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static HGLRC GL_BINDING_CALL
+Debug_wglCreateLayerContext(HDC hdc, int iLayerPlane) {
+ GL_SERVICE_LOG("wglCreateLayerContext"
+ << "(" << hdc << ", " << iLayerPlane << ")");
+ HGLRC result =
+ g_driver_wgl.debug_fn.wglCreateLayerContextFn(hdc, iLayerPlane);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static HPBUFFERARB GL_BINDING_CALL
+Debug_wglCreatePbufferARB(HDC hDC,
+ int iPixelFormat,
+ int iWidth,
+ int iHeight,
+ const int* piAttribList) {
+ GL_SERVICE_LOG("wglCreatePbufferARB"
+ << "(" << hDC << ", " << iPixelFormat << ", " << iWidth << ", "
+ << iHeight << ", " << static_cast<const void*>(piAttribList)
+ << ")");
+ HPBUFFERARB result = g_driver_wgl.debug_fn.wglCreatePbufferARBFn(
+ hDC, iPixelFormat, iWidth, iHeight, piAttribList);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static BOOL GL_BINDING_CALL Debug_wglDeleteContext(HGLRC hglrc) {
+ GL_SERVICE_LOG("wglDeleteContext"
+ << "(" << hglrc << ")");
+ BOOL result = g_driver_wgl.debug_fn.wglDeleteContextFn(hglrc);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static BOOL GL_BINDING_CALL Debug_wglDestroyPbufferARB(HPBUFFERARB hPbuffer) {
+ GL_SERVICE_LOG("wglDestroyPbufferARB"
+ << "(" << hPbuffer << ")");
+ BOOL result = g_driver_wgl.debug_fn.wglDestroyPbufferARBFn(hPbuffer);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static HGLRC GL_BINDING_CALL Debug_wglGetCurrentContext() {
+ GL_SERVICE_LOG("wglGetCurrentContext"
+ << "("
+ << ")");
+ HGLRC result = g_driver_wgl.debug_fn.wglGetCurrentContextFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static HDC GL_BINDING_CALL Debug_wglGetCurrentDC() {
+ GL_SERVICE_LOG("wglGetCurrentDC"
+ << "("
+ << ")");
+ HDC result = g_driver_wgl.debug_fn.wglGetCurrentDCFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static const char* GL_BINDING_CALL Debug_wglGetExtensionsStringARB(HDC hDC) {
+ GL_SERVICE_LOG("wglGetExtensionsStringARB"
+ << "(" << hDC << ")");
+ const char* result = g_driver_wgl.debug_fn.wglGetExtensionsStringARBFn(hDC);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static const char* GL_BINDING_CALL Debug_wglGetExtensionsStringEXT() {
+ GL_SERVICE_LOG("wglGetExtensionsStringEXT"
+ << "("
+ << ")");
+ const char* result = g_driver_wgl.debug_fn.wglGetExtensionsStringEXTFn();
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static HDC GL_BINDING_CALL Debug_wglGetPbufferDCARB(HPBUFFERARB hPbuffer) {
+ GL_SERVICE_LOG("wglGetPbufferDCARB"
+ << "(" << hPbuffer << ")");
+ HDC result = g_driver_wgl.debug_fn.wglGetPbufferDCARBFn(hPbuffer);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static BOOL GL_BINDING_CALL Debug_wglMakeCurrent(HDC hdc, HGLRC hglrc) {
+ GL_SERVICE_LOG("wglMakeCurrent"
+ << "(" << hdc << ", " << hglrc << ")");
+ BOOL result = g_driver_wgl.debug_fn.wglMakeCurrentFn(hdc, hglrc);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static BOOL GL_BINDING_CALL
+Debug_wglQueryPbufferARB(HPBUFFERARB hPbuffer, int iAttribute, int* piValue) {
+ GL_SERVICE_LOG("wglQueryPbufferARB"
+ << "(" << hPbuffer << ", " << iAttribute << ", "
+ << static_cast<const void*>(piValue) << ")");
+ BOOL result =
+ g_driver_wgl.debug_fn.wglQueryPbufferARBFn(hPbuffer, iAttribute, piValue);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static int GL_BINDING_CALL
+Debug_wglReleasePbufferDCARB(HPBUFFERARB hPbuffer, HDC hDC) {
+ GL_SERVICE_LOG("wglReleasePbufferDCARB"
+ << "(" << hPbuffer << ", " << hDC << ")");
+ int result = g_driver_wgl.debug_fn.wglReleasePbufferDCARBFn(hPbuffer, hDC);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static BOOL GL_BINDING_CALL Debug_wglShareLists(HGLRC hglrc1, HGLRC hglrc2) {
+ GL_SERVICE_LOG("wglShareLists"
+ << "(" << hglrc1 << ", " << hglrc2 << ")");
+ BOOL result = g_driver_wgl.debug_fn.wglShareListsFn(hglrc1, hglrc2);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static BOOL GL_BINDING_CALL Debug_wglSwapIntervalEXT(int interval) {
+ GL_SERVICE_LOG("wglSwapIntervalEXT"
+ << "(" << interval << ")");
+ BOOL result = g_driver_wgl.debug_fn.wglSwapIntervalEXTFn(interval);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+
+static BOOL GL_BINDING_CALL Debug_wglSwapLayerBuffers(HDC hdc, UINT fuPlanes) {
+ GL_SERVICE_LOG("wglSwapLayerBuffers"
+ << "(" << hdc << ", " << fuPlanes << ")");
+ BOOL result = g_driver_wgl.debug_fn.wglSwapLayerBuffersFn(hdc, fuPlanes);
+ GL_SERVICE_LOG("GL_RESULT: " << result);
+ return result;
+}
+} // extern "C"
+
+void DriverWGL::InitializeDebugBindings() {
+ if (!debug_fn.wglChoosePixelFormatARBFn) {
+ debug_fn.wglChoosePixelFormatARBFn = fn.wglChoosePixelFormatARBFn;
+ fn.wglChoosePixelFormatARBFn = Debug_wglChoosePixelFormatARB;
+ }
+ if (!debug_fn.wglCopyContextFn) {
+ debug_fn.wglCopyContextFn = fn.wglCopyContextFn;
+ fn.wglCopyContextFn = Debug_wglCopyContext;
+ }
+ if (!debug_fn.wglCreateContextFn) {
+ debug_fn.wglCreateContextFn = fn.wglCreateContextFn;
+ fn.wglCreateContextFn = Debug_wglCreateContext;
+ }
+ if (!debug_fn.wglCreateLayerContextFn) {
+ debug_fn.wglCreateLayerContextFn = fn.wglCreateLayerContextFn;
+ fn.wglCreateLayerContextFn = Debug_wglCreateLayerContext;
+ }
+ if (!debug_fn.wglCreatePbufferARBFn) {
+ debug_fn.wglCreatePbufferARBFn = fn.wglCreatePbufferARBFn;
+ fn.wglCreatePbufferARBFn = Debug_wglCreatePbufferARB;
+ }
+ if (!debug_fn.wglDeleteContextFn) {
+ debug_fn.wglDeleteContextFn = fn.wglDeleteContextFn;
+ fn.wglDeleteContextFn = Debug_wglDeleteContext;
+ }
+ if (!debug_fn.wglDestroyPbufferARBFn) {
+ debug_fn.wglDestroyPbufferARBFn = fn.wglDestroyPbufferARBFn;
+ fn.wglDestroyPbufferARBFn = Debug_wglDestroyPbufferARB;
+ }
+ if (!debug_fn.wglGetCurrentContextFn) {
+ debug_fn.wglGetCurrentContextFn = fn.wglGetCurrentContextFn;
+ fn.wglGetCurrentContextFn = Debug_wglGetCurrentContext;
+ }
+ if (!debug_fn.wglGetCurrentDCFn) {
+ debug_fn.wglGetCurrentDCFn = fn.wglGetCurrentDCFn;
+ fn.wglGetCurrentDCFn = Debug_wglGetCurrentDC;
+ }
+ if (!debug_fn.wglGetExtensionsStringARBFn) {
+ debug_fn.wglGetExtensionsStringARBFn = fn.wglGetExtensionsStringARBFn;
+ fn.wglGetExtensionsStringARBFn = Debug_wglGetExtensionsStringARB;
+ }
+ if (!debug_fn.wglGetExtensionsStringEXTFn) {
+ debug_fn.wglGetExtensionsStringEXTFn = fn.wglGetExtensionsStringEXTFn;
+ fn.wglGetExtensionsStringEXTFn = Debug_wglGetExtensionsStringEXT;
+ }
+ if (!debug_fn.wglGetPbufferDCARBFn) {
+ debug_fn.wglGetPbufferDCARBFn = fn.wglGetPbufferDCARBFn;
+ fn.wglGetPbufferDCARBFn = Debug_wglGetPbufferDCARB;
+ }
+ if (!debug_fn.wglMakeCurrentFn) {
+ debug_fn.wglMakeCurrentFn = fn.wglMakeCurrentFn;
+ fn.wglMakeCurrentFn = Debug_wglMakeCurrent;
+ }
+ if (!debug_fn.wglQueryPbufferARBFn) {
+ debug_fn.wglQueryPbufferARBFn = fn.wglQueryPbufferARBFn;
+ fn.wglQueryPbufferARBFn = Debug_wglQueryPbufferARB;
+ }
+ if (!debug_fn.wglReleasePbufferDCARBFn) {
+ debug_fn.wglReleasePbufferDCARBFn = fn.wglReleasePbufferDCARBFn;
+ fn.wglReleasePbufferDCARBFn = Debug_wglReleasePbufferDCARB;
+ }
+ if (!debug_fn.wglShareListsFn) {
+ debug_fn.wglShareListsFn = fn.wglShareListsFn;
+ fn.wglShareListsFn = Debug_wglShareLists;
+ }
+ if (!debug_fn.wglSwapIntervalEXTFn) {
+ debug_fn.wglSwapIntervalEXTFn = fn.wglSwapIntervalEXTFn;
+ fn.wglSwapIntervalEXTFn = Debug_wglSwapIntervalEXT;
+ }
+ if (!debug_fn.wglSwapLayerBuffersFn) {
+ debug_fn.wglSwapLayerBuffersFn = fn.wglSwapLayerBuffersFn;
+ fn.wglSwapLayerBuffersFn = Debug_wglSwapLayerBuffers;
+ }
+ g_debugBindingsInitialized = true;
+}
+
+void DriverWGL::ClearBindings() {
+ memset(this, 0, sizeof(*this));
+}
+
+BOOL WGLApiBase::wglChoosePixelFormatARBFn(HDC dc,
+ const int* int_attrib_list,
+ const float* float_attrib_list,
+ UINT max_formats,
+ int* formats,
+ UINT* num_formats) {
+ return driver_->fn.wglChoosePixelFormatARBFn(dc, int_attrib_list,
+ float_attrib_list, max_formats,
+ formats, num_formats);
+}
+
+BOOL WGLApiBase::wglCopyContextFn(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) {
+ return driver_->fn.wglCopyContextFn(hglrcSrc, hglrcDst, mask);
+}
+
+HGLRC WGLApiBase::wglCreateContextFn(HDC hdc) {
+ return driver_->fn.wglCreateContextFn(hdc);
+}
+
+HGLRC WGLApiBase::wglCreateLayerContextFn(HDC hdc, int iLayerPlane) {
+ return driver_->fn.wglCreateLayerContextFn(hdc, iLayerPlane);
+}
+
+HPBUFFERARB WGLApiBase::wglCreatePbufferARBFn(HDC hDC,
+ int iPixelFormat,
+ int iWidth,
+ int iHeight,
+ const int* piAttribList) {
+ return driver_->fn.wglCreatePbufferARBFn(hDC, iPixelFormat, iWidth, iHeight,
+ piAttribList);
+}
+
+BOOL WGLApiBase::wglDeleteContextFn(HGLRC hglrc) {
+ return driver_->fn.wglDeleteContextFn(hglrc);
+}
+
+BOOL WGLApiBase::wglDestroyPbufferARBFn(HPBUFFERARB hPbuffer) {
+ return driver_->fn.wglDestroyPbufferARBFn(hPbuffer);
+}
+
+HGLRC WGLApiBase::wglGetCurrentContextFn() {
+ return driver_->fn.wglGetCurrentContextFn();
+}
+
+HDC WGLApiBase::wglGetCurrentDCFn() {
+ return driver_->fn.wglGetCurrentDCFn();
+}
+
+const char* WGLApiBase::wglGetExtensionsStringARBFn(HDC hDC) {
+ return driver_->fn.wglGetExtensionsStringARBFn(hDC);
+}
+
+const char* WGLApiBase::wglGetExtensionsStringEXTFn() {
+ return driver_->fn.wglGetExtensionsStringEXTFn();
+}
+
+HDC WGLApiBase::wglGetPbufferDCARBFn(HPBUFFERARB hPbuffer) {
+ return driver_->fn.wglGetPbufferDCARBFn(hPbuffer);
+}
+
+BOOL WGLApiBase::wglMakeCurrentFn(HDC hdc, HGLRC hglrc) {
+ return driver_->fn.wglMakeCurrentFn(hdc, hglrc);
+}
+
+BOOL WGLApiBase::wglQueryPbufferARBFn(HPBUFFERARB hPbuffer,
+ int iAttribute,
+ int* piValue) {
+ return driver_->fn.wglQueryPbufferARBFn(hPbuffer, iAttribute, piValue);
+}
+
+int WGLApiBase::wglReleasePbufferDCARBFn(HPBUFFERARB hPbuffer, HDC hDC) {
+ return driver_->fn.wglReleasePbufferDCARBFn(hPbuffer, hDC);
+}
+
+BOOL WGLApiBase::wglShareListsFn(HGLRC hglrc1, HGLRC hglrc2) {
+ return driver_->fn.wglShareListsFn(hglrc1, hglrc2);
+}
+
+BOOL WGLApiBase::wglSwapIntervalEXTFn(int interval) {
+ return driver_->fn.wglSwapIntervalEXTFn(interval);
+}
+
+BOOL WGLApiBase::wglSwapLayerBuffersFn(HDC hdc, UINT fuPlanes) {
+ return driver_->fn.wglSwapLayerBuffersFn(hdc, fuPlanes);
+}
+
+BOOL TraceWGLApi::wglChoosePixelFormatARBFn(HDC dc,
+ const int* int_attrib_list,
+ const float* float_attrib_list,
+ UINT max_formats,
+ int* formats,
+ UINT* num_formats) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglChoosePixelFormatARB")
+ return wgl_api_->wglChoosePixelFormatARBFn(dc, int_attrib_list,
+ float_attrib_list, max_formats,
+ formats, num_formats);
+}
+
+BOOL TraceWGLApi::wglCopyContextFn(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCopyContext")
+ return wgl_api_->wglCopyContextFn(hglrcSrc, hglrcDst, mask);
+}
+
+HGLRC TraceWGLApi::wglCreateContextFn(HDC hdc) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreateContext")
+ return wgl_api_->wglCreateContextFn(hdc);
+}
+
+HGLRC TraceWGLApi::wglCreateLayerContextFn(HDC hdc, int iLayerPlane) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreateLayerContext")
+ return wgl_api_->wglCreateLayerContextFn(hdc, iLayerPlane);
+}
+
+HPBUFFERARB TraceWGLApi::wglCreatePbufferARBFn(HDC hDC,
+ int iPixelFormat,
+ int iWidth,
+ int iHeight,
+ const int* piAttribList) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreatePbufferARB")
+ return wgl_api_->wglCreatePbufferARBFn(hDC, iPixelFormat, iWidth, iHeight,
+ piAttribList);
+}
+
+BOOL TraceWGLApi::wglDeleteContextFn(HGLRC hglrc) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglDeleteContext")
+ return wgl_api_->wglDeleteContextFn(hglrc);
+}
+
+BOOL TraceWGLApi::wglDestroyPbufferARBFn(HPBUFFERARB hPbuffer) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglDestroyPbufferARB")
+ return wgl_api_->wglDestroyPbufferARBFn(hPbuffer);
+}
+
+HGLRC TraceWGLApi::wglGetCurrentContextFn() {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetCurrentContext")
+ return wgl_api_->wglGetCurrentContextFn();
+}
+
+HDC TraceWGLApi::wglGetCurrentDCFn() {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetCurrentDC")
+ return wgl_api_->wglGetCurrentDCFn();
+}
+
+const char* TraceWGLApi::wglGetExtensionsStringARBFn(HDC hDC) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetExtensionsStringARB")
+ return wgl_api_->wglGetExtensionsStringARBFn(hDC);
+}
+
+const char* TraceWGLApi::wglGetExtensionsStringEXTFn() {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetExtensionsStringEXT")
+ return wgl_api_->wglGetExtensionsStringEXTFn();
+}
+
+HDC TraceWGLApi::wglGetPbufferDCARBFn(HPBUFFERARB hPbuffer) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetPbufferDCARB")
+ return wgl_api_->wglGetPbufferDCARBFn(hPbuffer);
+}
+
+BOOL TraceWGLApi::wglMakeCurrentFn(HDC hdc, HGLRC hglrc) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglMakeCurrent")
+ return wgl_api_->wglMakeCurrentFn(hdc, hglrc);
+}
+
+BOOL TraceWGLApi::wglQueryPbufferARBFn(HPBUFFERARB hPbuffer,
+ int iAttribute,
+ int* piValue) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglQueryPbufferARB")
+ return wgl_api_->wglQueryPbufferARBFn(hPbuffer, iAttribute, piValue);
+}
+
+int TraceWGLApi::wglReleasePbufferDCARBFn(HPBUFFERARB hPbuffer, HDC hDC) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglReleasePbufferDCARB")
+ return wgl_api_->wglReleasePbufferDCARBFn(hPbuffer, hDC);
+}
+
+BOOL TraceWGLApi::wglShareListsFn(HGLRC hglrc1, HGLRC hglrc2) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglShareLists")
+ return wgl_api_->wglShareListsFn(hglrc1, hglrc2);
+}
+
+BOOL TraceWGLApi::wglSwapIntervalEXTFn(int interval) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglSwapIntervalEXT")
+ return wgl_api_->wglSwapIntervalEXTFn(interval);
+}
+
+BOOL TraceWGLApi::wglSwapLayerBuffersFn(HDC hdc, UINT fuPlanes) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglSwapLayerBuffers")
+ return wgl_api_->wglSwapLayerBuffersFn(hdc, fuPlanes);
+}
+
+} // namespace gfx
diff --git a/ui/gl/gl_bindings_autogen_wgl.h b/ui/gl/gl_bindings_autogen_wgl.h
new file mode 100644
index 0000000..b7a2040
--- /dev/null
+++ b/ui/gl/gl_bindings_autogen_wgl.h
@@ -0,0 +1,147 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+#ifndef UI_GFX_GL_GL_BINDINGS_AUTOGEN_WGL_H_
+#define UI_GFX_GL_GL_BINDINGS_AUTOGEN_WGL_H_
+
+namespace gfx {
+
+class GLContext;
+
+typedef BOOL(GL_BINDING_CALL* wglChoosePixelFormatARBProc)(
+ HDC dc,
+ const int* int_attrib_list,
+ const float* float_attrib_list,
+ UINT max_formats,
+ int* formats,
+ UINT* num_formats);
+typedef BOOL(GL_BINDING_CALL* wglCopyContextProc)(HGLRC hglrcSrc,
+ HGLRC hglrcDst,
+ UINT mask);
+typedef HGLRC(GL_BINDING_CALL* wglCreateContextProc)(HDC hdc);
+typedef HGLRC(GL_BINDING_CALL* wglCreateLayerContextProc)(HDC hdc,
+ int iLayerPlane);
+typedef HPBUFFERARB(GL_BINDING_CALL* wglCreatePbufferARBProc)(
+ HDC hDC,
+ int iPixelFormat,
+ int iWidth,
+ int iHeight,
+ const int* piAttribList);
+typedef BOOL(GL_BINDING_CALL* wglDeleteContextProc)(HGLRC hglrc);
+typedef BOOL(GL_BINDING_CALL* wglDestroyPbufferARBProc)(HPBUFFERARB hPbuffer);
+typedef HGLRC(GL_BINDING_CALL* wglGetCurrentContextProc)();
+typedef HDC(GL_BINDING_CALL* wglGetCurrentDCProc)();
+typedef const char*(GL_BINDING_CALL* wglGetExtensionsStringARBProc)(HDC hDC);
+typedef const char*(GL_BINDING_CALL* wglGetExtensionsStringEXTProc)();
+typedef HDC(GL_BINDING_CALL* wglGetPbufferDCARBProc)(HPBUFFERARB hPbuffer);
+typedef BOOL(GL_BINDING_CALL* wglMakeCurrentProc)(HDC hdc, HGLRC hglrc);
+typedef BOOL(GL_BINDING_CALL* wglQueryPbufferARBProc)(HPBUFFERARB hPbuffer,
+ int iAttribute,
+ int* piValue);
+typedef int(GL_BINDING_CALL* wglReleasePbufferDCARBProc)(HPBUFFERARB hPbuffer,
+ HDC hDC);
+typedef BOOL(GL_BINDING_CALL* wglShareListsProc)(HGLRC hglrc1, HGLRC hglrc2);
+typedef BOOL(GL_BINDING_CALL* wglSwapIntervalEXTProc)(int interval);
+typedef BOOL(GL_BINDING_CALL* wglSwapLayerBuffersProc)(HDC hdc, UINT fuPlanes);
+
+struct ExtensionsWGL {
+ bool b_WGL_ARB_extensions_string;
+ bool b_WGL_ARB_pbuffer;
+ bool b_WGL_ARB_pixel_format;
+ bool b_WGL_EXT_extensions_string;
+ bool b_WGL_EXT_swap_control;
+};
+
+struct ProcsWGL {
+ wglChoosePixelFormatARBProc wglChoosePixelFormatARBFn;
+ wglCopyContextProc wglCopyContextFn;
+ wglCreateContextProc wglCreateContextFn;
+ wglCreateLayerContextProc wglCreateLayerContextFn;
+ wglCreatePbufferARBProc wglCreatePbufferARBFn;
+ wglDeleteContextProc wglDeleteContextFn;
+ wglDestroyPbufferARBProc wglDestroyPbufferARBFn;
+ wglGetCurrentContextProc wglGetCurrentContextFn;
+ wglGetCurrentDCProc wglGetCurrentDCFn;
+ wglGetExtensionsStringARBProc wglGetExtensionsStringARBFn;
+ wglGetExtensionsStringEXTProc wglGetExtensionsStringEXTFn;
+ wglGetPbufferDCARBProc wglGetPbufferDCARBFn;
+ wglMakeCurrentProc wglMakeCurrentFn;
+ wglQueryPbufferARBProc wglQueryPbufferARBFn;
+ wglReleasePbufferDCARBProc wglReleasePbufferDCARBFn;
+ wglShareListsProc wglShareListsFn;
+ wglSwapIntervalEXTProc wglSwapIntervalEXTFn;
+ wglSwapLayerBuffersProc wglSwapLayerBuffersFn;
+};
+
+class GL_EXPORT WGLApi {
+ public:
+ WGLApi();
+ virtual ~WGLApi();
+
+ virtual BOOL wglChoosePixelFormatARBFn(HDC dc,
+ const int* int_attrib_list,
+ const float* float_attrib_list,
+ UINT max_formats,
+ int* formats,
+ UINT* num_formats) = 0;
+ virtual BOOL wglCopyContextFn(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) = 0;
+ virtual HGLRC wglCreateContextFn(HDC hdc) = 0;
+ virtual HGLRC wglCreateLayerContextFn(HDC hdc, int iLayerPlane) = 0;
+ virtual HPBUFFERARB wglCreatePbufferARBFn(HDC hDC,
+ int iPixelFormat,
+ int iWidth,
+ int iHeight,
+ const int* piAttribList) = 0;
+ virtual BOOL wglDeleteContextFn(HGLRC hglrc) = 0;
+ virtual BOOL wglDestroyPbufferARBFn(HPBUFFERARB hPbuffer) = 0;
+ virtual HGLRC wglGetCurrentContextFn() = 0;
+ virtual HDC wglGetCurrentDCFn() = 0;
+ virtual const char* wglGetExtensionsStringARBFn(HDC hDC) = 0;
+ virtual const char* wglGetExtensionsStringEXTFn() = 0;
+ virtual HDC wglGetPbufferDCARBFn(HPBUFFERARB hPbuffer) = 0;
+ virtual BOOL wglMakeCurrentFn(HDC hdc, HGLRC hglrc) = 0;
+ virtual BOOL wglQueryPbufferARBFn(HPBUFFERARB hPbuffer,
+ int iAttribute,
+ int* piValue) = 0;
+ virtual int wglReleasePbufferDCARBFn(HPBUFFERARB hPbuffer, HDC hDC) = 0;
+ virtual BOOL wglShareListsFn(HGLRC hglrc1, HGLRC hglrc2) = 0;
+ virtual BOOL wglSwapIntervalEXTFn(int interval) = 0;
+ virtual BOOL wglSwapLayerBuffersFn(HDC hdc, UINT fuPlanes) = 0;
+};
+
+} // namespace gfx
+
+#define wglChoosePixelFormatARB \
+ ::gfx::g_current_wgl_context->wglChoosePixelFormatARBFn
+#define wglCopyContext ::gfx::g_current_wgl_context->wglCopyContextFn
+#define wglCreateContext ::gfx::g_current_wgl_context->wglCreateContextFn
+#define wglCreateLayerContext \
+ ::gfx::g_current_wgl_context->wglCreateLayerContextFn
+#define wglCreatePbufferARB ::gfx::g_current_wgl_context->wglCreatePbufferARBFn
+#define wglDeleteContext ::gfx::g_current_wgl_context->wglDeleteContextFn
+#define wglDestroyPbufferARB \
+ ::gfx::g_current_wgl_context->wglDestroyPbufferARBFn
+#define wglGetCurrentContext \
+ ::gfx::g_current_wgl_context->wglGetCurrentContextFn
+#define wglGetCurrentDC ::gfx::g_current_wgl_context->wglGetCurrentDCFn
+#define wglGetExtensionsStringARB \
+ ::gfx::g_current_wgl_context->wglGetExtensionsStringARBFn
+#define wglGetExtensionsStringEXT \
+ ::gfx::g_current_wgl_context->wglGetExtensionsStringEXTFn
+#define wglGetPbufferDCARB ::gfx::g_current_wgl_context->wglGetPbufferDCARBFn
+#define wglMakeCurrent ::gfx::g_current_wgl_context->wglMakeCurrentFn
+#define wglQueryPbufferARB ::gfx::g_current_wgl_context->wglQueryPbufferARBFn
+#define wglReleasePbufferDCARB \
+ ::gfx::g_current_wgl_context->wglReleasePbufferDCARBFn
+#define wglShareLists ::gfx::g_current_wgl_context->wglShareListsFn
+#define wglSwapIntervalEXT ::gfx::g_current_wgl_context->wglSwapIntervalEXTFn
+#define wglSwapLayerBuffers ::gfx::g_current_wgl_context->wglSwapLayerBuffersFn
+
+#endif // UI_GFX_GL_GL_BINDINGS_AUTOGEN_WGL_H_
diff --git a/ui/gl/gl_context_ozone.cc b/ui/gl/gl_context_ozone.cc
new file mode 100644
index 0000000..776e114
--- /dev/null
+++ b/ui/gl/gl_context_ozone.cc
@@ -0,0 +1,47 @@
+// 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 "ui/gl/gl_context.h"
+
+#include "base/logging.h"
+#include "base/memory/ref_counted.h"
+#include "base/sys_info.h"
+#include "ui/gl/gl_bindings.h"
+#include "ui/gl/gl_context_egl.h"
+#include "ui/gl/gl_context_osmesa.h"
+#include "ui/gl/gl_context_stub.h"
+#include "ui/gl/gl_implementation.h"
+#include "ui/gl/gl_surface.h"
+
+namespace gfx {
+
+// static
+scoped_refptr<GLContext> GLContext::CreateGLContext(
+ GLShareGroup* share_group,
+ GLSurface* compatible_surface,
+ GpuPreference gpu_preference) {
+
+ switch (GetGLImplementation()) {
+ case kGLImplementationMockGL:
+ return scoped_refptr<GLContext>(new GLContextStub());
+ case kGLImplementationOSMesaGL: {
+ scoped_refptr<GLContext> context(new GLContextOSMesa(share_group));
+ if (!context->Initialize(compatible_surface, gpu_preference))
+ return NULL;
+ return context;
+ }
+ case kGLImplementationEGLGLES2: {
+ scoped_refptr<GLContext> context(new GLContextEGL(share_group));
+ if (!context->Initialize(compatible_surface, gpu_preference))
+ return NULL;
+ return context;
+ }
+ default:
+ NOTREACHED();
+ return NULL;
+ }
+}
+
+} // namespace gfx
+
diff --git a/ui/gl/gl_enums.cc b/ui/gl/gl_enums.cc
new file mode 100644
index 0000000..d43681e
--- /dev/null
+++ b/ui/gl/gl_enums.cc
@@ -0,0 +1,40 @@
+// Copyright 2014 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 <sstream>
+#include <GLES2/gl2.h>
+
+#include "ui/gl/gl_enums.h"
+
+namespace gfx {
+
+std::string GLEnums::GetStringEnum(uint32 value) {
+ const EnumToString* entry = enum_to_string_table_;
+ const EnumToString* end = entry + enum_to_string_table_len_;
+ for (;entry < end; ++entry) {
+ if (value == entry->value) {
+ return entry->name;
+ }
+ }
+ std::stringstream ss;
+ ss.fill('0');
+ ss.width(value < 0x10000 ? 4 : 8);
+ ss << std::hex << value;
+ return "0x" + ss.str();
+}
+
+std::string GLEnums::GetStringError(uint32 value) {
+ if (value == GL_NONE)
+ return "GL_NONE";
+ return GetStringEnum(value);
+}
+
+std::string GLEnums::GetStringBool(uint32 value) {
+ return value ? "GL_TRUE" : "GL_FALSE";
+}
+
+#include "ui/gl/gl_enums_implementation_autogen.h"
+
+} // namespace gfx
+
diff --git a/ui/gl/gl_enums.h b/ui/gl/gl_enums.h
new file mode 100644
index 0000000..30dee6c
--- /dev/null
+++ b/ui/gl/gl_enums.h
@@ -0,0 +1,34 @@
+// Copyright 2014 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_GL_ENUMS_H_
+#define UI_GL_GL_ENUMS_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "ui/gl/gl_export.h"
+
+namespace gfx {
+
+class GL_EXPORT GLEnums {
+ public:
+ struct EnumToString {
+ uint32_t value;
+ const char* name;
+ };
+
+ static std::string GetStringEnum(uint32_t value);
+ static std::string GetStringBool(uint32_t value);
+ static std::string GetStringError(uint32_t value);
+
+ private:
+ static const EnumToString* const enum_to_string_table_;
+ static const size_t enum_to_string_table_len_;
+};
+
+} // namespace gfx
+
+#endif // UI_GL_GL_ENUMS_H_
+
diff --git a/ui/gl/gl_enums_implementation_autogen.h b/ui/gl/gl_enums_implementation_autogen.h
new file mode 100644
index 0000000..5872db9
--- /dev/null
+++ b/ui/gl/gl_enums_implementation_autogen.h
@@ -0,0 +1,4445 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+static const GLEnums::EnumToString enum_to_string_table[] = {
+ {
+ 0x8D77,
+ "GL_RGB16UI",
+ },
+ {
+ 0x8D76,
+ "GL_RGBA16UI",
+ },
+ {
+ 0x9260,
+ "GL_GCCSO_SHADER_BINARY_FJ",
+ },
+ {
+ 0x9009,
+ "GL_TEXTURE_CUBE_MAP_ARRAY_EXT",
+ },
+ {
+ 0x8D71,
+ "GL_RGB32UI",
+ },
+ {
+ 0x8D70,
+ "GL_RGBA32UI",
+ },
+ {
+ 0x8C76,
+ "GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH",
+ },
+ {
+ 0x8825,
+ "GL_DRAW_BUFFER0_EXT",
+ },
+ {
+ 0x8D94,
+ "GL_RED_INTEGER",
+ },
+ {
+ 0x0BC1,
+ "GL_ALPHA_TEST_FUNC_QCOM",
+ },
+ {
+ 0x884C,
+ "GL_TEXTURE_COMPARE_MODE_EXT",
+ },
+ {
+ 0x0BC2,
+ "GL_ALPHA_TEST_REF_QCOM",
+ },
+ {
+ 0x78EF,
+ "GL_PIXEL_UNPACK_TRANSFER_BUFFER_BINDING_CHROMIUM",
+ },
+ {
+ 0x884D,
+ "GL_TEXTURE_COMPARE_FUNC_EXT",
+ },
+ {
+ 0x884E,
+ "GL_COMPARE_REF_TO_TEXTURE_EXT",
+ },
+ {
+ 0x8E76,
+ "GL_TESS_GEN_MODE_EXT",
+ },
+ {
+ 0x8E77,
+ "GL_TESS_GEN_SPACING_EXT",
+ },
+ {
+ 0x000D,
+ "GL_TRIANGLE_STRIP_ADJACENCY_EXT",
+ },
+ {
+ 0x000E,
+ "GL_PATCHES_EXT",
+ },
+ {
+ 0x000B,
+ "GL_LINE_STRIP_ADJACENCY_EXT",
+ },
+ {
+ 0x000C,
+ "GL_TRIANGLES_ADJACENCY_EXT",
+ },
+ {
+ 0x000A,
+ "GL_LINES_ADJACENCY_EXT",
+ },
+ {
+ 0x92CF,
+ "GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT",
+ },
+ {
+ 0x93A1,
+ "GL_BGRA8_EXT",
+ },
+ {
+ 0x813C,
+ "GL_TEXTURE_BASE_LEVEL",
+ },
+ {
+ 0,
+ "GL_FALSE",
+ },
+ {
+ 0x00400000,
+ "GL_STENCIL_BUFFER_BIT6_QCOM",
+ },
+ {
+ 0x9500,
+ "GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL",
+ },
+ {
+ 0x78F2,
+ "GL_SCANOUT_CHROMIUM",
+ },
+ {
+ 0x9138,
+ "GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG",
+ },
+ {
+ 0x8FC4,
+ "GL_SHADER_BINARY_VIV",
+ },
+ {
+ 0x9130,
+ "GL_SGX_PROGRAM_BINARY_IMG",
+ },
+ {
+ 0x9133,
+ "GL_RENDERBUFFER_SAMPLES_IMG",
+ },
+ {
+ 0x82E0,
+ "GL_BUFFER_KHR",
+ },
+ {
+ 0x9135,
+ "GL_MAX_SAMPLES_IMG",
+ },
+ {
+ 0x9134,
+ "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG",
+ },
+ {
+ 0x9137,
+ "GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG",
+ },
+ {
+ 0x9136,
+ "GL_TEXTURE_SAMPLES_IMG",
+ },
+ {
+ 0x8D88,
+ "GL_RGBA16I",
+ },
+ {
+ 0x8D89,
+ "GL_RGB16I",
+ },
+ {
+ 0x00000020,
+ "GL_COLOR_BUFFER_BIT5_QCOM",
+ },
+ {
+ 0x0008,
+ "GL_MAP_INVALIDATE_BUFFER_BIT_EXT",
+ },
+ {
+ 0x0BC0,
+ "GL_ALPHA_TEST_QCOM",
+ },
+ {
+ 0x0006,
+ "GL_TRIANGLE_FAN",
+ },
+ {
+ 0x0007,
+ "GL_QUADS_EXT",
+ },
+ {
+ 0x0004,
+ "GL_TRIANGLES",
+ },
+ {
+ 0x0005,
+ "GL_TRIANGLE_STRIP",
+ },
+ {
+ 0x0002,
+ "GL_LINE_LOOP",
+ },
+ {
+ 0x0003,
+ "GL_LINE_STRIP",
+ },
+ {
+ 0x0000,
+ "GL_POINTS",
+ },
+ {
+ 0x0001,
+ "GL_LINES",
+ },
+ {
+ 0x8D7D,
+ "GL_RGB8UI",
+ },
+ {
+ 0x93F0,
+ "GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG",
+ },
+ {
+ 0x93F1,
+ "GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG",
+ },
+ {
+ 0x0D04,
+ "GL_PACK_SKIP_PIXELS",
+ },
+ {
+ 0x900E,
+ "GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT",
+ },
+ {
+ 0x900D,
+ "GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT",
+ },
+ {
+ 0x8C7F,
+ "GL_TRANSFORM_FEEDBACK_BUFFER_MODE",
+ },
+ {
+ 0x900F,
+ "GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT",
+ },
+ {
+ 0x900A,
+ "GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT",
+ },
+ {
+ 0x900C,
+ "GL_SAMPLER_CUBE_MAP_ARRAY_EXT",
+ },
+ {
+ 0x88B8,
+ "GL_READ_ONLY",
+ },
+ {
+ 0x88B9,
+ "GL_WRITE_ONLY_OES",
+ },
+ {
+ 0x8211,
+ "GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT",
+ },
+ {
+ 0x8210,
+ "GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT",
+ },
+ {
+ 0x8741,
+ "GL_PROGRAM_BINARY_LENGTH_OES",
+ },
+ {
+ 0x8740,
+ "GL_Z400_BINARY_AMD",
+ },
+ {
+ 0x8215,
+ "GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE",
+ },
+ {
+ 0x8C4D,
+ "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV",
+ },
+ {
+ 0x8192,
+ "GL_GENERATE_MIPMAP_HINT",
+ },
+ {
+ 0x8E79,
+ "GL_TESS_GEN_POINT_MODE_EXT",
+ },
+ {
+ 0x8A54,
+ "GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT",
+ },
+ {
+ 0x8A55,
+ "GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT",
+ },
+ {
+ 0x8A56,
+ "GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT",
+ },
+ {
+ 0x8A57,
+ "GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT",
+ },
+ {
+ 0x8A51,
+ "GL_RGB_RAW_422_APPLE",
+ },
+ {
+ 0x87F9,
+ "GL_3DC_X_AMD",
+ },
+ {
+ 0x8A53,
+ "GL_SYNC_OBJECT_APPLE",
+ },
+ {
+ 0x8DF8,
+ "GL_SHADER_BINARY_FORMATS",
+ },
+ {
+ 0x8DF9,
+ "GL_NUM_SHADER_BINARY_FORMATS",
+ },
+ {
+ 0x826D,
+ "GL_DEBUG_GROUP_STACK_DEPTH_KHR",
+ },
+ {
+ 0x8E75,
+ "GL_TESS_CONTROL_OUTPUT_VERTICES_EXT",
+ },
+ {
+ 0x826B,
+ "GL_DEBUG_SEVERITY_NOTIFICATION_KHR",
+ },
+ {
+ 0x826C,
+ "GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR",
+ },
+ {
+ 0x8B59,
+ "GL_BOOL_VEC4",
+ },
+ {
+ 0x826A,
+ "GL_DEBUG_TYPE_POP_GROUP_KHR",
+ },
+ {
+ 0x8B57,
+ "GL_BOOL_VEC2",
+ },
+ {
+ 0x8DF1,
+ "GL_MEDIUM_FLOAT",
+ },
+ {
+ 0x8B55,
+ "GL_INT_VEC4",
+ },
+ {
+ 0x8B54,
+ "GL_INT_VEC3",
+ },
+ {
+ 0x8DF4,
+ "GL_MEDIUM_INT",
+ },
+ {
+ 0x8DF5,
+ "GL_HIGH_INT",
+ },
+ {
+ 0x8B51,
+ "GL_FLOAT_VEC3",
+ },
+ {
+ 0x8B50,
+ "GL_FLOAT_VEC2",
+ },
+ {
+ 0x806D,
+ "GL_UNPACK_SKIP_IMAGES",
+ },
+ {
+ 0x806E,
+ "GL_UNPACK_IMAGE_HEIGHT",
+ },
+ {
+ 0x806F,
+ "GL_TEXTURE_3D_OES",
+ },
+ {
+ 0x92E7,
+ "GL_IS_PER_PATCH_EXT",
+ },
+ {
+ 0x92E0,
+ "GL_DEBUG_OUTPUT_KHR",
+ },
+ {
+ 0x806A,
+ "GL_TEXTURE_BINDING_3D_OES",
+ },
+ {
+ 0x8D8E,
+ "GL_RGBA8I",
+ },
+ {
+ 0x8CE3,
+ "GL_COLOR_ATTACHMENT3_EXT",
+ },
+ {
+ 0x9274,
+ "GL_COMPRESSED_RGB8_ETC2",
+ },
+ {
+ 0x1904,
+ "GL_GREEN_NV",
+ },
+ {
+ 0x928D,
+ "GL_DST_OUT_NV",
+ },
+ {
+ 0x8069,
+ "GL_TEXTURE_BINDING_2D",
+ },
+ {
+ 0x8A2E,
+ "GL_MAX_COMBINED_UNIFORM_BLOCKS",
+ },
+ {
+ 0x8F96,
+ "GL_RGB8_SNORM",
+ },
+ {
+ 0x8F95,
+ "GL_RG8_SNORM",
+ },
+ {
+ 0x8260,
+ "GL_UNDEFINED_VERTEX_EXT",
+ },
+ {
+ 0x8261,
+ "GL_NO_RESET_NOTIFICATION_KHR",
+ },
+ {
+ 0x0D02,
+ "GL_PACK_ROW_LENGTH",
+ },
+ {
+ 0x8DFA,
+ "GL_SHADER_COMPILER",
+ },
+ {
+ 0x8DFB,
+ "GL_MAX_VERTEX_UNIFORM_VECTORS",
+ },
+ {
+ 0x8DFC,
+ "GL_MAX_VARYING_VECTORS",
+ },
+ {
+ 0x8B5C,
+ "GL_FLOAT_MAT4",
+ },
+ {
+ 0x8B5B,
+ "GL_FLOAT_MAT3",
+ },
+ {
+ 0x8268,
+ "GL_DEBUG_TYPE_MARKER_KHR",
+ },
+ {
+ 0x8269,
+ "GL_DEBUG_TYPE_PUSH_GROUP_KHR",
+ },
+ {
+ 0x8A43,
+ "GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES",
+ },
+ {
+ 0x1905,
+ "GL_BLUE_NV",
+ },
+ {
+ 0x87FF,
+ "GL_PROGRAM_BINARY_FORMATS_OES",
+ },
+ {
+ 0x87FE,
+ "GL_NUM_PROGRAM_BINARY_FORMATS_OES",
+ },
+ {
+ 0x8A41,
+ "GL_UNIFORM_BLOCK_NAME_LENGTH",
+ },
+ {
+ 0x2600,
+ "GL_NEAREST",
+ },
+ {
+ 0x2601,
+ "GL_LINEAR",
+ },
+ {
+ 0x8C03,
+ "GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",
+ },
+ {
+ 0x821B,
+ "GL_MAJOR_VERSION",
+ },
+ {
+ 0x821A,
+ "GL_DEPTH_STENCIL_ATTACHMENT",
+ },
+ {
+ 0x8A40,
+ "GL_UNIFORM_BLOCK_DATA_SIZE",
+ },
+ {
+ 0x9242,
+ "GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM",
+ },
+ {
+ 0x821D,
+ "GL_NUM_EXTENSIONS",
+ },
+ {
+ 0x88BB,
+ "GL_BUFFER_ACCESS_OES",
+ },
+ {
+ 0x88BC,
+ "GL_BUFFER_MAPPED_OES",
+ },
+ {
+ 0x88BD,
+ "GL_BUFFER_MAP_POINTER_OES",
+ },
+ {
+ 0x88BF,
+ "GL_TIME_ELAPSED_EXT",
+ },
+ {
+ 0x8A46,
+ "GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER",
+ },
+ {
+ 0x6003,
+ "GL_GET_ERROR_QUERY_CHROMIUM",
+ },
+ {
+ 0x8F94,
+ "GL_R8_SNORM",
+ },
+ {
+ 0x0C10,
+ "GL_SCISSOR_BOX",
+ },
+ {
+ 0x0C11,
+ "GL_SCISSOR_TEST",
+ },
+ {
+ 0x1700,
+ "GL_PATH_MODELVIEW_CHROMIUM",
+ },
+ {
+ 0x80000000,
+ "GL_MULTISAMPLE_BUFFER_BIT7_QCOM",
+ },
+ {
+ 0x94F8,
+ "GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL",
+ },
+ {
+ 0x8A48,
+ "GL_TEXTURE_SRGB_DECODE_EXT",
+ },
+ {
+ 0x300E,
+ "GL_CONTEXT_LOST",
+ },
+ {
+ 0x02000000,
+ "GL_MULTISAMPLE_BUFFER_BIT1_QCOM",
+ },
+ {
+ 0x8C2F,
+ "GL_ANY_SAMPLES_PASSED_EXT",
+ },
+ {
+ 0x8BD2,
+ "GL_TEXTURE_WIDTH_QCOM",
+ },
+ {
+ 0x8C2D,
+ "GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT",
+ },
+ {
+ 0x8C2C,
+ "GL_TEXTURE_BINDING_BUFFER_EXT",
+ },
+ {
+ 0x8C2B,
+ "GL_MAX_TEXTURE_BUFFER_SIZE_EXT",
+ },
+ {
+ 0x8C2A,
+ "GL_TEXTURE_BUFFER_EXT",
+ },
+ {
+ 0x8BD7,
+ "GL_TEXTURE_TYPE_QCOM",
+ },
+ {
+ 0x8B8D,
+ "GL_CURRENT_PROGRAM",
+ },
+ {
+ 0x8BD9,
+ "GL_TEXTURE_NUM_LEVELS_QCOM",
+ },
+ {
+ 0x00200000,
+ "GL_STENCIL_BUFFER_BIT5_QCOM",
+ },
+ {
+ 0x8D9F,
+ "GL_INT_2_10_10_10_REV",
+ },
+ {
+ 0x8B8A,
+ "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH",
+ },
+ {
+ 0x8B8B,
+ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES",
+ },
+ {
+ 0x8B8C,
+ "GL_SHADING_LANGUAGE_VERSION",
+ },
+ {
+ 0x8BDA,
+ "GL_TEXTURE_TARGET_QCOM",
+ },
+ {
+ 0x8BDB,
+ "GL_TEXTURE_OBJECT_VALID_QCOM",
+ },
+ {
+ 0x8BDC,
+ "GL_STATE_RESTORE",
+ },
+ {
+ 0x8B88,
+ "GL_SHADER_SOURCE_LENGTH",
+ },
+ {
+ 0x8B89,
+ "GL_ACTIVE_ATTRIBUTES",
+ },
+ {
+ 0x93C9,
+ "GL_COMPRESSED_RGBA_ASTC_6x6x6_OES",
+ },
+ {
+ 0x93C8,
+ "GL_COMPRESSED_RGBA_ASTC_6x6x5_OES",
+ },
+ {
+ 0x8B84,
+ "GL_INFO_LOG_LENGTH",
+ },
+ {
+ 0x8B85,
+ "GL_ATTACHED_SHADERS",
+ },
+ {
+ 0x8B86,
+ "GL_ACTIVE_UNIFORMS",
+ },
+ {
+ 0x8B87,
+ "GL_ACTIVE_UNIFORM_MAX_LENGTH",
+ },
+ {
+ 0x8B80,
+ "GL_DELETE_STATUS",
+ },
+ {
+ 0x8B81,
+ "GL_COMPILE_STATUS",
+ },
+ {
+ 0x8B82,
+ "GL_LINK_STATUS",
+ },
+ {
+ 0x8B83,
+ "GL_VALIDATE_STATUS",
+ },
+ {
+ 0x9380,
+ "GL_NUM_SAMPLE_COUNTS",
+ },
+ {
+ 0x8D48,
+ "GL_STENCIL_INDEX8",
+ },
+ {
+ 0x8D46,
+ "GL_STENCIL_INDEX1_OES",
+ },
+ {
+ 0x8D47,
+ "GL_STENCIL_INDEX4_OES",
+ },
+ {
+ 0x8D44,
+ "GL_RENDERBUFFER_INTERNAL_FORMAT",
+ },
+ {
+ 0x00000100,
+ "GL_DEPTH_BUFFER_BIT",
+ },
+ {
+ 0x8D42,
+ "GL_RENDERBUFFER_WIDTH",
+ },
+ {
+ 0x8D43,
+ "GL_RENDERBUFFER_HEIGHT",
+ },
+ {
+ 0x8D40,
+ "GL_FRAMEBUFFER",
+ },
+ {
+ 0x8D41,
+ "GL_RENDERBUFFER",
+ },
+ {
+ 0x8A3A,
+ "GL_UNIFORM_BLOCK_INDEX",
+ },
+ {
+ 0x0BD0,
+ "GL_DITHER",
+ },
+ {
+ 0x93D3,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR",
+ },
+ {
+ 0x9144,
+ "GL_MAX_DEBUG_LOGGED_MESSAGES_KHR",
+ },
+ {
+ 0x1801,
+ "GL_DEPTH_EXT",
+ },
+ {
+ 0x1800,
+ "GL_COLOR_EXT",
+ },
+ {
+ 0x1802,
+ "GL_STENCIL_EXT",
+ },
+ {
+ 0x9288,
+ "GL_SRC_OVER_NV",
+ },
+ {
+ 0x9120,
+ "GL_BUFFER_MAP_LENGTH",
+ },
+ {
+ 0x0B21,
+ "GL_LINE_WIDTH",
+ },
+ {
+ 0x9308,
+ "GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT",
+ },
+ {
+ 0x81A5,
+ "GL_DEPTH_COMPONENT16",
+ },
+ {
+ 0x81A6,
+ "GL_DEPTH_COMPONENT24_OES",
+ },
+ {
+ 0x81A7,
+ "GL_DEPTH_COMPONENT32_OES",
+ },
+ {
+ 0x88FD,
+ "GL_VERTEX_ATTRIB_ARRAY_INTEGER",
+ },
+ {
+ 0x88FE,
+ "GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE",
+ },
+ {
+ 0x88FF,
+ "GL_MAX_ARRAY_TEXTURE_LAYERS",
+ },
+ {
+ 0x8B6A,
+ "GL_FLOAT_MAT4x3_NV",
+ },
+ {
+ 0x93D0,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR",
+ },
+ {
+ 0x9143,
+ "GL_MAX_DEBUG_MESSAGE_LENGTH_KHR",
+ },
+ {
+ 0x8DFD,
+ "GL_MAX_FRAGMENT_UNIFORM_VECTORS",
+ },
+ {
+ 0x9145,
+ "GL_DEBUG_LOGGED_MESSAGES_KHR",
+ },
+ {
+ 0x9146,
+ "GL_DEBUG_SEVERITY_HIGH_KHR",
+ },
+ {
+ 0x9147,
+ "GL_DEBUG_SEVERITY_MEDIUM_KHR",
+ },
+ {
+ 0x9148,
+ "GL_DEBUG_SEVERITY_LOW_KHR",
+ },
+ {
+ 0x8F63,
+ "GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT",
+ },
+ {
+ 0x8F60,
+ "GL_MALI_SHADER_BINARY_ARM",
+ },
+ {
+ 0x8F61,
+ "GL_MALI_PROGRAM_BINARY_ARM",
+ },
+ {
+ 0x8F66,
+ "GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM",
+ },
+ {
+ 0x8F67,
+ "GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT",
+ },
+ {
+ 0x8F64,
+ "GL_SHADER_PIXEL_LOCAL_STORAGE_EXT",
+ },
+ {
+ 0x8F65,
+ "GL_FETCH_PER_SAMPLE_ARM",
+ },
+ {
+ 0x92D3,
+ "GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT",
+ },
+ {
+ 0x87EE,
+ "GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD",
+ },
+ {
+ 0x822B,
+ "GL_RG8_EXT",
+ },
+ {
+ 0x822F,
+ "GL_RG16F_EXT",
+ },
+ {
+ 0x822D,
+ "GL_R16F_EXT",
+ },
+ {
+ 0x822E,
+ "GL_R32F_EXT",
+ },
+ {
+ 1,
+ "GL_ES_VERSION_2_0",
+ },
+ {
+ 0x84F9,
+ "GL_DEPTH_STENCIL_OES",
+ },
+ {
+ 0x82DB,
+ "GL_TEXTURE_VIEW_MIN_LEVEL_EXT",
+ },
+ {
+ 0x8368,
+ "GL_UNSIGNED_INT_2_10_10_10_REV_EXT",
+ },
+ {
+ 0x8819,
+ "GL_LUMINANCE_ALPHA32F_EXT",
+ },
+ {
+ 0x8818,
+ "GL_LUMINANCE32F_EXT",
+ },
+ {
+ 0x82DF,
+ "GL_TEXTURE_IMMUTABLE_LEVELS",
+ },
+ {
+ 0x8363,
+ "GL_UNSIGNED_SHORT_5_6_5",
+ },
+ {
+ 0x9051,
+ "GL_IMAGE_BUFFER_EXT",
+ },
+ {
+ 0x84F2,
+ "GL_ALL_COMPLETED_NV",
+ },
+ {
+ 0x8E5A,
+ "GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT",
+ },
+ {
+ 0x84F4,
+ "GL_FENCE_CONDITION_NV",
+ },
+ {
+ 0x8366,
+ "GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT",
+ },
+ {
+ 0x8365,
+ "GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT",
+ },
+ {
+ 0x84F7,
+ "GL_COMMANDS_COMPLETED_CHROMIUM",
+ },
+ {
+ 0x8F9C,
+ "GL_SIGNED_NORMALIZED",
+ },
+ {
+ 0x92D5,
+ "GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT",
+ },
+ {
+ 0x881E,
+ "GL_LUMINANCE16F_EXT",
+ },
+ {
+ 0x84FA,
+ "GL_UNSIGNED_INT_24_8_OES",
+ },
+ {
+ 0x92D4,
+ "GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT",
+ },
+ {
+ 0x881A,
+ "GL_RGBA16F_EXT",
+ },
+ {
+ 0x84FE,
+ "GL_TEXTURE_MAX_ANISOTROPY_EXT",
+ },
+ {
+ 0x0901,
+ "GL_CCW",
+ },
+ {
+ 0x0900,
+ "GL_CW",
+ },
+ {
+ 0x9317,
+ "GL_MAX_FRAMEBUFFER_LAYERS_EXT",
+ },
+ {
+ 0x8229,
+ "GL_R8_EXT",
+ },
+ {
+ 0x8230,
+ "GL_RG32F_EXT",
+ },
+ {
+ 0x9312,
+ "GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT",
+ },
+ {
+ 0x9283,
+ "GL_DISJOINT_NV",
+ },
+ {
+ 0x8221,
+ "GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED",
+ },
+ {
+ 0x8227,
+ "GL_RG_EXT",
+ },
+ {
+ 0x8B66,
+ "GL_FLOAT_MAT2x4_NV",
+ },
+ {
+ 0x8B67,
+ "GL_FLOAT_MAT3x2_NV",
+ },
+ {
+ 0x8E1E,
+ "GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT",
+ },
+ {
+ 0x8B62,
+ "GL_SAMPLER_2D_SHADOW_EXT",
+ },
+ {
+ 0x8B63,
+ "GL_SAMPLER_2D_RECT_ARB",
+ },
+ {
+ 0x8B60,
+ "GL_SAMPLER_CUBE",
+ },
+ {
+ 0x00001000,
+ "GL_DEPTH_BUFFER_BIT4_QCOM",
+ },
+ {
+ 0x8B68,
+ "GL_FLOAT_MAT3x4_NV",
+ },
+ {
+ 0x83F0,
+ "GL_COMPRESSED_RGB_S3TC_DXT1_EXT",
+ },
+ {
+ 0x8D6A,
+ "GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT",
+ },
+ {
+ 0x00000080,
+ "GL_COLOR_BUFFER_BIT7_QCOM",
+ },
+ {
+ 0x88F0,
+ "GL_DEPTH24_STENCIL8_OES",
+ },
+ {
+ 0x8E1F,
+ "GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT",
+ },
+ {
+ 0x80A0,
+ "GL_SAMPLE_COVERAGE",
+ },
+ {
+ 0x928F,
+ "GL_DST_ATOP_NV",
+ },
+ {
+ 0x8213,
+ "GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE",
+ },
+ {
+ 0x80A9,
+ "GL_SAMPLES",
+ },
+ {
+ 0x80A8,
+ "GL_SAMPLE_BUFFERS",
+ },
+ {
+ 0x0D55,
+ "GL_ALPHA_BITS",
+ },
+ {
+ 0x0D54,
+ "GL_BLUE_BITS",
+ },
+ {
+ 0x0D57,
+ "GL_STENCIL_BITS",
+ },
+ {
+ 0x0D56,
+ "GL_DEPTH_BITS",
+ },
+ {
+ 0x8CD5,
+ "GL_FRAMEBUFFER_COMPLETE",
+ },
+ {
+ 0x0D50,
+ "GL_SUBPIXEL_BITS",
+ },
+ {
+ 0x0D53,
+ "GL_GREEN_BITS",
+ },
+ {
+ 0x0D52,
+ "GL_RED_BITS",
+ },
+ {
+ 0x8037,
+ "GL_POLYGON_OFFSET_FILL",
+ },
+ {
+ 0x928C,
+ "GL_SRC_OUT_NV",
+ },
+ {
+ 0x8034,
+ "GL_UNSIGNED_SHORT_5_5_5_1",
+ },
+ {
+ 0x8033,
+ "GL_UNSIGNED_SHORT_4_4_4_4",
+ },
+ {
+ 0x928B,
+ "GL_DST_IN_NV",
+ },
+ {
+ 0x0305,
+ "GL_ONE_MINUS_DST_ALPHA",
+ },
+ {
+ 0x0304,
+ "GL_DST_ALPHA",
+ },
+ {
+ 0x0307,
+ "GL_ONE_MINUS_DST_COLOR",
+ },
+ {
+ 0x0306,
+ "GL_DST_COLOR",
+ },
+ {
+ 0x0301,
+ "GL_ONE_MINUS_SRC_COLOR",
+ },
+ {
+ 0x0300,
+ "GL_SRC_COLOR",
+ },
+ {
+ 0x0303,
+ "GL_ONE_MINUS_SRC_ALPHA",
+ },
+ {
+ 0x0302,
+ "GL_SRC_ALPHA",
+ },
+ {
+ 0x8212,
+ "GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE",
+ },
+ {
+ 0x0308,
+ "GL_SRC_ALPHA_SATURATE",
+ },
+ {
+ 0x2A00,
+ "GL_POLYGON_OFFSET_UNITS",
+ },
+ {
+ 0xFFFFFFFF,
+ "GL_ALL_SHADER_BITS_EXT",
+ },
+ {
+ 0x82DC,
+ "GL_TEXTURE_VIEW_NUM_LEVELS_EXT",
+ },
+ {
+ 0x8C29,
+ "GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT",
+ },
+ {
+ 0x82DD,
+ "GL_TEXTURE_VIEW_MIN_LAYER_EXT",
+ },
+ {
+ 0x00800000,
+ "GL_STENCIL_BUFFER_BIT7_QCOM",
+ },
+ {
+ 0x82DE,
+ "GL_TEXTURE_VIEW_NUM_LAYERS_EXT",
+ },
+ {
+ 0x00020000,
+ "GL_STENCIL_BUFFER_BIT1_QCOM",
+ },
+ {
+ 0x8D00,
+ "GL_DEPTH_ATTACHMENT",
+ },
+ {
+ 0x8FA0,
+ "GL_PERFMON_GLOBAL_MODE_QCOM",
+ },
+ {
+ 0x8815,
+ "GL_RGB32F_EXT",
+ },
+ {
+ 0x8A35,
+ "GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH",
+ },
+ {
+ 0x8814,
+ "GL_RGBA32F_EXT",
+ },
+ {
+ 0x9277,
+ "GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",
+ },
+ {
+ 0x6004,
+ "GL_COMMANDS_ISSUED_CHROMIUM",
+ },
+ {
+ 0x813D,
+ "GL_TEXTURE_MAX_LEVEL_APPLE",
+ },
+ {
+ 0x8816,
+ "GL_ALPHA32F_EXT",
+ },
+ {
+ 0x813B,
+ "GL_TEXTURE_MAX_LOD",
+ },
+ {
+ 0x8CDD,
+ "GL_FRAMEBUFFER_UNSUPPORTED",
+ },
+ {
+ 0x8CDF,
+ "GL_MAX_COLOR_ATTACHMENTS_EXT",
+ },
+ {
+ 0x90F3,
+ "GL_CONTEXT_ROBUST_ACCESS_KHR",
+ },
+ {
+ 0x90F2,
+ "GL_MAX_MULTIVIEW_BUFFERS_EXT",
+ },
+ {
+ 0x90F1,
+ "GL_MULTIVIEW_EXT",
+ },
+ {
+ 0x90F0,
+ "GL_COLOR_ATTACHMENT_EXT",
+ },
+ {
+ 0x803C,
+ "GL_ALPHA8_OES",
+ },
+ {
+ 0x8904,
+ "GL_MIN_PROGRAM_TEXEL_OFFSET",
+ },
+ {
+ 0x84F5,
+ "GL_TEXTURE_RECTANGLE_ARB",
+ },
+ {
+ 0x882A,
+ "GL_DRAW_BUFFER5_EXT",
+ },
+ {
+ 0x8E7F,
+ "GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT",
+ },
+ {
+ 0x80AA,
+ "GL_SAMPLE_COVERAGE_VALUE",
+ },
+ {
+ 0x84F6,
+ "GL_TEXTURE_BINDING_RECTANGLE_ARB",
+ },
+ {
+ 0x80AB,
+ "GL_SAMPLE_COVERAGE_INVERT",
+ },
+ {
+ 0x8E7D,
+ "GL_MAX_PATCH_VERTICES_EXT",
+ },
+ {
+ 0x6005,
+ "GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM",
+ },
+ {
+ 0x9105,
+ "GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES",
+ },
+ {
+ 0x8E7E,
+ "GL_MAX_TESS_GEN_LEVEL_EXT",
+ },
+ {
+ 0x9102,
+ "GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES",
+ },
+ {
+ 0x8C40,
+ "GL_SRGB_EXT",
+ },
+ {
+ 0x8236,
+ "GL_R32UI",
+ },
+ {
+ 0x8E7B,
+ "GL_FRACTIONAL_ODD_EXT",
+ },
+ {
+ 0x00000040,
+ "GL_COLOR_BUFFER_BIT6_QCOM",
+ },
+ {
+ 0x882B,
+ "GL_DRAW_BUFFER6_EXT",
+ },
+ {
+ 0x8E7C,
+ "GL_FRACTIONAL_EVEN_EXT",
+ },
+ {
+ 0x8C8E,
+ "GL_TRANSFORM_FEEDBACK_BUFFER",
+ },
+ {
+ 0x8C8D,
+ "GL_SEPARATE_ATTRIBS",
+ },
+ {
+ 0x8C8F,
+ "GL_TRANSFORM_FEEDBACK_BUFFER_BINDING",
+ },
+ {
+ 0x8C8A,
+ "GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS",
+ },
+ {
+ 0x8C8C,
+ "GL_INTERLEAVED_ATTRIBS",
+ },
+ {
+ 0x8C8B,
+ "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS",
+ },
+ {
+ 0x8C17,
+ "GL_UNSIGNED_NORMALIZED_EXT",
+ },
+ {
+ 0x8A3E,
+ "GL_UNIFORM_IS_ROW_MAJOR",
+ },
+ {
+ 0x8E7A,
+ "GL_ISOLINES_EXT",
+ },
+ {
+ 0x6006,
+ "GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM",
+ },
+ {
+ 0x8D99,
+ "GL_RGBA_INTEGER",
+ },
+ {
+ 0x8D98,
+ "GL_RGB_INTEGER",
+ },
+ {
+ 0x8A4A,
+ "GL_SKIP_DECODE_EXT",
+ },
+ {
+ 0x8A4F,
+ "GL_PROGRAM_PIPELINE_OBJECT_EXT",
+ },
+ {
+ 0x882C,
+ "GL_DRAW_BUFFER7_EXT",
+ },
+ {
+ 0x0010,
+ "GL_MAP_FLUSH_EXPLICIT_BIT_EXT",
+ },
+ {
+ 0x8918,
+ "GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT",
+ },
+ {
+ 0x8919,
+ "GL_SAMPLER_BINDING",
+ },
+ {
+ 0x92CD,
+ "GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT",
+ },
+ {
+ 0x92CE,
+ "GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT",
+ },
+ {
+ 0x8C85,
+ "GL_TRANSFORM_FEEDBACK_BUFFER_SIZE",
+ },
+ {
+ 0x8D7C,
+ "GL_RGBA8UI",
+ },
+ {
+ 0x6007,
+ "GL_LATENCY_QUERY_CHROMIUM",
+ },
+ {
+ 0x8D83,
+ "GL_RGB32I",
+ },
+ {
+ 0x8916,
+ "GL_GEOMETRY_LINKED_VERTICES_OUT_EXT",
+ },
+ {
+ 0x8917,
+ "GL_GEOMETRY_LINKED_INPUT_TYPE_EXT",
+ },
+ {
+ 0x881F,
+ "GL_LUMINANCE_ALPHA16F_EXT",
+ },
+ {
+ 0x84FD,
+ "GL_MAX_TEXTURE_LOD_BIAS",
+ },
+ {
+ 0x882D,
+ "GL_DRAW_BUFFER8_EXT",
+ },
+ {
+ 0x0BA6,
+ "GL_PATH_MODELVIEW_MATRIX_CHROMIUM",
+ },
+ {
+ 0x8A42,
+ "GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS",
+ },
+ {
+ 0x8F37,
+ "GL_COPY_WRITE_BUFFER_NV",
+ },
+ {
+ 0x8F36,
+ "GL_COPY_READ_BUFFER_NV",
+ },
+ {
+ 0x84FF,
+ "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT",
+ },
+ {
+ 0x8A3C,
+ "GL_UNIFORM_ARRAY_STRIDE",
+ },
+ {
+ 0x8A44,
+ "GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER",
+ },
+ {
+ 0x6000,
+ "GL_TEXTURE_POOL_CHROMIUM",
+ },
+ {
+ 0x0B74,
+ "GL_DEPTH_FUNC",
+ },
+ {
+ 0x8A49,
+ "GL_DECODE_EXT",
+ },
+ {
+ 0x881B,
+ "GL_RGB16F_EXT",
+ },
+ {
+ 0x0B71,
+ "GL_DEPTH_TEST",
+ },
+ {
+ 0x0B70,
+ "GL_DEPTH_RANGE",
+ },
+ {
+ 0x0B73,
+ "GL_DEPTH_CLEAR_VALUE",
+ },
+ {
+ 0x0B72,
+ "GL_DEPTH_WRITEMASK",
+ },
+ {
+ 0x8BD5,
+ "GL_TEXTURE_INTERNAL_FORMAT_QCOM",
+ },
+ {
+ 0x85BA,
+ "GL_UNSIGNED_SHORT_8_8_APPLE",
+ },
+ {
+ 0x8C87,
+ "GL_PRIMITIVES_GENERATED_EXT",
+ },
+ {
+ 0x8C80,
+ "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS",
+ },
+ {
+ 0x8C83,
+ "GL_TRANSFORM_FEEDBACK_VARYINGS",
+ },
+ {
+ 0x8D69,
+ "GL_PRIMITIVE_RESTART_FIXED_INDEX",
+ },
+ {
+ 0x882E,
+ "GL_DRAW_BUFFER9_EXT",
+ },
+ {
+ 0x8A32,
+ "GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT",
+ },
+ {
+ 0x8A31,
+ "GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS",
+ },
+ {
+ 0x8C89,
+ "GL_RASTERIZER_DISCARD",
+ },
+ {
+ 0x8C88,
+ "GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN",
+ },
+ {
+ 0x8C1A,
+ "GL_TEXTURE_2D_ARRAY",
+ },
+ {
+ 0x910D,
+ "GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES",
+ },
+ {
+ 0x8E80,
+ "GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT",
+ },
+ {
+ 0x910B,
+ "GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES",
+ },
+ {
+ 0x910C,
+ "GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES",
+ },
+ {
+ 0x94FA,
+ "GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL",
+ },
+ {
+ 0x8073,
+ "GL_MAX_3D_TEXTURE_SIZE_OES",
+ },
+ {
+ 0x8072,
+ "GL_TEXTURE_WRAP_R_OES",
+ },
+ {
+ 0x9289,
+ "GL_DST_OVER_NV",
+ },
+ {
+ 0x882F,
+ "GL_DRAW_BUFFER10_EXT",
+ },
+ {
+ 0x8074,
+ "GL_VERTEX_ARRAY_KHR",
+ },
+ {
+ 0x80E1,
+ "GL_BGRA_EXT",
+ },
+ {
+ 0x8ED7,
+ "GL_COVERAGE_AUTOMATIC_NV",
+ },
+ {
+ 0x8ED6,
+ "GL_COVERAGE_EDGE_FRAGMENTS_NV",
+ },
+ {
+ 0x8ED5,
+ "GL_COVERAGE_ALL_FRAGMENTS_NV",
+ },
+ {
+ 0x8ED4,
+ "GL_COVERAGE_SAMPLES_NV",
+ },
+ {
+ 0x8ED3,
+ "GL_COVERAGE_BUFFERS_NV",
+ },
+ {
+ 0x8ED2,
+ "GL_COVERAGE_ATTACHMENT_NV",
+ },
+ {
+ 0x8ED1,
+ "GL_COVERAGE_COMPONENT4_NV",
+ },
+ {
+ 0x8ED0,
+ "GL_COVERAGE_COMPONENT_NV",
+ },
+ {
+ 0x8217,
+ "GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE",
+ },
+ {
+ 0x8E89,
+ "GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT",
+ },
+ {
+ 0x8216,
+ "GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE",
+ },
+ {
+ 0x8A36,
+ "GL_ACTIVE_UNIFORM_BLOCKS",
+ },
+ {
+ 0x8A37,
+ "GL_UNIFORM_TYPE",
+ },
+ {
+ 0x8A34,
+ "GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT",
+ },
+ {
+ 0x3006,
+ "GL_CLIP_DISTANCE6_APPLE",
+ },
+ {
+ 0x800B,
+ "GL_FUNC_REVERSE_SUBTRACT",
+ },
+ {
+ 0x8A33,
+ "GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS",
+ },
+ {
+ 0x00000400,
+ "GL_STENCIL_BUFFER_BIT",
+ },
+ {
+ 0x800A,
+ "GL_FUNC_SUBTRACT",
+ },
+ {
+ 0x8214,
+ "GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE",
+ },
+ {
+ 0x8A38,
+ "GL_UNIFORM_SIZE",
+ },
+ {
+ 0x8A39,
+ "GL_UNIFORM_NAME_LENGTH",
+ },
+ {
+ 0x8E2C,
+ "GL_DEPTH_COMPONENT16_NONLINEAR_NV",
+ },
+ {
+ 0x889F,
+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",
+ },
+ {
+ 0x8219,
+ "GL_FRAMEBUFFER_UNDEFINED_OES",
+ },
+ {
+ 0x8E23,
+ "GL_TRANSFORM_FEEDBACK_PAUSED",
+ },
+ {
+ 0x8E22,
+ "GL_TRANSFORM_FEEDBACK",
+ },
+ {
+ 0x8E25,
+ "GL_TRANSFORM_FEEDBACK_BINDING",
+ },
+ {
+ 0x9054,
+ "GL_IMAGE_CUBE_MAP_ARRAY_EXT",
+ },
+ {
+ 0x8E28,
+ "GL_TIMESTAMP_EXT",
+ },
+ {
+ 0x8006,
+ "GL_FUNC_ADD",
+ },
+ {
+ 0x8007,
+ "GL_MIN_EXT",
+ },
+ {
+ 0x8004,
+ "GL_ONE_MINUS_CONSTANT_ALPHA",
+ },
+ {
+ 0x8005,
+ "GL_BLEND_COLOR",
+ },
+ {
+ 0x8002,
+ "GL_ONE_MINUS_CONSTANT_COLOR",
+ },
+ {
+ 0x8003,
+ "GL_CONSTANT_ALPHA",
+ },
+ {
+ 0x8001,
+ "GL_CONSTANT_COLOR",
+ },
+ {
+ 0x0204,
+ "GL_GREATER",
+ },
+ {
+ 0x0205,
+ "GL_NOTEQUAL",
+ },
+ {
+ 0x0206,
+ "GL_GEQUAL",
+ },
+ {
+ 0x0207,
+ "GL_ALWAYS",
+ },
+ {
+ 0x0200,
+ "GL_NEVER",
+ },
+ {
+ 0x0201,
+ "GL_LESS",
+ },
+ {
+ 0x0202,
+ "GL_EQUAL",
+ },
+ {
+ 0x0203,
+ "GL_LEQUAL",
+ },
+ {
+ 0x8BD6,
+ "GL_TEXTURE_FORMAT_QCOM",
+ },
+ {
+ 0x8228,
+ "GL_RG_INTEGER",
+ },
+ {
+ 0x2901,
+ "GL_REPEAT",
+ },
+ {
+ 0x9067,
+ "GL_UNSIGNED_INT_IMAGE_BUFFER_EXT",
+ },
+ {
+ 0x92A0,
+ "GL_EXCLUSION_KHR",
+ },
+ {
+ 0x93D8,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR",
+ },
+ {
+ 0x93D9,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR",
+ },
+ {
+ 0x8FB2,
+ "GL_GPU_OPTIMIZED_QCOM",
+ },
+ {
+ 0x190A,
+ "GL_LUMINANCE_ALPHA",
+ },
+ {
+ 0x8FB0,
+ "GL_BINNING_CONTROL_HINT_QCOM",
+ },
+ {
+ 0x905C,
+ "GL_INT_IMAGE_BUFFER_EXT",
+ },
+ {
+ 0x1E00,
+ "GL_KEEP",
+ },
+ {
+ 0x1E01,
+ "GL_REPLACE",
+ },
+ {
+ 0x1E02,
+ "GL_INCR",
+ },
+ {
+ 0x1E03,
+ "GL_DECR",
+ },
+ {
+ 0x93D6,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR",
+ },
+ {
+ 0x93D7,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR",
+ },
+ {
+ 0x93D4,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR",
+ },
+ {
+ 0x93D5,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR",
+ },
+ {
+ 0x886D,
+ "GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT",
+ },
+ {
+ 0x0BE2,
+ "GL_BLEND",
+ },
+ {
+ 0x84CB,
+ "GL_TEXTURE11",
+ },
+ {
+ 0x8D55,
+ "GL_RENDERBUFFER_STENCIL_SIZE",
+ },
+ {
+ 0x8D54,
+ "GL_RENDERBUFFER_DEPTH_SIZE",
+ },
+ {
+ 0x8D57,
+ "GL_MAX_SAMPLES_ANGLE",
+ },
+ {
+ 0x8D56,
+ "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE",
+ },
+ {
+ 0x8D51,
+ "GL_RENDERBUFFER_GREEN_SIZE",
+ },
+ {
+ 0x8D50,
+ "GL_RENDERBUFFER_RED_SIZE",
+ },
+ {
+ 0x8D53,
+ "GL_RENDERBUFFER_ALPHA_SIZE",
+ },
+ {
+ 0x8D52,
+ "GL_RENDERBUFFER_BLUE_SIZE",
+ },
+ {
+ 0x92A6,
+ "GL_VIVIDLIGHT_NV",
+ },
+ {
+ 0x8A2A,
+ "GL_UNIFORM_BUFFER_SIZE",
+ },
+ {
+ 0x8DCC,
+ "GL_INT_SAMPLER_CUBE",
+ },
+ {
+ 0x78F1,
+ "GL_MAP_CHROMIUM",
+ },
+ {
+ 0x00080000,
+ "GL_STENCIL_BUFFER_BIT3_QCOM",
+ },
+ {
+ 0x92A7,
+ "GL_LINEARLIGHT_NV",
+ },
+ {
+ 0x8DCF,
+ "GL_INT_SAMPLER_2D_ARRAY",
+ },
+ {
+ 0x886A,
+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED",
+ },
+ {
+ 0x8C41,
+ "GL_SRGB8_NV",
+ },
+ {
+ 0x0C01,
+ "GL_DRAW_BUFFER_EXT",
+ },
+ {
+ 0x886C,
+ "GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT",
+ },
+ {
+ 0x90CB,
+ "GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT",
+ },
+ {
+ 0x8DCA,
+ "GL_INT_SAMPLER_2D",
+ },
+ {
+ 0x93C7,
+ "GL_COMPRESSED_RGBA_ASTC_6x5x5_OES",
+ },
+ {
+ 0x8B5F,
+ "GL_SAMPLER_3D_OES",
+ },
+ {
+ 0x8B95,
+ "GL_PALETTE8_RGB8_OES",
+ },
+ {
+ 0x9250,
+ "GL_SHADER_BINARY_DMP",
+ },
+ {
+ 0x9251,
+ "GL_SMAPHS30_PROGRAM_BINARY_DMP",
+ },
+ {
+ 0x9252,
+ "GL_SMAPHS_PROGRAM_BINARY_DMP",
+ },
+ {
+ 0x9253,
+ "GL_DMP_PROGRAM_BINARY_DMP",
+ },
+ {
+ 0x8DC8,
+ "GL_UNSIGNED_INT_VEC4",
+ },
+ {
+ 0x3000,
+ "GL_CLIP_DISTANCE0_APPLE",
+ },
+ {
+ 0x8C92,
+ "GL_ATC_RGB_AMD",
+ },
+ {
+ 0x8DC1,
+ "GL_SAMPLER_2D_ARRAY",
+ },
+ {
+ 0x9154,
+ "GL_VERTEX_ARRAY_OBJECT_EXT",
+ },
+ {
+ 0x9153,
+ "GL_QUERY_OBJECT_EXT",
+ },
+ {
+ 0x8864,
+ "GL_QUERY_COUNTER_BITS_EXT",
+ },
+ {
+ 0x9151,
+ "GL_BUFFER_OBJECT_EXT",
+ },
+ {
+ 0x8C93,
+ "GL_ATC_RGBA_EXPLICIT_ALPHA_AMD",
+ },
+ {
+ 0x00000002,
+ "GL_CONTEXT_FLAG_DEBUG_BIT_KHR",
+ },
+ {
+ 0x8A3F,
+ "GL_UNIFORM_BLOCK_BINDING",
+ },
+ {
+ 0x00000000,
+ "GL_PERFQUERY_SINGLE_CONTEXT_INTEL",
+ },
+ {
+ 0x00000001,
+ "GL_SYNC_FLUSH_COMMANDS_BIT_APPLE",
+ },
+ {
+ 0x9248,
+ "GL_OVERLAY_TRANSFORM_ROTATE_90_CHROMIUM",
+ },
+ {
+ 0x00000004,
+ "GL_GEOMETRY_SHADER_BIT_EXT",
+ },
+ {
+ 0x1702,
+ "GL_TEXTURE",
+ },
+ {
+ 0x3003,
+ "GL_CLIP_DISTANCE3_APPLE",
+ },
+ {
+ 0x00000008,
+ "GL_TESS_CONTROL_SHADER_BIT_EXT",
+ },
+ {
+ 0x8B58,
+ "GL_BOOL_VEC3",
+ },
+ {
+ 0x8A3D,
+ "GL_UNIFORM_MATRIX_STRIDE",
+ },
+ {
+ 0x8828,
+ "GL_DRAW_BUFFER3_EXT",
+ },
+ {
+ 0x8DF0,
+ "GL_LOW_FLOAT",
+ },
+ {
+ 0x1906,
+ "GL_ALPHA",
+ },
+ {
+ 0x1907,
+ "GL_RGB",
+ },
+ {
+ 0x8FBB,
+ "GL_GPU_DISJOINT_EXT",
+ },
+ {
+ 0x1901,
+ "GL_STENCIL_INDEX_OES",
+ },
+ {
+ 0x1902,
+ "GL_DEPTH_COMPONENT",
+ },
+ {
+ 0x8B56,
+ "GL_BOOL",
+ },
+ {
+ 0x93DB,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR",
+ },
+ {
+ 0x8B9B,
+ "GL_IMPLEMENTATION_COLOR_READ_FORMAT",
+ },
+ {
+ 0x8B9A,
+ "GL_IMPLEMENTATION_COLOR_READ_TYPE",
+ },
+ {
+ 0x93DA,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR",
+ },
+ {
+ 0x1908,
+ "GL_RGBA",
+ },
+ {
+ 0x8DF2,
+ "GL_HIGH_FLOAT",
+ },
+ {
+ 0x93DD,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR",
+ },
+ {
+ 0x8827,
+ "GL_DRAW_BUFFER2_EXT",
+ },
+ {
+ 0x9243,
+ "GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM",
+ },
+ {
+ 0x8DF3,
+ "GL_LOW_INT",
+ },
+ {
+ 0x82E8,
+ "GL_MAX_LABEL_LENGTH_KHR",
+ },
+ {
+ 0x82E6,
+ "GL_SAMPLER_KHR",
+ },
+ {
+ 0x0C02,
+ "GL_READ_BUFFER_EXT",
+ },
+ {
+ 0x82E3,
+ "GL_QUERY_KHR",
+ },
+ {
+ 0x82E2,
+ "GL_PROGRAM_KHR",
+ },
+ {
+ 0x82E1,
+ "GL_SHADER_KHR",
+ },
+ {
+ 0x8B52,
+ "GL_FLOAT_VEC4",
+ },
+ {
+ 0x8239,
+ "GL_RG16I",
+ },
+ {
+ 0x8238,
+ "GL_RG8UI",
+ },
+ {
+ 0x9240,
+ "GL_UNPACK_FLIP_Y_CHROMIUM",
+ },
+ {
+ 0x8DF6,
+ "GL_UNSIGNED_INT_10_10_10_2_OES",
+ },
+ {
+ 0x8A30,
+ "GL_MAX_UNIFORM_BLOCK_SIZE",
+ },
+ {
+ 0x9273,
+ "GL_COMPRESSED_SIGNED_RG11_EAC",
+ },
+ {
+ 0x8231,
+ "GL_R8I",
+ },
+ {
+ 0x8866,
+ "GL_QUERY_RESULT_EXT",
+ },
+ {
+ 0x8233,
+ "GL_R16I",
+ },
+ {
+ 0x8DF7,
+ "GL_INT_10_10_10_2_OES",
+ },
+ {
+ 0x8235,
+ "GL_R32I",
+ },
+ {
+ 0x8234,
+ "GL_R16UI",
+ },
+ {
+ 0x8237,
+ "GL_RG8I",
+ },
+ {
+ 0x9246,
+ "GL_OVERLAY_TRANSFORM_FLIP_HORIZONTAL_CHROMIUM",
+ },
+ {
+ 0x8B69,
+ "GL_FLOAT_MAT4x2_NV",
+ },
+ {
+ 0x812D,
+ "GL_CLAMP_TO_BORDER_EXT",
+ },
+ {
+ 0x812F,
+ "GL_CLAMP_TO_EDGE",
+ },
+ {
+ 0x92A4,
+ "GL_LINEARDODGE_NV",
+ },
+ {
+ 0x8DD8,
+ "GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT",
+ },
+ {
+ 0x8DD9,
+ "GL_GEOMETRY_SHADER_EXT",
+ },
+ {
+ 0x86A3,
+ "GL_COMPRESSED_TEXTURE_FORMATS",
+ },
+ {
+ 0x8DD4,
+ "GL_UNSIGNED_INT_SAMPLER_CUBE",
+ },
+ {
+ 0x9244,
+ "GL_BIND_GENERATES_RESOURCE_CHROMIUM",
+ },
+ {
+ 0x8DD2,
+ "GL_UNSIGNED_INT_SAMPLER_2D",
+ },
+ {
+ 0x8DD3,
+ "GL_UNSIGNED_INT_SAMPLER_3D",
+ },
+ {
+ 0x8DD0,
+ "GL_INT_SAMPLER_BUFFER_EXT",
+ },
+ {
+ 0x86A2,
+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS",
+ },
+ {
+ 0x0CF3,
+ "GL_UNPACK_SKIP_ROWS_EXT",
+ },
+ {
+ 0x0CF2,
+ "GL_UNPACK_ROW_LENGTH_EXT",
+ },
+ {
+ 0x140C,
+ "GL_FIXED",
+ },
+ {
+ 0x140B,
+ "GL_HALF_FLOAT",
+ },
+ {
+ 0x8008,
+ "GL_MAX_EXT",
+ },
+ {
+ 0x0CF5,
+ "GL_UNPACK_ALIGNMENT",
+ },
+ {
+ 0x8867,
+ "GL_QUERY_RESULT_AVAILABLE_EXT",
+ },
+ {
+ 0x8D82,
+ "GL_RGBA32I",
+ },
+ {
+ 0x8009,
+ "GL_BLEND_EQUATION",
+ },
+ {
+ 0x911F,
+ "GL_BUFFER_ACCESS_FLAGS",
+ },
+ {
+ 0x1401,
+ "GL_UNSIGNED_BYTE",
+ },
+ {
+ 0x1400,
+ "GL_BYTE",
+ },
+ {
+ 0x1403,
+ "GL_UNSIGNED_SHORT",
+ },
+ {
+ 0x1402,
+ "GL_SHORT",
+ },
+ {
+ 0x1405,
+ "GL_UNSIGNED_INT",
+ },
+ {
+ 0x1404,
+ "GL_INT",
+ },
+ {
+ 0x1406,
+ "GL_FLOAT",
+ },
+ {
+ 0x8C1D,
+ "GL_TEXTURE_BINDING_2D_ARRAY",
+ },
+ {
+ 0x8DDF,
+ "GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT",
+ },
+ {
+ 0x8043,
+ "GL_LUMINANCE4_ALPHA4_OES",
+ },
+ {
+ 0x8040,
+ "GL_LUMINANCE8_OES",
+ },
+ {
+ 0x8045,
+ "GL_LUMINANCE8_ALPHA8_OES",
+ },
+ {
+ 0x8CD1,
+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",
+ },
+ {
+ 0x00040000,
+ "GL_STENCIL_BUFFER_BIT2_QCOM",
+ },
+ {
+ 0x8CD0,
+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",
+ },
+ {
+ 0x823A,
+ "GL_RG16UI",
+ },
+ {
+ 0x8CE4,
+ "GL_COLOR_ATTACHMENT4_EXT",
+ },
+ {
+ 0x823B,
+ "GL_RG32I",
+ },
+ {
+ 0x8CD3,
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",
+ },
+ {
+ 0x846E,
+ "GL_ALIASED_LINE_WIDTH_RANGE",
+ },
+ {
+ 0x0B90,
+ "GL_STENCIL_TEST",
+ },
+ {
+ 0x8CD2,
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",
+ },
+ {
+ 0x881C,
+ "GL_ALPHA16F_EXT",
+ },
+ {
+ 0x928E,
+ "GL_SRC_ATOP_NV",
+ },
+ {
+ 0x8CD4,
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES",
+ },
+ {
+ 0x9113,
+ "GL_SYNC_CONDITION_APPLE",
+ },
+ {
+ 0x8CD7,
+ "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",
+ },
+ {
+ 0x08000000,
+ "GL_MULTISAMPLE_BUFFER_BIT3_QCOM",
+ },
+ {
+ 0x93A4,
+ "GL_PACK_REVERSE_ROW_ORDER_ANGLE",
+ },
+ {
+ 0x8038,
+ "GL_POLYGON_OFFSET_FACTOR",
+ },
+ {
+ 0x94F9,
+ "GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL",
+ },
+ {
+ 0x851A,
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z",
+ },
+ {
+ 0x851C,
+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE",
+ },
+ {
+ 0x8CD9,
+ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS",
+ },
+ {
+ 0x84CC,
+ "GL_TEXTURE12",
+ },
+ {
+ 0x0BA2,
+ "GL_VIEWPORT",
+ },
+ {
+ 0x84CA,
+ "GL_TEXTURE10",
+ },
+ {
+ 0x0BA7,
+ "GL_PATH_PROJECTION_MATRIX_CHROMIUM",
+ },
+ {
+ 0x84CF,
+ "GL_TEXTURE15",
+ },
+ {
+ 0x84CE,
+ "GL_TEXTURE14",
+ },
+ {
+ 0x84CD,
+ "GL_TEXTURE13",
+ },
+ {
+ 0x83F9,
+ "GL_PERFQUERY_DONOT_FLUSH_INTEL",
+ },
+ {
+ 0x9115,
+ "GL_SYNC_FLAGS_APPLE",
+ },
+ {
+ 0x9286,
+ "GL_SRC_NV",
+ },
+ {
+ 0x83F3,
+ "GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE",
+ },
+ {
+ 0x83F2,
+ "GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE",
+ },
+ {
+ 0x83F1,
+ "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT",
+ },
+ {
+ 0x9114,
+ "GL_SYNC_STATUS_APPLE",
+ },
+ {
+ 0x8C0A,
+ "GL_SGX_BINARY_IMG",
+ },
+ {
+ 0x93BB,
+ "GL_COMPRESSED_RGBA_ASTC_10x10_KHR",
+ },
+ {
+ 0x911C,
+ "GL_CONDITION_SATISFIED_APPLE",
+ },
+ {
+ 0x911B,
+ "GL_TIMEOUT_EXPIRED_APPLE",
+ },
+ {
+ 0x911A,
+ "GL_ALREADY_SIGNALED_APPLE",
+ },
+ {
+ 0x9284,
+ "GL_CONJOINT_NV",
+ },
+ {
+ 0x9124,
+ "GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT",
+ },
+ {
+ 0x911D,
+ "GL_WAIT_FAILED_APPLE",
+ },
+ {
+ 0x929A,
+ "GL_COLORBURN_KHR",
+ },
+ {
+ 0x929B,
+ "GL_HARDLIGHT_KHR",
+ },
+ {
+ 0x929C,
+ "GL_SOFTLIGHT_KHR",
+ },
+ {
+ 0x846D,
+ "GL_ALIASED_POINT_SIZE_RANGE",
+ },
+ {
+ 0x929E,
+ "GL_DIFFERENCE_KHR",
+ },
+ {
+ 0x929F,
+ "GL_MINUS_NV",
+ },
+ {
+ 0x9282,
+ "GL_UNCORRELATED_NV",
+ },
+ {
+ 0x9298,
+ "GL_LIGHTEN_KHR",
+ },
+ {
+ 0x9299,
+ "GL_COLORDODGE_KHR",
+ },
+ {
+ 0x9111,
+ "GL_MAX_SERVER_WAIT_TIMEOUT_APPLE",
+ },
+ {
+ 0x93A6,
+ "GL_PROGRAM_BINARY_ANGLE",
+ },
+ {
+ 0x9117,
+ "GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE",
+ },
+ {
+ 0x93A0,
+ "GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE",
+ },
+ {
+ 0x93A3,
+ "GL_FRAMEBUFFER_ATTACHMENT_ANGLE",
+ },
+ {
+ 0x93A2,
+ "GL_TEXTURE_USAGE_ANGLE",
+ },
+ {
+ 0x8802,
+ "GL_STENCIL_BACK_PASS_DEPTH_FAIL",
+ },
+ {
+ 0x9119,
+ "GL_SIGNALED_APPLE",
+ },
+ {
+ 0x9118,
+ "GL_UNSIGNALED_APPLE",
+ },
+ {
+ 0x9294,
+ "GL_MULTIPLY_KHR",
+ },
+ {
+ 0x9295,
+ "GL_SCREEN_KHR",
+ },
+ {
+ 0x9296,
+ "GL_OVERLAY_KHR",
+ },
+ {
+ 0x9297,
+ "GL_DARKEN_KHR",
+ },
+ {
+ 0x0020,
+ "GL_MAP_UNSYNCHRONIZED_BIT_EXT",
+ },
+ {
+ 0x8E78,
+ "GL_TESS_GEN_VERTEX_ORDER_EXT",
+ },
+ {
+ 0x8C01,
+ "GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG",
+ },
+ {
+ 0x8C00,
+ "GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG",
+ },
+ {
+ 0x8A52,
+ "GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT",
+ },
+ {
+ 0x8C02,
+ "GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",
+ },
+ {
+ 0x84C9,
+ "GL_TEXTURE9",
+ },
+ {
+ 0x84C8,
+ "GL_TEXTURE8",
+ },
+ {
+ 0x8869,
+ "GL_MAX_VERTEX_ATTRIBS",
+ },
+ {
+ 0x84C3,
+ "GL_TEXTURE3",
+ },
+ {
+ 0x84C2,
+ "GL_TEXTURE2",
+ },
+ {
+ 0x84C1,
+ "GL_TEXTURE1",
+ },
+ {
+ 0x84C0,
+ "GL_TEXTURE0",
+ },
+ {
+ 0x84C7,
+ "GL_TEXTURE7",
+ },
+ {
+ 0x84C6,
+ "GL_TEXTURE6",
+ },
+ {
+ 0x84C5,
+ "GL_TEXTURE5",
+ },
+ {
+ 0x8803,
+ "GL_STENCIL_BACK_PASS_DEPTH_PASS",
+ },
+ {
+ 0x928A,
+ "GL_SRC_IN_NV",
+ },
+ {
+ 0x8518,
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y",
+ },
+ {
+ 0x8519,
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z",
+ },
+ {
+ 0x8514,
+ "GL_TEXTURE_BINDING_CUBE_MAP",
+ },
+ {
+ 0x8515,
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X",
+ },
+ {
+ 0x8516,
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X",
+ },
+ {
+ 0x8517,
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y",
+ },
+ {
+ 0x8218,
+ "GL_FRAMEBUFFER_DEFAULT",
+ },
+ {
+ 0x8513,
+ "GL_TEXTURE_CUBE_MAP",
+ },
+ {
+ 0x8626,
+ "GL_CURRENT_VERTEX_ATTRIB",
+ },
+ {
+ 0x92B1,
+ "GL_PLUS_CLAMPED_NV",
+ },
+ {
+ 0x92B0,
+ "GL_HSL_LUMINOSITY_KHR",
+ },
+ {
+ 0x92B3,
+ "GL_MINUS_CLAMPED_NV",
+ },
+ {
+ 0x92B2,
+ "GL_PLUS_CLAMPED_ALPHA_NV",
+ },
+ {
+ 0x8765,
+ "GL_BUFFER_USAGE",
+ },
+ {
+ 0x8764,
+ "GL_BUFFER_SIZE",
+ },
+ {
+ 0x8B99,
+ "GL_PALETTE8_RGB5_A1_OES",
+ },
+ {
+ 0x0503,
+ "GL_STACK_OVERFLOW_KHR",
+ },
+ {
+ 0x0502,
+ "GL_INVALID_OPERATION",
+ },
+ {
+ 0x0501,
+ "GL_INVALID_VALUE",
+ },
+ {
+ 0x0500,
+ "GL_INVALID_ENUM",
+ },
+ {
+ 0x0507,
+ "GL_CONTEXT_LOST_KHR",
+ },
+ {
+ 0x0506,
+ "GL_INVALID_FRAMEBUFFER_OPERATION",
+ },
+ {
+ 0x0505,
+ "GL_OUT_OF_MEMORY",
+ },
+ {
+ 0x0504,
+ "GL_STACK_UNDERFLOW_KHR",
+ },
+ {
+ 0x0CF4,
+ "GL_UNPACK_SKIP_PIXELS_EXT",
+ },
+ {
+ 0x0B44,
+ "GL_CULL_FACE",
+ },
+ {
+ 0x8B5E,
+ "GL_SAMPLER_2D",
+ },
+ {
+ 0x0B46,
+ "GL_FRONT_FACE",
+ },
+ {
+ 0x8FB3,
+ "GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM",
+ },
+ {
+ 0x824A,
+ "GL_DEBUG_SOURCE_APPLICATION_KHR",
+ },
+ {
+ 0x824B,
+ "GL_DEBUG_SOURCE_OTHER_KHR",
+ },
+ {
+ 0x824C,
+ "GL_DEBUG_TYPE_ERROR_KHR",
+ },
+ {
+ 0x824D,
+ "GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR",
+ },
+ {
+ 0x824E,
+ "GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR",
+ },
+ {
+ 0x824F,
+ "GL_DEBUG_TYPE_PORTABILITY_KHR",
+ },
+ {
+ 0x8DD7,
+ "GL_UNSIGNED_INT_SAMPLER_2D_ARRAY",
+ },
+ {
+ 0x8B31,
+ "GL_VERTEX_SHADER",
+ },
+ {
+ 0x8B30,
+ "GL_FRAGMENT_SHADER",
+ },
+ {
+ 0x8FB1,
+ "GL_CPU_OPTIMIZED_QCOM",
+ },
+ {
+ 0x93D2,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR",
+ },
+ {
+ 0x82FB,
+ "GL_CONTEXT_RELEASE_BEHAVIOR_KHR",
+ },
+ {
+ 0x8B5A,
+ "GL_FLOAT_MAT2",
+ },
+ {
+ 0x84D8,
+ "GL_TEXTURE24",
+ },
+ {
+ 0x84D9,
+ "GL_TEXTURE25",
+ },
+ {
+ 0x84D6,
+ "GL_TEXTURE22",
+ },
+ {
+ 0x84D7,
+ "GL_TEXTURE23",
+ },
+ {
+ 0x84D4,
+ "GL_TEXTURE20",
+ },
+ {
+ 0x0D05,
+ "GL_PACK_ALIGNMENT",
+ },
+ {
+ 0x84D2,
+ "GL_TEXTURE18",
+ },
+ {
+ 0x84D3,
+ "GL_TEXTURE19",
+ },
+ {
+ 0x84D0,
+ "GL_TEXTURE16",
+ },
+ {
+ 0x84D1,
+ "GL_TEXTURE17",
+ },
+ {
+ 0x93D1,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR",
+ },
+ {
+ 0x84DF,
+ "GL_TEXTURE31",
+ },
+ {
+ 0x8B97,
+ "GL_PALETTE8_R5_G6_B5_OES",
+ },
+ {
+ 0x84DD,
+ "GL_TEXTURE29",
+ },
+ {
+ 0x84DE,
+ "GL_TEXTURE30",
+ },
+ {
+ 0x84DB,
+ "GL_TEXTURE27",
+ },
+ {
+ 0x84DC,
+ "GL_TEXTURE28",
+ },
+ {
+ 0x6002,
+ "GL_TEXTURE_POOL_UNMANAGED_CHROMIUM",
+ },
+ {
+ 0x84DA,
+ "GL_TEXTURE26",
+ },
+ {
+ 0x8242,
+ "GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR",
+ },
+ {
+ 0x8243,
+ "GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR",
+ },
+ {
+ 0x8244,
+ "GL_DEBUG_CALLBACK_FUNCTION_KHR",
+ },
+ {
+ 0x8245,
+ "GL_DEBUG_CALLBACK_USER_PARAM_KHR",
+ },
+ {
+ 0x8246,
+ "GL_DEBUG_SOURCE_API_KHR",
+ },
+ {
+ 0x8247,
+ "GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR",
+ },
+ {
+ 0x8248,
+ "GL_DEBUG_SOURCE_SHADER_COMPILER_KHR",
+ },
+ {
+ 0x8249,
+ "GL_DEBUG_SOURCE_THIRD_PARTY_KHR",
+ },
+ {
+ 0x88ED,
+ "GL_PIXEL_PACK_BUFFER_BINDING",
+ },
+ {
+ 0x8B94,
+ "GL_PALETTE4_RGB5_A1_OES",
+ },
+ {
+ 0x94F4,
+ "GL_PERFQUERY_COUNTER_RAW_INTEL",
+ },
+ {
+ 0x823C,
+ "GL_RG32UI",
+ },
+ {
+ 0x8A29,
+ "GL_UNIFORM_BUFFER_START",
+ },
+ {
+ 0x8A28,
+ "GL_UNIFORM_BUFFER_BINDING",
+ },
+ {
+ 0x92BE,
+ "GL_PRIMITIVE_BOUNDING_BOX_EXT",
+ },
+ {
+ 0x8645,
+ "GL_VERTEX_ATTRIB_ARRAY_POINTER",
+ },
+ {
+ 0x8865,
+ "GL_CURRENT_QUERY_EXT",
+ },
+ {
+ 0x8E5B,
+ "GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES",
+ },
+ {
+ 0x8E5C,
+ "GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES",
+ },
+ {
+ 0x8E5D,
+ "GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES",
+ },
+ {
+ 0x906A,
+ "GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT",
+ },
+ {
+ 0x906F,
+ "GL_RGB10_A2UI",
+ },
+ {
+ 0x8E72,
+ "GL_PATCH_VERTICES_EXT",
+ },
+ {
+ 0x8BD3,
+ "GL_TEXTURE_HEIGHT_QCOM",
+ },
+ {
+ 0x87FA,
+ "GL_3DC_XY_AMD",
+ },
+ {
+ 0x84C4,
+ "GL_TEXTURE4",
+ },
+ {
+ 0x821C,
+ "GL_MINOR_VERSION",
+ },
+ {
+ 0x8E8A,
+ "GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT",
+ },
+ {
+ 0x85B5,
+ "GL_VERTEX_ARRAY_BINDING_OES",
+ },
+ {
+ 0x8253,
+ "GL_GUILTY_CONTEXT_RESET_KHR",
+ },
+ {
+ 0x8D6B,
+ "GL_MAX_ELEMENT_INDEX",
+ },
+ {
+ 0x8D6C,
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT",
+ },
+ {
+ 0x92A1,
+ "GL_CONTRAST_NV",
+ },
+ {
+ 0x8252,
+ "GL_LOSE_CONTEXT_ON_RESET_KHR",
+ },
+ {
+ 0x8C4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5x5_OES",
+ },
+ {
+ 0x93E6,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES",
+ },
+ {
+ 0x8D68,
+ "GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES",
+ },
+ {
+ 0x8E82,
+ "GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT",
+ },
+ {
+ 0x8E81,
+ "GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT",
+ },
+ {
+ 0x85BB,
+ "GL_UNSIGNED_SHORT_8_8_REV_APPLE",
+ },
+ {
+ 0x8E87,
+ "GL_TESS_EVALUATION_SHADER_EXT",
+ },
+ {
+ 0x8E86,
+ "GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT",
+ },
+ {
+ 0x8E85,
+ "GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT",
+ },
+ {
+ 0x8E84,
+ "GL_MAX_TESS_PATCH_COMPONENTS_EXT",
+ },
+ {
+ 0x8D61,
+ "GL_HALF_FLOAT_OES",
+ },
+ {
+ 0x8D62,
+ "GL_RGB565",
+ },
+ {
+ 0x8E88,
+ "GL_TESS_CONTROL_SHADER_EXT",
+ },
+ {
+ 0x8D64,
+ "GL_ETC1_RGB8_OES",
+ },
+ {
+ 0x8D65,
+ "GL_TEXTURE_EXTERNAL_OES",
+ },
+ {
+ 0x8D66,
+ "GL_SAMPLER_EXTERNAL_OES",
+ },
+ {
+ 0x8D67,
+ "GL_TEXTURE_BINDING_EXTERNAL_OES",
+ },
+ {
+ 0x10000000,
+ "GL_MULTISAMPLE_BUFFER_BIT4_QCOM",
+ },
+ {
+ 0x04000000,
+ "GL_MULTISAMPLE_BUFFER_BIT2_QCOM",
+ },
+ {
+ 0x90D7,
+ "GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT",
+ },
+ {
+ 0x90D9,
+ "GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT",
+ },
+ {
+ 0x90D8,
+ "GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT",
+ },
+ {
+ 0x8CEE,
+ "GL_COLOR_ATTACHMENT14_EXT",
+ },
+ {
+ 0x8DC7,
+ "GL_UNSIGNED_INT_VEC3",
+ },
+ {
+ 0x1701,
+ "GL_PATH_PROJECTION_CHROMIUM",
+ },
+ {
+ 0x2800,
+ "GL_TEXTURE_MAG_FILTER",
+ },
+ {
+ 0x2801,
+ "GL_TEXTURE_MIN_FILTER",
+ },
+ {
+ 0x2802,
+ "GL_TEXTURE_WRAP_S",
+ },
+ {
+ 0x2803,
+ "GL_TEXTURE_WRAP_T",
+ },
+ {
+ 0x8DCB,
+ "GL_INT_SAMPLER_3D",
+ },
+ {
+ 0x3007,
+ "GL_CLIP_DISTANCE7_APPLE",
+ },
+ {
+ 0x2703,
+ "GL_LINEAR_MIPMAP_LINEAR",
+ },
+ {
+ 0x3005,
+ "GL_CLIP_DISTANCE5_APPLE",
+ },
+ {
+ 0x3004,
+ "GL_CLIP_DISTANCE4_APPLE",
+ },
+ {
+ 0x8B98,
+ "GL_PALETTE8_RGBA4_OES",
+ },
+ {
+ 0x3002,
+ "GL_CLIP_DISTANCE2_APPLE",
+ },
+ {
+ 0x3001,
+ "GL_CLIP_DISTANCE1_APPLE",
+ },
+ {
+ 0x2702,
+ "GL_NEAREST_MIPMAP_LINEAR",
+ },
+ {
+ 0x1F03,
+ "GL_EXTENSIONS",
+ },
+ {
+ 0x1F02,
+ "GL_VERSION",
+ },
+ {
+ 0x1F01,
+ "GL_RENDERER",
+ },
+ {
+ 0x1F00,
+ "GL_VENDOR",
+ },
+ {
+ 0x9247,
+ "GL_OVERLAY_TRANSFORM_FLIP_VERTICAL_CHROMIUM",
+ },
+ {
+ 0x2701,
+ "GL_LINEAR_MIPMAP_NEAREST",
+ },
+ {
+ 0x9245,
+ "GL_OVERLAY_TRANSFORM_NONE_CHROMIUM",
+ },
+ {
+ 0x92B4,
+ "GL_INVERT_OVG_NV",
+ },
+ {
+ 0x9249,
+ "GL_OVERLAY_TRANSFORM_ROTATE_180_CHROMIUM",
+ },
+ {
+ 0x0B94,
+ "GL_STENCIL_FAIL",
+ },
+ {
+ 0x8B4A,
+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS",
+ },
+ {
+ 0x8B4B,
+ "GL_MAX_VARYING_COMPONENTS",
+ },
+ {
+ 0x8B4C,
+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS",
+ },
+ {
+ 0x8B4D,
+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS",
+ },
+ {
+ 0x8B4F,
+ "GL_SHADER_TYPE",
+ },
+ {
+ 0x9122,
+ "GL_MAX_VERTEX_OUTPUT_COMPONENTS",
+ },
+ {
+ 0x9123,
+ "GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT",
+ },
+ {
+ 0x83FB,
+ "GL_PERFQUERY_WAIT_INTEL",
+ },
+ {
+ 0x9121,
+ "GL_BUFFER_MAP_OFFSET",
+ },
+ {
+ 0x00004000,
+ "GL_COLOR_BUFFER_BIT",
+ },
+ {
+ 0x9125,
+ "GL_MAX_FRAGMENT_INPUT_COMPONENTS",
+ },
+ {
+ 0x00000010,
+ "GL_TESS_EVALUATION_SHADER_BIT_EXT",
+ },
+ {
+ 0x8834,
+ "GL_DRAW_BUFFER15_EXT",
+ },
+ {
+ 0x8833,
+ "GL_DRAW_BUFFER14_EXT",
+ },
+ {
+ 0x8832,
+ "GL_DRAW_BUFFER13_EXT",
+ },
+ {
+ 0x8831,
+ "GL_DRAW_BUFFER12_EXT",
+ },
+ {
+ 0x8830,
+ "GL_DRAW_BUFFER11_EXT",
+ },
+ {
+ 0x8DC5,
+ "GL_SAMPLER_CUBE_SHADOW_NV",
+ },
+ {
+ 0x94FF,
+ "GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL",
+ },
+ {
+ 0x94FE,
+ "GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL",
+ },
+ {
+ 0x94FD,
+ "GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL",
+ },
+ {
+ 0x94FC,
+ "GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL",
+ },
+ {
+ 0x94FB,
+ "GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL",
+ },
+ {
+ 0x93B8,
+ "GL_COMPRESSED_RGBA_ASTC_10x5_KHR",
+ },
+ {
+ 0x8B65,
+ "GL_FLOAT_MAT2x3_NV",
+ },
+ {
+ 0x9241,
+ "GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM",
+ },
+ {
+ 0x00010000,
+ "GL_STENCIL_BUFFER_BIT0_QCOM",
+ },
+ {
+ 0x83FA,
+ "GL_PERFQUERY_FLUSH_INTEL",
+ },
+ {
+ 0x0D03,
+ "GL_PACK_SKIP_ROWS",
+ },
+ {
+ 0x84F3,
+ "GL_FENCE_STATUS_NV",
+ },
+ {
+ 0x88E6,
+ "GL_STATIC_COPY",
+ },
+ {
+ 0x0B93,
+ "GL_STENCIL_VALUE_MASK",
+ },
+ {
+ 0x0B92,
+ "GL_STENCIL_FUNC",
+ },
+ {
+ 0x0B91,
+ "GL_STENCIL_CLEAR_VALUE",
+ },
+ {
+ 0x883D,
+ "GL_BLEND_EQUATION_ALPHA",
+ },
+ {
+ 0x0B97,
+ "GL_STENCIL_REF",
+ },
+ {
+ 0x0B96,
+ "GL_STENCIL_PASS_DEPTH_PASS",
+ },
+ {
+ 0x0B95,
+ "GL_STENCIL_PASS_DEPTH_FAIL",
+ },
+ {
+ 0x2700,
+ "GL_NEAREST_MIPMAP_NEAREST",
+ },
+ {
+ 0x94F5,
+ "GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL",
+ },
+ {
+ 0x0B98,
+ "GL_STENCIL_WRITEMASK",
+ },
+ {
+ 0x94F3,
+ "GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL",
+ },
+ {
+ 0x94F2,
+ "GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL",
+ },
+ {
+ 0x94F1,
+ "GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL",
+ },
+ {
+ 0x94F0,
+ "GL_PERFQUERY_COUNTER_EVENT_INTEL",
+ },
+ {
+ 0x8B40,
+ "GL_PROGRAM_OBJECT_EXT",
+ },
+ {
+ 0x1004,
+ "GL_TEXTURE_BORDER_COLOR_EXT",
+ },
+ {
+ 0x8A2D,
+ "GL_MAX_FRAGMENT_UNIFORM_BLOCKS",
+ },
+ {
+ 0x8B48,
+ "GL_SHADER_OBJECT_EXT",
+ },
+ {
+ 0x8B49,
+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS",
+ },
+ {
+ 0x813A,
+ "GL_TEXTURE_MIN_LOD",
+ },
+ {
+ 0x8DE1,
+ "GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT",
+ },
+ {
+ 0x8DE0,
+ "GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT",
+ },
+ {
+ 0x924C,
+ "GL_MOUSE_POSITION_CHROMIUM",
+ },
+ {
+ 0x924B,
+ "GL_SUBSCRIBED_VALUES_BUFFER_CHROMIUM",
+ },
+ {
+ 0x924A,
+ "GL_OVERLAY_TRANSFORM_ROTATE_270_CHROMIUM",
+ },
+ {
+ 0x8A2F,
+ "GL_MAX_UNIFORM_BUFFER_BINDINGS",
+ },
+ {
+ 0x20000000,
+ "GL_MULTISAMPLE_BUFFER_BIT5_QCOM",
+ },
+ {
+ 64,
+ "GL_MAILBOX_SIZE_CHROMIUM",
+ },
+ {
+ 0x0DE1,
+ "GL_TEXTURE_2D",
+ },
+ {
+ 0x8A2C,
+ "GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT",
+ },
+ {
+ 0x80C9,
+ "GL_BLEND_SRC_RGB",
+ },
+ {
+ 0x80C8,
+ "GL_BLEND_DST_RGB",
+ },
+ {
+ 0x912F,
+ "GL_TEXTURE_IMMUTABLE_FORMAT_EXT",
+ },
+ {
+ 0x8A2B,
+ "GL_MAX_VERTEX_UNIFORM_BLOCKS",
+ },
+ {
+ 0x88EC,
+ "GL_PIXEL_UNPACK_BUFFER",
+ },
+ {
+ 0x8D8F,
+ "GL_RGB8I",
+ },
+ {
+ 0x8059,
+ "GL_RGB10_A2_EXT",
+ },
+ {
+ 0x8058,
+ "GL_RGBA8_OES",
+ },
+ {
+ 0x8B93,
+ "GL_PALETTE4_RGBA4_OES",
+ },
+ {
+ 0x88EB,
+ "GL_PIXEL_PACK_BUFFER",
+ },
+ {
+ 0x8E83,
+ "GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT",
+ },
+ {
+ 0x8051,
+ "GL_RGB8_OES",
+ },
+ {
+ 0x8CAD,
+ "GL_DEPTH32F_STENCIL8",
+ },
+ {
+ 0x8052,
+ "GL_RGB10_EXT",
+ },
+ {
+ 0x8CAB,
+ "GL_RENDERBUFFER_SAMPLES_ANGLE",
+ },
+ {
+ 0x8CAC,
+ "GL_DEPTH_COMPONENT32F",
+ },
+ {
+ 0x8057,
+ "GL_RGB5_A1",
+ },
+ {
+ 0x8056,
+ "GL_RGBA4",
+ },
+ {
+ 0x8232,
+ "GL_R8UI",
+ },
+ {
+ 0x150A,
+ "GL_INVERT",
+ },
+ {
+ 0x01000000,
+ "GL_MULTISAMPLE_BUFFER_BIT0_QCOM",
+ },
+ {
+ 0x78ED,
+ "GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM",
+ },
+ {
+ 0x78EE,
+ "GL_PIXEL_PACK_TRANSFER_BUFFER_BINDING_CHROMIUM",
+ },
+ {
+ 0x6001,
+ "GL_TEXTURE_POOL_MANAGED_CHROMIUM",
+ },
+ {
+ 0x0B45,
+ "GL_CULL_FACE_MODE",
+ },
+ {
+ 0x8B92,
+ "GL_PALETTE4_R5_G6_B5_OES",
+ },
+ {
+ 0x00100000,
+ "GL_STENCIL_BUFFER_BIT4_QCOM",
+ },
+ {
+ 0x8E4E,
+ "GL_LAST_VERTEX_CONVENTION_EXT",
+ },
+ {
+ 0x8E4D,
+ "GL_FIRST_VERTEX_CONVENTION_EXT",
+ },
+ {
+ 0x8E24,
+ "GL_TRANSFORM_FEEDBACK_ACTIVE",
+ },
+ {
+ 0x8E45,
+ "GL_TEXTURE_SWIZZLE_A",
+ },
+ {
+ 0x8E44,
+ "GL_TEXTURE_SWIZZLE_B",
+ },
+ {
+ 0x8E43,
+ "GL_TEXTURE_SWIZZLE_G",
+ },
+ {
+ 0x8E42,
+ "GL_TEXTURE_SWIZZLE_R",
+ },
+ {
+ 0x8D20,
+ "GL_STENCIL_ATTACHMENT",
+ },
+ {
+ 0x8B91,
+ "GL_PALETTE4_RGBA8_OES",
+ },
+ {
+ 0x00000200,
+ "GL_DEPTH_BUFFER_BIT1_QCOM",
+ },
+ {
+ 0x00008000,
+ "GL_COVERAGE_BUFFER_BIT_NV",
+ },
+ {
+ 0x1506,
+ "GL_XOR_NV",
+ },
+ {
+ 0x8CA8,
+ "GL_READ_FRAMEBUFFER_ANGLE",
+ },
+ {
+ 0x8CA9,
+ "GL_DRAW_FRAMEBUFFER_ANGLE",
+ },
+ {
+ 0x8CA6,
+ "GL_FRAMEBUFFER_BINDING",
+ },
+ {
+ 0x8CA7,
+ "GL_RENDERBUFFER_BINDING",
+ },
+ {
+ 0x8CA4,
+ "GL_STENCIL_BACK_VALUE_MASK",
+ },
+ {
+ 0x8CA5,
+ "GL_STENCIL_BACK_WRITEMASK",
+ },
+ {
+ 0x8B90,
+ "GL_PALETTE4_RGB8_OES",
+ },
+ {
+ 0x8CA3,
+ "GL_STENCIL_BACK_REF",
+ },
+ {
+ 0x80E8,
+ "GL_MAX_ELEMENTS_VERTICES",
+ },
+ {
+ 0x80CB,
+ "GL_BLEND_SRC_ALPHA",
+ },
+ {
+ 0x80CA,
+ "GL_BLEND_DST_ALPHA",
+ },
+ {
+ 0x8CE7,
+ "GL_COLOR_ATTACHMENT7_EXT",
+ },
+ {
+ 0x93B0,
+ "GL_COMPRESSED_RGBA_ASTC_4x4_KHR",
+ },
+ {
+ 0x93B1,
+ "GL_COMPRESSED_RGBA_ASTC_5x4_KHR",
+ },
+ {
+ 0x93B2,
+ "GL_COMPRESSED_RGBA_ASTC_5x5_KHR",
+ },
+ {
+ 0x93B3,
+ "GL_COMPRESSED_RGBA_ASTC_6x5_KHR",
+ },
+ {
+ 0x93B4,
+ "GL_COMPRESSED_RGBA_ASTC_6x6_KHR",
+ },
+ {
+ 0x93B5,
+ "GL_COMPRESSED_RGBA_ASTC_8x5_KHR",
+ },
+ {
+ 0x93B6,
+ "GL_COMPRESSED_RGBA_ASTC_8x6_KHR",
+ },
+ {
+ 0x93B7,
+ "GL_COMPRESSED_RGBA_ASTC_8x8_KHR",
+ },
+ {
+ 0x8CD6,
+ "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT",
+ },
+ {
+ 0x93B9,
+ "GL_COMPRESSED_RGBA_ASTC_10x6_KHR",
+ },
+ {
+ 0x80E9,
+ "GL_MAX_ELEMENTS_INDICES",
+ },
+ {
+ 0x8CE5,
+ "GL_COLOR_ATTACHMENT5_EXT",
+ },
+ {
+ 0x8C84,
+ "GL_TRANSFORM_FEEDBACK_BUFFER_START",
+ },
+ {
+ 0x8DC2,
+ "GL_SAMPLER_BUFFER_EXT",
+ },
+ {
+ 0x8C36,
+ "GL_SAMPLE_SHADING_OES",
+ },
+ {
+ 0x8C37,
+ "GL_MIN_SAMPLE_SHADING_VALUE_OES",
+ },
+ {
+ 0x8F97,
+ "GL_RGBA8_SNORM",
+ },
+ {
+ 0x8CE9,
+ "GL_COLOR_ATTACHMENT9_EXT",
+ },
+ {
+ 0x8DAD,
+ "GL_FLOAT_32_UNSIGNED_INT_24_8_REV",
+ },
+ {
+ 0x8B96,
+ "GL_PALETTE8_RGBA8_OES",
+ },
+ {
+ 0x8872,
+ "GL_MAX_TEXTURE_IMAGE_UNITS",
+ },
+ {
+ 0x8DC6,
+ "GL_UNSIGNED_INT_VEC2",
+ },
+ {
+ 0x8905,
+ "GL_MAX_PROGRAM_TEXEL_OFFSET",
+ },
+ {
+ 0x8508,
+ "GL_DECR_WRAP",
+ },
+ {
+ 0x92AD,
+ "GL_HSL_HUE_KHR",
+ },
+ {
+ 0x92AE,
+ "GL_HSL_SATURATION_KHR",
+ },
+ {
+ 0x92AF,
+ "GL_HSL_COLOR_KHR",
+ },
+ {
+ 0x8BD4,
+ "GL_TEXTURE_DEPTH_QCOM",
+ },
+ {
+ 0x8DC4,
+ "GL_SAMPLER_2D_ARRAY_SHADOW_NV",
+ },
+ {
+ 0x8507,
+ "GL_INCR_WRAP",
+ },
+ {
+ 0x82FC,
+ "GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR",
+ },
+ {
+ 0x8895,
+ "GL_ELEMENT_ARRAY_BUFFER_BINDING",
+ },
+ {
+ 0x8894,
+ "GL_ARRAY_BUFFER_BINDING",
+ },
+ {
+ 0x92A3,
+ "GL_INVERT_RGB_NV",
+ },
+ {
+ 0x905F,
+ "GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT",
+ },
+ {
+ 0x92A5,
+ "GL_LINEARBURN_NV",
+ },
+ {
+ 0x8893,
+ "GL_ELEMENT_ARRAY_BUFFER",
+ },
+ {
+ 0x8892,
+ "GL_ARRAY_BUFFER",
+ },
+ {
+ 0x92A8,
+ "GL_PINLIGHT_NV",
+ },
+ {
+ 0x92A9,
+ "GL_HARDMIX_NV",
+ },
+ {
+ 0x9112,
+ "GL_OBJECT_TYPE_APPLE",
+ },
+ {
+ 0x90CC,
+ "GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT",
+ },
+ {
+ 0x90CD,
+ "GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT",
+ },
+ {
+ 0x919F,
+ "GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_EXT",
+ },
+ {
+ 0x919E,
+ "GL_TEXTURE_BUFFER_SIZE_EXT",
+ },
+ {
+ 0x919D,
+ "GL_TEXTURE_BUFFER_OFFSET_EXT",
+ },
+ {
+ 0x8BD8,
+ "GL_TEXTURE_IMAGE_VALID_QCOM",
+ },
+ {
+ 0x9278,
+ "GL_COMPRESSED_RGBA8_ETC2_EAC",
+ },
+ {
+ 0x9279,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",
+ },
+ {
+ 0x8DA7,
+ "GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT",
+ },
+ {
+ 0x9272,
+ "GL_COMPRESSED_RG11_EAC",
+ },
+ {
+ 0x8DA8,
+ "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT",
+ },
+ {
+ 0x9270,
+ "GL_COMPRESSED_R11_EAC",
+ },
+ {
+ 0x9271,
+ "GL_COMPRESSED_SIGNED_R11_EAC",
+ },
+ {
+ 0x9276,
+ "GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",
+ },
+ {
+ 0x887F,
+ "GL_GEOMETRY_SHADER_INVOCATIONS_EXT",
+ },
+ {
+ 0x8A3B,
+ "GL_UNIFORM_OFFSET",
+ },
+ {
+ 0x9275,
+ "GL_COMPRESSED_SRGB8_ETC2",
+ },
+ {
+ 0x84D5,
+ "GL_TEXTURE21",
+ },
+ {
+ 0x8C3A,
+ "GL_R11F_G11F_B10F_APPLE",
+ },
+ {
+ 0x8C3B,
+ "GL_UNSIGNED_INT_10F_11F_11F_REV_APPLE",
+ },
+ {
+ 0x8C3D,
+ "GL_RGB9_E5_APPLE",
+ },
+ {
+ 0x8C3E,
+ "GL_UNSIGNED_INT_5_9_9_9_REV_APPLE",
+ },
+ {
+ 0x9287,
+ "GL_DST_NV",
+ },
+ {
+ 0x93BA,
+ "GL_COMPRESSED_RGBA_ASTC_10x8_KHR",
+ },
+ {
+ 0x9285,
+ "GL_BLEND_ADVANCED_COHERENT_KHR",
+ },
+ {
+ 0x93BC,
+ "GL_COMPRESSED_RGBA_ASTC_12x10_KHR",
+ },
+ {
+ 0x93BD,
+ "GL_COMPRESSED_RGBA_ASTC_12x12_KHR",
+ },
+ {
+ 0x84E8,
+ "GL_MAX_RENDERBUFFER_SIZE",
+ },
+ {
+ 0x9281,
+ "GL_BLEND_OVERLAP_NV",
+ },
+ {
+ 0x9280,
+ "GL_BLEND_PREMULTIPLIED_SRC_NV",
+ },
+ {
+ 0x00002000,
+ "GL_DEPTH_BUFFER_BIT5_QCOM",
+ },
+ {
+ 0x8370,
+ "GL_MIRRORED_REPEAT",
+ },
+ {
+ 0x84E0,
+ "GL_ACTIVE_TEXTURE",
+ },
+ {
+ 0x8800,
+ "GL_STENCIL_BACK_FUNC",
+ },
+ {
+ 0x8801,
+ "GL_STENCIL_BACK_FAIL",
+ },
+ {
+ 0x0D33,
+ "GL_MAX_TEXTURE_SIZE",
+ },
+ {
+ 0x0D32,
+ "GL_MAX_CLIP_DISTANCES_APPLE",
+ },
+ {
+ 0x8624,
+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE",
+ },
+ {
+ 0x8625,
+ "GL_VERTEX_ATTRIB_ARRAY_TYPE",
+ },
+ {
+ 0x8622,
+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED",
+ },
+ {
+ 0x8623,
+ "GL_VERTEX_ATTRIB_ARRAY_SIZE",
+ },
+ {
+ 0x8DB9,
+ "GL_FRAMEBUFFER_SRGB_EXT",
+ },
+ {
+ 0x9307,
+ "GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT",
+ },
+ {
+ 0x8259,
+ "GL_ACTIVE_PROGRAM_EXT",
+ },
+ {
+ 0x8258,
+ "GL_PROGRAM_SEPARABLE_EXT",
+ },
+ {
+ 0x8257,
+ "GL_PROGRAM_BINARY_RETRIEVABLE_HINT",
+ },
+ {
+ 0x8256,
+ "GL_RESET_NOTIFICATION_STRATEGY_KHR",
+ },
+ {
+ 0x8255,
+ "GL_UNKNOWN_CONTEXT_RESET_KHR",
+ },
+ {
+ 0x8254,
+ "GL_INNOCENT_CONTEXT_RESET_KHR",
+ },
+ {
+ 0x1100,
+ "GL_DONT_CARE",
+ },
+ {
+ 0x1101,
+ "GL_FASTEST",
+ },
+ {
+ 0x1102,
+ "GL_NICEST",
+ },
+ {
+ 0x8250,
+ "GL_DEBUG_TYPE_PERFORMANCE_KHR",
+ },
+ {
+ 0x8CEB,
+ "GL_COLOR_ATTACHMENT11_EXT",
+ },
+ {
+ 0x8CEC,
+ "GL_COLOR_ATTACHMENT12_EXT",
+ },
+ {
+ 0x0408,
+ "GL_FRONT_AND_BACK",
+ },
+ {
+ 0x8CEA,
+ "GL_COLOR_ATTACHMENT10_EXT",
+ },
+ {
+ 0x8CEF,
+ "GL_COLOR_ATTACHMENT15_EXT",
+ },
+ {
+ 0x8CED,
+ "GL_COLOR_ATTACHMENT13_EXT",
+ },
+ {
+ 0x8829,
+ "GL_DRAW_BUFFER4_EXT",
+ },
+ {
+ 0x0404,
+ "GL_FRONT",
+ },
+ {
+ 0x0405,
+ "GL_BACK",
+ },
+ {
+ 0x88E1,
+ "GL_STREAM_READ",
+ },
+ {
+ 0x88E0,
+ "GL_STREAM_DRAW",
+ },
+ {
+ 0x88E2,
+ "GL_STREAM_COPY",
+ },
+ {
+ 0x88E5,
+ "GL_STATIC_READ",
+ },
+ {
+ 0x88E4,
+ "GL_STATIC_DRAW",
+ },
+ {
+ 0x93C6,
+ "GL_COMPRESSED_RGBA_ASTC_5x5x5_OES",
+ },
+ {
+ 0x88E9,
+ "GL_DYNAMIC_READ",
+ },
+ {
+ 0x88E8,
+ "GL_DYNAMIC_DRAW",
+ },
+ {
+ 0x9291,
+ "GL_PLUS_NV",
+ },
+ {
+ 0x8CAA,
+ "GL_READ_FRAMEBUFFER_BINDING_ANGLE",
+ },
+ {
+ 0x93C5,
+ "GL_COMPRESSED_RGBA_ASTC_5x5x4_OES",
+ },
+ {
+ 0x40000000,
+ "GL_MULTISAMPLE_BUFFER_BIT6_QCOM",
+ },
+ {
+ 0x88EA,
+ "GL_DYNAMIC_COPY",
+ },
+ {
+ 0x9116,
+ "GL_SYNC_FENCE_APPLE",
+ },
+ {
+ 0x93C4,
+ "GL_COMPRESSED_RGBA_ASTC_5x4x4_OES",
+ },
+ {
+ 0x88EE,
+ "GL_ETC1_SRGB8_NV",
+ },
+ {
+ 0x78EC,
+ "GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM",
+ },
+ {
+ 0x88EF,
+ "GL_PIXEL_UNPACK_BUFFER_BINDING",
+ },
+ {
+ 0x93C3,
+ "GL_COMPRESSED_RGBA_ASTC_4x4x4_OES",
+ },
+ {
+ 0x00000800,
+ "GL_DEPTH_BUFFER_BIT3_QCOM",
+ },
+ {
+ 0x1903,
+ "GL_RED_EXT",
+ },
+ {
+ 0x93C2,
+ "GL_COMPRESSED_RGBA_ASTC_4x4x3_OES",
+ },
+ {
+ 0x8CE2,
+ "GL_COLOR_ATTACHMENT2_EXT",
+ },
+ {
+ 0x8BC1,
+ "GL_COUNTER_RANGE_AMD",
+ },
+ {
+ 0x8CE0,
+ "GL_COLOR_ATTACHMENT0",
+ },
+ {
+ 0x8CE1,
+ "GL_COLOR_ATTACHMENT1_EXT",
+ },
+ {
+ 0x8CE6,
+ "GL_COLOR_ATTACHMENT6_EXT",
+ },
+ {
+ 0x93C1,
+ "GL_COMPRESSED_RGBA_ASTC_4x3x3_OES",
+ },
+ {
+ 0x8A1F,
+ "GL_RGB_422_APPLE",
+ },
+ {
+ 0x93DC,
+ "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR",
+ },
+ {
+ 0x9292,
+ "GL_PLUS_DARKER_NV",
+ },
+ {
+ 0x8CE8,
+ "GL_COLOR_ATTACHMENT8_EXT",
+ },
+ {
+ 0x93C0,
+ "GL_COMPRESSED_RGBA_ASTC_3x3x3_OES",
+ },
+ {
+ 0x0C23,
+ "GL_COLOR_WRITEMASK",
+ },
+ {
+ 0x0C22,
+ "GL_COLOR_CLEAR_VALUE",
+ },
+ {
+ 0x8A11,
+ "GL_UNIFORM_BUFFER",
+ },
+ {
+ 0x8823,
+ "GL_WRITEONLY_RENDERING_QCOM",
+ },
+ {
+ 0x8824,
+ "GL_MAX_DRAW_BUFFERS_EXT",
+ },
+ {
+ 0x825E,
+ "GL_LAYER_PROVOKING_VERTEX_EXT",
+ },
+ {
+ 0x825A,
+ "GL_PROGRAM_PIPELINE_BINDING_EXT",
+ },
+ {
+ 0x1909,
+ "GL_LUMINANCE",
+ },
+ {
+ 0x0D3A,
+ "GL_MAX_VIEWPORT_DIMS",
+ },
+ {
+ 0x8B53,
+ "GL_INT_VEC2",
+ },
+ {
+ 0x8826,
+ "GL_DRAW_BUFFER1_EXT",
+ },
+ {
+ 0x809E,
+ "GL_SAMPLE_ALPHA_TO_COVERAGE",
+ },
+ {
+ 0x8BC0,
+ "GL_COUNTER_TYPE_AMD",
+ },
+ {
+ 0x8BC3,
+ "GL_PERCENTAGE_AMD",
+ },
+ {
+ 0x8BC2,
+ "GL_UNSIGNED_INT64_AMD",
+ },
+ {
+ 0x8BC5,
+ "GL_PERFMON_RESULT_SIZE_AMD",
+ },
+ {
+ 0x8BC4,
+ "GL_PERFMON_RESULT_AVAILABLE_AMD",
+ },
+ {
+ 0x8BC6,
+ "GL_PERFMON_RESULT_AMD",
+ },
+};
+
+const GLEnums::EnumToString* const GLEnums::enum_to_string_table_ =
+ enum_to_string_table;
+const size_t GLEnums::enum_to_string_table_len_ =
+ sizeof(enum_to_string_table) / sizeof(enum_to_string_table[0]);
diff --git a/ui/gl/gl_implementation_ozone.cc b/ui/gl/gl_implementation_ozone.cc
new file mode 100644
index 0000000..43b3b04
--- /dev/null
+++ b/ui/gl/gl_implementation_ozone.cc
@@ -0,0 +1,121 @@
+// Copyright (c) 2012 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/bind.h"
+#include "ui/gl/gl_bindings.h"
+#include "ui/gl/gl_context_stub_with_extensions.h"
+#include "ui/gl/gl_egl_api_implementation.h"
+#include "ui/gl/gl_gl_api_implementation.h"
+#include "ui/gl/gl_implementation.h"
+#include "ui/gl/gl_implementation_osmesa.h"
+#include "ui/gl/gl_osmesa_api_implementation.h"
+#include "ui/ozone/public/ozone_platform.h"
+#include "ui/ozone/public/surface_factory_ozone.h"
+
+namespace gfx {
+
+namespace {
+
+void GL_BINDING_CALL MarshalClearDepthToClearDepthf(GLclampd depth) {
+ glClearDepthf(static_cast<GLclampf>(depth));
+}
+
+void GL_BINDING_CALL MarshalDepthRangeToDepthRangef(GLclampd z_near,
+ GLclampd z_far) {
+ glDepthRangef(static_cast<GLclampf>(z_near), static_cast<GLclampf>(z_far));
+}
+
+} // namespace
+
+void GetAllowedGLImplementations(std::vector<GLImplementation>* impls) {
+ impls->push_back(kGLImplementationEGLGLES2);
+ impls->push_back(kGLImplementationOSMesaGL);
+}
+
+bool InitializeStaticGLBindings(GLImplementation implementation) {
+ // Prevent reinitialization with a different implementation. Once the gpu
+ // unit tests have initialized with kGLImplementationMock, we don't want to
+ // later switch to another GL implementation.
+ DCHECK_EQ(kGLImplementationNone, GetGLImplementation());
+ ui::OzonePlatform::InitializeForGPU();
+
+ switch (implementation) {
+ case kGLImplementationOSMesaGL:
+ return InitializeStaticGLBindingsOSMesaGL();
+ case kGLImplementationEGLGLES2:
+ if (!ui::SurfaceFactoryOzone::GetInstance()->LoadEGLGLES2Bindings(
+ base::Bind(&AddGLNativeLibrary),
+ base::Bind(&SetGLGetProcAddressProc)))
+ return false;
+ SetGLImplementation(kGLImplementationEGLGLES2);
+ InitializeStaticGLBindingsGL();
+ InitializeStaticGLBindingsEGL();
+
+ // These two functions take single precision float rather than double
+ // precision float parameters in GLES.
+ ::gfx::g_driver_gl.fn.glClearDepthFn = MarshalClearDepthToClearDepthf;
+ ::gfx::g_driver_gl.fn.glDepthRangeFn = MarshalDepthRangeToDepthRangef;
+ break;
+ case kGLImplementationMockGL: {
+ SetGLImplementation(kGLImplementationMockGL);
+ InitializeStaticGLBindingsGL();
+ break;
+ }
+ default:
+ NOTIMPLEMENTED()
+ << "Unsupported GL type for Ozone surface implementation";
+ return false;
+ }
+
+ return true;
+}
+
+bool InitializeDynamicGLBindings(GLImplementation implementation,
+ GLContext* context) {
+ switch (implementation) {
+ case kGLImplementationOSMesaGL:
+ InitializeDynamicGLBindingsGL(context);
+ InitializeDynamicGLBindingsOSMESA(context);
+ break;
+ case kGLImplementationEGLGLES2:
+ InitializeDynamicGLBindingsGL(context);
+ InitializeDynamicGLBindingsEGL(context);
+ break;
+ case kGLImplementationMockGL:
+ if (!context) {
+ scoped_refptr<GLContextStubWithExtensions> mock_context(
+ new GLContextStubWithExtensions());
+ mock_context->SetGLVersionString("3.0");
+ InitializeDynamicGLBindingsGL(mock_context.get());
+ } else
+ InitializeDynamicGLBindingsGL(context);
+ break;
+ default:
+ return false;
+ }
+
+ return true;
+}
+
+void InitializeDebugGLBindings() {
+}
+
+void ClearGLBindings() {
+ ClearGLBindingsEGL();
+ ClearGLBindingsGL();
+ SetGLImplementation(kGLImplementationNone);
+ UnloadGLNativeLibraries();
+}
+
+bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) {
+ switch (GetGLImplementation()) {
+ case kGLImplementationEGLGLES2:
+ return GetGLWindowSystemBindingInfoEGL(info);
+ default:
+ return false;
+ }
+ return false;
+}
+
+} // namespace gfx
diff --git a/ui/gl/gl_mock_autogen_gl.h b/ui/gl/gl_mock_autogen_gl.h
new file mode 100644
index 0000000..470de01
--- /dev/null
+++ b/ui/gl/gl_mock_autogen_gl.h
@@ -0,0 +1,709 @@
+// Copyright 2014 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.
+//
+// This file is auto-generated from
+// ui/gl/generate_bindings.py
+// It's formatted by clang-format using chromium coding style:
+// clang-format -i -style=chromium filename
+// DO NOT EDIT!
+
+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));
+MOCK_METHOD2(BindBuffer, void(GLenum target, GLuint buffer));
+MOCK_METHOD3(BindBufferBase, void(GLenum target, GLuint index, GLuint buffer));
+MOCK_METHOD5(BindBufferRange,
+ void(GLenum target,
+ GLuint index,
+ GLuint buffer,
+ GLintptr offset,
+ GLsizeiptr size));
+MOCK_METHOD3(BindFragDataLocation,
+ void(GLuint program, GLuint colorNumber, const char* name));
+MOCK_METHOD4(
+ BindFragDataLocationIndexed,
+ void(GLuint program, GLuint colorNumber, GLuint index, const char* name));
+MOCK_METHOD2(BindFramebufferEXT, void(GLenum target, GLuint framebuffer));
+MOCK_METHOD2(BindRenderbufferEXT, void(GLenum target, GLuint renderbuffer));
+MOCK_METHOD2(BindSampler, void(GLuint unit, GLuint sampler));
+MOCK_METHOD2(BindTexture, void(GLenum target, GLuint texture));
+MOCK_METHOD2(BindTransformFeedback, void(GLenum target, GLuint id));
+MOCK_METHOD1(BindVertexArrayOES, void(GLuint array));
+MOCK_METHOD0(BlendBarrierKHR, void());
+MOCK_METHOD4(BlendColor,
+ void(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha));
+MOCK_METHOD1(BlendEquation, void(GLenum mode));
+MOCK_METHOD2(BlendEquationSeparate, void(GLenum modeRGB, GLenum modeAlpha));
+MOCK_METHOD2(BlendFunc, void(GLenum sfactor, GLenum dfactor));
+MOCK_METHOD4(
+ BlendFuncSeparate,
+ void(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha));
+MOCK_METHOD10(BlitFramebuffer,
+ void(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter));
+MOCK_METHOD10(BlitFramebufferANGLE,
+ void(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter));
+MOCK_METHOD10(BlitFramebufferEXT,
+ void(GLint srcX0,
+ GLint srcY0,
+ GLint srcX1,
+ GLint srcY1,
+ GLint dstX0,
+ GLint dstY0,
+ GLint dstX1,
+ GLint dstY1,
+ GLbitfield mask,
+ GLenum filter));
+MOCK_METHOD4(
+ BufferData,
+ void(GLenum target, GLsizeiptr size, const void* data, GLenum usage));
+MOCK_METHOD4(
+ BufferSubData,
+ void(GLenum target, GLintptr offset, GLsizeiptr size, const void* data));
+MOCK_METHOD1(CheckFramebufferStatusEXT, GLenum(GLenum target));
+MOCK_METHOD1(Clear, void(GLbitfield mask));
+MOCK_METHOD4(
+ ClearBufferfi,
+ void(GLenum buffer, GLint drawbuffer, const GLfloat depth, GLint stencil));
+MOCK_METHOD3(ClearBufferfv,
+ void(GLenum buffer, GLint drawbuffer, const GLfloat* value));
+MOCK_METHOD3(ClearBufferiv,
+ void(GLenum buffer, GLint drawbuffer, const GLint* value));
+MOCK_METHOD3(ClearBufferuiv,
+ void(GLenum buffer, GLint drawbuffer, const GLuint* value));
+MOCK_METHOD4(ClearColor,
+ void(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha));
+MOCK_METHOD1(ClearDepth, void(GLclampd depth));
+MOCK_METHOD1(ClearDepthf, void(GLclampf depth));
+MOCK_METHOD1(ClearStencil, void(GLint s));
+MOCK_METHOD3(ClientWaitSync,
+ GLenum(GLsync sync, GLbitfield flags, GLuint64 timeout));
+MOCK_METHOD4(
+ ColorMask,
+ void(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha));
+MOCK_METHOD1(CompileShader, void(GLuint shader));
+MOCK_METHOD8(CompressedTexImage2D,
+ void(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLsizei imageSize,
+ const void* data));
+MOCK_METHOD9(CompressedTexImage3D,
+ void(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLsizei imageSize,
+ const void* data));
+MOCK_METHOD9(CompressedTexSubImage2D,
+ void(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLsizei imageSize,
+ const void* data));
+MOCK_METHOD5(CopyBufferSubData,
+ void(GLenum readTarget,
+ GLenum writeTarget,
+ GLintptr readOffset,
+ GLintptr writeOffset,
+ GLsizeiptr size));
+MOCK_METHOD8(CopyTexImage2D,
+ void(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLint border));
+MOCK_METHOD8(CopyTexSubImage2D,
+ void(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height));
+MOCK_METHOD9(CopyTexSubImage3D,
+ void(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLint zoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height));
+MOCK_METHOD0(CreateProgram, GLuint());
+MOCK_METHOD1(CreateShader, GLuint(GLenum type));
+MOCK_METHOD1(CullFace, void(GLenum mode));
+MOCK_METHOD2(DeleteBuffersARB, void(GLsizei n, const GLuint* buffers));
+MOCK_METHOD2(DeleteFencesAPPLE, void(GLsizei n, const GLuint* fences));
+MOCK_METHOD2(DeleteFencesNV, void(GLsizei n, const GLuint* fences));
+MOCK_METHOD2(DeleteFramebuffersEXT,
+ 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));
+MOCK_METHOD1(DeleteShader, void(GLuint shader));
+MOCK_METHOD1(DeleteSync, void(GLsync sync));
+MOCK_METHOD2(DeleteTextures, void(GLsizei n, const GLuint* textures));
+MOCK_METHOD2(DeleteTransformFeedbacks, void(GLsizei n, const GLuint* ids));
+MOCK_METHOD2(DeleteVertexArraysOES, void(GLsizei n, const GLuint* arrays));
+MOCK_METHOD1(DepthFunc, void(GLenum func));
+MOCK_METHOD1(DepthMask, void(GLboolean flag));
+MOCK_METHOD2(DepthRange, void(GLclampd zNear, GLclampd zFar));
+MOCK_METHOD2(DepthRangef, void(GLclampf zNear, GLclampf zFar));
+MOCK_METHOD2(DetachShader, void(GLuint program, GLuint shader));
+MOCK_METHOD1(Disable, void(GLenum cap));
+MOCK_METHOD1(DisableVertexAttribArray, void(GLuint index));
+MOCK_METHOD3(DiscardFramebufferEXT,
+ void(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments));
+MOCK_METHOD3(DrawArrays, void(GLenum mode, GLint first, GLsizei count));
+MOCK_METHOD4(DrawArraysInstancedANGLE,
+ void(GLenum mode, GLint first, GLsizei count, GLsizei primcount));
+MOCK_METHOD1(DrawBuffer, void(GLenum mode));
+MOCK_METHOD2(DrawBuffersARB, void(GLsizei n, const GLenum* bufs));
+MOCK_METHOD4(
+ DrawElements,
+ void(GLenum mode, GLsizei count, GLenum type, const void* indices));
+MOCK_METHOD5(DrawElementsInstancedANGLE,
+ void(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount));
+MOCK_METHOD6(DrawRangeElements,
+ void(GLenum mode,
+ GLuint start,
+ GLuint end,
+ GLsizei count,
+ GLenum type,
+ const void* indices));
+MOCK_METHOD2(EGLImageTargetRenderbufferStorageOES,
+ void(GLenum target, GLeglImageOES image));
+MOCK_METHOD2(EGLImageTargetTexture2DOES,
+ void(GLenum target, GLeglImageOES image));
+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());
+MOCK_METHOD1(FinishFenceAPPLE, void(GLuint fence));
+MOCK_METHOD1(FinishFenceNV, void(GLuint fence));
+MOCK_METHOD0(Flush, void());
+MOCK_METHOD3(FlushMappedBufferRange,
+ void(GLenum target, GLintptr offset, GLsizeiptr length));
+MOCK_METHOD4(FramebufferRenderbufferEXT,
+ void(GLenum target,
+ GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer));
+MOCK_METHOD5(FramebufferTexture2DEXT,
+ void(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level));
+MOCK_METHOD6(FramebufferTexture2DMultisampleEXT,
+ void(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples));
+MOCK_METHOD6(FramebufferTexture2DMultisampleIMG,
+ void(GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level,
+ GLsizei samples));
+MOCK_METHOD5(FramebufferTextureLayer,
+ void(GLenum target,
+ GLenum attachment,
+ GLuint texture,
+ GLint level,
+ GLint layer));
+MOCK_METHOD1(FrontFace, void(GLenum mode));
+MOCK_METHOD2(GenBuffersARB, void(GLsizei n, GLuint* buffers));
+MOCK_METHOD1(GenerateMipmapEXT, void(GLenum target));
+MOCK_METHOD2(GenFencesAPPLE, void(GLsizei n, GLuint* fences));
+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));
+MOCK_METHOD2(GenTransformFeedbacks, void(GLsizei n, GLuint* ids));
+MOCK_METHOD2(GenVertexArraysOES, void(GLsizei n, GLuint* arrays));
+MOCK_METHOD7(GetActiveAttrib,
+ void(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name));
+MOCK_METHOD7(GetActiveUniform,
+ void(GLuint program,
+ GLuint index,
+ GLsizei bufsize,
+ GLsizei* length,
+ GLint* size,
+ GLenum* type,
+ char* name));
+MOCK_METHOD4(GetActiveUniformBlockiv,
+ void(GLuint program,
+ GLuint uniformBlockIndex,
+ GLenum pname,
+ GLint* params));
+MOCK_METHOD5(GetActiveUniformBlockName,
+ void(GLuint program,
+ GLuint uniformBlockIndex,
+ GLsizei bufSize,
+ GLsizei* length,
+ char* uniformBlockName));
+MOCK_METHOD5(GetActiveUniformsiv,
+ void(GLuint program,
+ GLsizei uniformCount,
+ const GLuint* uniformIndices,
+ GLenum pname,
+ GLint* params));
+MOCK_METHOD4(
+ GetAttachedShaders,
+ void(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders));
+MOCK_METHOD2(GetAttribLocation, GLint(GLuint program, const char* name));
+MOCK_METHOD2(GetBooleanv, void(GLenum pname, GLboolean* params));
+MOCK_METHOD3(GetBufferParameteriv,
+ void(GLenum target, GLenum pname, GLint* params));
+MOCK_METHOD0(GetError, GLenum());
+MOCK_METHOD3(GetFenceivNV, void(GLuint fence, GLenum pname, GLint* params));
+MOCK_METHOD2(GetFloatv, void(GLenum pname, GLfloat* params));
+MOCK_METHOD2(GetFragDataLocation, GLint(GLuint program, const char* name));
+MOCK_METHOD4(
+ GetFramebufferAttachmentParameterivEXT,
+ void(GLenum target, GLenum attachment, GLenum pname, GLint* params));
+MOCK_METHOD0(GetGraphicsResetStatusARB, GLenum());
+MOCK_METHOD3(GetInteger64i_v, void(GLenum target, GLuint index, GLint64* data));
+MOCK_METHOD2(GetInteger64v, void(GLenum pname, GLint64* params));
+MOCK_METHOD3(GetIntegeri_v, void(GLenum target, GLuint index, GLint* data));
+MOCK_METHOD2(GetIntegerv, void(GLenum pname, GLint* params));
+MOCK_METHOD5(GetInternalformativ,
+ void(GLenum target,
+ GLenum internalformat,
+ GLenum pname,
+ GLsizei bufSize,
+ GLint* params));
+MOCK_METHOD5(GetProgramBinary,
+ void(GLuint program,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* binaryFormat,
+ GLvoid* binary));
+MOCK_METHOD4(
+ GetProgramInfoLog,
+ void(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog));
+MOCK_METHOD3(GetProgramiv, void(GLuint program, GLenum pname, GLint* params));
+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,
+ void(GLuint sampler, GLenum pname, GLfloat* params));
+MOCK_METHOD3(GetSamplerParameteriv,
+ void(GLuint sampler, GLenum pname, GLint* params));
+MOCK_METHOD4(
+ GetShaderInfoLog,
+ void(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog));
+MOCK_METHOD3(GetShaderiv, void(GLuint shader, GLenum pname, GLint* params));
+MOCK_METHOD4(GetShaderPrecisionFormat,
+ void(GLenum shadertype,
+ GLenum precisiontype,
+ GLint* range,
+ GLint* precision));
+MOCK_METHOD4(
+ GetShaderSource,
+ void(GLuint shader, GLsizei bufsize, GLsizei* length, char* source));
+MOCK_METHOD1(GetString, const GLubyte*(GLenum name));
+MOCK_METHOD5(GetSynciv,
+ void(GLsync sync,
+ GLenum pname,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLint* values));
+MOCK_METHOD4(GetTexLevelParameterfv,
+ void(GLenum target, GLint level, GLenum pname, GLfloat* params));
+MOCK_METHOD4(GetTexLevelParameteriv,
+ void(GLenum target, GLint level, GLenum pname, GLint* params));
+MOCK_METHOD3(GetTexParameterfv,
+ void(GLenum target, GLenum pname, GLfloat* params));
+MOCK_METHOD3(GetTexParameteriv,
+ void(GLenum target, GLenum pname, GLint* params));
+MOCK_METHOD6(GetTransformFeedbackVarying,
+ void(GLuint program,
+ GLuint index,
+ GLsizei bufSize,
+ GLsizei* length,
+ GLenum* type,
+ char* name));
+MOCK_METHOD4(
+ GetTranslatedShaderSourceANGLE,
+ void(GLuint shader, GLsizei bufsize, GLsizei* length, char* source));
+MOCK_METHOD2(GetUniformBlockIndex,
+ GLuint(GLuint program, const char* uniformBlockName));
+MOCK_METHOD3(GetUniformfv,
+ void(GLuint program, GLint location, GLfloat* params));
+MOCK_METHOD4(GetUniformIndices,
+ void(GLuint program,
+ GLsizei uniformCount,
+ const char* const* uniformNames,
+ GLuint* uniformIndices));
+MOCK_METHOD3(GetUniformiv, void(GLuint program, GLint location, GLint* params));
+MOCK_METHOD2(GetUniformLocation, GLint(GLuint program, const char* name));
+MOCK_METHOD3(GetVertexAttribfv,
+ void(GLuint index, GLenum pname, GLfloat* params));
+MOCK_METHOD3(GetVertexAttribiv,
+ void(GLuint index, GLenum pname, GLint* params));
+MOCK_METHOD3(GetVertexAttribPointerv,
+ void(GLuint index, GLenum pname, void** pointer));
+MOCK_METHOD2(Hint, void(GLenum target, GLenum mode));
+MOCK_METHOD2(InsertEventMarkerEXT, void(GLsizei length, const char* marker));
+MOCK_METHOD3(InvalidateFramebuffer,
+ void(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments));
+MOCK_METHOD7(InvalidateSubFramebuffer,
+ void(GLenum target,
+ GLsizei numAttachments,
+ const GLenum* attachments,
+ GLint x,
+ GLint y,
+ GLint width,
+ GLint height));
+MOCK_METHOD1(IsBuffer, GLboolean(GLuint buffer));
+MOCK_METHOD1(IsEnabled, GLboolean(GLenum cap));
+MOCK_METHOD1(IsFenceAPPLE, GLboolean(GLuint fence));
+MOCK_METHOD1(IsFenceNV, GLboolean(GLuint fence));
+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));
+MOCK_METHOD1(IsSync, GLboolean(GLsync sync));
+MOCK_METHOD1(IsTexture, GLboolean(GLuint texture));
+MOCK_METHOD1(IsTransformFeedback, GLboolean(GLuint id));
+MOCK_METHOD1(IsVertexArrayOES, GLboolean(GLuint array));
+MOCK_METHOD1(LineWidth, void(GLfloat width));
+MOCK_METHOD1(LinkProgram, void(GLuint program));
+MOCK_METHOD2(MapBuffer, void*(GLenum target, GLenum access));
+MOCK_METHOD4(MapBufferRange,
+ void*(GLenum target,
+ GLintptr offset,
+ GLsizeiptr length,
+ GLbitfield access));
+MOCK_METHOD2(MatrixLoadfEXT, void(GLenum matrixMode, const GLfloat* m));
+MOCK_METHOD1(MatrixLoadIdentityEXT, void(GLenum matrixMode));
+MOCK_METHOD0(PauseTransformFeedback, void());
+MOCK_METHOD2(PixelStorei, void(GLenum pname, GLint param));
+MOCK_METHOD2(PointParameteri, void(GLenum pname, GLint param));
+MOCK_METHOD2(PolygonOffset, void(GLfloat factor, GLfloat units));
+MOCK_METHOD0(PopGroupMarkerEXT, void());
+MOCK_METHOD4(ProgramBinary,
+ void(GLuint program,
+ GLenum binaryFormat,
+ const GLvoid* binary,
+ GLsizei length));
+MOCK_METHOD3(ProgramParameteri,
+ void(GLuint program, GLenum pname, GLint value));
+MOCK_METHOD2(PushGroupMarkerEXT, void(GLsizei length, const char* marker));
+MOCK_METHOD2(QueryCounter, void(GLuint id, GLenum target));
+MOCK_METHOD1(ReadBuffer, void(GLenum src));
+MOCK_METHOD7(ReadPixels,
+ void(GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ void* pixels));
+MOCK_METHOD0(ReleaseShaderCompiler, void());
+MOCK_METHOD4(
+ RenderbufferStorageEXT,
+ void(GLenum target, GLenum internalformat, GLsizei width, GLsizei height));
+MOCK_METHOD5(RenderbufferStorageMultisample,
+ void(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height));
+MOCK_METHOD5(RenderbufferStorageMultisampleANGLE,
+ void(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height));
+MOCK_METHOD5(RenderbufferStorageMultisampleEXT,
+ void(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height));
+MOCK_METHOD5(RenderbufferStorageMultisampleIMG,
+ void(GLenum target,
+ GLsizei samples,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height));
+MOCK_METHOD0(ResumeTransformFeedback, void());
+MOCK_METHOD2(SampleCoverage, void(GLclampf value, GLboolean invert));
+MOCK_METHOD3(SamplerParameterf,
+ void(GLuint sampler, GLenum pname, GLfloat param));
+MOCK_METHOD3(SamplerParameterfv,
+ void(GLuint sampler, GLenum pname, const GLfloat* params));
+MOCK_METHOD3(SamplerParameteri,
+ void(GLuint sampler, GLenum pname, GLint param));
+MOCK_METHOD3(SamplerParameteriv,
+ void(GLuint sampler, GLenum pname, const GLint* params));
+MOCK_METHOD4(Scissor, void(GLint x, GLint y, GLsizei width, GLsizei height));
+MOCK_METHOD1(SetFenceAPPLE, void(GLuint fence));
+MOCK_METHOD2(SetFenceNV, void(GLuint fence, GLenum condition));
+MOCK_METHOD5(ShaderBinary,
+ void(GLsizei n,
+ const GLuint* shaders,
+ GLenum binaryformat,
+ const void* binary,
+ GLsizei length));
+MOCK_METHOD4(ShaderSource,
+ void(GLuint shader,
+ GLsizei count,
+ const char* const* str,
+ const GLint* length));
+MOCK_METHOD3(StencilFunc, void(GLenum func, GLint ref, GLuint mask));
+MOCK_METHOD4(StencilFuncSeparate,
+ void(GLenum face, GLenum func, GLint ref, GLuint mask));
+MOCK_METHOD1(StencilMask, void(GLuint mask));
+MOCK_METHOD2(StencilMaskSeparate, void(GLenum face, GLuint mask));
+MOCK_METHOD3(StencilOp, void(GLenum fail, GLenum zfail, GLenum zpass));
+MOCK_METHOD4(StencilOpSeparate,
+ void(GLenum face, GLenum fail, GLenum zfail, GLenum zpass));
+MOCK_METHOD1(TestFenceAPPLE, GLboolean(GLuint fence));
+MOCK_METHOD1(TestFenceNV, GLboolean(GLuint fence));
+MOCK_METHOD9(TexImage2D,
+ void(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels));
+MOCK_METHOD10(TexImage3D,
+ void(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const void* pixels));
+MOCK_METHOD3(TexParameterf, void(GLenum target, GLenum pname, GLfloat param));
+MOCK_METHOD3(TexParameterfv,
+ void(GLenum target, GLenum pname, const GLfloat* params));
+MOCK_METHOD3(TexParameteri, void(GLenum target, GLenum pname, GLint param));
+MOCK_METHOD3(TexParameteriv,
+ void(GLenum target, GLenum pname, const GLint* params));
+MOCK_METHOD5(TexStorage2DEXT,
+ void(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height));
+MOCK_METHOD6(TexStorage3D,
+ void(GLenum target,
+ GLsizei levels,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth));
+MOCK_METHOD9(TexSubImage2D,
+ void(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const void* pixels));
+MOCK_METHOD4(TransformFeedbackVaryings,
+ void(GLuint program,
+ GLsizei count,
+ const char* const* varyings,
+ GLenum bufferMode));
+MOCK_METHOD2(Uniform1f, void(GLint location, GLfloat x));
+MOCK_METHOD3(Uniform1fv, void(GLint location, GLsizei count, const GLfloat* v));
+MOCK_METHOD2(Uniform1i, void(GLint location, GLint x));
+MOCK_METHOD3(Uniform1iv, void(GLint location, GLsizei count, const GLint* v));
+MOCK_METHOD2(Uniform1ui, void(GLint location, GLuint v0));
+MOCK_METHOD3(Uniform1uiv, void(GLint location, GLsizei count, const GLuint* v));
+MOCK_METHOD3(Uniform2f, void(GLint location, GLfloat x, GLfloat y));
+MOCK_METHOD3(Uniform2fv, void(GLint location, GLsizei count, const GLfloat* v));
+MOCK_METHOD3(Uniform2i, void(GLint location, GLint x, GLint y));
+MOCK_METHOD3(Uniform2iv, void(GLint location, GLsizei count, const GLint* v));
+MOCK_METHOD3(Uniform2ui, void(GLint location, GLuint v0, GLuint v1));
+MOCK_METHOD3(Uniform2uiv, void(GLint location, GLsizei count, const GLuint* v));
+MOCK_METHOD4(Uniform3f, void(GLint location, GLfloat x, GLfloat y, GLfloat z));
+MOCK_METHOD3(Uniform3fv, void(GLint location, GLsizei count, const GLfloat* v));
+MOCK_METHOD4(Uniform3i, void(GLint location, GLint x, GLint y, GLint z));
+MOCK_METHOD3(Uniform3iv, void(GLint location, GLsizei count, const GLint* v));
+MOCK_METHOD4(Uniform3ui, void(GLint location, GLuint v0, GLuint v1, GLuint v2));
+MOCK_METHOD3(Uniform3uiv, void(GLint location, GLsizei count, const GLuint* v));
+MOCK_METHOD5(Uniform4f,
+ void(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w));
+MOCK_METHOD3(Uniform4fv, void(GLint location, GLsizei count, const GLfloat* v));
+MOCK_METHOD5(Uniform4i,
+ void(GLint location, GLint x, GLint y, GLint z, GLint w));
+MOCK_METHOD3(Uniform4iv, void(GLint location, GLsizei count, const GLint* v));
+MOCK_METHOD5(Uniform4ui,
+ void(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3));
+MOCK_METHOD3(Uniform4uiv, void(GLint location, GLsizei count, const GLuint* v));
+MOCK_METHOD3(UniformBlockBinding,
+ void(GLuint program,
+ GLuint uniformBlockIndex,
+ GLuint uniformBlockBinding));
+MOCK_METHOD4(UniformMatrix2fv,
+ void(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value));
+MOCK_METHOD4(UniformMatrix2x3fv,
+ void(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value));
+MOCK_METHOD4(UniformMatrix2x4fv,
+ void(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value));
+MOCK_METHOD4(UniformMatrix3fv,
+ void(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value));
+MOCK_METHOD4(UniformMatrix3x2fv,
+ void(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value));
+MOCK_METHOD4(UniformMatrix3x4fv,
+ void(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value));
+MOCK_METHOD4(UniformMatrix4fv,
+ void(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value));
+MOCK_METHOD4(UniformMatrix4x2fv,
+ void(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value));
+MOCK_METHOD4(UniformMatrix4x3fv,
+ void(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat* value));
+MOCK_METHOD1(UnmapBuffer, GLboolean(GLenum target));
+MOCK_METHOD1(UseProgram, void(GLuint program));
+MOCK_METHOD1(ValidateProgram, void(GLuint program));
+MOCK_METHOD2(VertexAttrib1f, void(GLuint indx, GLfloat x));
+MOCK_METHOD2(VertexAttrib1fv, void(GLuint indx, const GLfloat* values));
+MOCK_METHOD3(VertexAttrib2f, void(GLuint indx, GLfloat x, GLfloat y));
+MOCK_METHOD2(VertexAttrib2fv, void(GLuint indx, const GLfloat* values));
+MOCK_METHOD4(VertexAttrib3f,
+ void(GLuint indx, GLfloat x, GLfloat y, GLfloat z));
+MOCK_METHOD2(VertexAttrib3fv, void(GLuint indx, const GLfloat* values));
+MOCK_METHOD5(VertexAttrib4f,
+ void(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w));
+MOCK_METHOD2(VertexAttrib4fv, void(GLuint indx, const GLfloat* values));
+MOCK_METHOD2(VertexAttribDivisorANGLE, void(GLuint index, GLuint divisor));
+MOCK_METHOD5(VertexAttribI4i,
+ void(GLuint indx, GLint x, GLint y, GLint z, GLint w));
+MOCK_METHOD2(VertexAttribI4iv, void(GLuint indx, const GLint* values));
+MOCK_METHOD5(VertexAttribI4ui,
+ void(GLuint indx, GLuint x, GLuint y, GLuint z, GLuint w));
+MOCK_METHOD2(VertexAttribI4uiv, void(GLuint indx, const GLuint* values));
+MOCK_METHOD5(VertexAttribIPointer,
+ void(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLsizei stride,
+ const void* ptr));
+MOCK_METHOD6(VertexAttribPointer,
+ void(GLuint indx,
+ GLint size,
+ GLenum type,
+ GLboolean normalized,
+ GLsizei stride,
+ const void* ptr));
+MOCK_METHOD4(Viewport, void(GLint x, GLint y, GLsizei width, GLsizei height));
+MOCK_METHOD3(WaitSync, GLenum(GLsync sync, GLbitfield flags, GLuint64 timeout));
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 5e849ac..1b670e1 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -29,6 +29,10 @@
}
#endif
+#if defined (USE_OZONE)
+#include "ui/ozone/public/surface_factory_ozone.h"
+#endif
+
#if !defined(EGL_FIXED_SIZE_ANGLE)
#define EGL_FIXED_SIZE_ANGLE 0x3201
#endif
diff --git a/ui/gl/gl_surface_ozone.cc b/ui/gl/gl_surface_ozone.cc
new file mode 100644
index 0000000..eecd064
--- /dev/null
+++ b/ui/gl/gl_surface_ozone.cc
@@ -0,0 +1,266 @@
+// Copyright 2014 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/gl_surface.h"
+
+#include "base/logging.h"
+#include "base/memory/ref_counted.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/gl/gl_context.h"
+#include "ui/gl/gl_image.h"
+#include "ui/gl/gl_implementation.h"
+#include "ui/gl/gl_surface_egl.h"
+#include "ui/gl/gl_surface_osmesa.h"
+#include "ui/gl/gl_surface_stub.h"
+#include "ui/gl/scoped_make_current.h"
+#include "ui/ozone/public/surface_factory_ozone.h"
+#include "ui/ozone/public/surface_ozone_egl.h"
+
+namespace gfx {
+
+namespace {
+
+// A thin wrapper around GLSurfaceEGL that owns the EGLNativeWindow
+class GL_EXPORT GLSurfaceOzoneEGL : public NativeViewGLSurfaceEGL {
+ public:
+ GLSurfaceOzoneEGL(scoped_ptr<ui::SurfaceOzoneEGL> ozone_surface,
+ AcceleratedWidget widget)
+ : NativeViewGLSurfaceEGL(ozone_surface->GetNativeWindow()),
+ ozone_surface_(ozone_surface.Pass()),
+ widget_(widget) {}
+
+ bool Initialize() override {
+ return Initialize(ozone_surface_->CreateVSyncProvider());
+ }
+ bool Resize(const gfx::Size& size) override {
+ if (!ozone_surface_->ResizeNativeWindow(size)) {
+ if (!ReinitializeNativeSurface() ||
+ !ozone_surface_->ResizeNativeWindow(size))
+ return false;
+ }
+
+ return NativeViewGLSurfaceEGL::Resize(size);
+ }
+ bool SwapBuffers() override {
+ if (!NativeViewGLSurfaceEGL::SwapBuffers())
+ return false;
+
+ return ozone_surface_->OnSwapBuffers();
+ }
+ bool ScheduleOverlayPlane(int z_order,
+ OverlayTransform transform,
+ GLImage* image,
+ const Rect& bounds_rect,
+ const RectF& crop_rect) override {
+ return image->ScheduleOverlayPlane(
+ widget_, z_order, transform, bounds_rect, crop_rect);
+ }
+
+ private:
+ using NativeViewGLSurfaceEGL::Initialize;
+
+ ~GLSurfaceOzoneEGL() override {
+ Destroy(); // EGL surface must be destroyed before SurfaceOzone
+ }
+
+ bool ReinitializeNativeSurface() {
+ scoped_ptr<ui::ScopedMakeCurrent> scoped_make_current;
+ GLContext* current_context = GLContext::GetCurrent();
+ bool was_current =
+ current_context && current_context->IsCurrent(this);
+ if (was_current) {
+ scoped_make_current.reset(
+ new ui::ScopedMakeCurrent(current_context, this));
+ }
+
+ Destroy();
+ ozone_surface_ =
+ ui::SurfaceFactoryOzone::GetInstance()->CreateEGLSurfaceForWidget(
+ widget_).Pass();
+ if (!ozone_surface_) {
+ LOG(ERROR) << "Failed to create native surface.";
+ return false;
+ }
+
+ window_ = ozone_surface_->GetNativeWindow();
+ if (!Initialize()) {
+ LOG(ERROR) << "Failed to initialize.";
+ return false;
+ }
+
+ return true;
+ }
+
+ // The native surface. Deleting this is allowed to free the EGLNativeWindow.
+ scoped_ptr<ui::SurfaceOzoneEGL> ozone_surface_;
+ AcceleratedWidget widget_;
+
+ DISALLOW_COPY_AND_ASSIGN(GLSurfaceOzoneEGL);
+};
+
+class GL_EXPORT GLSurfaceOzoneSurfaceless : public SurfacelessEGL {
+ public:
+ GLSurfaceOzoneSurfaceless(scoped_ptr<ui::SurfaceOzoneEGL> ozone_surface,
+ AcceleratedWidget widget)
+ : SurfacelessEGL(gfx::Size()),
+ ozone_surface_(ozone_surface.Pass()),
+ widget_(widget) {}
+
+ bool Initialize() override {
+ if (!SurfacelessEGL::Initialize())
+ return false;
+ vsync_provider_ = ozone_surface_->CreateVSyncProvider();
+ if (!vsync_provider_)
+ return false;
+ return true;
+ }
+ bool Resize(const gfx::Size& size) override {
+ if (!ozone_surface_->ResizeNativeWindow(size))
+ return false;
+
+ return SurfacelessEGL::Resize(size);
+ }
+ bool SwapBuffers() override {
+ // TODO: this should be replaced by a fence when supported by the driver.
+ glFlush();
+ return ozone_surface_->OnSwapBuffers();
+ }
+ bool ScheduleOverlayPlane(int z_order,
+ OverlayTransform transform,
+ GLImage* image,
+ const Rect& bounds_rect,
+ const RectF& crop_rect) override {
+ return image->ScheduleOverlayPlane(
+ widget_, z_order, transform, bounds_rect, crop_rect);
+ }
+ bool IsOffscreen() override { return false; }
+ VSyncProvider* GetVSyncProvider() override { return vsync_provider_.get(); }
+ bool SupportsPostSubBuffer() override { return true; }
+ bool PostSubBuffer(int x, int y, int width, int height) override {
+ // The actual sub buffer handling is handled at higher layers.
+ SwapBuffers();
+ return true;
+ }
+ bool SwapBuffersAsync(const SwapCompletionCallback& callback) override {
+ // TODO: this should be replaced by a fence when supported by the driver.
+ glFlush();
+ return ozone_surface_->OnSwapBuffersAsync(callback);
+ }
+ bool PostSubBufferAsync(int x,
+ int y,
+ int width,
+ int height,
+ const SwapCompletionCallback& callback) override {
+ return SwapBuffersAsync(callback);
+ }
+
+ private:
+ ~GLSurfaceOzoneSurfaceless() override {
+ Destroy(); // EGL surface must be destroyed before SurfaceOzone
+ }
+
+ // The native surface. Deleting this is allowed to free the EGLNativeWindow.
+ scoped_ptr<ui::SurfaceOzoneEGL> ozone_surface_;
+ AcceleratedWidget widget_;
+ scoped_ptr<VSyncProvider> vsync_provider_;
+
+ DISALLOW_COPY_AND_ASSIGN(GLSurfaceOzoneSurfaceless);
+};
+
+} // namespace
+
+// static
+bool GLSurface::InitializeOneOffInternal() {
+ switch (GetGLImplementation()) {
+ case kGLImplementationEGLGLES2:
+ if (!GLSurfaceEGL::InitializeOneOff()) {
+ LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed.";
+ return false;
+ }
+
+ return true;
+ case kGLImplementationOSMesaGL:
+ case kGLImplementationMockGL:
+ return true;
+ default:
+ return false;
+ }
+}
+
+// static
+scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface(
+ gfx::AcceleratedWidget window) {
+ if (GetGLImplementation() == kGLImplementationOSMesaGL) {
+ scoped_refptr<GLSurface> surface(new GLSurfaceOSMesaHeadless());
+ if (!surface->Initialize())
+ return NULL;
+ return surface;
+ }
+ DCHECK(GetGLImplementation() == kGLImplementationEGLGLES2);
+ if (window != kNullAcceleratedWidget) {
+ scoped_refptr<GLSurface> surface;
+ if (GLSurfaceEGL::IsEGLSurfacelessContextSupported() &&
+ ui::SurfaceFactoryOzone::GetInstance()
+ ->CanShowPrimaryPlaneAsOverlay()) {
+ scoped_ptr<ui::SurfaceOzoneEGL> surface_ozone =
+ ui::SurfaceFactoryOzone::GetInstance()
+ ->CreateSurfacelessEGLSurfaceForWidget(window);
+ if (!surface_ozone)
+ return NULL;
+ surface = new GLSurfaceOzoneSurfaceless(surface_ozone.Pass(), window);
+ } else {
+ scoped_ptr<ui::SurfaceOzoneEGL> surface_ozone =
+ ui::SurfaceFactoryOzone::GetInstance()->CreateEGLSurfaceForWidget(
+ window);
+ if (!surface_ozone)
+ return NULL;
+
+ surface = new GLSurfaceOzoneEGL(surface_ozone.Pass(), window);
+ }
+ if (!surface->Initialize())
+ return NULL;
+ return surface;
+ } else {
+ scoped_refptr<GLSurface> surface = new GLSurfaceStub();
+ if (surface->Initialize())
+ return surface;
+ }
+ return NULL;
+}
+
+// static
+scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface(
+ const gfx::Size& size) {
+ switch (GetGLImplementation()) {
+ case kGLImplementationOSMesaGL: {
+ scoped_refptr<GLSurface> surface(
+ new GLSurfaceOSMesa(OSMesaSurfaceFormatBGRA, size));
+ if (!surface->Initialize())
+ return NULL;
+
+ return surface;
+ }
+ case kGLImplementationEGLGLES2: {
+ scoped_refptr<GLSurface> surface;
+ if (GLSurfaceEGL::IsEGLSurfacelessContextSupported() &&
+ (size.width() == 0 && size.height() == 0)) {
+ surface = new SurfacelessEGL(size);
+ } else
+ surface = new PbufferGLSurfaceEGL(size);
+
+ if (!surface->Initialize())
+ return NULL;
+ return surface;
+ }
+ default:
+ NOTREACHED();
+ return NULL;
+ }
+}
+
+EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() {
+ return ui::SurfaceFactoryOzone::GetInstance()->GetNativeDisplay();
+}
+
+} // namespace gfx
diff --git a/url/BUILD.gn b/url/BUILD.gn
index 3bffec2..03e90cb 100644
--- a/url/BUILD.gn
+++ b/url/BUILD.gn
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//testing/test.gni")
import("//url/config.gni")
# Sets the USE_ICU_ALTERNATIVES_ON_ANDROID define based on the build flag.