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

Side by Side Diff: src/gpu/GrTextureMaker.h

Issue 1370223002: Revert[4] of add ImageShader, sharing code with its Bitmap cousin (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 GrTextureMaker_DEFINED 8 #ifndef GrTextureMaker_DEFINED
9 #define GrTextureMaker_DEFINED 9 #define GrTextureMaker_DEFINED
10 10
11 #include "SkGrPriv.h" 11 #include "SkGrPriv.h"
12 12
13 class GrContext; 13 class GrContext;
14 class GrTexture; 14 class GrTexture;
15 class GrTextureParams; 15 class GrTextureParams;
16 class GrUniqueKey; 16 class GrUniqueKey;
17 class SkBitmap; 17 class SkBitmap;
18 18
19 class GrTextureMaker { 19 class GrTextureMaker {
20 public: 20 public:
21 GrTextureMaker(int width, int height) : fWidth(width), fHeight(height) {} 21 GrTextureMaker(int width, int height) : fWidth(width), fHeight(height) {}
22 virtual ~GrTextureMaker() {} 22 virtual ~GrTextureMaker() {}
23 23
24 int width() const { return fWidth; } 24 int width() const { return fWidth; }
25 int height() const { return fHeight; } 25 int height() const { return fHeight; }
26 26
27 GrTexture* refCachedTexture(GrContext*, SkImageUsageType);
27 GrTexture* refCachedTexture(GrContext*, const GrTextureParams*); 28 GrTexture* refCachedTexture(GrContext*, const GrTextureParams*);
28 29
29 protected: 30 protected:
30 /** 31 /**
31 * Return the maker's "original" unstretched texture. It is the responsibil ity of the maker 32 * Return the maker's "original" unstretched texture. It is the responsibil ity of the maker
32 * to make this efficient ... if the texture is being generated, the maker must handle 33 * to make this efficient ... if the texture is being generated, the maker must handle
33 * caching it. 34 * caching it.
34 */ 35 */
35 virtual GrTexture* onRefUnstretchedTexture(GrContext*) = 0; 36 virtual GrTexture* onRefUnstretchedTexture(GrContext*) = 0;
36 37
(...skipping 30 matching lines...) Expand all
67 * of the original texture. 68 * of the original texture.
68 */ 69 */
69 virtual bool onGetROBitmap(SkBitmap*) = 0; 70 virtual bool onGetROBitmap(SkBitmap*) = 0;
70 71
71 private: 72 private:
72 const int fWidth; 73 const int fWidth;
73 const int fHeight; 74 const int fHeight;
74 }; 75 };
75 76
76 #endif 77 #endif
OLDNEW
« no previous file with comments | « src/core/SkImageCacherator.cpp ('k') | src/gpu/SkGr.cpp » ('j') | src/gpu/SkGr.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698