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

Unified Diff: src/gpu/SkGpuDevice.h

Issue 2249163004: Fix tile bitmap code in SkGpuDevice to compute correct local coords (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: fix int->scalar warning on windows Created 4 years, 4 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: src/gpu/SkGpuDevice.h
diff --git a/src/gpu/SkGpuDevice.h b/src/gpu/SkGpuDevice.h
index efb674472ba37b483757edfcae2d6cbdec4bdf1e..2185f162d789b19bd28fce0fd3dae6c1edbe5b6a 100644
--- a/src/gpu/SkGpuDevice.h
+++ b/src/gpu/SkGpuDevice.h
@@ -179,32 +179,17 @@ private:
// The tileSize and clippedSrcRect will be valid only if true is returned.
bool shouldTileImageID(uint32_t imageID, const SkIRect& imageRect,
const SkMatrix& viewMatrix,
+ const SkMatrix& srcToDstRectMatrix,
const GrTextureParams& params,
const SkRect* srcRectPtr,
int maxTileSize,
int* tileSize,
SkIRect* clippedSubset) const;
- bool shouldTileBitmap(const SkBitmap& bitmap,
- const SkMatrix& viewMatrix,
- const GrTextureParams& sampler,
- const SkRect* srcRectPtr,
- int maxTileSize,
- int* tileSize,
- SkIRect* clippedSrcRect) const;
// Just returns the predicate, not the out-tileSize or out-clippedSubset, as they are not
// needed at the moment.
bool shouldTileImage(const SkImage* image, const SkRect* srcRectPtr,
SkCanvas::SrcRectConstraint constraint, SkFilterQuality quality,
- const SkMatrix& viewMatrix) const;
-
- void internalDrawBitmap(const SkBitmap&,
- const SkMatrix& viewMatrix,
- const SkRect&,
- const GrTextureParams& params,
- const SkPaint& paint,
- SkCanvas::SrcRectConstraint,
- bool bicubic,
- bool needsTextureDomain);
+ const SkMatrix& viewMatrix, const SkMatrix& srcToDstRect) const;
sk_sp<SkSpecialImage> filterTexture(const SkDraw&,
SkSpecialImage*,
@@ -212,8 +197,10 @@ private:
SkIPoint* offset,
const SkImageFilter* filter);
+ // Splits bitmap into tiles of tileSize and draws them using separate textures for each tile.
void drawTiledBitmap(const SkBitmap& bitmap,
const SkMatrix& viewMatrix,
+ const SkMatrix& srcToDstMatrix,
const SkRect& srcRect,
const SkIRect& clippedSrcRect,
const GrTextureParams& params,
@@ -222,6 +209,17 @@ private:
int tileSize,
bool bicubic);
+ // Used by drawTiledBitmap to draw each tile.
+ void drawBitmapTile(const SkBitmap&,
+ const SkMatrix& viewMatrix,
+ const SkRect& dstRect,
+ const SkRect& srcRect,
+ const GrTextureParams& params,
+ const SkPaint& paint,
+ SkCanvas::SrcRectConstraint,
+ bool bicubic,
+ bool needsTextureDomain);
+
void drawTextureProducer(GrTextureProducer*,
const SkRect* srcRect,
const SkRect* dstRect,
« 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