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

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

Issue 304203005: Remove const LayerImpl* from QuadSink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onlyQuadSink
Patch Set: 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
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 DrawableTile* tile = TileAt(i, j); 202 DrawableTile* tile = TileAt(i, j);
203 gfx::Rect tile_rect = tiler_->tile_bounds(i, j); 203 gfx::Rect tile_rect = tiler_->tile_bounds(i, j);
204 gfx::Rect display_rect = tile_rect; 204 gfx::Rect display_rect = tile_rect;
205 tile_rect.Intersect(content_rect); 205 tile_rect.Intersect(content_rect);
206 206
207 // Skip empty tiles. 207 // Skip empty tiles.
208 if (tile_rect.IsEmpty()) 208 if (tile_rect.IsEmpty())
209 continue; 209 continue;
210 210
211 gfx::Rect visible_tile_rect = 211 gfx::Rect visible_tile_rect =
212 quad_sink->UnoccludedContentRect(tile_rect, draw_transform()); 212 quad_sink->UnoccludedContentRect(this, tile_rect, draw_transform());
213 if (visible_tile_rect.IsEmpty()) 213 if (visible_tile_rect.IsEmpty())
214 continue; 214 continue;
215 215
216 if (!tile || !tile->resource_id()) { 216 if (!tile || !tile->resource_id()) {
217 SkColor checker_color; 217 SkColor checker_color;
218 if (ShowDebugBorders()) { 218 if (ShowDebugBorders()) {
219 checker_color = 219 checker_color =
220 tile ? DebugColors::InvalidatedTileCheckerboardColor() 220 tile ? DebugColors::InvalidatedTileCheckerboardColor()
221 : DebugColors::EvictedTileCheckerboardColor(); 221 : DebugColors::EvictedTileCheckerboardColor();
222 } else { 222 } else {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 306
307 void TiledLayerImpl::ReleaseResources() { 307 void TiledLayerImpl::ReleaseResources() {
308 tiler_->reset(); 308 tiler_->reset();
309 } 309 }
310 310
311 const char* TiledLayerImpl::LayerTypeAsString() const { 311 const char* TiledLayerImpl::LayerTypeAsString() const {
312 return "cc::TiledLayerImpl"; 312 return "cc::TiledLayerImpl";
313 } 313 }
314 314
315 } // namespace cc 315 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698