Chromium Code Reviews| Index: cc/picture.h |
| diff --git a/cc/picture.h b/cc/picture.h |
| index 118bcb39a5c4fc32a241335e8fde1290cb6190ff..97d5dfc6c5514f54613395c39c66a7ecfe72f7d9 100644 |
| --- a/cc/picture.h |
| +++ b/cc/picture.h |
| @@ -16,6 +16,10 @@ |
| #include "third_party/skia/include/core/SkPixelRef.h" |
| #include "ui/gfx/rect.h" |
| +namespace skia { |
| + class AnalysisCanvas; |
| +} // namespace skia |
| + |
| namespace cc { |
| class ContentLayerClient; |
| @@ -42,10 +46,17 @@ class CC_EXPORT Picture |
| // Apply this contents scale and raster the content rect into the canvas. |
| void Raster(SkCanvas* canvas, gfx::Rect content_rect, float contents_scale); |
| - // Estimate the cost of rasterizing. To predict the cost of a particular |
| - // call to Raster(), pass this the bounds of the canvas that will |
| - // be rastered into. |
| - bool IsCheapInRect(const gfx::Rect& layer_rect) const; |
| + struct Analysis { |
| + bool is_solid_color_; |
|
reveman
2013/02/28 21:23:10
no "_" suffix for public struct members.
|
| + SkColor solid_color_; |
| + bool is_transparent_; |
| + bool is_cheap_to_raster_; |
| + }; |
| + |
| + void AnalyzeInRect(skia::AnalysisCanvas* canvas, |
| + const gfx::Rect& content_rect, |
| + float contents_scale, |
| + Analysis* analysis); |
| void GatherPixelRefs( |
| const gfx::Rect& layer_rect, |