aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-11 19:39:09 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-11 19:39:09 +0000
commit3ab43d5c5b4d77f46dd0266618f92e5fefce2021 (patch)
tree2950bae414b8cc85a61d350f945ccc55affd52d6 /include/gpu
parent5dc26b97366934ba0f896cea02a3fec027d5d5c1 (diff)
Minimize use of SkDraw's matrix in SkGpuDevice.
R=robertphillips@google.com Review URL: https://codereview.appspot.com/6604068 git-svn-id: http://skia.googlecode.com/svn/trunk@5906 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/SkGpuDevice.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h
index b941894221..558468ca3e 100644
--- a/include/gpu/SkGpuDevice.h
+++ b/include/gpu/SkGpuDevice.h
@@ -145,26 +145,33 @@ private:
bool bindDeviceAsTexture(GrPaint* paint);
void prepareDraw(const SkDraw&); // sets the render target, clip, and matrix on GrContext.
+
+ /**
+ * Implementation for both drawBitmap and drawBitmapRect.
+ */
+ void drawBitmapCommon(const SkDraw&,
+ const SkBitmap& bitmap,
+ const SkRect* srcRectPtr,
+ const SkMatrix&,
+ const SkPaint&);
+
+ /**
+ * Helper functions called by drawBitmapCommon. By the time these are called the SkDraw's
+ * matrix has already been set on GrContext
+ */
bool shouldTileBitmap(const SkBitmap& bitmap,
const GrTextureParams& sampler,
const SkRect* srcRectPtr) const;
- void internalDrawBitmap(const SkDraw&,
- const SkBitmap&,
+ void internalDrawBitmap(const SkBitmap&,
const SkRect&,
const SkMatrix&,
const GrTextureParams& params,
GrPaint* grPaint);
- void drawTiledBitmap(const SkDraw& draw,
- const SkBitmap& bitmap,
+ void drawTiledBitmap(const SkBitmap& bitmap,
const SkRect& srcRect,
const SkMatrix& m,
const GrTextureParams& params,
GrPaint* grPaint);
- void drawBitmapCommon(const SkDraw&,
- const SkBitmap& bitmap,
- const SkRect* srcRectPtr,
- const SkMatrix&,
- const SkPaint&);
/**
* Returns non-initialized instance.