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

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

Issue 23120004: Change Atlas recycling to track current flush count and recycle if Atlas not used in current flush. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Disable font cache stats Created 7 years, 4 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/GrAtlas.h » ('j') | src/gpu/GrTextStrike.cpp » ('J')
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 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 AutoMatrix fAutoMatrix; 817 AutoMatrix fAutoMatrix;
818 }; 818 };
819 819
820 /////////////////////////////////////////////////////////////////////////// 820 ///////////////////////////////////////////////////////////////////////////
821 // Functions intended for internal use only. 821 // Functions intended for internal use only.
822 GrGpu* getGpu() { return fGpu; } 822 GrGpu* getGpu() { return fGpu; }
823 const GrGpu* getGpu() const { return fGpu; } 823 const GrGpu* getGpu() const { return fGpu; }
824 GrFontCache* getFontCache() { return fFontCache; } 824 GrFontCache* getFontCache() { return fFontCache; }
825 GrDrawTarget* getTextTarget(); 825 GrDrawTarget* getTextTarget();
826 const GrIndexBuffer* getQuadIndexBuffer() const; 826 const GrIndexBuffer* getQuadIndexBuffer() const;
827 uint64_t getFlushCount() const { return fFlushCount; }
bsalomon 2013/08/13 21:18:28 I think this guy needs some documentation even tho
827 828
828 /** 829 /**
829 * Stencil buffers add themselves to the cache using addStencilBuffer. findS tencilBuffer is 830 * Stencil buffers add themselves to the cache using addStencilBuffer. findS tencilBuffer is
830 * called to check the cache for a SB that matches an RT's criteria. 831 * called to check the cache for a SB that matches an RT's criteria.
831 */ 832 */
832 void addStencilBuffer(GrStencilBuffer* sb); 833 void addStencilBuffer(GrStencilBuffer* sb);
833 GrStencilBuffer* findStencilBuffer(int width, int height, int sampleCnt); 834 GrStencilBuffer* findStencilBuffer(int width, int height, int sampleCnt);
834 835
835 GrPathRenderer* getPathRenderer( 836 GrPathRenderer* getPathRenderer(
836 const SkPath& path, 837 const SkPath& path,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 int fUPMToPMConversion; 877 int fUPMToPMConversion;
877 878
878 struct CleanUpData { 879 struct CleanUpData {
879 PFCleanUpFunc fFunc; 880 PFCleanUpFunc fFunc;
880 void* fInfo; 881 void* fInfo;
881 }; 882 };
882 883
883 SkTDArray<CleanUpData> fCleanUpData; 884 SkTDArray<CleanUpData> fCleanUpData;
884 885
885 int fMaxTextureSizeOverride; 886 int fMaxTextureSizeOverride;
887
888 uint64_t fFlushCount;
886 889
887 GrContext(); // init must be called after the constructor. 890 GrContext(); // init must be called after the constructor.
888 bool init(GrBackend, GrBackendContext); 891 bool init(GrBackend, GrBackendContext);
889 892
890 void setupDrawBuffer(); 893 void setupDrawBuffer();
891 894
892 class AutoRestoreEffects; 895 class AutoRestoreEffects;
893 /// Sets the paint and returns the target to draw into. The paint can be NUL L in which case the 896 /// Sets the paint and returns the target to draw into. The paint can be NUL L in which case the
894 /// draw state is left unmodified. 897 /// draw state is left unmodified.
895 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects *); 898 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects *);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 } 1015 }
1013 1016
1014 GrTexture* texture() { return fTexture; } 1017 GrTexture* texture() { return fTexture; }
1015 1018
1016 private: 1019 private:
1017 GrContext* fContext; 1020 GrContext* fContext;
1018 GrTexture* fTexture; 1021 GrTexture* fTexture;
1019 }; 1022 };
1020 1023
1021 #endif 1024 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrAtlas.h » ('j') | src/gpu/GrTextStrike.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698