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

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

Issue 664583002: Remove obsolete SkRecord preview code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update r&r micro, and format Created 6 years, 2 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/picture_layer.h ('k') | cc/layers/picture_layer_unittest.cc » ('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/trees/layer_tree_impl.h" 10 #include "cc/trees/layer_tree_impl.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 DCHECK(client_); 122 DCHECK(client_);
123 updated |= 123 updated |=
124 pile_->UpdateAndExpandInvalidation(client_, 124 pile_->UpdateAndExpandInvalidation(client_,
125 &pile_invalidation_, 125 &pile_invalidation_,
126 SafeOpaqueBackgroundColor(), 126 SafeOpaqueBackgroundColor(),
127 contents_opaque(), 127 contents_opaque(),
128 client_->FillsBoundsCompletely(), 128 client_->FillsBoundsCompletely(),
129 layer_size, 129 layer_size,
130 visible_layer_rect, 130 visible_layer_rect,
131 update_source_frame_number_, 131 update_source_frame_number_,
132 RecordingMode(), 132 Picture::RECORD_NORMALLY,
133 rendering_stats_instrumentation()); 133 rendering_stats_instrumentation());
134 last_updated_visible_content_rect_ = visible_content_rect(); 134 last_updated_visible_content_rect_ = visible_content_rect();
135 135
136 if (updated) { 136 if (updated) {
137 SetNeedsPushProperties(); 137 SetNeedsPushProperties();
138 } else { 138 } else {
139 // If this invalidation did not affect the pile, then it can be cleared as 139 // If this invalidation did not affect the pile, then it can be cleared as
140 // an optimization. 140 // an optimization.
141 pile_invalidation_.Clear(); 141 pile_invalidation_.Clear();
142 } 142 }
143 143
144 return updated; 144 return updated;
145 } 145 }
146 146
147 void PictureLayer::SetIsMask(bool is_mask) { 147 void PictureLayer::SetIsMask(bool is_mask) {
148 pile_->set_is_mask(is_mask); 148 pile_->set_is_mask(is_mask);
149 } 149 }
150 150
151 Picture::RecordingMode PictureLayer::RecordingMode() const {
152 switch (layer_tree_host()->settings().recording_mode) {
153 case LayerTreeSettings::RecordNormally:
154 return Picture::RECORD_NORMALLY;
155 case LayerTreeSettings::RecordWithSkRecord:
156 return Picture::RECORD_WITH_SKRECORD;
157 }
158 NOTREACHED();
159 return Picture::RECORD_NORMALLY;
160 }
161
162 bool PictureLayer::SupportsLCDText() const { 151 bool PictureLayer::SupportsLCDText() const {
163 return true; 152 return true;
164 } 153 }
165 154
166 void PictureLayer::UpdateCanUseLCDText() { 155 void PictureLayer::UpdateCanUseLCDText() {
167 if (can_use_lcd_text_last_frame_ == can_use_lcd_text()) 156 if (can_use_lcd_text_last_frame_ == can_use_lcd_text())
168 return; 157 return;
169 158
170 can_use_lcd_text_last_frame_ = can_use_lcd_text(); 159 can_use_lcd_text_last_frame_ = can_use_lcd_text();
171 if (client_) 160 if (client_)
(...skipping 30 matching lines...) Expand all
202 191
203 bool PictureLayer::HasDrawableContent() const { 192 bool PictureLayer::HasDrawableContent() const {
204 return client_ && Layer::HasDrawableContent(); 193 return client_ && Layer::HasDrawableContent();
205 } 194 }
206 195
207 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { 196 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
208 benchmark->RunOnLayer(this); 197 benchmark->RunOnLayer(this);
209 } 198 }
210 199
211 } // namespace cc 200 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer.h ('k') | cc/layers/picture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698