OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |