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

Unified Diff: src/core/SkCanvas.cpp

Issue 1986383002: SkCanvas::adjustToTopLayer() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Mike's comments Created 4 years, 7 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 | « include/core/SkCanvas.h ('k') | tests/CanvasTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index c7a9dc72f299e75347298965966dc7554cb80c84..7102c3385514a61d28ce3946a39a74ec4c920035 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -2036,6 +2036,18 @@ void SkCanvas::legacy_drawBitmapRect(const SkBitmap& bitmap, const SkRect* src,
}
}
+void SkCanvas::temporary_internal_describeTopLayer(SkMatrix* matrix, SkIRect* clip_bounds) {
+ SkIRect layer_bounds = this->getTopLayerBounds();
+ if (matrix) {
+ *matrix = this->getTotalMatrix();
+ matrix->preTranslate(-layer_bounds.left(), -layer_bounds.top());
+ }
+ if (clip_bounds) {
+ this->getClipDeviceBounds(clip_bounds);
+ clip_bounds->offset(-layer_bounds.left(), -layer_bounds.top());
+ }
+}
+
//////////////////////////////////////////////////////////////////////////////
// These are the virtual drawing methods
//////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « include/core/SkCanvas.h ('k') | tests/CanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698