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

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: beautify 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
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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 if (this->needsNewClip()) { 446 if (this->needsNewClip()) {
447 this->recordClip(); 447 this->recordClip();
448 } 448 }
449 this->recordStateIfNecessary(); 449 this->recordStateIfNecessary();
450 DrawPaths* dp = this->recordDrawPaths(); 450 DrawPaths* dp = this->recordDrawPaths();
451 dp->fPathRange.reset(SkRef(pathRange)); 451 dp->fPathRange.reset(SkRef(pathRange));
452 dp->fIndices = SkNEW_ARRAY(uint32_t, count); // TODO: Accomplish this withou t a malloc 452 dp->fIndices = SkNEW_ARRAY(uint32_t, count); // TODO: Accomplish this withou t a malloc
453 memcpy(dp->fIndices, indices, sizeof(uint32_t) * count); 453 memcpy(dp->fIndices, indices, sizeof(uint32_t) * count);
454 dp->fCount = count; 454 dp->fCount = count;
455 455
456 const int transformsLength = PathTransformSize(transformsType) * count; 456 const int transformsLength = GrPathRendering::PathTransformSize(transformsTy pe) * count;
457 dp->fTransforms = SkNEW_ARRAY(float, transformsLength); 457 dp->fTransforms = SkNEW_ARRAY(float, transformsLength);
458 memcpy(dp->fTransforms, transforms, sizeof(float) * transformsLength); 458 memcpy(dp->fTransforms, transforms, sizeof(float) * transformsLength);
459 dp->fTransformsType = transformsType; 459 dp->fTransformsType = transformsType;
460 460
461 dp->fFill = fill; 461 dp->fFill = fill;
462 462
463 if (NULL != dstCopy) { 463 if (NULL != dstCopy) {
464 dp->fDstCopy = *dstCopy; 464 dp->fDstCopy = *dstCopy;
465 } 465 }
466 } 466 }
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 GrInOrderDrawBuffer::CopySurface* GrInOrderDrawBuffer::recordCopySurface() { 981 GrInOrderDrawBuffer::CopySurface* GrInOrderDrawBuffer::recordCopySurface() {
982 this->addToCmdBuffer(kCopySurface_Cmd); 982 this->addToCmdBuffer(kCopySurface_Cmd);
983 return &fCopySurfaces.push_back(); 983 return &fCopySurfaces.push_back();
984 } 984 }
985 985
986 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { 986 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) {
987 INHERITED::clipWillBeSet(newClipData); 987 INHERITED::clipWillBeSet(newClipData);
988 fClipSet = true; 988 fClipSet = true;
989 fClipProxyState = kUnknown_ClipProxyState; 989 fClipProxyState = kUnknown_ClipProxyState;
990 } 990 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrPathRendering.h » ('j') | src/gpu/GrPathRendering.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698