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

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

Issue 1128903008: add option to supress prints on context (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 7 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 | include/gpu/GrTypesPriv.h » ('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 29 matching lines...) Expand all
40 class GrVertexBuffer; 40 class GrVertexBuffer;
41 class GrStrokeInfo; 41 class GrStrokeInfo;
42 class GrSoftwarePathRenderer; 42 class GrSoftwarePathRenderer;
43 class SkGpuDevice; 43 class SkGpuDevice;
44 44
45 class SK_API GrContext : public SkRefCnt { 45 class SK_API GrContext : public SkRefCnt {
46 public: 46 public:
47 SK_DECLARE_INST_COUNT(GrContext) 47 SK_DECLARE_INST_COUNT(GrContext)
48 48
49 struct Options { 49 struct Options {
50 Options() : fDrawPathToCompressedTexture(false) { } 50 Options() : fDrawPathToCompressedTexture(false), fSuppressPrints(false) { }
51 51
52 // EXPERIMENTAL 52 // EXPERIMENTAL
53 // May be removed in the future, or may become standard depending 53 // May be removed in the future, or may become standard depending
54 // on the outcomes of a variety of internal tests. 54 // on the outcomes of a variety of internal tests.
55 bool fDrawPathToCompressedTexture; 55 bool fDrawPathToCompressedTexture;
56 bool fSuppressPrints;
56 }; 57 };
57 58
58 /** 59 /**
59 * Creates a GrContext for a backend context. 60 * Creates a GrContext for a backend context.
60 */ 61 */
61 static GrContext* Create(GrBackend, GrBackendContext, const Options* opts = NULL); 62 static GrContext* Create(GrBackend, GrBackendContext, const Options* opts = NULL);
62 63
63 /** 64 /**
64 * Only defined in test apps. 65 * Only defined in test apps.
65 */ 66 */
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 GrGpu* getGpu() { return fGpu; } 523 GrGpu* getGpu() { return fGpu; }
523 const GrGpu* getGpu() const { return fGpu; } 524 const GrGpu* getGpu() const { return fGpu; }
524 GrBatchFontCache* getBatchFontCache() { return fBatchFontCache; } 525 GrBatchFontCache* getBatchFontCache() { return fBatchFontCache; }
525 GrLayerCache* getLayerCache() { return fLayerCache.get(); } 526 GrLayerCache* getLayerCache() { return fLayerCache.get(); }
526 GrTextBlobCache* getTextBlobCache() { return fTextBlobCache; } 527 GrTextBlobCache* getTextBlobCache() { return fTextBlobCache; }
527 GrDrawTarget* getTextTarget(); 528 GrDrawTarget* getTextTarget();
528 GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; } 529 GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; }
529 GrResourceProvider* resourceProvider() { return fResourceProvider; } 530 GrResourceProvider* resourceProvider() { return fResourceProvider; }
530 const GrResourceProvider* resourceProvider() const { return fResourceProvide r; } 531 const GrResourceProvider* resourceProvider() const { return fResourceProvide r; }
531 GrResourceCache* getResourceCache() { return fResourceCache; } 532 GrResourceCache* getResourceCache() { return fResourceCache; }
533 bool suppressPrints() const { return fOptions.fSuppressPrints; }
532 534
533 // Called by tests that draw directly to the context via GrDrawTarget 535 // Called by tests that draw directly to the context via GrDrawTarget
534 void getTestTarget(GrTestTarget*); 536 void getTestTarget(GrTestTarget*);
535 537
536 void addGpuTraceMarker(const GrGpuTraceMarker* marker); 538 void addGpuTraceMarker(const GrGpuTraceMarker* marker);
537 void removeGpuTraceMarker(const GrGpuTraceMarker* marker); 539 void removeGpuTraceMarker(const GrGpuTraceMarker* marker);
538 540
539 GrPathRenderer* getPathRenderer( 541 GrPathRenderer* getPathRenderer(
540 const GrDrawTarget* target, 542 const GrDrawTarget* target,
541 const GrPipelineBuilder*, 543 const GrPipelineBuilder*,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 */ 660 */
659 static void TextBlobCacheOverBudgetCB(void* data); 661 static void TextBlobCacheOverBudgetCB(void* data);
660 662
661 // TODO see note on createTextContext 663 // TODO see note on createTextContext
662 friend class SkGpuDevice; 664 friend class SkGpuDevice;
663 665
664 typedef SkRefCnt INHERITED; 666 typedef SkRefCnt INHERITED;
665 }; 667 };
666 668
667 #endif 669 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrTypesPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698