| Index: cc/resources/picture_pile_impl.cc
|
| diff --git a/cc/resources/picture_pile_impl.cc b/cc/resources/picture_pile_impl.cc
|
| index 44a52b8afd71d20a0fd3158e6a5ba367f4a1af7f..324e6915455a7704aaa5535b248c9eadcf6cf854 100644
|
| --- a/cc/resources/picture_pile_impl.cc
|
| +++ b/cc/resources/picture_pile_impl.cc
|
| @@ -80,13 +80,6 @@ void PicturePileImpl::RasterDirect(
|
| rendering_stats_instrumentation);
|
| }
|
|
|
| -void PicturePileImpl::RasterForAnalysis(
|
| - skia::AnalysisCanvas* canvas,
|
| - gfx::Rect canvas_rect,
|
| - float contents_scale) {
|
| - RasterCommon(canvas, canvas, canvas_rect, contents_scale, NULL);
|
| -}
|
| -
|
| void PicturePileImpl::RasterToBitmap(
|
| SkCanvas* canvas,
|
| gfx::Rect canvas_rect,
|
| @@ -297,30 +290,6 @@ skia::RefPtr<SkPicture> PicturePileImpl::GetFlattenedPicture() {
|
| return picture;
|
| }
|
|
|
| -void PicturePileImpl::AnalyzeInRect(gfx::Rect content_rect,
|
| - float contents_scale,
|
| - PicturePileImpl::Analysis* analysis) {
|
| - DCHECK(analysis);
|
| - TRACE_EVENT0("cc", "PicturePileImpl::AnalyzeInRect");
|
| -
|
| - gfx::Rect layer_rect = gfx::ScaleToEnclosingRect(
|
| - content_rect, 1.0f / contents_scale);
|
| -
|
| - layer_rect.Intersect(gfx::Rect(tiling_.total_size()));
|
| -
|
| - SkBitmap empty_bitmap;
|
| - empty_bitmap.setConfig(SkBitmap::kNo_Config,
|
| - layer_rect.width(),
|
| - layer_rect.height());
|
| - skia::AnalysisDevice device(empty_bitmap);
|
| - skia::AnalysisCanvas canvas(&device);
|
| -
|
| - RasterForAnalysis(&canvas, layer_rect, 1.0f);
|
| -
|
| - analysis->is_solid_color = canvas.GetColorIfSolid(&analysis->solid_color);
|
| - analysis->has_text = canvas.HasText();
|
| -}
|
| -
|
| PicturePileImpl::Analysis::Analysis()
|
| : is_solid_color(false),
|
| has_text(false) {
|
| @@ -376,6 +345,19 @@ void PicturePileImpl::PixelRefIterator::AdvanceToTilePictureWithPixelRefs() {
|
| }
|
| }
|
|
|
| +gfx::Rect PicturePileImpl::AnalysisRectForRaster(gfx::Rect content_rect,
|
| + float contents_scale) const {
|
| + // Bound the analysis rect to just the pile content.
|
| + gfx::Rect content_bounds(
|
| + gfx::ScaleToEnclosingRect(gfx::Rect(size()), contents_scale));
|
| + gfx::Rect analysis_rect(content_rect);
|
| + analysis_rect.Intersect(content_bounds);
|
| + // Move to canvas space.
|
| + analysis_rect.set_origin(gfx::Point());
|
| +
|
| + return analysis_rect;
|
| +}
|
| +
|
| void PicturePileImpl::DidBeginTracing() {
|
| gfx::Rect layer_rect(tiling_.total_size());
|
| std::set<void*> processed_pictures;
|
|
|