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

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

Issue 1166993002: Towards removing getTexture() from SkImage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 6 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') | 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 19 matching lines...) Expand all
30 GrTexture* tex = this->getTexture(); 30 GrTexture* tex = this->getTexture();
31 SkASSERT(tex); 31 SkASSERT(tex);
32 if (fBudgeted) { 32 if (fBudgeted) {
33 tex->resourcePriv().makeBudgeted(); 33 tex->resourcePriv().makeBudgeted();
34 } else { 34 } else {
35 tex->resourcePriv().makeUnbudgeted(); 35 tex->resourcePriv().makeUnbudgeted();
36 } 36 }
37 } 37 }
38 38
39 bool getROPixels(SkBitmap*) const override; 39 bool getROPixels(SkBitmap*) const override;
40 GrTexture* onGetTexture() const override { return fTexture; } 40 GrTexture* getTexture() const override { return fTexture; }
41 SkShader* onNewShader(SkShader::TileMode, 41 SkShader* onNewShader(SkShader::TileMode,
42 SkShader::TileMode, 42 SkShader::TileMode,
43 const SkMatrix* localMatrix) const override; 43 const SkMatrix* localMatrix) const override;
44 bool isOpaque() const override; 44 bool isOpaque() const override;
45 SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) const ove rride; 45 SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) const ove rride;
46 bool onReadPixels(const SkImageInfo&, void* dstPixels, size_t dstRowBytes, 46 bool onReadPixels(const SkImageInfo&, void* dstPixels, size_t dstRowBytes,
47 int srcX, int srcY) const override; 47 int srcX, int srcY) const override;
48 48
49 private: 49 private:
50 SkAutoTUnref<GrTexture> fTexture; 50 SkAutoTUnref<GrTexture> fTexture;
51 const int fSampleCountForNewSurfaces; // 0 if we don't know 51 const int fSampleCountForNewSurfaces; // 0 if we don't know
52 const SkAlphaType fAlphaType; 52 const SkAlphaType fAlphaType;
53 SkSurface::Budgeted fBudgeted; 53 SkSurface::Budgeted fBudgeted;
54 54
55 typedef SkImage_Base INHERITED; 55 typedef SkImage_Base INHERITED;
56 }; 56 };
57 57
58 #endif 58 #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