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

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

Issue 1784023002: Add sampler precision to GrTextureAccess (Closed) Base URL: https://skia.googlesource.com/skia.git@upload2_verttex
Patch Set: rebase Created 4 years, 9 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 | include/gpu/GrTypesPriv.h » ('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);
34 35
35 void reset(GrTexture*, const GrTextureParams&, 36 void reset(GrTexture*, const GrTextureParams&,
36 GrShaderFlags visibility = kFragment_GrShaderFlag); 37 GrShaderFlags visibility = kFragment_GrShaderFlag,
38 GrSLPrecision = kDefault_GrSLPrecision);
37 void reset(GrTexture*, 39 void reset(GrTexture*,
38 GrTextureParams::FilterMode = GrTextureParams::kNone_FilterMode, 40 GrTextureParams::FilterMode = GrTextureParams::kNone_FilterMode,
39 SkShader::TileMode tileXAndY = SkShader::kClamp_TileMode, 41 SkShader::TileMode tileXAndY = SkShader::kClamp_TileMode,
40 GrShaderFlags visibility = kFragment_GrShaderFlag); 42 GrShaderFlags visibility = kFragment_GrShaderFlag,
43 GrSLPrecision = kDefault_GrSLPrecision);
41 44
42 bool operator==(const GrTextureAccess& that) const { 45 bool operator==(const GrTextureAccess& that) const {
43 return this->getTexture() == that.getTexture() && 46 return this->getTexture() == that.getTexture() &&
44 fParams == that.fParams && 47 fParams == that.fParams &&
45 fVisibility == that.fVisibility; 48 fVisibility == that.fVisibility &&
49 fPrecision == that.fPrecision;
46 } 50 }
47 51
48 bool operator!=(const GrTextureAccess& other) const { return !(*this == othe r); } 52 bool operator!=(const GrTextureAccess& other) const { return !(*this == othe r); }
49 53
50 GrTexture* getTexture() const { return fTexture.get(); } 54 GrTexture* getTexture() const { return fTexture.get(); }
51 GrShaderFlags getVisibility() const { return fVisibility; } 55 GrShaderFlags getVisibility() const { return fVisibility; }
56 GrSLPrecision getPrecision() const { return fPrecision; }
52 57
53 /** 58 /**
54 * For internal use by GrProcessor. 59 * For internal use by GrProcessor.
55 */ 60 */
56 const GrGpuResourceRef* getProgramTexture() const { return &fTexture; } 61 const GrGpuResourceRef* getProgramTexture() const { return &fTexture; }
57 62
58 const GrTextureParams& getParams() const { return fParams; } 63 const GrTextureParams& getParams() const { return fParams; }
59 64
60 private: 65 private:
61 66
62 typedef GrTGpuResourceRef<GrTexture> ProgramTexture; 67 typedef GrTGpuResourceRef<GrTexture> ProgramTexture;
63 68
64 ProgramTexture fTexture; 69 ProgramTexture fTexture;
65 GrTextureParams fParams; 70 GrTextureParams fParams;
66 GrShaderFlags fVisibility; 71 GrShaderFlags fVisibility;
72 GrSLPrecision fPrecision;
67 73
68 typedef SkNoncopyable INHERITED; 74 typedef SkNoncopyable INHERITED;
69 }; 75 };
70 76
71 #endif 77 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrTypesPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698