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

Unified Diff: cc/test/test_web_graphics_context_3d.cc

Issue 14772021: cc::OutputSurfaceClient::InitializeForGL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win compile by including ContextProvider from output_surface_client.h Created 7 years, 6 months 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
« no previous file with comments | « cc/test/test_web_graphics_context_3d.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_web_graphics_context_3d.cc
diff --git a/cc/test/test_web_graphics_context_3d.cc b/cc/test/test_web_graphics_context_3d.cc
index aaeff687da4095735d8dc547aa733d6a02a20f84..8956aec707c1a8e8c340557c55ea24970b841548 100644
--- a/cc/test/test_web_graphics_context_3d.cc
+++ b/cc/test/test_web_graphics_context_3d.cc
@@ -41,6 +41,7 @@ TestWebGraphicsContext3D::TestWebGraphicsContext3D()
next_buffer_id_(1),
next_image_id_(1),
next_texture_id_(1),
+ support_swapbuffers_complete_callback_(true),
have_extension_io_surface_(false),
have_extension_egl_image_(false),
times_make_current_succeeds_(-1),
@@ -64,6 +65,7 @@ TestWebGraphicsContext3D::TestWebGraphicsContext3D(
next_image_id_(1),
next_texture_id_(1),
attributes_(attributes),
+ support_swapbuffers_complete_callback_(true),
have_extension_io_surface_(false),
have_extension_egl_image_(false),
times_make_current_succeeds_(-1),
@@ -132,7 +134,10 @@ WebGraphicsContext3D::Attributes
}
WebKit::WebString TestWebGraphicsContext3D::getString(WGC3Denum name) {
- std::string string("GL_CHROMIUM_swapbuffers_complete_callback");
+ std::string string;
+
+ if (support_swapbuffers_complete_callback_)
+ string += "GL_CHROMIUM_swapbuffers_complete_callback";
if (name == GL_EXTENSIONS) {
if (have_extension_io_surface_)
@@ -355,7 +360,8 @@ void TestWebGraphicsContext3D::signalSyncPoint(
void TestWebGraphicsContext3D::setSwapBuffersCompleteCallbackCHROMIUM(
WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* callback) {
- swap_buffers_callback_ = callback;
+ if (support_swapbuffers_complete_callback_)
+ swap_buffers_callback_ = callback;
}
void TestWebGraphicsContext3D::prepareTexture() {
« no previous file with comments | « cc/test/test_web_graphics_context_3d.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698