| 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(); |
| 90 | 92 |
| 91 fGpu->saveActiveTraceMarkers(); | 93 fGpu->saveActiveTraceMarkers(); |
| 92 | 94 |
| 93 this->onFlush(); | 95 this->onFlush(); |
| 94 | 96 |
| 95 fGpu->restoreActiveTraceMarkers(); | 97 fGpu->restoreActiveTraceMarkers(); |
| 96 | 98 |
| 97 fFlushing = false; | 99 fFlushing = false; |
| 98 this->reset(); | 100 this->reset(); |
| 99 } | 101 } |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 bool GrFlushToGpuDrawTarget::onCanCopySurface(const GrSurface* dst, | 253 bool GrFlushToGpuDrawTarget::onCanCopySurface(const GrSurface* dst, |
| 252 const GrSurface* src, | 254 const GrSurface* src, |
| 253 const SkIRect& srcRect, | 255 const SkIRect& srcRect, |
| 254 const SkIPoint& dstPoint) { | 256 const SkIPoint& dstPoint) { |
| 255 return getGpu()->canCopySurface(dst, src, srcRect, dstPoint); | 257 return getGpu()->canCopySurface(dst, src, srcRect, dstPoint); |
| 256 } | 258 } |
| 257 | 259 |
| 258 bool GrFlushToGpuDrawTarget::onInitCopySurfaceDstDesc(const GrSurface* src, GrSu
rfaceDesc* desc) { | 260 bool GrFlushToGpuDrawTarget::onInitCopySurfaceDstDesc(const GrSurface* src, GrSu
rfaceDesc* desc) { |
| 259 return getGpu()->initCopySurfaceDstDesc(src, desc); | 261 return getGpu()->initCopySurfaceDstDesc(src, desc); |
| 260 } | 262 } |
| OLD | NEW |