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

Unified Diff: app/gfx/gl/gl_context.h

Issue 5105006: Resize synchronization for Linux. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Moved IPC call up to GpuCommandBufferStub via callback to satisfy checkdeps. Created 10 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
« no previous file with comments | « no previous file | app/gfx/gl/gl_context.cc » ('j') | chrome/browser/gpu_process_host.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/gfx/gl/gl_context.h
diff --git a/app/gfx/gl/gl_context.h b/app/gfx/gl/gl_context.h
index 865af76595da34d8ab6d70e7ecfd6222e39092e4..55371a2fcde5be2ee44a93d4426cd9e24ff6ae9d 100644
--- a/app/gfx/gl/gl_context.h
+++ b/app/gfx/gl/gl_context.h
@@ -8,6 +8,9 @@
#include <string>
+#include "base/callback.h"
+#include "base/basictypes.h"
+#include "base/scoped_ptr.h"
#include "build/build_config.h"
#include "gfx/native_widget_types.h"
#include "gfx/size.h"
@@ -36,10 +39,11 @@ class GLContext {
// contexts.
virtual bool SwapBuffers() = 0;
- // Set the size of the back buffer.
- // FIXME(backer): Currently a NOP. Once we have an implementation for each
- // backend we can switch it to pure virtual.
- virtual void SetSize(gfx::Size) {}
+ // Set the size of the back buffer. Calls the callback.
nduca 2010/11/23 16:59:49 Is there a way to put this callback on the GL-spec
jonathan.backer 2010/11/23 21:00:19 Done.
+ virtual void SetSize(gfx::Size size);
+
+ // Sometimes used to delegate resizing the back buffer.
+ virtual void RegisterSetSizeCallback(Callback1<gfx::Size>::Type* callback);
// Get the size of the back buffer.
virtual gfx::Size GetSize() = 0;
@@ -75,6 +79,8 @@ class GLContext {
bool InitializeCommon();
private:
+ scoped_ptr<Callback1<gfx::Size>::Type> set_size_callback_;
+
DISALLOW_COPY_AND_ASSIGN(GLContext);
};
« no previous file with comments | « no previous file | app/gfx/gl/gl_context.cc » ('j') | chrome/browser/gpu_process_host.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698