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

Unified Diff: include/gpu/GrDrawContext.h

Issue 2255963002: Batched implementation of drawLattice() for GPU (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Speculative reland 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 | « bench/DrawLatticeBench.cpp ('k') | include/private/SkTArray.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrDrawContext.h
diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h
index 6e98404a44bd6751c2ef03281e96ccbf1ee0e498..77a3443f9e514dc8abaf8955a9cae8d36b23cb5d 100644
--- a/include/gpu/GrDrawContext.h
+++ b/include/gpu/GrDrawContext.h
@@ -35,6 +35,7 @@ struct GrUserStencilSettings;
class SkDrawFilter;
struct SkIPoint;
struct SkIRect;
+class SkLatticeIter;
class SkMatrix;
class SkPaint;
class SkPath;
@@ -231,26 +232,15 @@ public:
const GrStyle& style);
/**
- * Draw the image stretched differentially to fit into dst.
- * center is a rect within the image, and logically divides the image
- * into 9 sections (3x3). For example, if the middle pixel of a [5x5]
- * image is the "center", then the center-rect should be [2, 2, 3, 3].
- *
- * If the dst is >= the image size, then...
- * - The 4 corners are not stretched at all.
- * - The sides are stretched in only one axis.
- * - The center is stretched in both axes.
- * Else, for each axis where dst < image,
- * - The corners shrink proportionally
- * - The sides (along the shrink axis) and center are not drawn
+ * Draw the image as a set of rects, specified by |iter|.
*/
- void drawImageNine(const GrClip&,
- const GrPaint& paint,
- const SkMatrix& viewMatrix,
- int imageWidth,
- int imageHeight,
- const SkIRect& center,
- const SkRect& dst);
+ void drawImageLattice(const GrClip&,
+ const GrPaint& paint,
+ const SkMatrix& viewMatrix,
+ int imageWidth,
+ int imageHeight,
+ std::unique_ptr<SkLatticeIter> iter,
+ const SkRect& dst);
/**
* After this returns any pending surface IO will be issued to the backend 3D API and
« no previous file with comments | « bench/DrawLatticeBench.cpp ('k') | include/private/SkTArray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698