OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkGpuDevice.h" | 8 #include "SkGpuDevice.h" |
9 | 9 |
10 #include "effects/GrBicubicEffect.h" | 10 #include "effects/GrBicubicEffect.h" |
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1190 tileFilterPad = 1; | 1190 tileFilterPad = 1; |
1191 } | 1191 } |
1192 params.setFilterMode(textureFilterMode); | 1192 params.setFilterMode(textureFilterMode); |
1193 | 1193 |
1194 int maxTileSize = fContext->getMaxTextureSize() - 2 * tileFilterPad; | 1194 int maxTileSize = fContext->getMaxTextureSize() - 2 * tileFilterPad; |
1195 int tileSize; | 1195 int tileSize; |
1196 | 1196 |
1197 SkIRect clippedSrcRect; | 1197 SkIRect clippedSrcRect; |
1198 if (this->shouldTileBitmap(bitmap, params, srcRectPtr, maxTileSize, &tileSiz e, | 1198 if (this->shouldTileBitmap(bitmap, params, srcRectPtr, maxTileSize, &tileSiz e, |
1199 &clippedSrcRect)) { | 1199 &clippedSrcRect)) { |
1200 SkDebugf("Tile!\n"); | |
joshualitt
2014/12/08 19:38:32
delete
bsalomon
2014/12/08 19:49:18
ha, woops
| |
1200 this->drawTiledBitmap(bitmap, srcRect, clippedSrcRect, params, paint, fl ags, tileSize, | 1201 this->drawTiledBitmap(bitmap, srcRect, clippedSrcRect, params, paint, fl ags, tileSize, |
1201 doBicubic); | 1202 doBicubic); |
1202 } else { | 1203 } else { |
1203 // take the simple case | 1204 // take the simple case |
1204 bool needsTextureDomain = needs_texture_domain(bitmap, | 1205 bool needsTextureDomain = needs_texture_domain(bitmap, |
1205 srcRect, | 1206 srcRect, |
1206 params, | 1207 params, |
1207 fContext->getMatrix(), | 1208 fContext->getMatrix(), |
1208 doBicubic); | 1209 doBicubic); |
1209 this->internalDrawBitmap(bitmap, | 1210 this->internalDrawBitmap(bitmap, |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1880 #endif | 1881 #endif |
1881 } | 1882 } |
1882 | 1883 |
1883 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 1884 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
1884 // We always return a transient cache, so it is freed after each | 1885 // We always return a transient cache, so it is freed after each |
1885 // filter traversal. | 1886 // filter traversal. |
1886 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); | 1887 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); |
1887 } | 1888 } |
1888 | 1889 |
1889 #endif | 1890 #endif |
OLD | NEW |