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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
620 * down-sampled to the associated GrTexture (accessible via | 620 * down-sampled to the associated GrTexture (accessible via |
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 |
robertphillips
2013/10/02 15:07:28
#ifdef SK_DEBUG? DEV?
const?
jvanverth1
2013/10/02 15:12:09
I'd like to be able to use this in release builds.
| |
631 void dumpFontCache(); | |
632 | |
631 /////////////////////////////////////////////////////////////////////////// | 633 /////////////////////////////////////////////////////////////////////////// |
632 // Helpers | 634 // Helpers |
633 | 635 |
634 class AutoRenderTarget : public ::SkNoncopyable { | 636 class AutoRenderTarget : public ::SkNoncopyable { |
635 public: | 637 public: |
636 AutoRenderTarget(GrContext* context, GrRenderTarget* target) { | 638 AutoRenderTarget(GrContext* context, GrRenderTarget* target) { |
637 fPrevTarget = context->getRenderTarget(); | 639 fPrevTarget = context->getRenderTarget(); |
638 SkSafeRef(fPrevTarget); | 640 SkSafeRef(fPrevTarget); |
639 context->setRenderTarget(target); | 641 context->setRenderTarget(target); |
640 fContext = context; | 642 fContext = context; |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1017 } | 1019 } |
1018 | 1020 |
1019 GrTexture* texture() { return fTexture; } | 1021 GrTexture* texture() { return fTexture; } |
1020 | 1022 |
1021 private: | 1023 private: |
1022 GrContext* fContext; | 1024 GrContext* fContext; |
1023 GrTexture* fTexture; | 1025 GrTexture* fTexture; |
1024 }; | 1026 }; |
1025 | 1027 |
1026 #endif | 1028 #endif |
OLD | NEW |