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

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

Issue 1390913005: add applyFilter() to SkImage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase to new effect factories, use stroke to show image bounds Created 5 years, 2 months 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
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 25 matching lines...) Expand all
36 } 36 }
37 37
38 bool getROPixels(SkBitmap*) const override; 38 bool getROPixels(SkBitmap*) const override;
39 GrTexture* asTextureRef(GrContext* ctx, const GrTextureParams& params) const override; 39 GrTexture* asTextureRef(GrContext* ctx, const GrTextureParams& params) const override;
40 SkImage* onNewSubset(const SkIRect&) const override; 40 SkImage* onNewSubset(const SkIRect&) const override;
41 41
42 GrTexture* peekTexture() const override { return fTexture; } 42 GrTexture* peekTexture() const override { return fTexture; }
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) const override; 45 int srcX, int srcY) const override;
46 SkImage* onApplyFilter(SkImageFilter*, SkIPoint* offset,
47 bool forceResultToOriginalSize) const override;
48
49 SkSurface* onNewSurface(const SkImageInfo& info) const override {
50 return SkSurface::NewRenderTarget(fTexture->getContext(), SkSurface::kNo _Budgeted, info);
51 }
46 52
47 private: 53 private:
48 SkAutoTUnref<GrTexture> fTexture; 54 SkAutoTUnref<GrTexture> fTexture;
49 const SkAlphaType fAlphaType; 55 const SkAlphaType fAlphaType;
50 const SkSurface::Budgeted fBudgeted; 56 const SkSurface::Budgeted fBudgeted;
51 mutable SkAtomic<bool> fAddedRasterVersionToCache; 57 mutable SkAtomic<bool> fAddedRasterVersionToCache;
52 58
53 59
54 typedef SkImage_Base INHERITED; 60 typedef SkImage_Base INHERITED;
55 }; 61 };
56 62
57 #endif 63 #endif
OLDNEW
« no previous file with comments | « src/image/SkImage_Base.h ('k') | src/image/SkImage_Gpu.cpp » ('j') | src/image/SkImage_Gpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698