diff options
author | reed <reed@google.com> | 2015-10-12 11:30:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-12 11:30:02 -0700 |
commit | 88d064d0e481949184305c7b1d6b282dddffac39 (patch) | |
tree | d0e264a2d1289cdfc46a5026ca45a7a57095c250 /src/gpu/GrLayerHoister.cpp | |
parent | f028003cf4429813ae1ac6624efa51ecbb062ed3 (diff) |
add applyFilter() to SkImage
Result:
- clients can get a filtered version of an image without having to setup a temp drawing environment
- for some cases, the process is more efficient even than (deprecated) drawSprite, since there is no need to draw/copy the result
Impl:
- made Proxy virtual so we don't need to have an existing device to use it
This, in conjunction with LocalMatrixImageFilter, should allow us to simplify and optimize ApplyImageFilter() in cc/output/gl_renderer.cc
BUG=skia:
Review URL: https://codereview.chromium.org/1390913005
Diffstat (limited to 'src/gpu/GrLayerHoister.cpp')
-rw-r--r-- | src/gpu/GrLayerHoister.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/GrLayerHoister.cpp b/src/gpu/GrLayerHoister.cpp index baeb3784ed..5bddc036df 100644 --- a/src/gpu/GrLayerHoister.cpp +++ b/src/gpu/GrLayerHoister.cpp @@ -313,7 +313,7 @@ void GrLayerHoister::FilterLayer(GrContext* context, SkAutoTUnref<SkImageFilter::Cache> cache(SkImageFilter::Cache::Create(kDefaultCacheSize)); SkImageFilter::Context filterContext(totMat, clipBounds, cache); - SkImageFilter::Proxy proxy(device); + SkImageFilter::DeviceProxy proxy(device); const SkBitmap src = wrap_texture(layer->texture()); if (!layer->filter()->filterImage(&proxy, src, filterContext, &filteredBitmap, &offset)) { |