| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkImage_Gpu_DEFINED | 8 #ifndef SkImage_Gpu_DEFINED |
| 9 #define SkImage_Gpu_DEFINED | 9 #define SkImage_Gpu_DEFINED |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 GrTexture* peekTexture() const override { return fTexture; } | 48 GrTexture* peekTexture() const override { return fTexture; } |
| 49 bool isOpaque() const override; | 49 bool isOpaque() const override; |
| 50 bool onReadPixels(const SkImageInfo&, void* dstPixels, size_t dstRowBytes, | 50 bool onReadPixels(const SkImageInfo&, void* dstPixels, size_t dstRowBytes, |
| 51 int srcX, int srcY, CachingHint) const override; | 51 int srcX, int srcY, CachingHint) const override; |
| 52 | 52 |
| 53 sk_sp<SkSurface> onNewSurface(const SkImageInfo& info) const override { | 53 sk_sp<SkSurface> onNewSurface(const SkImageInfo& info) const override { |
| 54 return SkSurface::MakeRenderTarget(fTexture->getContext(), SkBudgeted::k
No, info); | 54 return SkSurface::MakeRenderTarget(fTexture->getContext(), SkBudgeted::k
No, info); |
| 55 } | 55 } |
| 56 | 56 |
| 57 bool asBitmapForImageFilters(SkBitmap* bitmap) const override; | |
| 58 | |
| 59 private: | 57 private: |
| 60 SkAutoTUnref<GrTexture> fTexture; | 58 SkAutoTUnref<GrTexture> fTexture; |
| 61 const SkAlphaType fAlphaType; | 59 const SkAlphaType fAlphaType; |
| 62 const SkBudgeted fBudgeted; | 60 const SkBudgeted fBudgeted; |
| 63 sk_sp<SkColorSpace> fColorSpace; | 61 sk_sp<SkColorSpace> fColorSpace; |
| 64 mutable SkAtomic<bool> fAddedRasterVersionToCache; | 62 mutable SkAtomic<bool> fAddedRasterVersionToCache; |
| 65 | 63 |
| 66 | 64 |
| 67 typedef SkImage_Base INHERITED; | 65 typedef SkImage_Base INHERITED; |
| 68 }; | 66 }; |
| 69 | 67 |
| 70 #endif | 68 #endif |
| OLD | NEW |