Chromium Code Reviews| Index: cc/resources/picture.cc |
| diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc |
| index e206e8db5070b380a1bce6faa8d54a2037c39e98..41bef6602c6bcf45d8e1f158e5a9994509c73889 100644 |
| --- a/cc/resources/picture.cc |
| +++ b/cc/resources/picture.cc |
| @@ -217,6 +217,11 @@ bool Picture::IsSuitableForGpuRasterization() const { |
| return picture_->suitableForGpuRasterization(NULL); |
| } |
| +int Picture::GetApproximateOpCount() const { |
| + DCHECK(picture_); |
| + return picture_->approximateOpCount(); |
| +} |
| + |
| void Picture::CloneForDrawing(int num_threads) { |
| TRACE_EVENT1("cc", "Picture::CloneForDrawing", "num_threads", num_threads); |
| @@ -417,6 +422,21 @@ int Picture::Raster( |
| return bounds.width() * bounds.height(); |
| } |
| +void Picture::RasterForAnalysis(SkCanvas* canvas) { |
| + TRACE_EVENT0("cc", "Picture::AnalysisRaster"); |
| + DCHECK(picture_); |
| + |
| + canvas->save(); |
| + |
| + canvas->translate(layer_rect_.x(), layer_rect_.y()); |
| + if (playback_) { |
| + playback_->draw(canvas); |
| + } else { |
| + picture_->draw(canvas, NULL); |
|
vmpstr
2014/08/20 16:12:00
Make a comment here please explaining why we don't
hendrikw
2014/08/20 20:46:55
Acknowledged.
|
| + } |
| + canvas->restore(); |
| +} |
| + |
| void Picture::Replay(SkCanvas* canvas) { |
| if (!playback_) |
| DCHECK(raster_thread_checker_.CalledOnValidThread()); |