diff options
author | 2016-04-08 12:10:42 -0700 | |
---|---|---|
committer | 2016-04-08 12:10:42 -0700 | |
commit | 646125114b42b24e5ada3c9f8fac53a85f9ad2a0 (patch) | |
tree | c5d599427e99f89313131114b977f33232c3df48 /src/gpu/GrLayerHoister.cpp | |
parent | 89c2a0b8c12879f94f746a5d9fe723a48434647f (diff) |
Upgrade SkSpecialImage to have getTextureRef & getROPixels entry points
This more closely aligns the SkSpecialImage API with the SkImage API. In doing so it allows the image filters to handle SkImages that can sneak through while remaining encoded (e.g., if an input filter just returns a wrapped version of the source SkImage)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1861643003
Review URL: https://codereview.chromium.org/1861643003
Diffstat (limited to 'src/gpu/GrLayerHoister.cpp')
-rw-r--r-- | src/gpu/GrLayerHoister.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gpu/GrLayerHoister.cpp b/src/gpu/GrLayerHoister.cpp index dd8a48547a..9a2be0be60 100644 --- a/src/gpu/GrLayerHoister.cpp +++ b/src/gpu/GrLayerHoister.cpp @@ -318,8 +318,9 @@ void GrLayerHoister::FilterLayer(GrContext* context, return; } - SkASSERT(result->peekTexture()); - layer->setTexture(result->peekTexture(), result->subset(), false); + SkASSERT(result->isTextureBacked()); + SkAutoTUnref<GrTexture> texture(result->asTextureRef(context)); + layer->setTexture(texture, result->subset(), false); layer->setOffset(offset); } |