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

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

Issue 1404433002: Remove image usage type enum. Use GrTextureParams instead. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix no gpu build 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
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/SkGpuDevice.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 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*);
29 28
30 protected: 29 protected:
31 /** 30 /**
32 * Return the maker's "original" unstretched texture. It is the responsibil ity of the maker 31 * Return the maker's "original" unstretched texture. It is the responsibil ity of the maker
33 * to make this efficient ... if the texture is being generated, the maker must handle 32 * to make this efficient ... if the texture is being generated, the maker must handle
34 * caching it. 33 * caching it.
35 */ 34 */
36 virtual GrTexture* onRefUnstretchedTexture(GrContext*) = 0; 35 virtual GrTexture* onRefUnstretchedTexture(GrContext*) = 0;
37 36
38 /** 37 /**
(...skipping 29 matching lines...) Expand all
68 * of the original texture. 67 * of the original texture.
69 */ 68 */
70 virtual bool onGetROBitmap(SkBitmap*) = 0; 69 virtual bool onGetROBitmap(SkBitmap*) = 0;
71 70
72 private: 71 private:
73 const int fWidth; 72 const int fWidth;
74 const int fHeight; 73 const int fHeight;
75 }; 74 };
76 75
77 #endif 76 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698