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

Unified Diff: tests/PictureTest.cpp

Issue 1992283002: Add drawBitmapLattice() API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rewrite picture impls Created 4 years, 4 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 | « src/pdf/SkPDFCanvas.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 b02491661eaca6dc2dd5720a29e642c2de4c4799..8f5ebd3f3b2d283556ea34a2e905cd67cbbe3fc9 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -994,12 +994,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::Lattice lattice;
+ lattice.fXCount = lattice.fYCount = 2;
+ lattice.fXDivs = lattice.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->drawBitmapLattice(bitmap, lattice, rect, &paint);
}
static void test_draw_bitmaps(SkCanvas* canvas) {
« no previous file with comments | « src/pdf/SkPDFCanvas.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698