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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 * GrRenderTarget::asTexture()). Any pending draws to the render target will | 621 * GrRenderTarget::asTexture()). Any pending draws to the render target will |
622 * be executed before the resolve. | 622 * be executed before the resolve. |
623 * | 623 * |
624 * This is only necessary when a client wants to access the object directly | 624 * This is only necessary when a client wants to access the object directly |
625 * using the backend API directly. GrContext will detect when it must | 625 * using the backend API directly. GrContext will detect when it must |
626 * perform a resolve to a GrTexture used as the source of a draw or before | 626 * perform a resolve to a GrTexture used as the source of a draw or before |
627 * reading pixels back from a GrTexture or GrRenderTarget. | 627 * reading pixels back from a GrTexture or GrRenderTarget. |
628 */ | 628 */ |
629 void resolveRenderTarget(GrRenderTarget* target); | 629 void resolveRenderTarget(GrRenderTarget* target); |
630 | 630 |
| 631 #ifdef SK_DEVELOPER |
| 632 void dumpFontCache() const; |
| 633 #endif |
| 634 |
631 /////////////////////////////////////////////////////////////////////////// | 635 /////////////////////////////////////////////////////////////////////////// |
632 // Helpers | 636 // Helpers |
633 | 637 |
634 class AutoRenderTarget : public ::SkNoncopyable { | 638 class AutoRenderTarget : public ::SkNoncopyable { |
635 public: | 639 public: |
636 AutoRenderTarget(GrContext* context, GrRenderTarget* target) { | 640 AutoRenderTarget(GrContext* context, GrRenderTarget* target) { |
637 fPrevTarget = context->getRenderTarget(); | 641 fPrevTarget = context->getRenderTarget(); |
638 SkSafeRef(fPrevTarget); | 642 SkSafeRef(fPrevTarget); |
639 context->setRenderTarget(target); | 643 context->setRenderTarget(target); |
640 fContext = context; | 644 fContext = context; |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1017 } | 1021 } |
1018 | 1022 |
1019 GrTexture* texture() { return fTexture; } | 1023 GrTexture* texture() { return fTexture; } |
1020 | 1024 |
1021 private: | 1025 private: |
1022 GrContext* fContext; | 1026 GrContext* fContext; |
1023 GrTexture* fTexture; | 1027 GrTexture* fTexture; |
1024 }; | 1028 }; |
1025 | 1029 |
1026 #endif | 1030 #endif |
OLD | NEW |