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

Unified Diff: ui/compositor/compositor.h

Issue 808003002: Fix compositor integration in ui/compositor (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « mojo/cc/context_provider_mojo.cc ('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 d67955105c7786498c7c376ec66bb4cb80a93672..a1707a333fb3af45c929b42a9cb32fbdabad4a11 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -69,8 +69,8 @@ class COMPOSITOR_EXPORT ContextFactory {
// Creates an output surface for the given compositor. The factory may keep
// per-compositor data (e.g. a shared context), that needs to be cleaned up
// by calling RemoveCompositor when the compositor gets destroyed.
- virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(
- Compositor* compositor, bool software_fallback) = 0;
+ virtual void CreateOutputSurface(base::WeakPtr<Compositor> compositor,
+ bool software_fallback) = 0;
// Creates a reflector that copies the content of the |mirrored_compositor|
// onto |mirroring_layer|.
@@ -147,6 +147,8 @@ class COMPOSITOR_EXPORT Compositor
ui::ContextFactory* context_factory() { return context_factory_; }
+ void SetOutputSurface(scoped_ptr<cc::OutputSurface> surface);
+
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@@ -287,10 +289,6 @@ class COMPOSITOR_EXPORT Compositor
friend class base::RefCounted<Compositor>;
friend class CompositorLock;
- enum {
- OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK = 4,
- MAX_OUTPUT_SURFACE_RETRIES = 5,
- };
// Called by CompositorLock.
void UnlockCompositor();
@@ -328,8 +326,6 @@ class COMPOSITOR_EXPORT Compositor
int last_started_frame_;
int last_ended_frame_;
- int num_failed_recreate_attempts_;
-
bool disable_schedule_composite_;
CompositorLock* compositor_lock_;
« no previous file with comments | « mojo/cc/context_provider_mojo.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698