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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 void incNumDraws() {} | 405 void incNumDraws() {} |
406 #endif | 406 #endif |
407 }; | 407 }; |
408 | 408 |
409 Stats* stats() { return &fStats; } | 409 Stats* stats() { return &fStats; } |
410 | 410 |
411 /** Creates a texture directly in the backend API without wrapping it in a G
rTexture. This is | 411 /** Creates a texture directly in the backend API without wrapping it in a G
rTexture. This is |
412 only to be used for testing (particularly for testing the methods that i
mport an externally | 412 only to be used for testing (particularly for testing the methods that i
mport an externally |
413 created texture into Skia. Must be matched with a call to deleteTestingO
nlyTexture(). */ | 413 created texture into Skia. Must be matched with a call to deleteTestingO
nlyTexture(). */ |
414 virtual GrBackendObject createTestingOnlyBackendTexture(void* pixels, int w,
int h, | 414 virtual GrBackendObject createTestingOnlyBackendTexture(void* pixels, int w,
int h, |
415 GrPixelConfig config
) const = 0; | 415 GrPixelConfig config
) = 0; |
416 /** Check a handle represents an actual texture in the backend API that has
not been freed. */ | 416 /** Check a handle represents an actual texture in the backend API that has
not been freed. */ |
417 virtual bool isTestingOnlyBackendTexture(GrBackendObject) const = 0; | 417 virtual bool isTestingOnlyBackendTexture(GrBackendObject) const = 0; |
418 /** If ownership of the backend texture has been transferred pass true for a
bandonTexture. This | 418 /** If ownership of the backend texture has been transferred pass true for a
bandonTexture. This |
419 will do any necessary cleanup of the handle without freeing the texture
in the backend | 419 will do any necessary cleanup of the handle without freeing the texture
in the backend |
420 API. */ | 420 API. */ |
421 virtual void deleteTestingOnlyBackendTexture(GrBackendObject, | 421 virtual void deleteTestingOnlyBackendTexture(GrBackendObject, |
422 bool abandonTexture = false) co
nst = 0; | 422 bool abandonTexture = false) =
0; |
423 | 423 |
424 // width and height may be larger than rt (if underlying API allows it). | 424 // width and height may be larger than rt (if underlying API allows it). |
425 // Returns nullptr if compatible sb could not be created, otherwise the call
er owns the ref on | 425 // Returns nullptr if compatible sb could not be created, otherwise the call
er owns the ref on |
426 // the GrStencilAttachment. | 426 // the GrStencilAttachment. |
427 virtual GrStencilAttachment* createStencilAttachmentForRenderTarget(const Gr
RenderTarget*, | 427 virtual GrStencilAttachment* createStencilAttachmentForRenderTarget(const Gr
RenderTarget*, |
428 int widt
h, | 428 int widt
h, |
429 int heig
ht) = 0; | 429 int heig
ht) = 0; |
430 // clears target's entire stencil buffer to 0 | 430 // clears target's entire stencil buffer to 0 |
431 virtual void clearStencil(GrRenderTarget* target) = 0; | 431 virtual void clearStencil(GrRenderTarget* target) = 0; |
432 | 432 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 ResetTimestamp fResetTi
mestamp; | 574 ResetTimestamp fResetTi
mestamp; |
575 uint32_t fResetBi
ts; | 575 uint32_t fResetBi
ts; |
576 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 576 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
577 GrContext* fContext
; | 577 GrContext* fContext
; |
578 | 578 |
579 friend class GrPathRendering; | 579 friend class GrPathRendering; |
580 typedef SkRefCnt INHERITED; | 580 typedef SkRefCnt INHERITED; |
581 }; | 581 }; |
582 | 582 |
583 #endif | 583 #endif |
OLD | NEW |