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

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

Issue 20325002: Add GrContext::setMaxTextureSizeOverride (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: omit body of setMaxTextureOverride Created 7 years, 5 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
« 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 * @param maxTextureBytes The maximum number of bytes of texture memory 246 * @param maxTextureBytes The maximum number of bytes of texture memory
247 * that can be held in the cache. 247 * that can be held in the cache.
248 */ 248 */
249 void setTextureCacheLimits(int maxTextures, size_t maxTextureBytes); 249 void setTextureCacheLimits(int maxTextures, size_t maxTextureBytes);
250 250
251 /** 251 /**
252 * Return the max width or height of a texture supported by the current GPU . 252 * Return the max width or height of a texture supported by the current GPU .
253 */ 253 */
254 int getMaxTextureSize() const; 254 int getMaxTextureSize() const;
255 255
256 /**
257 * Temporarily override the true max texture size. Note: an override
258 * larger then the true max texture size will have no effect.
259 * This entry point is mainly meant for testing texture size dependent
260 * features and is only available if defined outside of Skia (see
261 * bleed GM.
262 */
263 void setMaxTextureSizeOverride(int maxTextureSizeOverride);
264
256 /////////////////////////////////////////////////////////////////////////// 265 ///////////////////////////////////////////////////////////////////////////
257 // Render targets 266 // Render targets
258 267
259 /** 268 /**
260 * Sets the render target. 269 * Sets the render target.
261 * @param target the render target to set. 270 * @param target the render target to set.
262 */ 271 */
263 void setRenderTarget(GrRenderTarget* target) { 272 void setRenderTarget(GrRenderTarget* target) {
264 fRenderTarget.reset(SkSafeRef(target)); 273 fRenderTarget.reset(SkSafeRef(target));
265 } 274 }
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 873
865 bool fDidTestPMConversions; 874 bool fDidTestPMConversions;
866 int fPMToUPMConversion; 875 int fPMToUPMConversion;
867 int fUPMToPMConversion; 876 int fUPMToPMConversion;
868 877
869 struct CleanUpData { 878 struct CleanUpData {
870 PFCleanUpFunc fFunc; 879 PFCleanUpFunc fFunc;
871 void* fInfo; 880 void* fInfo;
872 }; 881 };
873 882
874 SkTDArray<CleanUpData> fCleanUpData; 883 SkTDArray<CleanUpData> fCleanUpData;
884
885 int fMaxTextureSizeOverride;
875 886
876 GrContext(); // init must be called after the constructor. 887 GrContext(); // init must be called after the constructor.
877 bool init(GrBackend, GrBackendContext); 888 bool init(GrBackend, GrBackendContext);
878 889
879 void setupDrawBuffer(); 890 void setupDrawBuffer();
880 891
881 class AutoRestoreEffects; 892 class AutoRestoreEffects;
882 /// Sets the paint and returns the target to draw into. The paint can be NUL L in which case the 893 /// Sets the paint and returns the target to draw into. The paint can be NUL L in which case the
883 /// draw state is left unmodified. 894 /// draw state is left unmodified.
884 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects *); 895 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects *);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 } 1012 }
1002 1013
1003 GrTexture* texture() { return fTexture; } 1014 GrTexture* texture() { return fTexture; }
1004 1015
1005 private: 1016 private:
1006 GrContext* fContext; 1017 GrContext* fContext;
1007 GrTexture* fTexture; 1018 GrTexture* fTexture;
1008 }; 1019 };
1009 1020
1010 #endif 1021 #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