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

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

Issue 1127953003: Remove viewmatrix from GrGeometryProcessor base class (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup3
Patch Set: Created 5 years, 7 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
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 GrGeometryProcessor_DEFINED 8 #ifndef GrGeometryProcessor_DEFINED
9 #define GrGeometryProcessor_DEFINED 9 #define GrGeometryProcessor_DEFINED
10 10
11 #include "GrPrimitiveProcessor.h" 11 #include "GrPrimitiveProcessor.h"
12 12
13 /** 13 /**
14 * A GrGeometryProcessor is a flexible method for rendering a primitive. The Gr GeometryProcessor 14 * A GrGeometryProcessor is a flexible method for rendering a primitive. The Gr GeometryProcessor
15 * has complete control over vertex attributes and uniforms(aside from the rende r target) but it 15 * has complete control over vertex attributes and uniforms(aside from the rende r target) but it
16 * must obey the same contract as any GrPrimitiveProcessor, specifically it must emit a color and 16 * must obey the same contract as any GrPrimitiveProcessor, specifically it must emit a color and
17 * coverage into the fragment shader. Where this color and coverage come from i s completely the 17 * coverage into the fragment shader. Where this color and coverage come from i s completely the
18 * responsibility of the GrGeometryProcessor. 18 * responsibility of the GrGeometryProcessor.
19 */ 19 */
20 class GrGeometryProcessor : public GrPrimitiveProcessor { 20 class GrGeometryProcessor : public GrPrimitiveProcessor {
21 public: 21 public:
22 GrGeometryProcessor(const SkMatrix& viewMatrix = SkMatrix::I(), 22 GrGeometryProcessor(const SkMatrix& localMatrix = SkMatrix::I())
23 const SkMatrix& localMatrix = SkMatrix::I()) 23 : INHERITED(localMatrix, false)
24 : INHERITED(viewMatrix, localMatrix, false)
25 , fWillUseGeoShader(false) 24 , fWillUseGeoShader(false)
26 , fHasLocalCoords(false) {} 25 , fHasLocalCoords(false) {}
27 26
28 bool willUseGeoShader() const { return fWillUseGeoShader; } 27 bool willUseGeoShader() const { return fWillUseGeoShader; }
29 28
30 // TODO delete this when paths are in batch 29 // TODO delete this when paths are in batch
31 bool canMakeEqual(const GrBatchTracker& mine, 30 bool canMakeEqual(const GrBatchTracker& mine,
32 const GrPrimitiveProcessor& that, 31 const GrPrimitiveProcessor& that,
33 const GrBatchTracker& theirs) const override { 32 const GrBatchTracker& theirs) const override {
34 SkFAIL("Unsupported\n"); 33 SkFAIL("Unsupported\n");
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 private: 96 private:
98 bool hasExplicitLocalCoords() const override { return fHasLocalCoords; } 97 bool hasExplicitLocalCoords() const override { return fHasLocalCoords; }
99 98
100 bool fWillUseGeoShader; 99 bool fWillUseGeoShader;
101 bool fHasLocalCoords; 100 bool fHasLocalCoords;
102 101
103 typedef GrPrimitiveProcessor INHERITED; 102 typedef GrPrimitiveProcessor INHERITED;
104 }; 103 };
105 104
106 #endif 105 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698