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

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

Issue 1132323003: Revert of Preliminary attempt to remove batch tracker (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup5
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
« no previous file with comments | « src/gpu/GrPathProcessor.h ('k') | src/gpu/GrRectBatch.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"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 return false; 50 return false;
51 } 51 }
52 52
53 const GrPathProcessor& other = that.cast<GrPathProcessor>(); 53 const GrPathProcessor& other = that.cast<GrPathProcessor>();
54 if (!this->viewMatrix().cheapEqualTo(other.viewMatrix())) { 54 if (!this->viewMatrix().cheapEqualTo(other.viewMatrix())) {
55 return false; 55 return false;
56 } 56 }
57 57
58 const PathBatchTracker& mine = m.cast<PathBatchTracker>(); 58 const PathBatchTracker& mine = m.cast<PathBatchTracker>();
59 const PathBatchTracker& theirs = t.cast<PathBatchTracker>(); 59 const PathBatchTracker& theirs = t.cast<PathBatchTracker>();
60 if (mine.fColor != theirs.fColor) { 60 return CanCombineLocalMatrices(*this, mine.fUsesLocalCoords,
61 return false; 61 that, theirs.fUsesLocalCoords) &&
62 } 62 CanCombineOutput(mine.fInputColorType, mine.fColor,
63 63 theirs.fInputColorType, theirs.fColor) &&
64 if (mine.fUsesLocalCoords != theirs.fUsesLocalCoords) { 64 CanCombineOutput(mine.fInputCoverageType, 0xff,
65 return false; 65 theirs.fInputCoverageType, 0xff);
66 }
67
68 if (mine.fUsesLocalCoords && !this->localMatrix().cheapEqualTo(other.localMa trix())) {
69 return false;
70 }
71
72 return true;
73 } 66 }
74 67
75 void GrPathProcessor::getGLProcessorKey(const GrBatchTracker& bt, 68 void GrPathProcessor::getGLProcessorKey(const GrBatchTracker& bt,
76 const GrGLSLCaps& caps, 69 const GrGLSLCaps& caps,
77 GrProcessorKeyBuilder* b) const { 70 GrProcessorKeyBuilder* b) const {
78 GrGLPathProcessor::GenKey(*this, bt, caps, b); 71 GrGLPathProcessor::GenKey(*this, bt, caps, b);
79 } 72 }
80 73
81 GrGLPrimitiveProcessor* GrPathProcessor::createGLInstance(const GrBatchTracker& bt, 74 GrGLPrimitiveProcessor* GrPathProcessor::createGLInstance(const GrBatchTracker& bt,
82 const GrGLSLCaps& caps ) const { 75 const GrGLSLCaps& caps ) const {
83 SkASSERT(caps.pathRenderingSupport()); 76 SkASSERT(caps.pathRenderingSupport());
84 return SkNEW_ARGS(GrGLPathProcessor, (*this, bt)); 77 return SkNEW_ARGS(GrGLPathProcessor, (*this, bt));
85 } 78 }
OLDNEW
« no previous file with comments | « src/gpu/GrPathProcessor.h ('k') | src/gpu/GrRectBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698