Chromium Code Reviews| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 239 | 239 |
| 240 return picture; | 240 return picture; |
| 241 } | 241 } |
| 242 | 242 |
| 243 void PicturePileImpl::AnalyzeInRect(gfx::Rect content_rect, | 243 void PicturePileImpl::AnalyzeInRect(gfx::Rect content_rect, |
| 244 float contents_scale, | 244 float contents_scale, |
| 245 PicturePileImpl::Analysis* analysis) { | 245 PicturePileImpl::Analysis* analysis) { |
| 246 DCHECK(analysis); | 246 DCHECK(analysis); |
| 247 TRACE_EVENT0("cc", "PicturePileImpl::AnalyzeInRect"); | 247 TRACE_EVENT0("cc", "PicturePileImpl::AnalyzeInRect"); |
| 248 | 248 |
| 249 content_rect.Intersect(gfx::Rect(gfx::ToCeiledSize( | 249 content_rect.Intersect(gfx::Rect(gfx::ToFlooredSize( |
|
reveman
2013/05/13 15:48:45
Can we really round down here? I think we can avoi
| |
| 250 gfx::ScaleSize(tiling_.total_size(), contents_scale)))); | 250 gfx::ScaleSize(tiling_.total_size(), contents_scale)))); |
| 251 | 251 |
| 252 SkBitmap empty_bitmap; | 252 SkBitmap empty_bitmap; |
| 253 empty_bitmap.setConfig(SkBitmap::kNo_Config, | 253 empty_bitmap.setConfig(SkBitmap::kNo_Config, |
| 254 content_rect.width(), | 254 content_rect.width(), |
| 255 content_rect.height()); | 255 content_rect.height()); |
| 256 skia::AnalysisDevice device(empty_bitmap); | 256 skia::AnalysisDevice device(empty_bitmap); |
| 257 skia::AnalysisCanvas canvas(&device); | 257 skia::AnalysisCanvas canvas(&device); |
| 258 | 258 |
| 259 Raster(&canvas, content_rect, contents_scale, NULL); | 259 Raster(&canvas, content_rect, contents_scale, NULL); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 325 layer_rect_, | 325 layer_rect_, |
| 326 *picture_list_iterator_); | 326 *picture_list_iterator_); |
| 327 if (pixel_ref_iterator_) | 327 if (pixel_ref_iterator_) |
| 328 return; | 328 return; |
| 329 } | 329 } |
| 330 ++tile_iterator_; | 330 ++tile_iterator_; |
| 331 } while (AdvanceToTileWithPictures()); | 331 } while (AdvanceToTileWithPictures()); |
| 332 } | 332 } |
| 333 | 333 |
| 334 } // namespace cc | 334 } // namespace cc |
| OLD | NEW |