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

Unified Diff: mojo/services/gles2/command_buffer_impl.cc

Issue 378243002: Revert of Connect X11 ConfigureNotify events to Mojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « mojo/services/gles2/command_buffer_impl.h ('k') | mojo/services/native_viewport/native_viewport_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/gles2/command_buffer_impl.cc
diff --git a/mojo/services/gles2/command_buffer_impl.cc b/mojo/services/gles2/command_buffer_impl.cc
index 438ff903f87fda1dce04bed89ed92fd18dbf2d4b..090b78c370709a9d0f2ff2b0237f92d472da2e36 100644
--- a/mojo/services/gles2/command_buffer_impl.cc
+++ b/mojo/services/gles2/command_buffer_impl.cc
@@ -73,17 +73,18 @@
bool CommandBufferImpl::DoInitialize(
mojo::ScopedSharedBufferHandle shared_state) {
// TODO(piman): offscreen surface.
- surface_ = gfx::GLSurface::CreateViewGLSurface(widget_);
- if (!surface_.get())
+ scoped_refptr<gfx::GLSurface> surface =
+ gfx::GLSurface::CreateViewGLSurface(widget_);
+ if (!surface.get())
return false;
// TODO(piman): context sharing, virtual contexts, gpu preference.
scoped_refptr<gfx::GLContext> context = gfx::GLContext::CreateGLContext(
- NULL, surface_.get(), gfx::PreferIntegratedGpu);
+ NULL, surface.get(), gfx::PreferIntegratedGpu);
if (!context.get())
return false;
- if (!context->MakeCurrent(surface_.get()))
+ if (!context->MakeCurrent(surface.get()))
return false;
// TODO(piman): ShaderTranslatorCache is currently per-ContextGroup but
@@ -105,14 +106,12 @@
scheduler_.reset(new gpu::GpuScheduler(
command_buffer_.get(), decoder_.get(), decoder_.get()));
decoder_->set_engine(scheduler_.get());
- decoder_->SetResizeCallback(
- base::Bind(&CommandBufferImpl::OnResize, base::Unretained(this)));
gpu::gles2::DisallowedFeatures disallowed_features;
// TODO(piman): attributes.
std::vector<int32> attrib_vector;
- if (!decoder_->Initialize(surface_,
+ if (!decoder_->Initialize(surface,
context,
false /* offscreen */,
size_,
@@ -195,9 +194,5 @@
void CommandBufferImpl::DrawAnimationFrame() { client()->DrawAnimationFrame(); }
-void CommandBufferImpl::OnResize(gfx::Size size, float scale_factor) {
- surface_->Resize(size);
-}
-
} // namespace services
} // namespace mojo
« no previous file with comments | « mojo/services/gles2/command_buffer_impl.h ('k') | mojo/services/native_viewport/native_viewport_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698