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

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

Issue 973223002: cc: Scale checkerboard quads by the device scale factor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: checkerboardscale: fixwindowsbuild 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 | « no previous file | cc/layers/tiled_layer_impl.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_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <set> 10 #include <set>
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 case TileDrawInfo::OOM_MODE: 324 case TileDrawInfo::OOM_MODE:
325 break; // Checkerboard. 325 break; // Checkerboard.
326 } 326 }
327 } 327 }
328 328
329 if (!has_draw_quad) { 329 if (!has_draw_quad) {
330 if (draw_checkerboard_for_missing_tiles()) { 330 if (draw_checkerboard_for_missing_tiles()) {
331 CheckerboardDrawQuad* quad = 331 CheckerboardDrawQuad* quad =
332 render_pass->CreateAndAppendDrawQuad<CheckerboardDrawQuad>(); 332 render_pass->CreateAndAppendDrawQuad<CheckerboardDrawQuad>();
333 SkColor color = DebugColors::DefaultCheckerboardColor(); 333 SkColor color = DebugColors::DefaultCheckerboardColor();
334 quad->SetNew( 334 quad->SetNew(shared_quad_state, geometry_rect, visible_geometry_rect,
335 shared_quad_state, geometry_rect, visible_geometry_rect, color); 335 color, draw_properties().device_scale_factor);
336 } else { 336 } else {
337 SkColor color = SafeOpaqueBackgroundColor(); 337 SkColor color = SafeOpaqueBackgroundColor();
338 SolidColorDrawQuad* quad = 338 SolidColorDrawQuad* quad =
339 render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); 339 render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
340 quad->SetNew(shared_quad_state, 340 quad->SetNew(shared_quad_state,
341 geometry_rect, 341 geometry_rect,
342 visible_geometry_rect, 342 visible_geometry_rect,
343 color, 343 color,
344 false); 344 false);
345 } 345 }
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 1219
1220 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1220 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1221 return !layer_tree_impl()->IsRecycleTree(); 1221 return !layer_tree_impl()->IsRecycleTree();
1222 } 1222 }
1223 1223
1224 bool PictureLayerImpl::HasValidTilePriorities() const { 1224 bool PictureLayerImpl::HasValidTilePriorities() const {
1225 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); 1225 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
1226 } 1226 }
1227 1227
1228 } // namespace cc 1228 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/tiled_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698