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

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

Issue 947443003: Move clip off of draw target (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc Created 5 years, 10 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/GrDashingEffect.h ('k') | tests/ClipCacheTest.cpp » ('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 "../GrAARectRenderer.h" 10 #include "../GrAARectRenderer.h"
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 devIntervals[1], strokeWidth, capType, gp->getVert exStride()); 506 devIntervals[1], strokeWidth, capType, gp->getVert exStride());
507 } else { 507 } else {
508 SkPoint* verts = reinterpret_cast<SkPoint*>(geo.vertices()); 508 SkPoint* verts = reinterpret_cast<SkPoint*>(geo.vertices());
509 SkASSERT(gp->getVertexStride() == sizeof(SkPoint)); 509 SkASSERT(gp->getVertexStride() == sizeof(SkPoint));
510 setup_dashed_rect_pos(endRect, curVIdx, combinedMatrix, verts); 510 setup_dashed_rect_pos(endRect, curVIdx, combinedMatrix, verts);
511 } 511 }
512 512
513 } 513 }
514 514
515 target->setIndexSourceToBuffer(gpu->getContext()->getQuadIndexBuffer()); 515 target->setIndexSourceToBuffer(gpu->getContext()->getQuadIndexBuffer());
516 target->drawIndexedInstances(pipelineBuilder, gp, kTriangles_GrPrimitiveType , 516 target->drawIndexedInstances(pipelineBuilder, gp, kTriangles_GrPrimitiveType , totalRectCnt,
517 totalRectCnt, 4, 6); 517 4, 6);
518 target->resetIndexSource(); 518 target->resetIndexSource();
519 return true; 519 return true;
520 } 520 }
521 521
522 ////////////////////////////////////////////////////////////////////////////// 522 //////////////////////////////////////////////////////////////////////////////
523 523
524 class GLDashingCircleEffect; 524 class GLDashingCircleEffect;
525 525
526 struct DashingCircleBatchTracker { 526 struct DashingCircleBatchTracker {
527 GrGPInput fInputColorType; 527 GrGPInput fInputColorType;
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 switch (cap) { 1030 switch (cap) {
1031 case kRound_DashCap: 1031 case kRound_DashCap:
1032 return DashingCircleEffect::Create(color, edgeType, localMatrix); 1032 return DashingCircleEffect::Create(color, edgeType, localMatrix);
1033 case kNonRound_DashCap: 1033 case kNonRound_DashCap:
1034 return DashingLineEffect::Create(color, edgeType, localMatrix); 1034 return DashingLineEffect::Create(color, edgeType, localMatrix);
1035 default: 1035 default:
1036 SkFAIL("Unexpected dashed cap."); 1036 SkFAIL("Unexpected dashed cap.");
1037 } 1037 }
1038 return NULL; 1038 return NULL;
1039 } 1039 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDashingEffect.h ('k') | tests/ClipCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698