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

Unified Diff: webkit/glue/plugins/pepper_graphics_3d.h

Issue 5944001: Make Graphics3D::SwapBuffers take a completion callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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: webkit/glue/plugins/pepper_graphics_3d.h
diff --git a/webkit/glue/plugins/pepper_graphics_3d.h b/webkit/glue/plugins/pepper_graphics_3d.h
index 420a36440e0153d729509aae5b31f1c64b356fa5..dec9ab35b22f7c8ef6b90c6d6a92791b393bdc46 100644
--- a/webkit/glue/plugins/pepper_graphics_3d.h
+++ b/webkit/glue/plugins/pepper_graphics_3d.h
@@ -54,7 +54,7 @@ class Graphics3D : public Resource {
bool MakeCurrent();
- bool SwapBuffers();
+ bool SwapBuffers(PP_CompletionCallback callback);
unsigned GetError();
@@ -62,6 +62,9 @@ class Graphics3D : public Resource {
void SetSwapBuffersCallback(Callback0::Type* callback);
+ void ViewInitiatedPaint();
+ void ViewFlushedPaint();
+
unsigned GetBackingTextureId();
gpu::gles2::GLES2Implementation* impl() {
@@ -75,6 +78,10 @@ class Graphics3D : public Resource {
// to, if any. If the context is currently unbound, this will be NULL.
PluginInstance* bound_instance_;
+ // True when the page's SwapBuffers has been issued but not returned yet.
+ bool swap_initiated_;
+ PP_CompletionCallback swap_callback_;
+
// PluginDelegate's 3D Context. Responsible for providing the command buffer.
scoped_ptr<PluginDelegate::PlatformContext3D> platform_context_;

Powered by Google App Engine
This is Rietveld 408576698