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

Unified Diff: src/core/SkImageCacherator.cpp

Issue 1459433002: Convert SkGpuDevice::drawTextureAdjuster to SkGpuDevice::drawTextureProducer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove redudant virtual decl Created 5 years, 1 month 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/GrImageIDTextureAdjuster.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageCacherator.cpp
diff --git a/src/core/SkImageCacherator.cpp b/src/core/SkImageCacherator.cpp
index 75fef5a8afe3bbd4db4078281d18c38840a84788..fb06a56917d21729aa27cccfa6306df0f67dc4e8 100644
--- a/src/core/SkImageCacherator.cpp
+++ b/src/core/SkImageCacherator.cpp
@@ -275,11 +275,10 @@ GrTexture* SkImageCacherator::lockTexture(GrContext* ctx, const GrUniqueKey& key
class Cacherator_GrTextureMaker : public GrTextureMaker {
public:
- Cacherator_GrTextureMaker(SkImageCacherator* cacher, const SkImage* client)
- : INHERITED(cacher->info().width(), cacher->info().height())
+ Cacherator_GrTextureMaker(GrContext* context, SkImageCacherator* cacher, const SkImage* client)
+ : INHERITED(context, cacher->info().width(), cacher->info().height())
, fCacher(cacher)
- , fClient(client)
- {
+ , fClient(client) {
if (client) {
GrMakeKeyFromImageID(&fOriginalKey, client->uniqueID(),
SkIRect::MakeWH(this->width(), this->height()));
@@ -289,10 +288,10 @@ public:
protected:
// TODO: consider overriding this, for the case where the underlying generator might be
// able to efficiently produce a "stretched" texture natively (e.g. picture-backed)
- // GrTexture* generateTextureForParams(GrContext*, const SkGrStretch&) override;
+ // GrTexture* generateTextureForParams(const CopyParams&) override;
- GrTexture* refOriginalTexture(GrContext* ctx) override {
- return fCacher->lockTexture(ctx, fOriginalKey, fClient);
+ GrTexture* refOriginalTexture() override {
+ return fCacher->lockTexture(this->context(), fOriginalKey, fClient);
}
void makeCopyKey(const CopyParams& stretch, GrUniqueKey* paramsCopyKey) override {
@@ -321,7 +320,7 @@ GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParam
return nullptr;
}
- return Cacherator_GrTextureMaker(this, client).refTextureForParams(ctx, params);
+ return Cacherator_GrTextureMaker(ctx, this, client).refTextureForParams(params);
}
#else
« no previous file with comments | « no previous file | src/gpu/GrImageIDTextureAdjuster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698