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

Unified Diff: include/gpu/SkGpuDevice.h

Issue 40403002: Compute clipped src rect once in tiled bitmap draws (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years, 2 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 | « no previous file | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/SkGpuDevice.h
diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h
index 81e03244f31b06a0349ca3ed8f532efe000433b1..0862514e78e140e31a147932ab8b2cd9e7ffa45a 100644
--- a/include/gpu/SkGpuDevice.h
+++ b/include/gpu/SkGpuDevice.h
@@ -184,13 +184,16 @@ private:
/**
* Helper functions called by drawBitmapCommon. By the time these are called the SkDraw's
- * matrix has already been set on GrContext
+ * matrix, clip, and the device's render target has already been set on GrContext.
*/
+
+ // The tileSize and clippedSrcRect will be valid only if true is returned.
bool shouldTileBitmap(const SkBitmap& bitmap,
const GrTextureParams& sampler,
const SkRect* srcRectPtr,
int maxTileSize,
- int* tileSize) const;
+ int* tileSize,
+ SkIRect* clippedSrcRect) const;
void internalDrawBitmap(const SkBitmap&,
const SkRect&,
const GrTextureParams& params,
@@ -198,6 +201,7 @@ private:
SkCanvas::DrawBitmapRectFlags flags);
void drawTiledBitmap(const SkBitmap& bitmap,
const SkRect& srcRect,
+ const SkIRect& clippedSrcRect,
const GrTextureParams& params,
const SkPaint& paint,
SkCanvas::DrawBitmapRectFlags flags,
« no previous file with comments | « no previous file | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698