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

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

Issue 1104343003: remove old text contexts and fontcache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak Created 5 years, 7 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') | src/gpu/GrFontCache.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 2014 Google Inc. 2 * Copyright 2014 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 "GrFlushToGpuDrawTarget.h" 8 #include "GrFlushToGpuDrawTarget.h"
9 #include "GrContext.h" 9 #include "GrContext.h"
10 #include "GrFontCache.h"
11 #include "GrGpu.h" 10 #include "GrGpu.h"
12 #include "GrBufferAllocPool.h" 11 #include "GrBufferAllocPool.h"
13 12
14 GrFlushToGpuDrawTarget::GrFlushToGpuDrawTarget(GrGpu* gpu, 13 GrFlushToGpuDrawTarget::GrFlushToGpuDrawTarget(GrGpu* gpu,
15 GrVertexBufferAllocPool* vertexPo ol, 14 GrVertexBufferAllocPool* vertexPo ol,
16 GrIndexBufferAllocPool* indexPool ) 15 GrIndexBufferAllocPool* indexPool )
17 : INHERITED(gpu->getContext()) 16 : INHERITED(gpu->getContext())
18 , fGpu(SkRef(gpu)) 17 , fGpu(SkRef(gpu))
19 , fVertexPool(vertexPool) 18 , fVertexPool(vertexPool)
20 , fIndexPool(indexPool) 19 , fIndexPool(indexPool)
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 78
80 void GrFlushToGpuDrawTarget::flush() { 79 void GrFlushToGpuDrawTarget::flush() {
81 SkASSERT(kReserved_GeometrySrcType != this->getGeomSrc().fVertexSrc); 80 SkASSERT(kReserved_GeometrySrcType != this->getGeomSrc().fVertexSrc);
82 SkASSERT(kReserved_GeometrySrcType != this->getGeomSrc().fIndexSrc); 81 SkASSERT(kReserved_GeometrySrcType != this->getGeomSrc().fIndexSrc);
83 82
84 if (fFlushing) { 83 if (fFlushing) {
85 return; 84 return;
86 } 85 }
87 fFlushing = true; 86 fFlushing = true;
88 87
89 fGpu->getContext()->getFontCache()->updateTextures();
90
91 fGpu->saveActiveTraceMarkers(); 88 fGpu->saveActiveTraceMarkers();
92 89
93 this->onFlush(); 90 this->onFlush();
94 91
95 fGpu->restoreActiveTraceMarkers(); 92 fGpu->restoreActiveTraceMarkers();
96 93
97 fFlushing = false; 94 fFlushing = false;
98 this->reset(); 95 this->reset();
99 } 96 }
100 97
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 bool GrFlushToGpuDrawTarget::onCanCopySurface(const GrSurface* dst, 248 bool GrFlushToGpuDrawTarget::onCanCopySurface(const GrSurface* dst,
252 const GrSurface* src, 249 const GrSurface* src,
253 const SkIRect& srcRect, 250 const SkIRect& srcRect,
254 const SkIPoint& dstPoint) { 251 const SkIPoint& dstPoint) {
255 return getGpu()->canCopySurface(dst, src, srcRect, dstPoint); 252 return getGpu()->canCopySurface(dst, src, srcRect, dstPoint);
256 } 253 }
257 254
258 bool GrFlushToGpuDrawTarget::onInitCopySurfaceDstDesc(const GrSurface* src, GrSu rfaceDesc* desc) { 255 bool GrFlushToGpuDrawTarget::onInitCopySurfaceDstDesc(const GrSurface* src, GrSu rfaceDesc* desc) {
259 return getGpu()->initCopySurfaceDstDesc(src, desc); 256 return getGpu()->initCopySurfaceDstDesc(src, desc);
260 } 257 }
OLDNEW
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.cpp ('k') | src/gpu/GrFontCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698