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

Unified Diff: src/image/SkImage_Raster.cpp

Issue 1404433002: Remove image usage type enum. Use GrTextureParams instead. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix no gpu build 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/image/SkImage_Gpu.cpp ('k') | src/utils/SkImageGeneratorUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Raster.cpp
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp
index b6c62e842349ab5d53c621fc9668338ec43ba801..b78818db6b71fd4aaadf8eafac5920817824b066 100644
--- a/src/image/SkImage_Raster.cpp
+++ b/src/image/SkImage_Raster.cpp
@@ -70,7 +70,7 @@ public:
const void* onPeekPixels(SkImageInfo*, size_t* /*rowBytes*/) const override;
SkData* onRefEncoded() const override;
bool getROPixels(SkBitmap*) const override;
- GrTexture* asTextureRef(GrContext*, SkImageUsageType) const override;
+ GrTexture* asTextureRef(GrContext*, const GrTextureParams&) const override;
SkImage* onNewSubset(const SkIRect&) const override;
// exposed for SkSurface_Raster via SkNewImageFromPixelRef
@@ -167,7 +167,7 @@ bool SkImage_Raster::getROPixels(SkBitmap* dst) const {
return true;
}
-GrTexture* SkImage_Raster::asTextureRef(GrContext* ctx, SkImageUsageType usage) const {
+GrTexture* SkImage_Raster::asTextureRef(GrContext* ctx, const GrTextureParams& params) const {
#if SK_SUPPORT_GPU
if (!ctx) {
return nullptr;
@@ -182,12 +182,12 @@ GrTexture* SkImage_Raster::asTextureRef(GrContext* ctx, SkImageUsageType usage)
GrUniqueKey key;
GrMakeKeyFromImageID(&key, fBitmap.getGenerationID(),
SkIRect::MakeWH(fBitmap.width(), fBitmap.height()),
- *ctx->caps(), usage);
+ *ctx->caps(), params);
if (GrTexture* tex = ctx->textureProvider()->findAndRefTextureByUniqueKey(key)) {
return tex;
}
- return GrRefCachedBitmapTexture(ctx, fBitmap, usage);
+ return GrRefCachedBitmapTexture(ctx, fBitmap, params);
#endif
return nullptr;
« no previous file with comments | « src/image/SkImage_Gpu.cpp ('k') | src/utils/SkImageGeneratorUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698