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

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

Issue 341023003: cc: Pass scaled bounds to debug border quads for drawing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: avoid extra overload function Created 6 years, 6 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/texture_layer_impl.cc ('k') | cc/layers/ui_resource_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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/tiled_layer_impl.h" 5 #include "cc/layers/tiled_layer_impl.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/debug/debug_colors.h" 10 #include "cc/debug/debug_colors.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 void TiledLayerImpl::AppendQuads(QuadSink* quad_sink, 154 void TiledLayerImpl::AppendQuads(QuadSink* quad_sink,
155 AppendQuadsData* append_quads_data) { 155 AppendQuadsData* append_quads_data) {
156 DCHECK(tiler_); 156 DCHECK(tiler_);
157 DCHECK(!tiler_->has_empty_bounds()); 157 DCHECK(!tiler_->has_empty_bounds());
158 DCHECK(!visible_content_rect().IsEmpty()); 158 DCHECK(!visible_content_rect().IsEmpty());
159 159
160 gfx::Rect content_rect = visible_content_rect(); 160 gfx::Rect content_rect = visible_content_rect();
161 SharedQuadState* shared_quad_state = quad_sink->CreateSharedQuadState(); 161 SharedQuadState* shared_quad_state = quad_sink->CreateSharedQuadState();
162 PopulateSharedQuadState(shared_quad_state); 162 PopulateSharedQuadState(shared_quad_state);
163 163
164 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data); 164 AppendDebugBorderQuad(
165 quad_sink, content_bounds(), shared_quad_state, append_quads_data);
165 166
166 int left, top, right, bottom; 167 int left, top, right, bottom;
167 tiler_->ContentRectToTileIndices(content_rect, &left, &top, &right, &bottom); 168 tiler_->ContentRectToTileIndices(content_rect, &left, &top, &right, &bottom);
168 169
169 if (ShowDebugBorders()) { 170 if (ShowDebugBorders()) {
170 for (int j = top; j <= bottom; ++j) { 171 for (int j = top; j <= bottom; ++j) {
171 for (int i = left; i <= right; ++i) { 172 for (int i = left; i <= right; ++i) {
172 DrawableTile* tile = TileAt(i, j); 173 DrawableTile* tile = TileAt(i, j);
173 gfx::Rect tile_rect = tiler_->tile_bounds(i, j); 174 gfx::Rect tile_rect = tiler_->tile_bounds(i, j);
174 gfx::Rect visible_tile_rect = tile_rect; 175 gfx::Rect visible_tile_rect = tile_rect;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 307
307 void TiledLayerImpl::ReleaseResources() { 308 void TiledLayerImpl::ReleaseResources() {
308 tiler_->reset(); 309 tiler_->reset();
309 } 310 }
310 311
311 const char* TiledLayerImpl::LayerTypeAsString() const { 312 const char* TiledLayerImpl::LayerTypeAsString() const {
312 return "cc::TiledLayerImpl"; 313 return "cc::TiledLayerImpl";
313 } 314 }
314 315
315 } // namespace cc 316 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/texture_layer_impl.cc ('k') | cc/layers/ui_resource_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698