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

Unified Diff: cc/output/output_surface.h

Issue 16304003: Unified OutputSurface::SwapBuffers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to 205473 Created 7 years, 6 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 | « cc/output/gl_renderer_unittest.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/output_surface.h
diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h
index fb93eb76dd2bb035b143ef4c4f6c0eb5ccbe7b47..d263d3a54ac0ca7a4d4b1340e5e12a039f1802c2 100644
--- a/cc/output/output_surface.h
+++ b/cc/output/output_surface.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "cc/base/cc_export.h"
#include "cc/output/context_provider.h"
#include "cc/output/software_output_device.h"
@@ -46,11 +47,11 @@ class CC_EXPORT OutputSurface {
struct Capabilities {
Capabilities()
- : has_parent_compositor(false),
+ : delegated_rendering(false),
max_frames_pending(0),
deferred_gl_initialization(false) {}
- bool has_parent_compositor;
+ bool delegated_rendering;
int max_frames_pending;
bool deferred_gl_initialization;
};
@@ -82,11 +83,6 @@ class CC_EXPORT OutputSurface {
// thread.
virtual bool BindToClient(OutputSurfaceClient* client);
- // Sends frame data to the parent compositor. This should only be called when
- // capabilities().has_parent_compositor. The implementation may destroy or
- // steal the contents of the CompositorFrame passed in.
- virtual void SendFrameToParentCompositor(CompositorFrame* frame);
-
virtual void EnsureBackbuffer();
virtual void DiscardBackbuffer();
@@ -95,8 +91,10 @@ class CC_EXPORT OutputSurface {
virtual void BindFramebuffer();
- virtual void PostSubBuffer(gfx::Rect rect, const ui::LatencyInfo&);
- virtual void SwapBuffers(const ui::LatencyInfo&);
+ // The implementation may destroy or steal the contents of the CompositorFrame
+ // passed in (though it will not take ownership of the CompositorFrame
+ // itself).
+ virtual void SwapBuffers(CompositorFrame* frame);
// Notifies frame-rate smoothness preference. If true, all non-critical
// processing should be stopped, or lowered in priority.
@@ -116,17 +114,24 @@ class CC_EXPORT OutputSurface {
scoped_ptr<WebKit::WebGraphicsContext3D> context3d,
scoped_refptr<ContextProvider> offscreen_context_provider);
+ void PostSwapBuffersComplete();
+
OutputSurfaceClient* client_;
struct cc::OutputSurface::Capabilities capabilities_;
scoped_ptr<OutputSurfaceCallbacks> callbacks_;
scoped_ptr<WebKit::WebGraphicsContext3D> context3d_;
scoped_ptr<cc::SoftwareOutputDevice> software_device_;
bool has_gl_discard_backbuffer_;
+ bool has_swap_buffers_complete_callback_;
gfx::Size surface_size_;
float device_scale_factor_;
private:
void SetContext3D(scoped_ptr<WebKit::WebGraphicsContext3D> context3d);
+ void SwapBuffersComplete();
+
+ base::WeakPtrFactory<OutputSurface> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(OutputSurface);
};
« no previous file with comments | « cc/output/gl_renderer_unittest.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698