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

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

Issue 25673004: When cache is full delay flush until GrContext draw is finished (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Rob's comments Created 7 years, 2 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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 GrResourceCache* fTextureCache; 870 GrResourceCache* fTextureCache;
871 GrFontCache* fFontCache; 871 GrFontCache* fFontCache;
872 872
873 GrPathRendererChain* fPathRendererChain; 873 GrPathRendererChain* fPathRendererChain;
874 GrSoftwarePathRenderer* fSoftwarePathRenderer; 874 GrSoftwarePathRenderer* fSoftwarePathRenderer;
875 875
876 GrVertexBufferAllocPool* fDrawBufferVBAllocPool; 876 GrVertexBufferAllocPool* fDrawBufferVBAllocPool;
877 GrIndexBufferAllocPool* fDrawBufferIBAllocPool; 877 GrIndexBufferAllocPool* fDrawBufferIBAllocPool;
878 GrInOrderDrawBuffer* fDrawBuffer; 878 GrInOrderDrawBuffer* fDrawBuffer;
879 879
880 // Set by OverbudgetCB() to request that GrContext flush before exiting a dr aw.
881 bool fFlushToReduceCacheSize;
882
880 GrAARectRenderer* fAARectRenderer; 883 GrAARectRenderer* fAARectRenderer;
881 GrOvalRenderer* fOvalRenderer; 884 GrOvalRenderer* fOvalRenderer;
882 885
883 bool fDidTestPMConversions; 886 bool fDidTestPMConversions;
884 int fPMToUPMConversion; 887 int fPMToUPMConversion;
885 int fUPMToPMConversion; 888 int fUPMToPMConversion;
886 889
887 struct CleanUpData { 890 struct CleanUpData {
888 PFCleanUpFunc fFunc; 891 PFCleanUpFunc fFunc;
889 void* fInfo; 892 void* fInfo;
890 }; 893 };
891 894
892 SkTDArray<CleanUpData> fCleanUpData; 895 SkTDArray<CleanUpData> fCleanUpData;
893 896
894 int fMaxTextureSizeOverride; 897 int fMaxTextureSizeOverride;
895 898
896 GrContext(); // init must be called after the constructor. 899 GrContext(); // init must be called after the constructor.
897 bool init(GrBackend, GrBackendContext); 900 bool init(GrBackend, GrBackendContext);
898 901
899 void setupDrawBuffer(); 902 void setupDrawBuffer();
900 903
901 class AutoRestoreEffects; 904 class AutoRestoreEffects;
905 class AutoCheckFlush;
902 /// Sets the paint and returns the target to draw into. The paint can be NUL L in which case the 906 /// Sets the paint and returns the target to draw into. The paint can be NUL L in which case the
903 /// draw state is left unmodified. 907 /// draw state is left unmodified.
904 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects *); 908 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects *, AutoCheckFlush*);
905 909
906 void internalDrawPath(GrDrawTarget* target, bool useAA, const SkPath& path, 910 void internalDrawPath(GrDrawTarget* target, bool useAA, const SkPath& path,
907 const SkStrokeRec& stroke); 911 const SkStrokeRec& stroke);
908 912
909 GrTexture* createResizedTexture(const GrTextureDesc& desc, 913 GrTexture* createResizedTexture(const GrTextureDesc& desc,
910 const GrCacheID& cacheID, 914 const GrCacheID& cacheID,
911 void* srcData, 915 void* srcData,
912 size_t rowBytes, 916 size_t rowBytes,
913 bool filter); 917 bool filter);
914 918
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 } 1025 }
1022 1026
1023 GrTexture* texture() { return fTexture; } 1027 GrTexture* texture() { return fTexture; }
1024 1028
1025 private: 1029 private:
1026 GrContext* fContext; 1030 GrContext* fContext;
1027 GrTexture* fTexture; 1031 GrTexture* fTexture;
1028 }; 1032 };
1029 1033
1030 #endif 1034 #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