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

Side by Side Diff: gm/beziereffects.cpp

Issue 1124733004: Move DrawInfo out from GrDrawTarget and rename to GrVertices. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comment changes 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 | « no previous file | gyp/gpu.gypi » ('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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 // This test only works with the GPU backend. 9 // This test only works with the GPU backend.
10 10
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 450
451 Geometry* geoData(int index) override { 451 Geometry* geoData(int index) override {
452 SkASSERT(0 == index); 452 SkASSERT(0 == index);
453 return &fGeometry; 453 return &fGeometry;
454 } 454 }
455 455
456 void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeli ne) override { 456 void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeli ne) override {
457 QuadHelper helper; 457 QuadHelper helper;
458 size_t vertexStride = this->geometryProcessor()->getVertexStride(); 458 size_t vertexStride = this->geometryProcessor()->getVertexStride();
459 SkASSERT(vertexStride == sizeof(Vertex)); 459 SkASSERT(vertexStride == sizeof(Vertex));
460 GrDrawTarget::DrawInfo drawInfo;
461 Vertex* verts = reinterpret_cast<Vertex*>(helper.init(batchTarget, verte xStride, 1)); 460 Vertex* verts = reinterpret_cast<Vertex*>(helper.init(batchTarget, verte xStride, 1));
462 if (!verts) { 461 if (!verts) {
463 return; 462 return;
464 } 463 }
465 verts[0].fPosition.setRectFan(fGeometry.fBounds.fLeft, fGeometry.fBounds .fTop, 464 verts[0].fPosition.setRectFan(fGeometry.fBounds.fLeft, fGeometry.fBounds .fTop,
466 fGeometry.fBounds.fRight, fGeometry.fBound s.fBottom, 465 fGeometry.fBounds.fRight, fGeometry.fBound s.fBottom,
467 sizeof(Vertex)); 466 sizeof(Vertex));
468 fDevToUV.apply<4, sizeof(Vertex), sizeof(SkPoint)>(verts); 467 fDevToUV.apply<4, sizeof(Vertex), sizeof(SkPoint)>(verts);
469 helper.issueDraws(batchTarget); 468 helper.issueDraws(batchTarget);
470 } 469 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 typedef GM INHERITED; 615 typedef GM INHERITED;
617 }; 616 };
618 617
619 DEF_GM( return SkNEW(BezierCubicEffects); ) 618 DEF_GM( return SkNEW(BezierCubicEffects); )
620 DEF_GM( return SkNEW(BezierConicEffects); ) 619 DEF_GM( return SkNEW(BezierConicEffects); )
621 DEF_GM( return SkNEW(BezierQuadEffects); ) 620 DEF_GM( return SkNEW(BezierQuadEffects); )
622 621
623 } 622 }
624 623
625 #endif 624 #endif
OLDNEW
« no previous file with comments | « no previous file | gyp/gpu.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698