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

Side by Side Diff: src/gpu/batches/GrDrawPathBatch.cpp

Issue 2316413003: Remove ability to skip coord transform comparison in pipeline comparison. (Closed)
Patch Set: 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/GrPipeline.cpp ('k') | no next file » | 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 2015 Google Inc. 2 * Copyright 2015 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 "GrDrawPathBatch.h" 8 #include "GrDrawPathBatch.h"
9 9
10 #include "GrRenderTargetPriv.h" 10 #include "GrRenderTargetPriv.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 bool GrDrawPathRangeBatch::onCombineIfPossible(GrBatch* t, const GrCaps& caps) { 63 bool GrDrawPathRangeBatch::onCombineIfPossible(GrBatch* t, const GrCaps& caps) {
64 GrDrawPathRangeBatch* that = t->cast<GrDrawPathRangeBatch>(); 64 GrDrawPathRangeBatch* that = t->cast<GrDrawPathRangeBatch>();
65 if (this->fPathRange.get() != that->fPathRange.get() || 65 if (this->fPathRange.get() != that->fPathRange.get() ||
66 this->transformType() != that->transformType() || 66 this->transformType() != that->transformType() ||
67 this->fScale != that->fScale || 67 this->fScale != that->fScale ||
68 this->color() != that->color() || 68 this->color() != that->color() ||
69 !this->viewMatrix().cheapEqualTo(that->viewMatrix())) { 69 !this->viewMatrix().cheapEqualTo(that->viewMatrix())) {
70 return false; 70 return false;
71 } 71 }
72 if (!GrPipeline::AreEqual(*this->pipeline(), *that->pipeline(), false)) { 72 if (!GrPipeline::AreEqual(*this->pipeline(), *that->pipeline())) {
73 return false; 73 return false;
74 } 74 }
75 switch (fDraws.head()->fInstanceData->transformType()) { 75 switch (fDraws.head()->fInstanceData->transformType()) {
76 case GrPathRendering::kNone_PathTransformType: 76 case GrPathRendering::kNone_PathTransformType:
77 if (this->fDraws.head()->fX != that->fDraws.head()->fX || 77 if (this->fDraws.head()->fX != that->fDraws.head()->fX ||
78 this->fDraws.head()->fY != that->fDraws.head()->fY) { 78 this->fDraws.head()->fY != that->fDraws.head()->fY) {
79 return false; 79 return false;
80 } 80 }
81 break; 81 break;
82 case GrPathRendering::kTranslateX_PathTransformType: 82 case GrPathRendering::kTranslateX_PathTransformType:
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 dst[i + 3] = xforms[i + 3]; 212 dst[i + 3] = xforms[i + 3];
213 dst[i + 4] = xforms[i + 4]; 213 dst[i + 4] = xforms[i + 4];
214 dst[i + 5] = xforms[i + 3] * x + xforms[i + 4] * y + xforms[i + 5]; 214 dst[i + 5] = xforms[i + 3] * x + xforms[i + 4] * y + xforms[i + 5];
215 } 215 }
216 break; 216 break;
217 default: 217 default:
218 SkFAIL("Unknown transform type."); 218 SkFAIL("Unknown transform type.");
219 break; 219 break;
220 } 220 }
221 } 221 }
OLDNEW
« no previous file with comments | « src/gpu/GrPipeline.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698