aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/bleed.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-11-02 11:36:52 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-02 11:36:52 -0800
commit8c07b7ab53b93b39015a409a4e0a9174feb6a4c3 (patch)
tree241791dd1f6d64be7a16ead5d47e1f02e265a8bc /gm/bleed.cpp
parent8b99ef434736791eefb31ecaa590a649dff83aed (diff)
Allow max tile size to be overridden separately from max texture size.
This allows internal Gr texture creation code to succeed for extraneous textures while running the bleed GM. This means we can turn on the shader variants. Review URL: https://codereview.chromium.org/1418473004
Diffstat (limited to 'gm/bleed.cpp')
-rw-r--r--gm/bleed.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/gm/bleed.cpp b/gm/bleed.cpp
index 5daa54e9ff..26dca803ef 100644
--- a/gm/bleed.cpp
+++ b/gm/bleed.cpp
@@ -215,7 +215,7 @@ protected:
// To exercise the GPU's tiling path we need a texture
// too big for the GPU to handle in one go
- gBleedRec[fBT].fBmpMaker(&fBitmapBig, 2*kMaxTextureSize, 2*kMaxTextureSize);
+ gBleedRec[fBT].fBmpMaker(&fBitmapBig, 2*kMaxTileSize, 2*kMaxTileSize);
fImageBig.reset(SkImage::NewFromBitmap(fBitmapBig));
fShader.reset(gBleedRec[fBT].fShaderMaker());
@@ -378,7 +378,7 @@ protected:
#if SK_SUPPORT_GPU
void modifyGrContextOptions(GrContextOptions* options) override {
- options->fMaxTextureSizeOverride = kMaxTextureSize;
+ options->fMaxTileSizeOverride = kMaxTileSize;
}
#endif
@@ -400,7 +400,7 @@ private:
static const int kRow3Y = 4*kBlockSpacing + 3*kBlockSize;
static const int kSmallTextureSize = 6;
- static const int kMaxTextureSize = 32;
+ static const int kMaxTileSize = 32;
SkBitmap fBitmapSmall;
SkBitmap fBitmapBig;
@@ -418,7 +418,5 @@ DEF_GM( return new BleedGM(kUseBitmap_BleedTest); )
DEF_GM( return new BleedGM(kUseImage_BleedTest); )
DEF_GM( return new BleedGM(kUseAlphaBitmap_BleedTest); )
DEF_GM( return new BleedGM(kUseAlphaImage_BleedTest); )
-#if 0 // Currently crashes GPU backend
DEF_GM(return new BleedGM(kUseAlphaBitmapShader_BleedTest); )
DEF_GM(return new BleedGM(kUseAlphaImageShader_BleedTest); )
-#endif