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

Unified Diff: include/gpu/GrContext.h

Issue 12531015: Adds local coords to GrEffect system. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | « include/gpu/GrBackendEffectFactory.h ('k') | include/gpu/GrDrawEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrContext.h
===================================================================
--- include/gpu/GrContext.h (revision 8241)
+++ include/gpu/GrContext.h (working copy)
@@ -390,25 +390,23 @@
const SkMatrix* matrix = NULL);
/**
- * Maps a rect of paint coordinates onto the a rect of destination
- * coordinates. Each rect can optionally be transformed. The srcRect
+ * Maps a rect of local coordinates onto the a rect of destination
+ * coordinates. Each rect can optionally be transformed. The localRect
* is stretched over the dstRect. The dstRect is transformed by the
- * context's matrix and the srcRect is transformed by the paint's matrix.
- * Additional optional matrices can be provided by parameters.
+ * context's matrix. Additional optional matrices for both rects can be
+ * provided by parameters.
*
- * @param paint describes how to color pixels.
- * @param dstRect the destination rect to draw.
- * @param srcRect rect of paint coordinates to be mapped onto dstRect
- * @param dstMatrix Optional matrix to transform dstRect. Applied before
- * context's matrix.
- * @param srcMatrix Optional matrix to transform srcRect Applied before
- * paint's matrix.
+ * @param paint describes how to color pixels.
+ * @param dstRect the destination rect to draw.
+ * @param localRect rect of local coordinates to be mapped onto dstRect
+ * @param dstMatrix Optional matrix to transform dstRect. Applied before context's matrix.
+ * @param localMatrix Optional matrix to transform localRect.
*/
void drawRectToRect(const GrPaint& paint,
const GrRect& dstRect,
- const GrRect& srcRect,
+ const GrRect& localRect,
const SkMatrix* dstMatrix = NULL,
- const SkMatrix* srcMatrix = NULL);
+ const SkMatrix* localMatrix = NULL);
/**
* Draws a path.
@@ -699,7 +697,7 @@
this->restore();
if (NULL != paint) {
- if (!paint->sourceCoordChangeByInverse(context->getMatrix())) {
+ if (!paint->localCoordChangeInverse(context->getMatrix())) {
return false;
}
}
@@ -737,7 +735,7 @@
*/
void preConcat(const SkMatrix& preConcat, GrPaint* paint = NULL) {
if (NULL != paint) {
- paint->sourceCoordChange(preConcat);
+ paint->localCoordChange(preConcat);
}
fContext->concatMatrix(preConcat);
}
« no previous file with comments | « include/gpu/GrBackendEffectFactory.h ('k') | include/gpu/GrDrawEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698