OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 GrContext_DEFINED | 8 #ifndef GrContext_DEFINED |
9 #define GrContext_DEFINED | 9 #define GrContext_DEFINED |
10 | 10 |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 * to become undefined. | 511 * to become undefined. |
512 */ | 512 */ |
513 void discardRenderTarget(GrRenderTarget*); | 513 void discardRenderTarget(GrRenderTarget*); |
514 | 514 |
515 /** | 515 /** |
516 * An ID associated with this context, guaranteed to be unique. | 516 * An ID associated with this context, guaranteed to be unique. |
517 */ | 517 */ |
518 uint32_t uniqueID() { return fUniqueID; } | 518 uint32_t uniqueID() { return fUniqueID; } |
519 | 519 |
520 /////////////////////////////////////////////////////////////////////////// | 520 /////////////////////////////////////////////////////////////////////////// |
521 // Legacy functions, to be removed once Chromium stops using them. | |
522 | |
523 enum ScratchTexMatch { | |
524 kExact_ScratchTexMatch = GrTextureProvider::kExact_ScratchTexMatch, | |
525 kApprox_ScratchTexMatch = GrTextureProvider::kApprox_ScratchTexMatch | |
526 }; | |
527 | |
528 GrTexture* refScratchTexture(const GrSurfaceDesc& desc, ScratchTexMatch matc
h) { | |
529 return this->textureProvider()->refScratchTexture( | |
530 desc, (GrTextureProvider::ScratchTexMatch) match); | |
531 } | |
532 | |
533 GrTexture* wrapBackendTexture(const GrBackendTextureDesc& desc) { | |
534 return this->textureProvider()->wrapBackendTexture(desc); | |
535 } | |
536 | |
537 /////////////////////////////////////////////////////////////////////////// | |
538 // Functions intended for internal use only. | 521 // Functions intended for internal use only. |
539 GrGpu* getGpu() { return fGpu; } | 522 GrGpu* getGpu() { return fGpu; } |
540 const GrGpu* getGpu() const { return fGpu; } | 523 const GrGpu* getGpu() const { return fGpu; } |
541 GrBatchFontCache* getBatchFontCache() { return fBatchFontCache; } | 524 GrBatchFontCache* getBatchFontCache() { return fBatchFontCache; } |
542 GrLayerCache* getLayerCache() { return fLayerCache.get(); } | 525 GrLayerCache* getLayerCache() { return fLayerCache.get(); } |
543 GrTextBlobCache* getTextBlobCache() { return fTextBlobCache; } | 526 GrTextBlobCache* getTextBlobCache() { return fTextBlobCache; } |
544 GrDrawTarget* getTextTarget(); | 527 GrDrawTarget* getTextTarget(); |
545 GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; } | 528 GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; } |
546 GrResourceProvider* resourceProvider() { return fResourceProvider; } | 529 GrResourceProvider* resourceProvider() { return fResourceProvider; } |
547 const GrResourceProvider* resourceProvider() const { return fResourceProvide
r; } | 530 const GrResourceProvider* resourceProvider() const { return fResourceProvide
r; } |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 */ | 658 */ |
676 static void TextBlobCacheOverBudgetCB(void* data); | 659 static void TextBlobCacheOverBudgetCB(void* data); |
677 | 660 |
678 // TODO see note on createTextContext | 661 // TODO see note on createTextContext |
679 friend class SkGpuDevice; | 662 friend class SkGpuDevice; |
680 | 663 |
681 typedef SkRefCnt INHERITED; | 664 typedef SkRefCnt INHERITED; |
682 }; | 665 }; |
683 | 666 |
684 #endif | 667 #endif |
OLD | NEW |