| 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 void incNumFailedDraws() {} | 416 void incNumFailedDraws() {} |
| 417 #endif | 417 #endif |
| 418 }; | 418 }; |
| 419 | 419 |
| 420 Stats* stats() { return &fStats; } | 420 Stats* stats() { return &fStats; } |
| 421 | 421 |
| 422 /** Creates a texture directly in the backend API without wrapping it in a G
rTexture. This is | 422 /** Creates a texture directly in the backend API without wrapping it in a G
rTexture. This is |
| 423 only to be used for testing (particularly for testing the methods that i
mport an externally | 423 only to be used for testing (particularly for testing the methods that i
mport an externally |
| 424 created texture into Skia. Must be matched with a call to deleteTestingO
nlyTexture(). */ | 424 created texture into Skia. Must be matched with a call to deleteTestingO
nlyTexture(). */ |
| 425 virtual GrBackendObject createTestingOnlyBackendTexture(void* pixels, int w,
int h, | 425 virtual GrBackendObject createTestingOnlyBackendTexture(void* pixels, int w,
int h, |
| 426 GrPixelConfig config
) = 0; | 426 GrPixelConfig config
, |
| 427 bool isRenderTarget
= false) = 0; |
| 427 /** Check a handle represents an actual texture in the backend API that has
not been freed. */ | 428 /** Check a handle represents an actual texture in the backend API that has
not been freed. */ |
| 428 virtual bool isTestingOnlyBackendTexture(GrBackendObject) const = 0; | 429 virtual bool isTestingOnlyBackendTexture(GrBackendObject) const = 0; |
| 429 /** If ownership of the backend texture has been transferred pass true for a
bandonTexture. This | 430 /** If ownership of the backend texture has been transferred pass true for a
bandonTexture. This |
| 430 will do any necessary cleanup of the handle without freeing the texture
in the backend | 431 will do any necessary cleanup of the handle without freeing the texture
in the backend |
| 431 API. */ | 432 API. */ |
| 432 virtual void deleteTestingOnlyBackendTexture(GrBackendObject, | 433 virtual void deleteTestingOnlyBackendTexture(GrBackendObject, |
| 433 bool abandonTexture = false) =
0; | 434 bool abandonTexture = false) =
0; |
| 434 | 435 |
| 435 // width and height may be larger than rt (if underlying API allows it). | 436 // width and height may be larger than rt (if underlying API allows it). |
| 436 // Returns nullptr if compatible sb could not be created, otherwise the call
er owns the ref on | 437 // Returns nullptr if compatible sb could not be created, otherwise the call
er owns the ref on |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; | 576 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; |
| 576 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; | 577 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; |
| 577 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 578 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
| 578 GrContext* fContext
; | 579 GrContext* fContext
; |
| 579 | 580 |
| 580 friend class GrPathRendering; | 581 friend class GrPathRendering; |
| 581 typedef SkRefCnt INHERITED; | 582 typedef SkRefCnt INHERITED; |
| 582 }; | 583 }; |
| 583 | 584 |
| 584 #endif | 585 #endif |
| OLD | NEW |