OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 #ifndef GrGpu_DEFINED | 8 #ifndef GrGpu_DEFINED |
9 #define GrGpu_DEFINED | 9 #define GrGpu_DEFINED |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 class GrPipeline; | 28 class GrPipeline; |
29 class GrPrimitiveProcessor; | 29 class GrPrimitiveProcessor; |
30 class GrRenderTarget; | 30 class GrRenderTarget; |
31 class GrStencilAttachment; | 31 class GrStencilAttachment; |
32 class GrSurface; | 32 class GrSurface; |
33 class GrTexture; | 33 class GrTexture; |
34 class GrTransferBuffer; | 34 class GrTransferBuffer; |
35 class GrVertexBuffer; | 35 class GrVertexBuffer; |
36 class GrVertices; | 36 class GrVertices; |
37 | 37 |
| 38 //#define ENABLE_PLS |
| 39 |
38 class GrGpu : public SkRefCnt { | 40 class GrGpu : public SkRefCnt { |
39 public: | 41 public: |
40 /** | 42 /** |
41 * Create an instance of GrGpu that matches the specified backend. If the re
quested backend is | 43 * Create an instance of GrGpu that matches the specified backend. If the re
quested backend is |
42 * not supported (at compile-time or run-time) this returns nullptr. The con
text will not be | 44 * not supported (at compile-time or run-time) this returns nullptr. The con
text will not be |
43 * fully constructed and should not be used by GrGpu until after this functi
on returns. | 45 * fully constructed and should not be used by GrGpu until after this functi
on returns. |
44 */ | 46 */ |
45 static GrGpu* Create(GrBackend, GrBackendContext, const GrContextOptions&, G
rContext* context); | 47 static GrGpu* Create(GrBackend, GrBackendContext, const GrContextOptions&, G
rContext* context); |
46 | 48 |
47 //////////////////////////////////////////////////////////////////////////// | 49 //////////////////////////////////////////////////////////////////////////// |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 , fDesc(desc) { | 326 , fDesc(desc) { |
325 SkASSERT(primProc && pipeline && desc); | 327 SkASSERT(primProc && pipeline && desc); |
326 } | 328 } |
327 const GrPrimitiveProcessor* fPrimitiveProcessor; | 329 const GrPrimitiveProcessor* fPrimitiveProcessor; |
328 const GrPipeline* fPipeline; | 330 const GrPipeline* fPipeline; |
329 const GrProgramDesc* fDesc; | 331 const GrProgramDesc* fDesc; |
330 }; | 332 }; |
331 | 333 |
332 void draw(const DrawArgs&, const GrVertices&); | 334 void draw(const DrawArgs&, const GrVertices&); |
333 | 335 |
| 336 // Called by drawtarget when flushing. Provides a hook for working around an
ARM PLS driver bug. |
| 337 virtual void performFlushWorkaround(); |
| 338 |
334 /////////////////////////////////////////////////////////////////////////// | 339 /////////////////////////////////////////////////////////////////////////// |
335 // Debugging and Stats | 340 // Debugging and Stats |
336 | 341 |
337 class Stats { | 342 class Stats { |
338 public: | 343 public: |
339 #if GR_GPU_STATS | 344 #if GR_GPU_STATS |
340 Stats() { this->reset(); } | 345 Stats() { this->reset(); } |
341 | 346 |
342 void reset() { | 347 void reset() { |
343 fRenderTargetBinds = 0; | 348 fRenderTargetBinds = 0; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 ResetTimestamp fResetTi
mestamp; | 531 ResetTimestamp fResetTi
mestamp; |
527 uint32_t fResetBi
ts; | 532 uint32_t fResetBi
ts; |
528 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 533 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
529 GrContext* fContext
; | 534 GrContext* fContext
; |
530 | 535 |
531 friend class GrPathRendering; | 536 friend class GrPathRendering; |
532 typedef SkRefCnt INHERITED; | 537 typedef SkRefCnt INHERITED; |
533 }; | 538 }; |
534 | 539 |
535 #endif | 540 #endif |
OLD | NEW |