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

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

Issue 438023004: Enable gpu Debug markers if tracing category skia.gpu is enabled (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Uniquify var names Created 6 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
« 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 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 const GrGpu* getGpu() const { return fGpu; } 921 const GrGpu* getGpu() const { return fGpu; }
922 GrFontCache* getFontCache() { return fFontCache; } 922 GrFontCache* getFontCache() { return fFontCache; }
923 GrLayerCache* getLayerCache() { return fLayerCache.get(); } 923 GrLayerCache* getLayerCache() { return fLayerCache.get(); }
924 GrDrawTarget* getTextTarget(); 924 GrDrawTarget* getTextTarget();
925 const GrIndexBuffer* getQuadIndexBuffer() const; 925 const GrIndexBuffer* getQuadIndexBuffer() const;
926 GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; } 926 GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; }
927 927
928 // Called by tests that draw directly to the context via GrDrawTarget 928 // Called by tests that draw directly to the context via GrDrawTarget
929 void getTestTarget(GrTestTarget*); 929 void getTestTarget(GrTestTarget*);
930 930
931 // Functions for managing gpu trace markers
932 bool isGpuTracingEnabled() const { return fGpuTracingEnabled; }
933 void enableGpuTracing() { fGpuTracingEnabled = true; }
934 void disableGpuTracing() { fGpuTracingEnabled = false; }
935
936 void addGpuTraceMarker(const GrGpuTraceMarker* marker); 931 void addGpuTraceMarker(const GrGpuTraceMarker* marker);
937 void removeGpuTraceMarker(const GrGpuTraceMarker* marker); 932 void removeGpuTraceMarker(const GrGpuTraceMarker* marker);
938 933
939 /** 934 /**
940 * Stencil buffers add themselves to the cache using addStencilBuffer. findS tencilBuffer is 935 * Stencil buffers add themselves to the cache using addStencilBuffer. findS tencilBuffer is
941 * called to check the cache for a SB that matches an RT's criteria. 936 * called to check the cache for a SB that matches an RT's criteria.
942 */ 937 */
943 void addStencilBuffer(GrStencilBuffer* sb); 938 void addStencilBuffer(GrStencilBuffer* sb);
944 GrStencilBuffer* findStencilBuffer(int width, int height, int sampleCnt); 939 GrStencilBuffer* findStencilBuffer(int width, int height, int sampleCnt);
945 940
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 987
993 struct CleanUpData { 988 struct CleanUpData {
994 PFCleanUpFunc fFunc; 989 PFCleanUpFunc fFunc;
995 void* fInfo; 990 void* fInfo;
996 }; 991 };
997 992
998 SkTDArray<CleanUpData> fCleanUpData; 993 SkTDArray<CleanUpData> fCleanUpData;
999 994
1000 int fMaxTextureSizeOverride; 995 int fMaxTextureSizeOverride;
1001 996
1002 bool fGpuTracingEnabled;
1003
1004 GrContext(); // init must be called after the constructor. 997 GrContext(); // init must be called after the constructor.
1005 bool init(GrBackend, GrBackendContext); 998 bool init(GrBackend, GrBackendContext);
1006 999
1007 void setupDrawBuffer(); 1000 void setupDrawBuffer();
1008 1001
1009 class AutoRestoreEffects; 1002 class AutoRestoreEffects;
1010 class AutoCheckFlush; 1003 class AutoCheckFlush;
1011 /// Sets the paint and returns the target to draw into. The paint can be NUL L in which case the 1004 /// Sets the paint and returns the target to draw into. The paint can be NUL L in which case the
1012 /// draw state is left unmodified. 1005 /// draw state is left unmodified.
1013 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects *, AutoCheckFlush*); 1006 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects *, AutoCheckFlush*);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 } 1134 }
1142 1135
1143 GrTexture* texture() { return fTexture; } 1136 GrTexture* texture() { return fTexture; }
1144 1137
1145 private: 1138 private:
1146 GrContext* fContext; 1139 GrContext* fContext;
1147 GrTexture* fTexture; 1140 GrTexture* fTexture;
1148 }; 1141 };
1149 1142
1150 #endif 1143 #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