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

Side by Side Diff: cc/layers/picture_layer.cc

Issue 73923003: Shared Raster Worker Threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build Error for Mac, macro conflict, moving setter to WorkerPool. Created 6 years, 11 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 unified diff | Download patch
« no previous file with comments | « AUTHORS ('k') | cc/resources/image_raster_worker_pool.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/picture_layer.h" 5 #include "cc/layers/picture_layer.h"
6 6
7 #include "cc/layers/content_layer_client.h" 7 #include "cc/layers/content_layer_client.h"
8 #include "cc/layers/picture_layer_impl.h" 8 #include "cc/layers/picture_layer_impl.h"
9 #include "cc/trees/layer_tree_impl.h" 9 #include "cc/trees/layer_tree_impl.h"
10 #include "ui/gfx/rect_conversions.h" 10 #include "ui/gfx/rect_conversions.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 layer_impl->invalidation_.Clear(); 56 layer_impl->invalidation_.Clear();
57 layer_impl->invalidation_.Swap(&pile_invalidation_); 57 layer_impl->invalidation_.Swap(&pile_invalidation_);
58 layer_impl->pile_ = PicturePileImpl::CreateFromOther(pile_.get()); 58 layer_impl->pile_ = PicturePileImpl::CreateFromOther(pile_.get());
59 } 59 }
60 60
61 void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) { 61 void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) {
62 Layer::SetLayerTreeHost(host); 62 Layer::SetLayerTreeHost(host);
63 if (host) { 63 if (host) {
64 pile_->SetMinContentsScale(host->settings().minimum_contents_scale); 64 pile_->SetMinContentsScale(host->settings().minimum_contents_scale);
65 pile_->SetTileGridSize(host->settings().default_tile_size); 65 pile_->SetTileGridSize(host->settings().default_tile_size);
66 pile_->set_num_raster_threads(host->settings().num_raster_threads);
67 pile_->set_slow_down_raster_scale_factor( 66 pile_->set_slow_down_raster_scale_factor(
68 host->debug_state().slow_down_raster_scale_factor); 67 host->debug_state().slow_down_raster_scale_factor);
69 pile_->set_show_debug_picture_borders( 68 pile_->set_show_debug_picture_borders(
70 host->debug_state().show_picture_borders); 69 host->debug_state().show_picture_borders);
71 } 70 }
72 } 71 }
73 72
74 void PictureLayer::SetNeedsDisplayRect(const gfx::RectF& layer_rect) { 73 void PictureLayer::SetNeedsDisplayRect(const gfx::RectF& layer_rect) {
75 gfx::Rect rect = gfx::ToEnclosedRect(layer_rect); 74 gfx::Rect rect = gfx::ToEnclosedRect(layer_rect);
76 if (!rect.IsEmpty()) { 75 if (!rect.IsEmpty()) {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 client_->PaintContents(canvas, gfx::Rect(width, height), &opaque); 154 client_->PaintContents(canvas, gfx::Rect(width, height), &opaque);
156 picture->endRecording(); 155 picture->endRecording();
157 return picture; 156 return picture;
158 } 157 }
159 158
160 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { 159 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
161 benchmark->RunOnLayer(this); 160 benchmark->RunOnLayer(this);
162 } 161 }
163 162
164 } // namespace cc 163 } // namespace cc
OLDNEW
« no previous file with comments | « AUTHORS ('k') | cc/resources/image_raster_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698