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

Unified Diff: gpu/command_buffer/service/gpu_scheduler.cc

Issue 7021014: GLContext no longer holds a pointer to a GLSurface. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
Index: gpu/command_buffer/service/gpu_scheduler.cc
===================================================================
--- gpu/command_buffer/service/gpu_scheduler.cc (revision 86168)
+++ gpu/command_buffer/service/gpu_scheduler.cc (working copy)
@@ -10,6 +10,7 @@
#include "base/message_loop.h"
#include "ui/gfx/gl/gl_context.h"
#include "ui/gfx/gl/gl_bindings.h"
+#include "ui/gfx/gl/gl_surface.h"
using ::base::SharedMemory;
@@ -52,6 +53,7 @@
}
bool GpuScheduler::InitializeCommon(
+ gfx::GLSurface* surface,
gfx::GLContext* context,
const gfx::Size& size,
const gles2::DisallowedExtensions& disallowed_extensions,
@@ -61,12 +63,12 @@
uint32 parent_texture_id) {
DCHECK(context);
- if (!context->MakeCurrent())
+ if (!context->MakeCurrent(surface))
return false;
// Do not limit to a certain number of commands before scheduling another
// update when rendering onscreen.
- if (!context->IsOffscreen())
+ if (!surface->IsOffscreen())
commands_per_update_ = INT_MAX;
// Map the ring buffer and create the parser.
@@ -84,7 +86,10 @@
}
// Initialize the decoder with either the view or pbuffer GLContext.
- if (!decoder_->Initialize(context,
+ // TODO(apatrick): The GpuScheduler should know nothing about the surface the
+ // decoder is rendering to. Get rid of the surface parameter.
+ if (!decoder_->Initialize(surface,
+ context,
size,
disallowed_extensions,
allowed_extensions,

Powered by Google App Engine
This is Rietveld 408576698