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

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

Issue 1127273007: Iterate over instanced draws in GrGpu rather than above GrBatchTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove dead code 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/GrVertices.h ('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 "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 } else { 592 } else {
593 SkPoint* verts = reinterpret_cast<SkPoint*>(vertices); 593 SkPoint* verts = reinterpret_cast<SkPoint*>(vertices);
594 SkASSERT(gp->getVertexStride() == sizeof(SkPoint)); 594 SkASSERT(gp->getVertexStride() == sizeof(SkPoint));
595 setup_dashed_rect_pos(rects[rectIndex], curVIdx, geom.fSrcRo tInv, verts); 595 setup_dashed_rect_pos(rects[rectIndex], curVIdx, geom.fSrcRo tInv, verts);
596 } 596 }
597 curVIdx += 4; 597 curVIdx += 4;
598 } 598 }
599 rectIndex++; 599 rectIndex++;
600 } 600 }
601 SkASSERT(0 == (curVIdx % 4) && (curVIdx / 4) == totalRectCount); 601 SkASSERT(0 == (curVIdx % 4) && (curVIdx / 4) == totalRectCount);
602 helper.issueDraws(batchTarget); 602 helper.issueDraw(batchTarget);
603 } 603 }
604 604
605 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } 605 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
606 606
607 private: 607 private:
608 DashBatch(const Geometry& geometry, SkPaint::Cap cap, DashAAMode aaMode, boo l fullDash) { 608 DashBatch(const Geometry& geometry, SkPaint::Cap cap, DashAAMode aaMode, boo l fullDash) {
609 this->initClassID<DashBatch>(); 609 this->initClassID<DashBatch>();
610 fGeoData.push_back(geometry); 610 fGeoData.push_back(geometry);
611 611
612 fBatch.fAAMode = aaMode; 612 fBatch.fAAMode = aaMode;
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 info.fIntervals = intervals; 1343 info.fIntervals = intervals;
1344 info.fCount = 2; 1344 info.fCount = 2;
1345 info.fPhase = phase; 1345 info.fPhase = phase;
1346 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); 1346 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info);
1347 SkASSERT(success); 1347 SkASSERT(success);
1348 1348
1349 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); 1349 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT);
1350 } 1350 }
1351 1351
1352 #endif 1352 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrVertices.h ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698