summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_impl.h
diff options
context:
space:
mode:
authorreveman <reveman@chromium.org>2015-09-23 17:19:43 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-24 00:34:48 +0000
commitd180dfc3198c1e58a8c10f7349f3d949e22c5f3d (patch)
tree3f1b2d58647d991dd3ab1d3ba13da4f7d8205979 /cc/trees/layer_tree_host_impl.h
parentf86718093f9c88d956207b527cf5bed4a872a24f (diff)
downloadchromium_src-d180dfc3198c1e58a8c10f7349f3d949e22c5f3d.zip
chromium_src-d180dfc3198c1e58a8c10f7349f3d949e22c5f3d.tar.gz
chromium_src-d180dfc3198c1e58a8c10f7349f3d949e22c5f3d.tar.bz2
Re-land: cc: Implement shared worker contexts.
This moves the responsibility to call BindToCurrentThread/SetupLock out of cc::OutputSurface and to the maintainer of the (possibly) shared context. OutputSurface now needs to be destroyed on the same thread they were created. OutputSurface::DetachFromClient() can be used to destroy any resources that need to be destroyed on the thread that the OutputSurface has been bound to. BUG=523411,525811 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1336733002 Cr-Commit-Position: refs/heads/master@{#350409}
Diffstat (limited to 'cc/trees/layer_tree_host_impl.h')
-rw-r--r--cc/trees/layer_tree_host_impl.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index f3d4a67..7e8a85b 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -360,14 +360,15 @@ class CC_EXPORT LayerTreeHostImpl
// Implementation.
int id() const { return id_; }
bool CanDraw() const;
- OutputSurface* output_surface() const { return output_surface_.get(); }
- scoped_ptr<OutputSurface> ReleaseOutputSurface();
+ OutputSurface* output_surface() const { return output_surface_; }
+ void ReleaseOutputSurface();
+
std::string LayerTreeAsJson() const;
void FinishAllRendering();
int RequestedMSAASampleCount() const;
- virtual bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface);
+ virtual bool InitializeRenderer(OutputSurface* output_surface);
TileManager* tile_manager() { return tile_manager_.get(); }
void SetHasGpuRasterizationTrigger(bool flag) {
@@ -696,7 +697,7 @@ class CC_EXPORT LayerTreeHostImpl
// request queue.
std::set<UIResourceId> evicted_ui_resources_;
- scoped_ptr<OutputSurface> output_surface_;
+ OutputSurface* output_surface_;
scoped_ptr<ResourceProvider> resource_provider_;
bool content_is_suitable_for_gpu_rasterization_;