Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: include/gpu/GrRenderTarget.h

Issue 696293004: Rename and clarify semantics of GrContext::resolveRenderTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@fix
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 GrRenderTarget_DEFINED 8 #ifndef GrRenderTarget_DEFINED
9 #define GrRenderTarget_DEFINED 9 #define GrRenderTarget_DEFINED
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 * @return true if the GrRenderTarget requires MSAA resolving 80 * @return true if the GrRenderTarget requires MSAA resolving
81 */ 81 */
82 bool needsResolve() const { return !fResolveRect.isEmpty(); } 82 bool needsResolve() const { return !fResolveRect.isEmpty(); }
83 83
84 /** 84 /**
85 * Returns a rect bounding the region needing resolving. 85 * Returns a rect bounding the region needing resolving.
86 */ 86 */
87 const SkIRect& getResolveRect() const { return fResolveRect; } 87 const SkIRect& getResolveRect() const { return fResolveRect; }
88 88
89 /** 89 /**
90 * If the render target is multisampled this will perform a multisample
91 * resolve. Any pending draws to the target are first flushed. This only
92 * applies to render targets that are associated with GrTextures. After the
93 * function returns the GrTexture will contain the resolved pixels.
94 */
95 void resolve();
96
97 /**
98 * Provide a performance hint that the render target's contents are allowed 90 * Provide a performance hint that the render target's contents are allowed
99 * to become undefined. 91 * to become undefined.
100 */ 92 */
101 void discard(); 93 void discard();
102 94
103 // a MSAA RT may require explicit resolving , it may auto-resolve (e.g. FBO 95 // a MSAA RT may require explicit resolving , it may auto-resolve (e.g. FBO
104 // 0 in GL), or be unresolvable because the client didn't give us the 96 // 0 in GL), or be unresolvable because the client didn't give us the
105 // resolve destination. 97 // resolve destination.
106 enum ResolveType { 98 enum ResolveType {
107 kCanResolve_ResolveType, 99 kCanResolve_ResolveType,
(...skipping 23 matching lines...) Expand all
131 123
132 private: 124 private:
133 GrStencilBuffer* fStencilBuffer; 125 GrStencilBuffer* fStencilBuffer;
134 126
135 SkIRect fResolveRect; 127 SkIRect fResolveRect;
136 128
137 typedef GrSurface INHERITED; 129 typedef GrSurface INHERITED;
138 }; 130 };
139 131
140 #endif 132 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | include/gpu/GrSurface.h » ('j') | src/gpu/GrContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698