diff options
author | jbauman <jbauman@chromium.org> | 2014-10-27 17:22:52 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-28 00:23:13 +0000 |
commit | 1a7a51295cc29a237a078ac614b68bd2948af894 (patch) | |
tree | 2d13bcd3b11eb6c90f78acbb1d3a68df04bba6f1 /ui/compositor/compositor.h | |
parent | 0b8c9d7fb00b9b4f300abd9cca18d06236052492 (diff) | |
download | chromium_src-1a7a51295cc29a237a078ac614b68bd2948af894.zip chromium_src-1a7a51295cc29a237a078ac614b68bd2948af894.tar.gz chromium_src-1a7a51295cc29a237a078ac614b68bd2948af894.tar.bz2 |
Make browser GPU channel creation async.
This may help startup time.
Review URL: https://codereview.chromium.org/648413004
Cr-Commit-Position: refs/heads/master@{#301512}
Diffstat (limited to 'ui/compositor/compositor.h')
-rw-r--r-- | ui/compositor/compositor.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h index d666303..fb29768 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); }; |