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

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

Issue 1287973003: Check for xfer barriers in GrBatch, auto-issue barriers in GrGpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment Created 5 years, 4 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/effects/GrCustomXfermode.cpp ('k') | src/gpu/gl/GrGLGpu.h » ('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 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 "GrBatchTarget.h" 10 #include "GrBatchTarget.h"
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 SkScalar xBloat = SkPaint::kButt_Cap == cap ? 0 : halfStrokeWidth; 610 SkScalar xBloat = SkPaint::kButt_Cap == cap ? 0 : halfStrokeWidth;
611 fBounds.set(geometry.fPtsRot[0], geometry.fPtsRot[1]); 611 fBounds.set(geometry.fPtsRot[0], geometry.fPtsRot[1]);
612 fBounds.outset(xBloat, halfStrokeWidth); 612 fBounds.outset(xBloat, halfStrokeWidth);
613 613
614 // Note, we actually create the combined matrix here, and save the work 614 // Note, we actually create the combined matrix here, and save the work
615 SkMatrix& combinedMatrix = fGeoData[0].fSrcRotInv; 615 SkMatrix& combinedMatrix = fGeoData[0].fSrcRotInv;
616 combinedMatrix.postConcat(geometry.fViewMatrix); 616 combinedMatrix.postConcat(geometry.fViewMatrix);
617 combinedMatrix.mapRect(&fBounds); 617 combinedMatrix.mapRect(&fBounds);
618 } 618 }
619 619
620 bool onCombineIfPossible(GrBatch* t) override { 620 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override {
621 if (!this->pipeline()->isEqual(*t->pipeline())) { 621 if (!GrPipeline::CanCombine(*this->pipeline(), this->bounds(), *t->pipel ine(), t->bounds(),
622 caps)) {
622 return false; 623 return false;
623 } 624 }
624 625
625 DashBatch* that = t->cast<DashBatch>(); 626 DashBatch* that = t->cast<DashBatch>();
626 627
627 if (this->aaMode() != that->aaMode()) { 628 if (this->aaMode() != that->aaMode()) {
628 return false; 629 return false;
629 } 630 }
630 631
631 if (this->fullDash() != that->fullDash()) { 632 if (this->fullDash() != that->fullDash()) {
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 info.fIntervals = intervals; 1298 info.fIntervals = intervals;
1298 info.fCount = 2; 1299 info.fCount = 2;
1299 info.fPhase = phase; 1300 info.fPhase = phase;
1300 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); 1301 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info);
1301 SkASSERT(success); 1302 SkASSERT(success);
1302 1303
1303 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); 1304 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT);
1304 } 1305 }
1305 1306
1306 #endif 1307 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrCustomXfermode.cpp ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698