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

Side by Side Diff: src/gpu/effects/GrSingleTextureEffect.h

Issue 2301523003: Have GrSurfaceProxys and GrGpuResources draw from the same pool of unique ids (Closed)
Patch Set: update to ToT Created 4 years, 3 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/gpu/batches/GrStencilPathBatch.h ('k') | src/gpu/gl/GrGLGpu.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 GrSingleTextureEffect_DEFINED 8 #ifndef GrSingleTextureEffect_DEFINED
9 #define GrSingleTextureEffect_DEFINED 9 #define GrSingleTextureEffect_DEFINED
10 10
11 #include "GrFragmentProcessor.h" 11 #include "GrFragmentProcessor.h"
12 #include "GrColorSpaceXform.h" 12 #include "GrColorSpaceXform.h"
13 #include "GrCoordTransform.h" 13 #include "GrCoordTransform.h"
14 #include "GrInvariantOutput.h" 14 #include "GrInvariantOutput.h"
15 #include "SkMatrix.h" 15 #include "SkMatrix.h"
16 16
17 class GrTexture; 17 class GrTexture;
18 18
19 /** 19 /**
20 * A base class for effects that draw a single texture with a texture matrix. Th is effect has no 20 * A base class for effects that draw a single texture with a texture matrix. Th is effect has no
21 * backend implementations. One must be provided by the subclass. 21 * backend implementations. One must be provided by the subclass.
22 */ 22 */
23 class GrSingleTextureEffect : public GrFragmentProcessor { 23 class GrSingleTextureEffect : public GrFragmentProcessor {
24 public: 24 public:
25 ~GrSingleTextureEffect() override; 25 ~GrSingleTextureEffect() override;
26 26
27 SkString dumpInfo() const override { 27 SkString dumpInfo() const override {
28 SkString str; 28 SkString str;
29 str.appendf("Texture: %d", fTextureAccess.getTexture()->getUniqueID()); 29 str.appendf("Texture: %d", fTextureAccess.getTexture()->uniqueID());
30 return str; 30 return str;
31 } 31 }
32 32
33 protected: 33 protected:
34 /** unfiltered, clamp mode */ 34 /** unfiltered, clamp mode */
35 GrSingleTextureEffect(GrTexture*, sk_sp<GrColorSpaceXform>, const SkMatrix&, 35 GrSingleTextureEffect(GrTexture*, sk_sp<GrColorSpaceXform>, const SkMatrix&,
36 GrCoordSet = kLocal_GrCoordSet); 36 GrCoordSet = kLocal_GrCoordSet);
37 /** clamp mode */ 37 /** clamp mode */
38 GrSingleTextureEffect(GrTexture*, sk_sp<GrColorSpaceXform>, const SkMatrix&, 38 GrSingleTextureEffect(GrTexture*, sk_sp<GrColorSpaceXform>, const SkMatrix&,
39 GrTextureParams::FilterMode filterMode, GrCoordSet = k Local_GrCoordSet); 39 GrTextureParams::FilterMode filterMode, GrCoordSet = k Local_GrCoordSet);
(...skipping 20 matching lines...) Expand all
60 60
61 private: 61 private:
62 GrCoordTransform fCoordTransform; 62 GrCoordTransform fCoordTransform;
63 GrTextureAccess fTextureAccess; 63 GrTextureAccess fTextureAccess;
64 sk_sp<GrColorSpaceXform> fColorSpaceXform; 64 sk_sp<GrColorSpaceXform> fColorSpaceXform;
65 65
66 typedef GrFragmentProcessor INHERITED; 66 typedef GrFragmentProcessor INHERITED;
67 }; 67 };
68 68
69 #endif 69 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrStencilPathBatch.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698