aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-13 14:22:17 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-13 14:22:17 +0000
commit82aa7482cbf55ce6d42c692550cadee5e23146e4 (patch)
treecf208c1d3e82a2288236d1591b1b85e3870371a9 /include/gpu
parent3ada0efdc8de8316df8113ec54ffd1a3f33ecd21 (diff)
Add a zoom filter to Skia. This will be used on ChromeOS to implement the screen magnifier.
Committed on behalf of zork@chromium.org Review URL: http://codereview.appspot.com/6354065/ git-svn-id: http://skia.googlecode.com/svn/trunk@5056 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrContext.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 6252cc29f8..52dafd0597 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -605,6 +605,23 @@ public:
float sigmaX, float sigmaY);
/**
+ * Zooms a subset of the texture to a larger size with a nice edge.
+ * The inner rectangle is a simple scaling of the texture by a factor of
+ * |zoom|. The outer |inset| pixels transition from the background texture
+ * to the zoomed coordinate system at a rate of
+ * (distance_to_edge / inset) ^2, producing a rounded lens effect.
+ * @param srcTexture The source texture to be zoomed.
+ * @param dstRect The destination rectangle.
+ * @param srcRect The source rectangle. Must be smaller than
+ * dstRect
+ * @param inset Number of pixels to blend along the edges.
+ * @return the zoomed texture, which is dstTexture.
+ */
+ GrTexture* zoom(GrTexture* srcTexture,
+ const SkRect& dstRect, const SkRect& srcRect, float inset);
+
+
+ /**
* This enum is used with the function below, applyMorphology.
*/
enum MorphologyType {