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

Unified Diff: ui/compositor/compositor.h

Issue 342413005: Revert of Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « content/test/web_layer_tree_view_impl_for_testing.h ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.h
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index 9179826d227e8b785cc51bbc2deae97299dc383a..79bf691c41520057728284ab3f1d4ba9f165fc77 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -21,6 +21,8 @@
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
#include "ui/gfx/vector2d.h"
+
+class SkBitmap;
namespace base {
class MessageLoopProxy;
@@ -155,6 +157,9 @@
// compositing layers on.
float device_scale_factor() const { return device_scale_factor_; }
+ // Draws the scene created by the layer tree and any visual effects.
+ void Draw();
+
// Where possible, draws are scissored to a damage region calculated from
// changes to layer properties. This bypasses that and indicates that
// the whole frame needs to be drawn.
@@ -223,11 +228,16 @@
virtual void DidCompleteSwapBuffers() OVERRIDE;
// cc::LayerTreeHostSingleThreadClient implementation.
+ virtual void ScheduleComposite() OVERRIDE;
+ virtual void ScheduleAnimation() OVERRIDE;
virtual void DidPostSwapBuffers() OVERRIDE;
virtual void DidAbortSwapBuffers() OVERRIDE;
// LayerAnimatorCollectionDelegate implementation.
virtual void ScheduleAnimationForLayerCollection() OVERRIDE;
+
+ int last_started_frame() { return last_started_frame_; }
+ int last_ended_frame() { return last_ended_frame_; }
bool IsLocked() { return compositor_lock_ != NULL; }
@@ -247,6 +257,9 @@
// Called to release any pending CompositorLock
void CancelCompositorLock();
+
+ // Notifies the compositor that compositing is complete.
+ void NotifyEnd();
gfx::Size size_;
@@ -276,7 +289,18 @@
CompositorLock* compositor_lock_;
+ // Prevent more than one draw from being scheduled.
+ bool defer_draw_scheduling_;
+
+ // Used to prevent Draw()s while a composite is in progress.
+ bool waiting_on_compositing_end_;
+ bool draw_on_compositing_end_;
+ enum SwapState { SWAP_NONE, SWAP_POSTED, SWAP_COMPLETED };
+ SwapState swap_state_;
+
LayerAnimatorCollection layer_animator_collection_;
+
+ base::WeakPtrFactory<Compositor> schedule_draw_factory_;
DISALLOW_COPY_AND_ASSIGN(Compositor);
};
« no previous file with comments | « content/test/web_layer_tree_view_impl_for_testing.h ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698