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

Side by Side Diff: src/gpu/effects/GrDashingEffect.cpp

Issue 1242033002: All batches do their own pipeline compare (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add quick accept to pipeline compare Created 5 years, 5 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/GrRectBatch.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 2014 Google Inc. 2 * Copyright 2014 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 "GrDashingEffect.h" 8 #include "GrDashingEffect.h"
9 9
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 fBounds.set(geometry.fPtsRot[0], geometry.fPtsRot[1]); 613 fBounds.set(geometry.fPtsRot[0], geometry.fPtsRot[1]);
614 fBounds.outset(xBloat, halfStrokeWidth); 614 fBounds.outset(xBloat, halfStrokeWidth);
615 615
616 // Note, we actually create the combined matrix here, and save the work 616 // Note, we actually create the combined matrix here, and save the work
617 SkMatrix& combinedMatrix = fGeoData[0].fSrcRotInv; 617 SkMatrix& combinedMatrix = fGeoData[0].fSrcRotInv;
618 combinedMatrix.postConcat(geometry.fViewMatrix); 618 combinedMatrix.postConcat(geometry.fViewMatrix);
619 combinedMatrix.mapRect(&fBounds); 619 combinedMatrix.mapRect(&fBounds);
620 } 620 }
621 621
622 bool onCombineIfPossible(GrBatch* t) override { 622 bool onCombineIfPossible(GrBatch* t) override {
623 if (!this->pipeline()->isEqual(*t->pipeline())) {
624 return false;
625 }
626
623 DashBatch* that = t->cast<DashBatch>(); 627 DashBatch* that = t->cast<DashBatch>();
624 628
625 if (this->aaMode() != that->aaMode()) { 629 if (this->aaMode() != that->aaMode()) {
626 return false; 630 return false;
627 } 631 }
628 632
629 if (this->fullDash() != that->fullDash()) { 633 if (this->fullDash() != that->fullDash()) {
630 return false; 634 return false;
631 } 635 }
632 636
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 info.fIntervals = intervals; 1295 info.fIntervals = intervals;
1292 info.fCount = 2; 1296 info.fCount = 2;
1293 info.fPhase = phase; 1297 info.fPhase = phase;
1294 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); 1298 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info);
1295 SkASSERT(success); 1299 SkASSERT(success);
1296 1300
1297 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); 1301 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT);
1298 } 1302 }
1299 1303
1300 #endif 1304 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrRectBatch.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698