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

Unified Diff: src/gpu/batches/GrAAFillRectBatch.cpp

Issue 1424313010: Separate out natively-texture image/bmp draws from cached-as-texture image/bmp draws (Closed) Base URL: https://skia.googlesource.com/skia.git@const
Patch Set: update Created 5 years, 1 month 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/gpu/batches/GrAAFillRectBatch.h ('k') | src/gpu/effects/GrBicubicEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAAFillRectBatch.cpp
diff --git a/src/gpu/batches/GrAAFillRectBatch.cpp b/src/gpu/batches/GrAAFillRectBatch.cpp
index 5b22422e1098b6ff2ebb31c8780c93f4d3f9822d..964610788d7ca5a7a33ed6d427bfef3458674741 100644
--- a/src/gpu/batches/GrAAFillRectBatch.cpp
+++ b/src/gpu/batches/GrAAFillRectBatch.cpp
@@ -332,6 +332,28 @@ GrDrawBatch* Create(GrColor color,
return batch;
}
+GrDrawBatch* Create(GrColor color,
+ const SkMatrix& viewMatrix,
+ const SkMatrix& localMatrix,
+ const SkRect& rect) {
+ SkRect devRect;
+ viewMatrix.mapRect(&devRect, rect);
+ return Create(color, viewMatrix, localMatrix, rect, devRect);
+}
+
+GrDrawBatch* CreateWithLocalRect(GrColor color,
+ const SkMatrix& viewMatrix,
+ const SkRect& rect,
+ const SkRect& localRect) {
+ SkRect devRect;
+ viewMatrix.mapRect(&devRect, rect);
+ SkMatrix localMatrix;
+ if (!localMatrix.setRectToRect(rect, localRect, SkMatrix::kFill_ScaleToFit)) {
+ return nullptr;
+ }
+ return Create(color, viewMatrix, localMatrix, rect, devRect);
+}
+
void Append(GrBatch* origBatch,
GrColor color,
const SkMatrix& viewMatrix,
« no previous file with comments | « src/gpu/batches/GrAAFillRectBatch.h ('k') | src/gpu/effects/GrBicubicEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698