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

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

Issue 988693005: Chromium roll (https://codereview.chromium.org/976353002) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed bad android build patch Created 5 years, 9 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 | « cc/layers/layer_impl.cc ('k') | cc/layers/picture_layer_impl.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 "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "cc/layers/content_layer_client.h" 8 #include "cc/layers/content_layer_client.h"
9 #include "cc/layers/picture_layer_impl.h" 9 #include "cc/layers/picture_layer_impl.h"
10 #include "cc/resources/display_list_recording_source.h" 10 #include "cc/resources/display_list_recording_source.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 if (host) { 82 if (host) {
83 if (!recording_source_) { 83 if (!recording_source_) {
84 if (host->settings().use_display_lists) { 84 if (host->settings().use_display_lists) {
85 recording_source_.reset(new DisplayListRecordingSource); 85 recording_source_.reset(new DisplayListRecordingSource);
86 } else { 86 } else {
87 recording_source_.reset( 87 recording_source_.reset(
88 new PicturePile(host->settings().minimum_contents_scale, 88 new PicturePile(host->settings().minimum_contents_scale,
89 host->settings().default_tile_grid_size)); 89 host->settings().default_tile_grid_size));
90 } 90 }
91 } 91 }
92 recording_source_->DidMoveToNewCompositor();
92 recording_source_->SetSlowdownRasterScaleFactor( 93 recording_source_->SetSlowdownRasterScaleFactor(
93 host->debug_state().slow_down_raster_scale_factor); 94 host->debug_state().slow_down_raster_scale_factor);
94 } 95 }
95 } 96 }
96 97
97 void PictureLayer::SetNeedsDisplayRect(const gfx::Rect& layer_rect) { 98 void PictureLayer::SetNeedsDisplayRect(const gfx::Rect& layer_rect) {
98 if (!layer_rect.IsEmpty()) { 99 if (!layer_rect.IsEmpty()) {
99 // Clamp invalidation to the layer bounds. 100 // Clamp invalidation to the layer bounds.
100 pending_invalidation_.Union( 101 pending_invalidation_.Union(
101 gfx::IntersectRects(layer_rect, gfx::Rect(bounds()))); 102 gfx::IntersectRects(layer_rect, gfx::Rect(bounds())));
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 203
203 bool PictureLayer::HasDrawableContent() const { 204 bool PictureLayer::HasDrawableContent() const {
204 return client_ && Layer::HasDrawableContent(); 205 return client_ && Layer::HasDrawableContent();
205 } 206 }
206 207
207 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { 208 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
208 benchmark->RunOnLayer(this); 209 benchmark->RunOnLayer(this);
209 } 210 }
210 211
211 } // namespace cc 212 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698