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

Side by Side Diff: src/image/SkImage_Gpu.h

Issue 1491293002: detect when we can filter bitmaps/images directly, w/o a tmp layer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: move include to the top Created 5 years 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 unified diff | Download patch
« no previous file with comments | « src/image/SkImage_Base.h ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 bool isOpaque() const override; 43 bool isOpaque() const override;
44 bool onReadPixels(const SkImageInfo&, void* dstPixels, size_t dstRowBytes, 44 bool onReadPixels(const SkImageInfo&, void* dstPixels, size_t dstRowBytes,
45 int srcX, int srcY, CachingHint) const override; 45 int srcX, int srcY, CachingHint) const override;
46 SkImage* onApplyFilter(SkImageFilter*, SkIPoint* offset, 46 SkImage* onApplyFilter(SkImageFilter*, SkIPoint* offset,
47 bool forceResultToOriginalSize) const override; 47 bool forceResultToOriginalSize) const override;
48 48
49 SkSurface* onNewSurface(const SkImageInfo& info) const override { 49 SkSurface* onNewSurface(const SkImageInfo& info) const override {
50 return SkSurface::NewRenderTarget(fTexture->getContext(), SkSurface::kNo _Budgeted, info); 50 return SkSurface::NewRenderTarget(fTexture->getContext(), SkSurface::kNo _Budgeted, info);
51 } 51 }
52 52
53 bool asBitmapForImageFilters(SkBitmap* bitmap) const override;
54
53 private: 55 private:
54 SkAutoTUnref<GrTexture> fTexture; 56 SkAutoTUnref<GrTexture> fTexture;
55 const SkAlphaType fAlphaType; 57 const SkAlphaType fAlphaType;
56 const SkSurface::Budgeted fBudgeted; 58 const SkSurface::Budgeted fBudgeted;
57 mutable SkAtomic<bool> fAddedRasterVersionToCache; 59 mutable SkAtomic<bool> fAddedRasterVersionToCache;
58 60
59 61
60 typedef SkImage_Base INHERITED; 62 typedef SkImage_Base INHERITED;
61 }; 63 };
62 64
63 #endif 65 #endif
OLDNEW
« no previous file with comments | « src/image/SkImage_Base.h ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698