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

Side by Side Diff: include/gpu/GrTextureAccess.h

Issue 1846963004: Infer sampler precision from pixel config (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ... and gcc doesn't like the enums Created 4 years, 8 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 | « no previous file | src/gpu/GrTextureAccess.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 2012 Google Inc. 2 * Copyright 2012 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 GrTextureAccess_DEFINED 8 #ifndef GrTextureAccess_DEFINED
9 #define GrTextureAccess_DEFINED 9 #define GrTextureAccess_DEFINED
10 10
(...skipping 12 matching lines...) Expand all
23 /** 23 /**
24 * Must be initialized before adding to a GrProcessor's texture access list. 24 * Must be initialized before adding to a GrProcessor's texture access list.
25 */ 25 */
26 GrTextureAccess(); 26 GrTextureAccess();
27 27
28 GrTextureAccess(GrTexture*, const GrTextureParams&); 28 GrTextureAccess(GrTexture*, const GrTextureParams&);
29 29
30 explicit GrTextureAccess(GrTexture*, 30 explicit GrTextureAccess(GrTexture*,
31 GrTextureParams::FilterMode = GrTextureParams::kNon e_FilterMode, 31 GrTextureParams::FilterMode = GrTextureParams::kNon e_FilterMode,
32 SkShader::TileMode tileXAndY = SkShader::kClamp_Til eMode, 32 SkShader::TileMode tileXAndY = SkShader::kClamp_Til eMode,
33 GrShaderFlags visibility = kFragment_GrShaderFlag, 33 GrShaderFlags visibility = kFragment_GrShaderFlag);
34 GrSLPrecision = kDefault_GrSLPrecision);
35 34
36 void reset(GrTexture*, const GrTextureParams&, 35 void reset(GrTexture*, const GrTextureParams&,
37 GrShaderFlags visibility = kFragment_GrShaderFlag, 36 GrShaderFlags visibility = kFragment_GrShaderFlag);
38 GrSLPrecision = kDefault_GrSLPrecision);
39 void reset(GrTexture*, 37 void reset(GrTexture*,
40 GrTextureParams::FilterMode = GrTextureParams::kNone_FilterMode, 38 GrTextureParams::FilterMode = GrTextureParams::kNone_FilterMode,
41 SkShader::TileMode tileXAndY = SkShader::kClamp_TileMode, 39 SkShader::TileMode tileXAndY = SkShader::kClamp_TileMode,
42 GrShaderFlags visibility = kFragment_GrShaderFlag, 40 GrShaderFlags visibility = kFragment_GrShaderFlag);
43 GrSLPrecision = kDefault_GrSLPrecision);
44 41
45 bool operator==(const GrTextureAccess& that) const { 42 bool operator==(const GrTextureAccess& that) const {
46 return this->getTexture() == that.getTexture() && 43 return this->getTexture() == that.getTexture() &&
47 fParams == that.fParams && 44 fParams == that.fParams &&
48 fVisibility == that.fVisibility && 45 fVisibility == that.fVisibility;
49 fPrecision == that.fPrecision;
50 } 46 }
51 47
52 bool operator!=(const GrTextureAccess& other) const { return !(*this == othe r); } 48 bool operator!=(const GrTextureAccess& other) const { return !(*this == othe r); }
53 49
54 GrTexture* getTexture() const { return fTexture.get(); } 50 GrTexture* getTexture() const { return fTexture.get(); }
55 GrShaderFlags getVisibility() const { return fVisibility; } 51 GrShaderFlags getVisibility() const { return fVisibility; }
56 GrSLPrecision getPrecision() const { return fPrecision; }
57 52
58 /** 53 /**
59 * For internal use by GrProcessor. 54 * For internal use by GrProcessor.
60 */ 55 */
61 const GrGpuResourceRef* getProgramTexture() const { return &fTexture; } 56 const GrGpuResourceRef* getProgramTexture() const { return &fTexture; }
62 57
63 const GrTextureParams& getParams() const { return fParams; } 58 const GrTextureParams& getParams() const { return fParams; }
64 59
65 private: 60 private:
66 61
67 typedef GrTGpuResourceRef<GrTexture> ProgramTexture; 62 typedef GrTGpuResourceRef<GrTexture> ProgramTexture;
68 63
69 ProgramTexture fTexture; 64 ProgramTexture fTexture;
70 GrTextureParams fParams; 65 GrTextureParams fParams;
71 GrShaderFlags fVisibility; 66 GrShaderFlags fVisibility;
72 GrSLPrecision fPrecision;
73 67
74 typedef SkNoncopyable INHERITED; 68 typedef SkNoncopyable INHERITED;
75 }; 69 };
76 70
77 #endif 71 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrTextureAccess.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698