OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |