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

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

Issue 184443003: Add Gpu Tracing to Ganesh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Merge fixes 2 Created 6 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
« no previous file with comments | « gyp/gpu.gypi ('k') | 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 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 // Functions intended for internal use only. 853 // Functions intended for internal use only.
854 GrGpu* getGpu() { return fGpu; } 854 GrGpu* getGpu() { return fGpu; }
855 const GrGpu* getGpu() const { return fGpu; } 855 const GrGpu* getGpu() const { return fGpu; }
856 GrFontCache* getFontCache() { return fFontCache; } 856 GrFontCache* getFontCache() { return fFontCache; }
857 GrDrawTarget* getTextTarget(); 857 GrDrawTarget* getTextTarget();
858 const GrIndexBuffer* getQuadIndexBuffer() const; 858 const GrIndexBuffer* getQuadIndexBuffer() const;
859 859
860 // Called by tests that draw directly to the context via GrDrawTarget 860 // Called by tests that draw directly to the context via GrDrawTarget
861 void getTestTarget(GrTestTarget*); 861 void getTestTarget(GrTestTarget*);
862 862
863 // Functions for managing gpu trace markers
864 bool isGpuTracingEnabled() const { return fGpuTracingEnabled; }
865 void enableGpuTracing() { fGpuTracingEnabled = true; }
866 void disableGpuTracing() { fGpuTracingEnabled = false; }
867
863 /** 868 /**
864 * Stencil buffers add themselves to the cache using addStencilBuffer. findS tencilBuffer is 869 * Stencil buffers add themselves to the cache using addStencilBuffer. findS tencilBuffer is
865 * called to check the cache for a SB that matches an RT's criteria. 870 * called to check the cache for a SB that matches an RT's criteria.
866 */ 871 */
867 void addStencilBuffer(GrStencilBuffer* sb); 872 void addStencilBuffer(GrStencilBuffer* sb);
868 GrStencilBuffer* findStencilBuffer(int width, int height, int sampleCnt); 873 GrStencilBuffer* findStencilBuffer(int width, int height, int sampleCnt);
869 874
870 GrPathRenderer* getPathRenderer( 875 GrPathRenderer* getPathRenderer(
871 const SkPath& path, 876 const SkPath& path,
872 const SkStrokeRec& stroke, 877 const SkStrokeRec& stroke,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 921
917 struct CleanUpData { 922 struct CleanUpData {
918 PFCleanUpFunc fFunc; 923 PFCleanUpFunc fFunc;
919 void* fInfo; 924 void* fInfo;
920 }; 925 };
921 926
922 SkTDArray<CleanUpData> fCleanUpData; 927 SkTDArray<CleanUpData> fCleanUpData;
923 928
924 int fMaxTextureSizeOverride; 929 int fMaxTextureSizeOverride;
925 930
931 bool fGpuTracingEnabled;
932
926 GrContext(); // init must be called after the constructor. 933 GrContext(); // init must be called after the constructor.
927 bool init(GrBackend, GrBackendContext); 934 bool init(GrBackend, GrBackendContext);
928 935
929 void setupDrawBuffer(); 936 void setupDrawBuffer();
930 937
931 class AutoRestoreEffects; 938 class AutoRestoreEffects;
932 class AutoCheckFlush; 939 class AutoCheckFlush;
933 /// Sets the paint and returns the target to draw into. The paint can be NUL L in which case the 940 /// Sets the paint and returns the target to draw into. The paint can be NUL L in which case the
934 /// draw state is left unmodified. 941 /// draw state is left unmodified.
935 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects *, AutoCheckFlush*); 942 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects *, AutoCheckFlush*);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 } 1069 }
1063 1070
1064 GrTexture* texture() { return fTexture; } 1071 GrTexture* texture() { return fTexture; }
1065 1072
1066 private: 1073 private:
1067 GrContext* fContext; 1074 GrContext* fContext;
1068 GrTexture* fTexture; 1075 GrTexture* fTexture;
1069 }; 1076 };
1070 1077
1071 #endif 1078 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698