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

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

Issue 1337513002: Late creation of GrPathProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 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/GrPathProcessor.h ('k') | src/gpu/GrStencilAndCoverTextContext.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 #include "GrPathProcessor.h" 8 #include "GrPathProcessor.h"
9 9
10 #include "gl/GrGLPathProcessor.h" 10 #include "gl/GrGLPathProcessor.h"
11 #include "gl/GrGLGpu.h" 11 #include "gl/GrGLGpu.h"
12 12
13 #include "glsl/GrGLSLCaps.h" 13 #include "glsl/GrGLSLCaps.h"
14 14
15 GrPathProcessor::GrPathProcessor(GrColor color, 15 GrPathProcessor::GrPathProcessor(GrColor color,
16 const GrPipelineOptimizations& opts,
16 const SkMatrix& viewMatrix, 17 const SkMatrix& viewMatrix,
17 const SkMatrix& localMatrix) 18 const SkMatrix& localMatrix)
18 : INHERITED(true) 19 : INHERITED(true)
19 , fColor(color) 20 , fColor(color)
20 , fViewMatrix(viewMatrix) 21 , fViewMatrix(viewMatrix)
21 , fLocalMatrix(localMatrix) { 22 , fLocalMatrix(localMatrix)
23 , fOpts(opts) {
22 this->initClassID<GrPathProcessor>(); 24 this->initClassID<GrPathProcessor>();
23 } 25 }
24 26
25 void GrPathProcessor::getInvariantOutputColor(GrInitInvariantOutput* out) const { 27 void GrPathProcessor::getInvariantOutputColor(GrInitInvariantOutput* out) const {
26 out->setKnownFourComponents(fColor); 28 out->setKnownFourComponents(fColor);
27 } 29 }
28 30
29 void GrPathProcessor::getInvariantOutputCoverage(GrInitInvariantOutput* out) con st { 31 void GrPathProcessor::getInvariantOutputCoverage(GrInitInvariantOutput* out) con st {
30 out->setKnownSingleComponent(0xff); 32 out->setKnownSingleComponent(0xff);
31 } 33 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 const GrGLSLCaps& caps, 81 const GrGLSLCaps& caps,
80 GrProcessorKeyBuilder* b) const { 82 GrProcessorKeyBuilder* b) const {
81 GrGLPathProcessor::GenKey(*this, bt, caps, b); 83 GrGLPathProcessor::GenKey(*this, bt, caps, b);
82 } 84 }
83 85
84 GrGLPrimitiveProcessor* GrPathProcessor::createGLInstance(const GrBatchTracker& bt, 86 GrGLPrimitiveProcessor* GrPathProcessor::createGLInstance(const GrBatchTracker& bt,
85 const GrGLSLCaps& caps ) const { 87 const GrGLSLCaps& caps ) const {
86 SkASSERT(caps.pathRenderingSupport()); 88 SkASSERT(caps.pathRenderingSupport());
87 return new GrGLPathProcessor(*this, bt); 89 return new GrGLPathProcessor(*this, bt);
88 } 90 }
OLDNEW
« no previous file with comments | « src/gpu/GrPathProcessor.h ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698