summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_impl.cc
diff options
context:
space:
mode:
authorenne <enne@chromium.org>2015-03-09 23:01:57 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-10 06:02:31 +0000
commitbdb6fd2037025923c986d1e3552cf9f99a634554 (patch)
treef75d434f8b3f8c4c5cf5c914226f3f149e85561f /cc/trees/layer_tree_host_impl.cc
parent843e610b00b629e45ec132bb4877dc217d8ae7bd (diff)
downloadchromium_src-bdb6fd2037025923c986d1e3552cf9f99a634554.zip
chromium_src-bdb6fd2037025923c986d1e3552cf9f99a634554.tar.gz
chromium_src-bdb6fd2037025923c986d1e3552cf9f99a634554.tar.bz2
cc: Add raster_enabled setting
In order to support impl-side painting plus an embedder without a message loop, cc needs a setting to disable raster. Rastering with impl-side painting requires a task runner (and DCHECKs this). This setting notifies cc that there's no need for a tile manager. Thankfully, tile manager is already considered optional in almost all contexts, and so just a few more callsites needed to be cleaned up to fix a few crashes. With this patch, all cc unittests pass with impl-side painting on by default. Review URL: https://codereview.chromium.org/984113004 Cr-Commit-Position: refs/heads/master@{#319840}
Diffstat (limited to 'cc/trees/layer_tree_host_impl.cc')
-rw-r--r--cc/trees/layer_tree_host_impl.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index a5cdc02..0bd757d 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1055,7 +1055,7 @@ DrawResult LayerTreeHostImpl::PrepareToDraw(FrameData* frame) {
// This will cause NotifyTileStateChanged() to be called for any visible tiles
// that completed, which will add damage to the frame for them so they appear
// as part of the current frame being drawn.
- if (settings().impl_side_painting)
+ if (tile_manager_)
tile_manager_->UpdateVisibleTiles(global_tile_state_);
frame->render_surface_layer_list = &active_tree_->RenderSurfaceLayerList();
@@ -1705,7 +1705,8 @@ void LayerTreeHostImpl::UpdateViewportContainerSizes() {
void LayerTreeHostImpl::SynchronouslyInitializeAllTiles() {
// Only valid for the single-threaded non-scheduled/synchronous case
// using the zero copy raster worker pool.
- single_thread_synchronous_task_graph_runner_->RunUntilIdle();
+ if (tile_manager_)
+ single_thread_synchronous_task_graph_runner_->RunUntilIdle();
}
void LayerTreeHostImpl::DidLoseOutputSurface() {
@@ -2136,7 +2137,7 @@ bool LayerTreeHostImpl::InitializeRenderer(
CreateAndSetRenderer();
- if (settings_.impl_side_painting)
+ if (settings_.impl_side_painting && settings_.raster_enabled)
CreateAndSetTileManager();
RecreateTreeResources();