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

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

Issue 189433003: Remove --background-color-instead-of-checkerboard flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: backgroundcolorinsteadofcheckerboard: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/trees/layer_tree_settings.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_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 // Keep track of the tilings that were used so that tilings that are 207 // Keep track of the tilings that were used so that tilings that are
208 // unused can be considered for removal. 208 // unused can be considered for removal.
209 std::vector<PictureLayerTiling*> seen_tilings; 209 std::vector<PictureLayerTiling*> seen_tilings;
210 210
211 for (PictureLayerTilingSet::CoverageIterator iter( 211 for (PictureLayerTilingSet::CoverageIterator iter(
212 tilings_.get(), contents_scale_x(), rect, ideal_contents_scale_); 212 tilings_.get(), contents_scale_x(), rect, ideal_contents_scale_);
213 iter; 213 iter;
214 ++iter) { 214 ++iter) {
215 gfx::Rect geometry_rect = iter.geometry_rect(); 215 gfx::Rect geometry_rect = iter.geometry_rect();
216 if (!*iter || !iter->IsReadyToDraw()) { 216 if (!*iter || !iter->IsReadyToDraw()) {
217 if (DrawCheckerboardForMissingTiles()) { 217 if (draw_checkerboard_for_missing_tiles()) {
218 // TODO(enne): Figure out how to show debug "invalidated checker" color 218 // TODO(enne): Figure out how to show debug "invalidated checker" color
219 scoped_ptr<CheckerboardDrawQuad> quad = CheckerboardDrawQuad::Create(); 219 scoped_ptr<CheckerboardDrawQuad> quad = CheckerboardDrawQuad::Create();
220 SkColor color = DebugColors::DefaultCheckerboardColor(); 220 SkColor color = DebugColors::DefaultCheckerboardColor();
221 quad->SetNew(shared_quad_state, geometry_rect, color); 221 quad->SetNew(shared_quad_state, geometry_rect, color);
222 if (quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data)) 222 if (quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data))
223 append_quads_data->num_missing_tiles++; 223 append_quads_data->num_missing_tiles++;
224 } else { 224 } else {
225 SkColor color = SafeOpaqueBackgroundColor(); 225 SkColor color = SafeOpaqueBackgroundColor();
226 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); 226 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create();
227 quad->SetNew(shared_quad_state, geometry_rect, color, false); 227 quad->SetNew(shared_quad_state, geometry_rect, color, false);
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { 1222 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const {
1223 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); 1223 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded();
1224 return tilings_->GPUMemoryUsageInBytes(); 1224 return tilings_->GPUMemoryUsageInBytes();
1225 } 1225 }
1226 1226
1227 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { 1227 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
1228 benchmark->RunOnLayer(this); 1228 benchmark->RunOnLayer(this);
1229 } 1229 }
1230 1230
1231 } // namespace cc 1231 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698