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

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

Issue 1467553002: New API for computing optimization invariants. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/GrOvalRenderer.cpp ('k') | src/gpu/GrPathProcessor.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 2013 Google Inc. 2 * Copyright 2013 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 GrPathProcessor_DEFINED 8 #ifndef GrPathProcessor_DEFINED
9 #define GrPathProcessor_DEFINED 9 #define GrPathProcessor_DEFINED
10 10
11 #include "GrPrimitiveProcessor.h" 11 #include "GrPrimitiveProcessor.h"
12 12
13 /* 13 /*
14 * The path equivalent of the GP. For now this just manages color. In the long term we plan on 14 * The path equivalent of the GP. For now this just manages color. In the long term we plan on
15 * extending this class to handle all nvpr uniform / varying / program work. 15 * extending this class to handle all nvpr uniform / varying / program work.
16 */ 16 */
17 class GrPathProcessor : public GrPrimitiveProcessor { 17 class GrPathProcessor : public GrPrimitiveProcessor {
18 public: 18 public:
19 static GrPathProcessor* Create(GrColor color, 19 static GrPathProcessor* Create(GrColor color,
20 const GrPipelineOptimizations& opts, 20 const GrXPOverridesForBatch& overrides,
21 const SkMatrix& viewMatrix = SkMatrix::I(), 21 const SkMatrix& viewMatrix = SkMatrix::I(),
22 const SkMatrix& localMatrix = SkMatrix::I()) { 22 const SkMatrix& localMatrix = SkMatrix::I()) {
23 return new GrPathProcessor(color, opts, viewMatrix, localMatrix); 23 return new GrPathProcessor(color, overrides, viewMatrix, localMatrix);
24 } 24 }
25 25
26 const char* name() const override { return "PathProcessor"; } 26 const char* name() const override { return "PathProcessor"; }
27 27
28 GrColor color() const { return fColor; } 28 GrColor color() const { return fColor; }
29 const SkMatrix& viewMatrix() const { return fViewMatrix; } 29 const SkMatrix& viewMatrix() const { return fViewMatrix; }
30 const SkMatrix& localMatrix() const { return fLocalMatrix; } 30 const SkMatrix& localMatrix() const { return fLocalMatrix; }
31 31
32 bool willUseGeoShader() const override { return false; } 32 bool willUseGeoShader() const override { return false; }
33 33
34 virtual void getGLSLProcessorKey(const GrGLSLCaps& caps, 34 virtual void getGLSLProcessorKey(const GrGLSLCaps& caps,
35 GrProcessorKeyBuilder* b) const override; 35 GrProcessorKeyBuilder* b) const override;
36 36
37 virtual GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps& caps) const override; 37 virtual GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps& caps) const override;
38 38
39 bool hasTransformedLocalCoords() const override { return false; } 39 bool hasTransformedLocalCoords() const override { return false; }
40 40
41 const GrPipelineOptimizations& opts() const { return fOpts; } 41 const GrXPOverridesForBatch& overrides() const { return fOverrides; }
42 42
43 private: 43 private:
44 GrPathProcessor(GrColor color, const GrPipelineOptimizations& opts, 44 GrPathProcessor(GrColor color, const GrXPOverridesForBatch& overrides,
45 const SkMatrix& viewMatrix, const SkMatrix& localMatrix); 45 const SkMatrix& viewMatrix, const SkMatrix& localMatrix);
46 46
47 bool hasExplicitLocalCoords() const override { return false; } 47 bool hasExplicitLocalCoords() const override { return false; }
48 48
49 GrColor fColor; 49 GrColor fColor;
50 const SkMatrix fViewMatrix; 50 const SkMatrix fViewMatrix;
51 const SkMatrix fLocalMatrix; 51 const SkMatrix fLocalMatrix;
52 GrPipelineOptimizations fOpts; 52 GrXPOverridesForBatch fOverrides;
53 53
54 typedef GrPrimitiveProcessor INHERITED; 54 typedef GrPrimitiveProcessor INHERITED;
55 }; 55 };
56 56
57 #endif 57 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/GrPathProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698