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

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

Issue 347563005: Reduce texture uploads for font atlas. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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/GrDistanceFieldTextContext.cpp ('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"
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
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698