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

Unified Diff: src/gpu/SkGr.cpp

Issue 1405383002: Remove check for whole image in the cache in SkGpuDevice::shouldTileImage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove unused function Created 5 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 | « src/gpu/SkGpuDevice.cpp ('k') | src/gpu/SkGrPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGr.cpp
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 50cd5fa52a55e7f49cd34a1b915ad2f7eb10d4dd..1813433b300c2e3b003ec8172eeb66ecd095acd4 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -173,14 +173,6 @@ void GrMakeKeyFromImageID(GrUniqueKey* key, uint32_t imageID, const SkIRect& sub
}
}
-static void make_image_keys(uint32_t imageID, const SkIRect& subset, const SkGrStretch& stretch,
- GrUniqueKey* key, GrUniqueKey* stretchedKey) {
- make_unstretched_key(key, imageID, subset);
- if (SkGrStretch::kNone_Type != stretch.fType) {
- GrMakeStretchedKey(*key, stretch, stretchedKey);
- }
-}
-
GrSurfaceDesc GrImageInfoToSurfaceDesc(const SkImageInfo& info) {
GrSurfaceDesc desc;
desc.fFlags = kNone_GrSurfaceFlags;
@@ -476,31 +468,6 @@ static SkBitmap stretch_on_cpu(const SkBitmap& bmp, const SkGrStretch& stretch)
return stretched;
}
-bool GrIsImageInCache(const GrContext* ctx, uint32_t imageID, const SkIRect& subset,
- GrTexture* nativeTexture, const GrTextureParams& params) {
- SkGrStretch stretch;
- get_stretch(*ctx->caps(), subset.width(), subset.height(), params, &stretch);
-
- // Handle the case where the bitmap/image is explicitly texture backed.
- if (nativeTexture) {
- if (SkGrStretch::kNone_Type == stretch.fType) {
- return true;
- }
- const GrUniqueKey& key = nativeTexture->getUniqueKey();
- if (!key.isValid()) {
- return false;
- }
- GrUniqueKey stretchedKey;
- GrMakeStretchedKey(key, stretch, &stretchedKey);
- return ctx->textureProvider()->existsTextureWithUniqueKey(stretchedKey);
- }
-
- GrUniqueKey key, stretchedKey;
- make_image_keys(imageID, subset, stretch, &key, &stretchedKey);
- return ctx->textureProvider()->existsTextureWithUniqueKey(
- (SkGrStretch::kNone_Type == stretch.fType) ? key : stretchedKey);
-}
-
class Bitmap_GrTextureMaker : public GrTextureMaker {
public:
Bitmap_GrTextureMaker(const SkBitmap& bitmap)
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/gpu/SkGrPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698