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

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

Issue 452823002: Separate GL path rendering state from GrGpuGL to GrGLPathRendering (Closed) Base URL: https://skia.googlesource.com/skia.git@00xx-cherrypick-pathrendering-class
Patch Set: Created 6 years, 4 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/GrGpu.cpp ('k') | src/gpu/GrPathRendering.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 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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 if (this->needsNewClip()) { 423 if (this->needsNewClip()) {
424 this->recordClip(); 424 this->recordClip();
425 } 425 }
426 this->recordStateIfNecessary(); 426 this->recordStateIfNecessary();
427 DrawPaths* dp = this->recordDrawPaths(); 427 DrawPaths* dp = this->recordDrawPaths();
428 dp->fPathRange.reset(SkRef(pathRange)); 428 dp->fPathRange.reset(SkRef(pathRange));
429 dp->fIndices = SkNEW_ARRAY(uint32_t, count); // TODO: Accomplish this withou t a malloc 429 dp->fIndices = SkNEW_ARRAY(uint32_t, count); // TODO: Accomplish this withou t a malloc
430 memcpy(dp->fIndices, indices, sizeof(uint32_t) * count); 430 memcpy(dp->fIndices, indices, sizeof(uint32_t) * count);
431 dp->fCount = count; 431 dp->fCount = count;
432 432
433 const int transformsLength = PathTransformSize(transformsType) * count; 433 const int transformsLength = GrPathRendering::PathTransformSize(transformsTy pe) * count;
434 dp->fTransforms = SkNEW_ARRAY(float, transformsLength); 434 dp->fTransforms = SkNEW_ARRAY(float, transformsLength);
435 memcpy(dp->fTransforms, transforms, sizeof(float) * transformsLength); 435 memcpy(dp->fTransforms, transforms, sizeof(float) * transformsLength);
436 dp->fTransformsType = transformsType; 436 dp->fTransformsType = transformsType;
437 437
438 dp->fFill = fill; 438 dp->fFill = fill;
439 439
440 if (NULL != dstCopy) { 440 if (NULL != dstCopy) {
441 dp->fDstCopy = *dstCopy; 441 dp->fDstCopy = *dstCopy;
442 } 442 }
443 } 443 }
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 GrInOrderDrawBuffer::CopySurface* GrInOrderDrawBuffer::recordCopySurface() { 958 GrInOrderDrawBuffer::CopySurface* GrInOrderDrawBuffer::recordCopySurface() {
959 this->addToCmdBuffer(kCopySurface_Cmd); 959 this->addToCmdBuffer(kCopySurface_Cmd);
960 return &fCopySurfaces.push_back(); 960 return &fCopySurfaces.push_back();
961 } 961 }
962 962
963 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { 963 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) {
964 INHERITED::clipWillBeSet(newClipData); 964 INHERITED::clipWillBeSet(newClipData);
965 fClipSet = true; 965 fClipSet = true;
966 fClipProxyState = kUnknown_ClipProxyState; 966 fClipProxyState = kUnknown_ClipProxyState;
967 } 967 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrPathRendering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698