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

Unified Diff: content/common/gpu/image_transport_surface.cc

Issue 10388131: Allow GLES2CmdDecoder to change the GLSurface associated with the default FBO. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 | « content/common/gpu/image_transport_surface.h ('k') | gpu/command_buffer/service/gl_surface_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/image_transport_surface.cc
===================================================================
--- content/common/gpu/image_transport_surface.cc (revision 137438)
+++ content/common/gpu/image_transport_surface.cc (working copy)
@@ -172,11 +172,11 @@
return decoder->MakeCurrent();
}
-void ImageTransportHelper::SetSwapInterval() {
+void ImageTransportHelper::SetSwapInterval(gfx::GLContext* context) {
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableGpuVsync))
- Decoder()->GetGLContext()->SetSwapInterval(0);
+ context->SetSwapInterval(0);
else
- Decoder()->GetGLContext()->SetSwapInterval(1);
+ context->SetSwapInterval(1);
}
void ImageTransportHelper::Suspend() {
@@ -230,7 +230,7 @@
#if defined(OS_WIN)
Decoder()->MakeCurrent();
- SetSwapInterval();
+ SetSwapInterval(Decoder()->GetGLContext());
#endif
}
@@ -298,7 +298,7 @@
bool PassThroughImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) {
if (!did_set_swap_interval_) {
- helper_->SetSwapInterval();
+ ImageTransportHelper::SetSwapInterval(context);
did_set_swap_interval_ = true;
}
return true;
« no previous file with comments | « content/common/gpu/image_transport_surface.h ('k') | gpu/command_buffer/service/gl_surface_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698