OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "GrGpu.h" | 10 #include "GrGpu.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 return this->onWriteTexturePixels(texture, left, top, width, height, | 202 return this->onWriteTexturePixels(texture, left, top, width, height, |
203 config, buffer, rowBytes); | 203 config, buffer, rowBytes); |
204 } | 204 } |
205 | 205 |
206 void GrGpu::resolveRenderTarget(GrRenderTarget* target) { | 206 void GrGpu::resolveRenderTarget(GrRenderTarget* target) { |
207 SkASSERT(target); | 207 SkASSERT(target); |
208 this->handleDirtyContext(); | 208 this->handleDirtyContext(); |
209 this->onResolveRenderTarget(target); | 209 this->onResolveRenderTarget(target); |
210 } | 210 } |
211 | 211 |
212 void GrGpu::initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) { | |
213 // Make the dst of the copy be a render target because the default copySurfa
ce draws to the dst. | |
214 desc->fOrigin = kDefault_GrSurfaceOrigin; | |
215 desc->fFlags = kRenderTarget_GrSurfaceFlag | kNoStencil_GrSurfaceFlag; | |
216 desc->fConfig = src->config(); | |
217 } | |
218 | |
219 typedef GrTraceMarkerSet::Iter TMIter; | 212 typedef GrTraceMarkerSet::Iter TMIter; |
220 void GrGpu::saveActiveTraceMarkers() { | 213 void GrGpu::saveActiveTraceMarkers() { |
221 if (this->caps()->gpuTracingSupport()) { | 214 if (this->caps()->gpuTracingSupport()) { |
222 SkASSERT(0 == fStoredTraceMarkers.count()); | 215 SkASSERT(0 == fStoredTraceMarkers.count()); |
223 fStoredTraceMarkers.addSet(fActiveTraceMarkers); | 216 fStoredTraceMarkers.addSet(fActiveTraceMarkers); |
224 for (TMIter iter = fStoredTraceMarkers.begin(); iter != fStoredTraceMark
ers.end(); ++iter) { | 217 for (TMIter iter = fStoredTraceMarkers.begin(); iter != fStoredTraceMark
ers.end(); ++iter) { |
225 this->removeGpuTraceMarker(&(*iter)); | 218 this->removeGpuTraceMarker(&(*iter)); |
226 } | 219 } |
227 } | 220 } |
228 } | 221 } |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 this->handleDirtyContext(); | 319 this->handleDirtyContext(); |
327 | 320 |
328 if (!this->flushGraphicsState(ds, kDrawPaths_DrawType)) { | 321 if (!this->flushGraphicsState(ds, kDrawPaths_DrawType)) { |
329 return; | 322 return; |
330 } | 323 } |
331 | 324 |
332 pathRange->willDrawPaths(indices, indexType, count); | 325 pathRange->willDrawPaths(indices, indexType, count); |
333 this->pathRendering()->drawPaths(pathRange, indices, indexType, transformVal
ues, | 326 this->pathRendering()->drawPaths(pathRange, indices, indexType, transformVal
ues, |
334 transformType, count, stencilSettings); | 327 transformType, count, stencilSettings); |
335 } | 328 } |
OLD | NEW |