diff options
author | Stan Iliev <stani@google.com> | 2017-06-08 15:16:53 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-08 20:23:05 +0000 |
commit | ba81af27cff1c1e23051d2957612b2f3e0fbf885 (patch) | |
tree | 26d9a5a1dd6766ea3055975409ab3cd44d2a4448 /src/gpu/GrBitmapTextureMaker.cpp | |
parent | 0cb31675f3aa9cc878aa3a9e1a7ad09efdb350fc (diff) |
Add support for SkImageGenerator creating external textures
Copy the SkImageGenerator texture if tiling is needed and
original texture target is GR_GL_TEXTURE_EXTERNAL.
Bug: skia:
Change-Id: I98f5acc3883e2060b1a35f80633b02b08a706107
Reviewed-on: https://skia-review.googlesource.com/18268
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
Diffstat (limited to 'src/gpu/GrBitmapTextureMaker.cpp')
-rw-r--r-- | src/gpu/GrBitmapTextureMaker.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gpu/GrBitmapTextureMaker.cpp b/src/gpu/GrBitmapTextureMaker.cpp index bde827658a..762b72c811 100644 --- a/src/gpu/GrBitmapTextureMaker.cpp +++ b/src/gpu/GrBitmapTextureMaker.cpp @@ -28,7 +28,12 @@ GrBitmapTextureMaker::GrBitmapTextureMaker(GrContext* context, const SkBitmap& b } sk_sp<GrTextureProxy> GrBitmapTextureMaker::refOriginalTextureProxy(bool willBeMipped, - SkColorSpace* dstColorSpace) { + SkColorSpace* dstColorSpace, + AllowedTexGenType onlyIfFast) { + if (AllowedTexGenType::kCheap == onlyIfFast) { + return nullptr; + } + sk_sp<GrTextureProxy> proxy; if (fOriginalKey.isValid()) { |