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

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

Issue 2353403002: Remove unused SkImage_Base and SkImage_Gpu onNewSurface methods (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « src/image/SkImage_Base.h ('k') | no next file » | 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 sk_sp<SkImage> onMakeSubset(const SkIRect&) const override; 44 sk_sp<SkImage> onMakeSubset(const SkIRect&) const override;
45 45
46 GrTexture* peekTexture() const override { return fTexture; } 46 GrTexture* peekTexture() const override { return fTexture; }
47 sk_sp<GrTexture> refPinnedTexture(uint32_t* uniqueID) const override { 47 sk_sp<GrTexture> refPinnedTexture(uint32_t* uniqueID) const override {
48 *uniqueID = this->uniqueID(); 48 *uniqueID = this->uniqueID();
49 return sk_ref_sp(fTexture.get()); 49 return sk_ref_sp(fTexture.get());
50 } 50 }
51 bool onReadPixels(const SkImageInfo&, void* dstPixels, size_t dstRowBytes, 51 bool onReadPixels(const SkImageInfo&, void* dstPixels, size_t dstRowBytes,
52 int srcX, int srcY, CachingHint) const override; 52 int srcX, int srcY, CachingHint) const override;
53 53
54 sk_sp<SkSurface> onNewSurface(const SkImageInfo& info) const override {
55 return SkSurface::MakeRenderTarget(fTexture->getContext(), SkBudgeted::k No, info);
56 }
57
58 private: 54 private:
59 SkAutoTUnref<GrTexture> fTexture; 55 SkAutoTUnref<GrTexture> fTexture;
60 const SkAlphaType fAlphaType; 56 const SkAlphaType fAlphaType;
61 const SkBudgeted fBudgeted; 57 const SkBudgeted fBudgeted;
62 sk_sp<SkColorSpace> fColorSpace; 58 sk_sp<SkColorSpace> fColorSpace;
63 mutable SkAtomic<bool> fAddedRasterVersionToCache; 59 mutable SkAtomic<bool> fAddedRasterVersionToCache;
64 60
65 61
66 typedef SkImage_Base INHERITED; 62 typedef SkImage_Base INHERITED;
67 }; 63 };
68 64
69 #endif 65 #endif
OLDNEW
« no previous file with comments | « src/image/SkImage_Base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698