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

Unified Diff: include/gpu/GrContext.h

Issue 812063002: Change to create device coord coordset (Closed) Base URL: https://skia.googlesource.com/skia.git@vm-off-context
Patch Set: ignoring bleed Created 6 years 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 | « expectations/gm/ignored-tests.txt ('k') | include/gpu/GrCoordTransform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrContext.h
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 4df1dac381437673d787764d364bfcb05053ed91..ead8ded762e6c846f4b85d627444e3ed5c336562 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -436,20 +436,30 @@ public:
const GrStrokeInfo* strokeInfo = NULL);
/**
- * Maps a rect of local coordinates onto the a rect of destination
- * coordinates. The localRect is stretched over the dstRect. The dstRect is
- * transformed by the context's matrix. An additional optional matrix can be
- * provided to transform the local rect.
+ * Maps a rectangle of shader coordinates to a rectangle and draws that rectangle
*
* @param paint describes how to color pixels.
- * @param viewMatrix transformation matrix
- * @param dstRect the destination rect to draw.
- * @param localRect rect of local coordinates to be mapped onto dstRect
- */
- void drawRectToRect(const GrPaint& paint,
- const SkMatrix& viewMatrix,
- const SkRect& dstRect,
- const SkRect& localRect);
+ * @param viewMatrix transformation matrix which applies to rectToDraw
+ * @param rectToDraw the rectangle to draw
+ * @param localRect the rectangle of shader coordinates applied to rectToDraw
+ * @param localMatrix an optional matrix to transform the shader coordinates before applying
+ * to rectToDraw
+ */
+ void drawNonAARectToRect(const GrPaint& paint,
+ const SkMatrix& viewMatrix,
+ const SkRect& rectToDraw,
+ const SkRect& localRect,
+ const SkMatrix* localMatrix = NULL);
+
+ /**
+ * Draws a non-AA rect with paint and a localMatrix
+ */
+ void drawNonAARectWithLocalMatrix(const GrPaint& paint,
+ const SkMatrix& viewMatrix,
+ const SkRect& rect,
+ const SkMatrix& localMatrix) {
+ this->drawNonAARectToRect(paint, viewMatrix, rect, rect, &localMatrix);
+ }
/**
* Draw a roundrect using a paint.
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | include/gpu/GrCoordTransform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698