Commit 74eefda9 authored by reed's avatar reed Committed by Commit bot

API migration: picture.draw -> picture.playback

patch from issue 802973002 at patchset 1 (http://crrev.com/802973002#ps1)

BUG=
TBR=benm@chromium.org
add tbr for android_webview owner

Review URL: https://codereview.chromium.org/795823003

Cr-Commit-Position: refs/heads/master@{#308383}
parent 480f002f
...@@ -39,7 +39,7 @@ void AwPicture::Draw(JNIEnv* env, jobject obj, jobject canvas) { ...@@ -39,7 +39,7 @@ void AwPicture::Draw(JNIEnv* env, jobject obj, jobject canvas) {
LOG(ERROR) << "Couldn't draw picture"; LOG(ERROR) << "Couldn't draw picture";
return; return;
} }
picture_->draw(canvas_holder->GetCanvas()); picture_->playback(canvas_holder->GetCanvas());
} }
bool RegisterAwPicture(JNIEnv* env) { bool RegisterAwPicture(JNIEnv* env) {
......
...@@ -24,7 +24,7 @@ void DrawingDisplayItem::Raster(SkCanvas* canvas, ...@@ -24,7 +24,7 @@ void DrawingDisplayItem::Raster(SkCanvas* canvas,
canvas->save(); canvas->save();
canvas->translate(location_.x(), location_.y()); canvas->translate(location_.x(), location_.y());
if (callback) if (callback)
picture_->draw(canvas, callback); picture_->playback(canvas, callback);
else else
canvas->drawPicture(picture_.get()); canvas->drawPicture(picture_.get());
canvas->restore(); canvas->restore();
......
...@@ -340,7 +340,7 @@ int Picture::Raster(SkCanvas* canvas, ...@@ -340,7 +340,7 @@ int Picture::Raster(SkCanvas* canvas,
if (callback) { if (callback) {
// If we have a callback, we need to call |draw()|, |drawPicture()| doesn't // If we have a callback, we need to call |draw()|, |drawPicture()| doesn't
// take a callback. This is used by |AnalysisCanvas| to early out. // take a callback. This is used by |AnalysisCanvas| to early out.
picture_->draw(canvas, callback); picture_->playback(canvas, callback);
} else { } else {
// Prefer to call |drawPicture()| on the canvas since it could place the // Prefer to call |drawPicture()| on the canvas since it could place the
// entire picture on the canvas instead of parsing the skia operations. // entire picture on the canvas instead of parsing the skia operations.
...@@ -358,7 +358,7 @@ int Picture::Raster(SkCanvas* canvas, ...@@ -358,7 +358,7 @@ int Picture::Raster(SkCanvas* canvas,
void Picture::Replay(SkCanvas* canvas) { void Picture::Replay(SkCanvas* canvas) {
TRACE_EVENT_BEGIN0("cc", "Picture::Replay"); TRACE_EVENT_BEGIN0("cc", "Picture::Replay");
DCHECK(picture_); DCHECK(picture_);
picture_->draw(canvas); picture_->playback(canvas);
SkIRect bounds; SkIRect bounds;
canvas->getClipDeviceBounds(&bounds); canvas->getClipDeviceBounds(&bounds);
TRACE_EVENT_END1("cc", "Picture::Replay", TRACE_EVENT_END1("cc", "Picture::Replay",
......
...@@ -265,10 +265,6 @@ SK_API void SkDebugf_FileLine(const char* file, int line, bool fatal, ...@@ -265,10 +265,6 @@ SK_API void SkDebugf_FileLine(const char* file, int line, bool fatal,
# define SK_IGNORE_GPU_DITHER # define SK_IGNORE_GPU_DITHER
#endif #endif
#ifndef SK_LEGACY_PICTURE_DRAW_API
# define SK_LEGACY_PICTURE_DRAW_API
#endif
// If this goes well, we can have Skia respect DYNAMIC_ANNOTATIONS_ENABLED directly. // If this goes well, we can have Skia respect DYNAMIC_ANNOTATIONS_ENABLED directly.
#if DYNAMIC_ANNOTATIONS_ENABLED #if DYNAMIC_ANNOTATIONS_ENABLED
# define SK_DYNAMIC_ANNOTATIONS_ENABLED 1 # define SK_DYNAMIC_ANNOTATIONS_ENABLED 1
......
...@@ -310,7 +310,7 @@ TEST(AnalysisCanvasTest, EarlyOutNotSolid) { ...@@ -310,7 +310,7 @@ TEST(AnalysisCanvasTest, EarlyOutNotSolid) {
// Draw the picture into the analysis canvas, using the canvas as a callback // Draw the picture into the analysis canvas, using the canvas as a callback
// as well. // as well.
skia::AnalysisCanvas canvas(256, 256); skia::AnalysisCanvas canvas(256, 256);
picture->draw(&canvas, &canvas); picture->playback(&canvas, &canvas);
// Ensure that canvas is not solid. // Ensure that canvas is not solid.
SkColor output_color; SkColor output_color;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment