| 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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 * Resolves a render target that has MSAA. The intermediate MSAA buffer is | 646 * Resolves a render target that has MSAA. The intermediate MSAA buffer is |
| 647 * down-sampled to the associated GrTexture (accessible via | 647 * down-sampled to the associated GrTexture (accessible via |
| 648 * GrRenderTarget::asTexture()). Any pending draws to the render target will | 648 * GrRenderTarget::asTexture()). Any pending draws to the render target will |
| 649 * be executed before the resolve. | 649 * be executed before the resolve. |
| 650 * | 650 * |
| 651 * This is only necessary when a client wants to access the object directly | 651 * This is only necessary when a client wants to access the object directly |
| 652 * using the backend API directly. GrContext will detect when it must | 652 * using the backend API directly. GrContext will detect when it must |
| 653 * perform a resolve to a GrTexture used as the source of a draw or before | 653 * perform a resolve to a GrTexture used as the source of a draw or before |
| 654 * reading pixels back from a GrTexture or GrRenderTarget. | 654 * reading pixels back from a GrTexture or GrRenderTarget. |
| 655 */ | 655 */ |
| 656 void resolveRenderTarget(GrRenderTarget* target); | 656 void resolveRenderTarget(GrRenderTarget*); |
| 657 |
| 658 /** |
| 659 * Provides a perfomance hint that the render target's contents are allowed |
| 660 * to become undefined. |
| 661 */ |
| 662 void discardRenderTarget(GrRenderTarget*); |
| 657 | 663 |
| 658 #ifdef SK_DEVELOPER | 664 #ifdef SK_DEVELOPER |
| 659 void dumpFontCache() const; | 665 void dumpFontCache() const; |
| 660 #endif | 666 #endif |
| 661 | 667 |
| 662 /////////////////////////////////////////////////////////////////////////// | 668 /////////////////////////////////////////////////////////////////////////// |
| 663 // Helpers | 669 // Helpers |
| 664 | 670 |
| 665 class AutoRenderTarget : public ::SkNoncopyable { | 671 class AutoRenderTarget : public ::SkNoncopyable { |
| 666 public: | 672 public: |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 } | 1075 } |
| 1070 | 1076 |
| 1071 GrTexture* texture() { return fTexture; } | 1077 GrTexture* texture() { return fTexture; } |
| 1072 | 1078 |
| 1073 private: | 1079 private: |
| 1074 GrContext* fContext; | 1080 GrContext* fContext; |
| 1075 GrTexture* fTexture; | 1081 GrTexture* fTexture; |
| 1076 }; | 1082 }; |
| 1077 | 1083 |
| 1078 #endif | 1084 #endif |
| OLD | NEW |