Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(825)

Unified Diff: gpu/command_buffer/client/gl_in_process_context.cc

Issue 79123004: Implemented failIfMajorPerformanceCaveat WebGL context creation attribute. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Feedback Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/client/gl_in_process_context.cc
diff --git a/gpu/command_buffer/client/gl_in_process_context.cc b/gpu/command_buffer/client/gl_in_process_context.cc
index a1ca1a2727e60745f7d504c4711b5ccdf89a094a..581c562220f82b2abf93a42917fe4ce05b9782fc 100644
--- a/gpu/command_buffer/client/gl_in_process_context.cc
+++ b/gpu/command_buffer/client/gl_in_process_context.cc
@@ -138,6 +138,9 @@ bool GLInProcessContextImpl::Initialize(
const int32 SAMPLE_BUFFERS = 0x3032;
const int32 NONE = 0x3038;
+ // Chromium-specific attributes
+ const int32 FAIL_IF_MAJOR_PERF_CAVEAT = 0x10002;
Ken Russell (switch to Gerrit) 2013/11/23 03:07:04 Please add a comment about dependencies between th
+
std::vector<int32> attrib_vector;
if (attribs.alpha_size >= 0) {
attrib_vector.push_back(ALPHA_SIZE);
@@ -171,6 +174,10 @@ bool GLInProcessContextImpl::Initialize(
attrib_vector.push_back(SAMPLE_BUFFERS);
attrib_vector.push_back(attribs.sample_buffers);
}
+ if (attribs.fail_if_major_perf_caveat > 0) {
+ attrib_vector.push_back(FAIL_IF_MAJOR_PERF_CAVEAT);
+ attrib_vector.push_back(attribs.fail_if_major_perf_caveat);
+ }
attrib_vector.push_back(NONE);
base::Closure wrapped_callback =

Powered by Google App Engine
This is Rietveld 408576698