| OLD | NEW |
| 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" | 10 #include "GrFontCache.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 void GrFlushToGpuDrawTarget::flush() { | 80 void GrFlushToGpuDrawTarget::flush() { |
| 81 SkASSERT(kReserved_GeometrySrcType != this->getGeomSrc().fVertexSrc); | 81 SkASSERT(kReserved_GeometrySrcType != this->getGeomSrc().fVertexSrc); |
| 82 SkASSERT(kReserved_GeometrySrcType != this->getGeomSrc().fIndexSrc); | 82 SkASSERT(kReserved_GeometrySrcType != this->getGeomSrc().fIndexSrc); |
| 83 | 83 |
| 84 if (fFlushing) { | 84 if (fFlushing) { |
| 85 return; | 85 return; |
| 86 } | 86 } |
| 87 fFlushing = true; | 87 fFlushing = true; |
| 88 | 88 |
| 89 fGpu->getContext()->getFontCache()->updateTextures(); | 89 fGpu->getContext()->getFontCache()->updateTextures(); |
| 90 fVertexPool->unmap(); | |
| 91 fIndexPool->unmap(); | |
| 92 | 90 |
| 93 fGpu->saveActiveTraceMarkers(); | 91 fGpu->saveActiveTraceMarkers(); |
| 94 | 92 |
| 95 this->onFlush(); | 93 this->onFlush(); |
| 96 | 94 |
| 97 fGpu->restoreActiveTraceMarkers(); | 95 fGpu->restoreActiveTraceMarkers(); |
| 98 | 96 |
| 99 fFlushing = false; | 97 fFlushing = false; |
| 100 this->reset(); | 98 this->reset(); |
| 101 } | 99 } |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 bool GrFlushToGpuDrawTarget::onCanCopySurface(const GrSurface* dst, | 251 bool GrFlushToGpuDrawTarget::onCanCopySurface(const GrSurface* dst, |
| 254 const GrSurface* src, | 252 const GrSurface* src, |
| 255 const SkIRect& srcRect, | 253 const SkIRect& srcRect, |
| 256 const SkIPoint& dstPoint) { | 254 const SkIPoint& dstPoint) { |
| 257 return getGpu()->canCopySurface(dst, src, srcRect, dstPoint); | 255 return getGpu()->canCopySurface(dst, src, srcRect, dstPoint); |
| 258 } | 256 } |
| 259 | 257 |
| 260 bool GrFlushToGpuDrawTarget::onInitCopySurfaceDstDesc(const GrSurface* src, GrSu
rfaceDesc* desc) { | 258 bool GrFlushToGpuDrawTarget::onInitCopySurfaceDstDesc(const GrSurface* src, GrSu
rfaceDesc* desc) { |
| 261 return getGpu()->initCopySurfaceDstDesc(src, desc); | 259 return getGpu()->initCopySurfaceDstDesc(src, desc); |
| 262 } | 260 } |
| OLD | NEW |