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

Side by Side Diff: src/gpu/batches/GrDrawPathBatch.cpp

Issue 1894973008: Compute bounds union while combining path range draw path batches (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | 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 2015 Google Inc. 2 * Copyright 2015 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 "GrDrawPathBatch.h" 8 #include "GrDrawPathBatch.h"
9 9
10 static void pre_translate_transform_values(const float* xforms, 10 static void pre_translate_transform_values(const float* xforms,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 SkASSERT(!that->overrides().willColorBlendWithDst()); 96 SkASSERT(!that->overrides().willColorBlendWithDst());
97 fTotalPathCount += that->fTotalPathCount; 97 fTotalPathCount += that->fTotalPathCount;
98 while (Draw* head = that->fDraws.head()) { 98 while (Draw* head = that->fDraws.head()) {
99 Draw* draw = fDraws.addToTail(); 99 Draw* draw = fDraws.addToTail();
100 draw->fInstanceData.reset(head->fInstanceData.release()); 100 draw->fInstanceData.reset(head->fInstanceData.release());
101 draw->fX = head->fX; 101 draw->fX = head->fX;
102 draw->fY = head->fY; 102 draw->fY = head->fY;
103 that->fDraws.popHead(); 103 that->fDraws.popHead();
104 } 104 }
105 this->joinBounds(that->fBounds);
105 return true; 106 return true;
106 } 107 }
107 108
108 void GrDrawPathRangeBatch::onDraw(GrBatchFlushState* state) { 109 void GrDrawPathRangeBatch::onDraw(GrBatchFlushState* state) {
109 const Draw& head = *fDraws.head(); 110 const Draw& head = *fDraws.head();
110 111
111 SkMatrix drawMatrix(this->viewMatrix()); 112 SkMatrix drawMatrix(this->viewMatrix());
112 drawMatrix.preScale(fScale, fScale); 113 drawMatrix.preScale(fScale, fScale);
113 drawMatrix.preTranslate(head.fX, head.fY); 114 drawMatrix.preTranslate(head.fX, head.fY);
114 115
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 dst[i + 3] = xforms[i + 3]; 202 dst[i + 3] = xforms[i + 3];
202 dst[i + 4] = xforms[i + 4]; 203 dst[i + 4] = xforms[i + 4];
203 dst[i + 5] = xforms[i + 3] * x + xforms[i + 4] * y + xforms[i + 5]; 204 dst[i + 5] = xforms[i + 3] * x + xforms[i + 4] * y + xforms[i + 5];
204 } 205 }
205 break; 206 break;
206 default: 207 default:
207 SkFAIL("Unknown transform type."); 208 SkFAIL("Unknown transform type.");
208 break; 209 break;
209 } 210 }
210 } 211 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698