| 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 * in the active set is removed from the active set and the targets remove f
unction is called. | 356 * in the active set is removed from the active set and the targets remove f
unction is called. |
| 357 * These functions do not work as a stack so you cannot call save a second t
ime before calling | 357 * These functions do not work as a stack so you cannot call save a second t
ime before calling |
| 358 * restore. Also, it is assumed that when restore is called the current acti
ve set of markers | 358 * restore. Also, it is assumed that when restore is called the current acti
ve set of markers |
| 359 * is empty. When the stored markers are added back into the active set, the
targets add marker | 359 * is empty. When the stored markers are added back into the active set, the
targets add marker |
| 360 * is called. | 360 * is called. |
| 361 */ | 361 */ |
| 362 void saveActiveTraceMarkers(); | 362 void saveActiveTraceMarkers(); |
| 363 void restoreActiveTraceMarkers(); | 363 void restoreActiveTraceMarkers(); |
| 364 | 364 |
| 365 // creation and deletion of raw texture for testing | 365 // creation and deletion of raw texture for testing |
| 366 virtual GrBackendObject createBackendTexture(void* pixels, int w, int h, | 366 // only to be used in GPU-specific tests |
| 367 GrPixelConfig config) const = 0
; | 367 virtual GrBackendObject createTestingOnlyBackendTexture(void* pixels, int w,
int h, |
| 368 virtual bool isBackendTexture(GrBackendObject id) const = 0; | 368 GrPixelConfig config
) const = 0; |
| 369 virtual void deleteBackendTexture(GrBackendObject id) const = 0; | 369 virtual bool isTestingOnlyBackendTexture(GrBackendObject id) const = 0; |
| 370 virtual void deleteTestingOnlyBackendTexture(GrBackendObject id) const = 0; |
| 370 | 371 |
| 371 // Given a rt, find or create a stencil buffer and attach it | 372 // Given a rt, find or create a stencil buffer and attach it |
| 372 bool attachStencilAttachmentToRenderTarget(GrRenderTarget* target); | 373 bool attachStencilAttachmentToRenderTarget(GrRenderTarget* target); |
| 373 | 374 |
| 374 // This is only to be used in GL-specific tests. | 375 // This is only to be used in GL-specific tests. |
| 375 virtual const GrGLContext* glContextForTesting() const { return NULL; } | 376 virtual const GrGLContext* glContextForTesting() const { return NULL; } |
| 376 | 377 |
| 377 protected: | 378 protected: |
| 378 // Functions used to map clip-respecting stencil tests into normal | 379 // Functions used to map clip-respecting stencil tests into normal |
| 379 // stencil funcs supported by GPUs. | 380 // stencil funcs supported by GPUs. |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 GrTraceMarkerSet fActiveT
raceMarkers; | 474 GrTraceMarkerSet fActiveT
raceMarkers; |
| 474 GrTraceMarkerSet fStoredT
raceMarkers; | 475 GrTraceMarkerSet fStoredT
raceMarkers; |
| 475 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 476 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
| 476 GrContext* fContext
; | 477 GrContext* fContext
; |
| 477 | 478 |
| 478 friend class GrPathRendering; | 479 friend class GrPathRendering; |
| 479 typedef SkRefCnt INHERITED; | 480 typedef SkRefCnt INHERITED; |
| 480 }; | 481 }; |
| 481 | 482 |
| 482 #endif | 483 #endif |
| OLD | NEW |