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

Unified Diff: ui/compositor/compositor.h

Issue 648413004: Make browser GPU channel creation async. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « mojo/aura/surface_context_factory.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 d6663038318ba5a4700a111fce70e5604ff21542..fb297685414e04402b453b92522789345f8852f8 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 |mirroing_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();
@@ -337,7 +339,7 @@ class COMPOSITOR_EXPORT Compositor
LayerAnimatorCollection layer_animator_collection_;
- base::WeakPtrFactory<Compositor> schedule_draw_factory_;
+ base::WeakPtrFactory<Compositor> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(Compositor);
};
« no previous file with comments | « mojo/aura/surface_context_factory.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698