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

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

Issue 12607013: Add MSAA configs to bench. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef GrContext_DEFINED 10 #ifndef GrContext_DEFINED
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 * @param maxTextureBytes The maximum number of bytes of texture memory 244 * @param maxTextureBytes The maximum number of bytes of texture memory
245 * that can be held in the cache. 245 * that can be held in the cache.
246 */ 246 */
247 void setTextureCacheLimits(int maxTextures, size_t maxTextureBytes); 247 void setTextureCacheLimits(int maxTextures, size_t maxTextureBytes);
248 248
249 /** 249 /**
250 * Return the max width or height of a texture supported by the current GPU . 250 * Return the max width or height of a texture supported by the current GPU .
251 */ 251 */
252 int getMaxTextureSize() const; 252 int getMaxTextureSize() const;
253 253
254 /**
255 * Return the max width or height of a render target supported by the
256 * current GPU.
257 */
258 int getMaxRenderTargetSize() const;
259
260 /////////////////////////////////////////////////////////////////////////// 254 ///////////////////////////////////////////////////////////////////////////
261 // Render targets 255 // Render targets
262 256
263 /** 257 /**
264 * Sets the render target. 258 * Sets the render target.
265 * @param target the render target to set. (should not be NULL.) 259 * @param target the render target to set. (should not be NULL.)
266 */ 260 */
267 void setRenderTarget(GrRenderTarget* target); 261 void setRenderTarget(GrRenderTarget* target);
268 262
269 /** 263 /**
270 * Gets the current render target. 264 * Gets the current render target.
271 * @return the currently bound render target. Should never be NULL. 265 * @return the currently bound render target. Should never be NULL.
272 */ 266 */
273 const GrRenderTarget* getRenderTarget() const; 267 const GrRenderTarget* getRenderTarget() const;
274 GrRenderTarget* getRenderTarget(); 268 GrRenderTarget* getRenderTarget();
275 269
276 GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; } 270 GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; }
277 271
278 /** 272 /**
279 * Can the provided configuration act as a color render target? 273 * Can the provided configuration act as a color render target?
280 */ 274 */
281 bool isConfigRenderable(GrPixelConfig config) const; 275 bool isConfigRenderable(GrPixelConfig config) const;
282 276
277 /**
278 * Return the max width or height of a render target supported by the
279 * current GPU.
280 */
281 int getMaxRenderTargetSize() const;
282
283 /**
284 * Returns the max sample count for a render target. It will be 0 if MSAA
285 * is not supported.
286 */
287 int getMaxSampleCount() const;
288
283 /////////////////////////////////////////////////////////////////////////// 289 ///////////////////////////////////////////////////////////////////////////
284 // Backend Surfaces 290 // Backend Surfaces
285 291
286 /** 292 /**
287 * Wraps an existing texture with a GrTexture object. 293 * Wraps an existing texture with a GrTexture object.
288 * 294 *
289 * OpenGL: if the object is a texture Gr may change its GL texture params 295 * OpenGL: if the object is a texture Gr may change its GL texture params
290 * when it is drawn. 296 * when it is drawn.
291 * 297 *
292 * @param desc description of the object to create. 298 * @param desc description of the object to create.
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 } 1002 }
997 1003
998 GrTexture* texture() { return fTexture; } 1004 GrTexture* texture() { return fTexture; }
999 1005
1000 private: 1006 private:
1001 GrContext* fContext; 1007 GrContext* fContext;
1002 GrTexture* fTexture; 1008 GrTexture* fTexture;
1003 }; 1009 };
1004 1010
1005 #endif 1011 #endif
OLDNEW
« no previous file with comments | « bench/benchmain.cpp ('k') | src/gpu/GrContext.cpp » ('j') | src/gpu/GrDrawTarget.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698