Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: src/utils/android/SkHwuiRenderer.cpp

Issue 1235823003: Cleanup skia test harness due to changes to DisplayListCanvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/android/SkHwuiRenderer.cpp
diff --git a/src/utils/android/SkHwuiRenderer.cpp b/src/utils/android/SkHwuiRenderer.cpp
index 70b7e5b89342d7b0f51df7f3bfe55f01572e14db..4493be6baa1f0f6cb880aa26075ffc385af126a4 100644
--- a/src/utils/android/SkHwuiRenderer.cpp
+++ b/src/utils/android/SkHwuiRenderer.cpp
@@ -57,19 +57,17 @@ void SkHwuiRenderer::initialize(SkISize size) {
this->proxy->setup(size.width(), size.height(), 800.0f,
255 * 0.075f, 255 * 0.15f);
this->proxy->setLightCenter(lightVector);
- this->canvas.reset(new android::uirenderer::DisplayListCanvas());
- this->canvas->setViewport(size.width(), size.height());
+ this->canvas.reset(new android::uirenderer::DisplayListCanvas(size.width(), size.height()));
}
SkCanvas* SkHwuiRenderer::prepareToDraw() {
- this->canvas->prepare();
+ this->canvas->reset(size.width(), size.height());
this->canvas->clipRect(0, 0, this->size.width(), this->size.height(),
SkRegion::Op::kReplace_Op);
return this->canvas->asSkCanvas();
}
void SkHwuiRenderer::finishDrawing() {
- this->canvas->finish();
this->rootNode->setStagingDisplayList(this->canvas->finishRecording());
this->proxy->syncAndDrawFrame();
// Surprisingly, calling this->proxy->fence() here appears to make no difference to
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698