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

Side by Side Diff: src/gpu/GrInOrderDrawBuffer.cpp

Issue 961813002: Some small code tidying (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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
« src/gpu/GrDrawTarget.h ('K') | « src/gpu/GrDrawTarget.h ('k') | 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 2011 Google Inc. 2 * Copyright 2011 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 "GrInOrderDrawBuffer.h" 8 #include "GrInOrderDrawBuffer.h"
9 9
10 #include "GrBufferAllocPool.h" 10 #include "GrBufferAllocPool.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 BatchTracker fBatch; 294 BatchTracker fBatch;
295 SkSTArray<1, Geometry, true> fGeoData; 295 SkSTArray<1, Geometry, true> fGeoData;
296 }; 296 };
297 297
298 void GrInOrderDrawBuffer::onDrawRect(GrPipelineBuilder* pipelineBuilder, 298 void GrInOrderDrawBuffer::onDrawRect(GrPipelineBuilder* pipelineBuilder,
299 GrColor color, 299 GrColor color,
300 const SkMatrix& viewMatrix, 300 const SkMatrix& viewMatrix,
301 const SkRect& rect, 301 const SkRect& rect,
302 const SkRect* localRect, 302 const SkRect* localRect,
303 const SkMatrix* localMatrix) { 303 const SkMatrix* localMatrix) {
304 GrPipelineBuilder::AutoRestoreEffects are(pipelineBuilder);
305 RectBatch::Geometry geometry; 304 RectBatch::Geometry geometry;
306 geometry.fColor = color; 305 geometry.fColor = color;
307 geometry.fViewMatrix = viewMatrix; 306 geometry.fViewMatrix = viewMatrix;
308 geometry.fRect = rect; 307 geometry.fRect = rect;
309 308
310 if (localRect) { 309 if (localRect) {
311 geometry.fHasLocalRect = true; 310 geometry.fHasLocalRect = true;
312 geometry.fLocalRect = *localRect; 311 geometry.fLocalRect = *localRect;
313 } else { 312 } else {
314 geometry.fHasLocalRect = false; 313 geometry.fHasLocalRect = false;
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 } 773 }
775 } 774 }
776 775
777 void GrInOrderDrawBuffer::willReserveVertexAndIndexSpace(int vertexCount, 776 void GrInOrderDrawBuffer::willReserveVertexAndIndexSpace(int vertexCount,
778 size_t vertexStride, 777 size_t vertexStride,
779 int indexCount) { 778 int indexCount) {
780 this->closeBatch(); 779 this->closeBatch();
781 780
782 this->INHERITED::willReserveVertexAndIndexSpace(vertexCount, vertexStride, i ndexCount); 781 this->INHERITED::willReserveVertexAndIndexSpace(vertexCount, vertexStride, i ndexCount);
783 } 782 }
OLDNEW
« src/gpu/GrDrawTarget.h ('K') | « src/gpu/GrDrawTarget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698