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" |
11 | 11 |
12 #include "GrBufferAllocPool.h" | 12 #include "GrBufferAllocPool.h" |
13 #include "GrContext.h" | 13 #include "GrContext.h" |
14 #include "GrDrawTargetCaps.h" | 14 #include "GrDrawTargetCaps.h" |
15 #include "GrGpuResourcePriv.h" | 15 #include "GrGpuResourcePriv.h" |
16 #include "GrIndexBuffer.h" | 16 #include "GrIndexBuffer.h" |
17 #include "GrResourceCache.h" | 17 #include "GrResourceCache.h" |
18 #include "GrRenderTargetPriv.h" | 18 #include "GrRenderTargetPriv.h" |
19 #include "GrStencilBuffer.h" | 19 #include "GrStencilBuffer.h" |
20 #include "GrVertexBuffer.h" | 20 #include "GrVertexBuffer.h" |
21 | 21 |
22 //////////////////////////////////////////////////////////////////////////////// | 22 //////////////////////////////////////////////////////////////////////////////// |
23 | 23 |
24 GrGpu::GrGpu(GrContext* context) | 24 GrGpu::GrGpu(GrContext* context) |
25 : fResetTimestamp(kExpiredTimestamp+1) | 25 : fResetTimestamp(kExpiredTimestamp+1) |
26 , fResetBits(kAll_GrBackendState) | 26 , fResetBits(kAll_GrBackendState) |
27 , fQuadIndexBuffer(NULL) | 27 , fQuadIndexBuffer(NULL) |
| 28 , fGpuTraceMarkerCount(0) |
28 , fContext(context) { | 29 , fContext(context) { |
29 } | 30 } |
30 | 31 |
31 GrGpu::~GrGpu() { | 32 GrGpu::~GrGpu() { |
32 SkSafeSetNull(fQuadIndexBuffer); | 33 SkSafeSetNull(fQuadIndexBuffer); |
33 } | 34 } |
34 | 35 |
35 void GrGpu::contextAbandoned() {} | 36 void GrGpu::contextAbandoned() {} |
36 | 37 |
37 //////////////////////////////////////////////////////////////////////////////// | 38 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 GrDrawTarget::PathIndexType indexType, | 304 GrDrawTarget::PathIndexType indexType, |
304 const float transformValues[], | 305 const float transformValues[], |
305 GrDrawTarget::PathTransformType transformType, | 306 GrDrawTarget::PathTransformType transformType, |
306 int count, | 307 int count, |
307 const GrStencilSettings& stencilSettings) { | 308 const GrStencilSettings& stencilSettings) { |
308 this->handleDirtyContext(); | 309 this->handleDirtyContext(); |
309 pathRange->willDrawPaths(indices, indexType, count); | 310 pathRange->willDrawPaths(indices, indexType, count); |
310 this->onDrawPaths(args, pathRange, indices, indexType, transformValues, | 311 this->onDrawPaths(args, pathRange, indices, indexType, transformValues, |
311 transformType, count, stencilSettings); | 312 transformType, count, stencilSettings); |
312 } | 313 } |
OLD | NEW |