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" |
11 #include "GrDrawTargetCaps.h" | 11 #include "GrDrawTargetCaps.h" |
| 12 #include "GrTextStrike.h" |
12 #include "GrGpu.h" | 13 #include "GrGpu.h" |
13 #include "GrIndexBuffer.h" | 14 #include "GrIndexBuffer.h" |
14 #include "GrPath.h" | 15 #include "GrPath.h" |
15 #include "GrRenderTarget.h" | 16 #include "GrRenderTarget.h" |
16 #include "GrTemplates.h" | 17 #include "GrTemplates.h" |
17 #include "GrTexture.h" | 18 #include "GrTexture.h" |
18 #include "GrVertexBuffer.h" | 19 #include "GrVertexBuffer.h" |
19 | 20 |
20 GrInOrderDrawBuffer::GrInOrderDrawBuffer(GrGpu* gpu, | 21 GrInOrderDrawBuffer::GrInOrderDrawBuffer(GrGpu* gpu, |
21 GrVertexBufferAllocPool* vertexPool, | 22 GrVertexBufferAllocPool* vertexPool, |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 fCopySurfaces.reset(); | 551 fCopySurfaces.reset(); |
551 fGpuCmdMarkers.reset(); | 552 fGpuCmdMarkers.reset(); |
552 fClipSet = true; | 553 fClipSet = true; |
553 } | 554 } |
554 | 555 |
555 void GrInOrderDrawBuffer::flush() { | 556 void GrInOrderDrawBuffer::flush() { |
556 if (fFlushing) { | 557 if (fFlushing) { |
557 return; | 558 return; |
558 } | 559 } |
559 | 560 |
| 561 this->getContext()->getFontCache()->updateTextures(); |
| 562 |
560 SkASSERT(kReserved_GeometrySrcType != this->getGeomSrc().fVertexSrc); | 563 SkASSERT(kReserved_GeometrySrcType != this->getGeomSrc().fVertexSrc); |
561 SkASSERT(kReserved_GeometrySrcType != this->getGeomSrc().fIndexSrc); | 564 SkASSERT(kReserved_GeometrySrcType != this->getGeomSrc().fIndexSrc); |
562 | 565 |
563 int numCmds = fCmds.count(); | 566 int numCmds = fCmds.count(); |
564 if (0 == numCmds) { | 567 if (0 == numCmds) { |
565 return; | 568 return; |
566 } | 569 } |
567 | 570 |
568 GrAutoTRestore<bool> flushRestore(&fFlushing); | 571 GrAutoTRestore<bool> flushRestore(&fFlushing); |
569 fFlushing = true; | 572 fFlushing = true; |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 this->addToCmdBuffer(kCopySurface_Cmd); | 986 this->addToCmdBuffer(kCopySurface_Cmd); |
984 return &fCopySurfaces.push_back(); | 987 return &fCopySurfaces.push_back(); |
985 } | 988 } |
986 | 989 |
987 | 990 |
988 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { | 991 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { |
989 INHERITED::clipWillBeSet(newClipData); | 992 INHERITED::clipWillBeSet(newClipData); |
990 fClipSet = true; | 993 fClipSet = true; |
991 fClipProxyState = kUnknown_ClipProxyState; | 994 fClipProxyState = kUnknown_ClipProxyState; |
992 } | 995 } |
OLD | NEW |