| OLD | NEW |
| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <limits> | 6 #include <limits> |
| 7 | 7 |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "cc/base/region.h" | 9 #include "cc/base/region.h" |
| 10 #include "cc/debug/debug_colors.h" | 10 #include "cc/debug/debug_colors.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 } | 75 } |
| 76 | 76 |
| 77 void PicturePileImpl::Raster( | 77 void PicturePileImpl::Raster( |
| 78 SkCanvas* canvas, | 78 SkCanvas* canvas, |
| 79 gfx::Rect canvas_rect, | 79 gfx::Rect canvas_rect, |
| 80 float contents_scale, | 80 float contents_scale, |
| 81 RasterStats* raster_stats) { | 81 RasterStats* raster_stats) { |
| 82 | 82 |
| 83 DCHECK(contents_scale >= min_contents_scale_); | 83 DCHECK(contents_scale >= min_contents_scale_); |
| 84 | 84 |
| 85 #ifndef NDEBUG | |
| 86 // Any non-painted areas will be left in this color. | |
| 87 canvas->clear(DebugColors::NonPaintedFillColor()); | |
| 88 #endif // NDEBUG | |
| 89 | |
| 90 canvas->save(); | 85 canvas->save(); |
| 91 canvas->translate(-canvas_rect.x(), -canvas_rect.y()); | 86 canvas->translate(-canvas_rect.x(), -canvas_rect.y()); |
| 92 | 87 |
| 93 gfx::SizeF total_content_size = gfx::ScaleSize(tiling_.total_size(), | 88 gfx::SizeF total_content_size = gfx::ScaleSize(tiling_.total_size(), |
| 94 contents_scale); | 89 contents_scale); |
| 95 gfx::Rect total_content_rect(gfx::ToCeiledSize(total_content_size)); | 90 gfx::Rect total_content_rect(gfx::ToCeiledSize(total_content_size)); |
| 96 gfx::Rect content_rect = total_content_rect; | 91 gfx::Rect content_rect = total_content_rect; |
| 97 content_rect.Intersect(canvas_rect); | 92 content_rect.Intersect(canvas_rect); |
| 98 | 93 |
| 99 // Clear one texel inside the right/bottom edge of the content rect, | 94 // Clear one texel inside the right/bottom edge of the content rect, |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 layer_rect_, | 324 layer_rect_, |
| 330 *picture_list_iterator_); | 325 *picture_list_iterator_); |
| 331 if (pixel_ref_iterator_) | 326 if (pixel_ref_iterator_) |
| 332 return; | 327 return; |
| 333 } | 328 } |
| 334 ++tile_iterator_; | 329 ++tile_iterator_; |
| 335 } while (AdvanceToTileWithPictures()); | 330 } while (AdvanceToTileWithPictures()); |
| 336 } | 331 } |
| 337 | 332 |
| 338 } // namespace cc | 333 } // namespace cc |
| OLD | NEW |