Chromium Code Reviews| Index: cc/resources/picture.cc |
| diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc |
| index e206e8db5070b380a1bce6faa8d54a2037c39e98..c3a6be2d9f3c076ef9e9a19b32d8a9385e28b0c5 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::approximateOpCount() const { |
| + DCHECK(picture_); |
| + return picture_->approximateOpCount(); |
| +} |
| + |
| void Picture::CloneForDrawing(int num_threads) { |
| TRACE_EVENT1("cc", "Picture::CloneForDrawing", "num_threads", num_threads); |
| @@ -417,6 +422,24 @@ int Picture::Raster( |
| return bounds.width() * bounds.height(); |
| } |
| +int Picture::AnalysisRaster(SkCanvas* canvas, SkDrawPictureCallback* callback) { |
| + 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, callback); |
| + } |
| + SkIRect bounds; |
| + canvas->getClipDeviceBounds(&bounds); |
| + canvas->restore(); |
| + return bounds.width() * bounds.height(); |
|
vmpstr
2014/08/19 23:55:37
If you're not using this, then let's just make thi
hendrikw
2014/08/20 00:34:05
ok, I also removed the callback, also not using th
|
| +} |
| + |
| void Picture::Replay(SkCanvas* canvas) { |
| if (!playback_) |
| DCHECK(raster_thread_checker_.CalledOnValidThread()); |