aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrContext.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-20 17:32:27 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-20 17:32:27 +0000
commitae81d5c4aa1716756b2cfb4c44f27f4dce2716ef (patch)
tree019b5c1b55da3c7da77943f8b93f5cc28da090c2 /include/gpu/GrContext.h
parent723dd790fbef396cd5c6619d0a3656c641b0c3f5 (diff)
Adds local coords to GrEffect system.
Effects can ask the builder for local coords which may or may not be distinct from positions. GrEffectStage tracks changes to relationship between pos and local coords. GrGLEffectMatrix and GrSingleTextureEffect can use either pos or textures as intput coords GrSimpleTextureEffect now allows for an explicit texture coords attribute. Review URL: https://codereview.chromium.org/12531015 git-svn-id: http://skia.googlecode.com/svn/trunk@8264 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu/GrContext.h')
-rw-r--r--include/gpu/GrContext.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 79edd0b11b..2d5766056b 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -390,25 +390,23 @@ public:
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 @@ public:
this->restore();
if (NULL != paint) {
- if (!paint->sourceCoordChangeByInverse(context->getMatrix())) {
+ if (!paint->localCoordChangeInverse(context->getMatrix())) {
return false;
}
}
@@ -737,7 +735,7 @@ public:
*/
void preConcat(const SkMatrix& preConcat, GrPaint* paint = NULL) {
if (NULL != paint) {
- paint->sourceCoordChange(preConcat);
+ paint->localCoordChange(preConcat);
}
fContext->concatMatrix(preConcat);
}