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

Unified Diff: tests/PictureTest.cpp

Issue 1992283002: Add drawBitmapLattice() API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add implementation for SkRecorder and SkPictureRecord Created 4 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
« include/core/SkCanvas.h ('K') | « src/core/SkRecorder.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PictureTest.cpp
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index eb0c6a8f0e6fe408acca8da3c40f222603aea662..9bd64eb4dfc19b8a1abb98139b55b1d75f88af53 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -1198,12 +1198,17 @@ static void draw_bitmaps(const SkBitmap bitmap, SkCanvas* canvas) {
const SkPaint paint;
const SkRect rect = { 5.0f, 5.0f, 8.0f, 8.0f };
const SkIRect irect = { 2, 2, 3, 3 };
+ int divs[] = { 2, 3 };
+ SkCanvas::NinePatchDivs npDivs;
+ npDivs.fXCount = npDivs.fYCount = 2;
+ npDivs.fXDivs = npDivs.fYDivs = divs;
// Don't care what these record, as long as they're legal.
canvas->drawBitmap(bitmap, 0.0f, 0.0f, &paint);
canvas->drawBitmapRect(bitmap, rect, rect, &paint, SkCanvas::kStrict_SrcRectConstraint);
canvas->drawBitmapNine(bitmap, irect, rect, &paint);
canvas->drawBitmap(bitmap, 1, 1); // drawSprite
+ canvas->drawBitmapNine(bitmap, npDivs, rect, &paint);
}
static void test_draw_bitmaps(SkCanvas* canvas) {
« include/core/SkCanvas.h ('K') | « src/core/SkRecorder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698