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/GrContext.h

Issue 188403003: Add API for GrContext to recommend rendertarget sample count (Closed) Base URL: https://skia.googlesource.com/skia.git@skpathobject
Patch Set: address review commetns Created 6 years, 9 months 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
« no previous file with comments | « no previous file | src/gpu/GrContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 * current GPU. 299 * current GPU.
300 */ 300 */
301 int getMaxRenderTargetSize() const; 301 int getMaxRenderTargetSize() const;
302 302
303 /** 303 /**
304 * Returns the max sample count for a render target. It will be 0 if MSAA 304 * Returns the max sample count for a render target. It will be 0 if MSAA
305 * is not supported. 305 * is not supported.
306 */ 306 */
307 int getMaxSampleCount() const; 307 int getMaxSampleCount() const;
308 308
309 /**
310 * Returns the recommended sample count for a render target when using this
311 * context.
312 *
313 * @param config the configuration of the render target.
314 * @param dpi the display density in dots per inch.
315 *
316 * @return sample count that should be perform well and have good enough
317 * rendering quality for the display. Alternatively returns 0 if
318 * MSAA is not supported or recommended to be used by default.
319 */
320 int getRecommendedSampleCount(GrPixelConfig config, SkScalar dpi) const;
321
309 /////////////////////////////////////////////////////////////////////////// 322 ///////////////////////////////////////////////////////////////////////////
310 // Backend Surfaces 323 // Backend Surfaces
311 324
312 /** 325 /**
313 * Wraps an existing texture with a GrTexture object. 326 * Wraps an existing texture with a GrTexture object.
314 * 327 *
315 * OpenGL: if the object is a texture Gr may change its GL texture params 328 * OpenGL: if the object is a texture Gr may change its GL texture params
316 * when it is drawn. 329 * when it is drawn.
317 * 330 *
318 * @param desc description of the object to create. 331 * @param desc description of the object to create.
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 } 1057 }
1045 1058
1046 GrTexture* texture() { return fTexture; } 1059 GrTexture* texture() { return fTexture; }
1047 1060
1048 private: 1061 private:
1049 GrContext* fContext; 1062 GrContext* fContext;
1050 GrTexture* fTexture; 1063 GrTexture* fTexture;
1051 }; 1064 };
1052 1065
1053 #endif 1066 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698