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

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

Issue 1313743002: Add onMemoryDump to GrContext (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Small build fix Created 5 years, 3 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') | include/gpu/GrGpuResource.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 25 matching lines...) Expand all
36 class GrResourceEntry; 36 class GrResourceEntry;
37 class GrResourceCache; 37 class GrResourceCache;
38 class GrResourceProvider; 38 class GrResourceProvider;
39 class GrTestTarget; 39 class GrTestTarget;
40 class GrTextBlobCache; 40 class GrTextBlobCache;
41 class GrTextContext; 41 class GrTextContext;
42 class GrTextureParams; 42 class GrTextureParams;
43 class GrVertexBuffer; 43 class GrVertexBuffer;
44 class GrStrokeInfo; 44 class GrStrokeInfo;
45 class GrSoftwarePathRenderer; 45 class GrSoftwarePathRenderer;
46 class SkTraceMemoryDump;
46 47
47 class SK_API GrContext : public SkRefCnt { 48 class SK_API GrContext : public SkRefCnt {
48 public: 49 public:
49 /** 50 /**
50 * Creates a GrContext for a backend context. 51 * Creates a GrContext for a backend context.
51 */ 52 */
52 static GrContext* Create(GrBackend, GrBackendContext, const GrContextOptions & options); 53 static GrContext* Create(GrBackend, GrBackendContext, const GrContextOptions & options);
53 static GrContext* Create(GrBackend, GrBackendContext); 54 static GrContext* Create(GrBackend, GrBackendContext);
54 55
55 /** 56 /**
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 void printGpuStats() const; 352 void printGpuStats() const;
352 353
353 /** Specify the TextBlob cache limit. If the current cache exceeds this limi t it will purge. 354 /** Specify the TextBlob cache limit. If the current cache exceeds this limi t it will purge.
354 this is for testing only */ 355 this is for testing only */
355 void setTextBlobCacheLimit_ForTesting(size_t bytes); 356 void setTextBlobCacheLimit_ForTesting(size_t bytes);
356 357
357 /** Specify the sizes of the GrAtlasTextContext atlases. The configs pointe r below should be 358 /** Specify the sizes of the GrAtlasTextContext atlases. The configs pointe r below should be
358 to an array of 3 entries */ 359 to an array of 3 entries */
359 void setTextContextAtlasSizes_ForTesting(const GrBatchAtlasConfig* configs); 360 void setTextContextAtlasSizes_ForTesting(const GrBatchAtlasConfig* configs);
360 361
362 /** Enumerates all cached GPU resources and dumps their memory to traceMemor yDump. */
363 void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const;
364
361 private: 365 private:
362 GrGpu* fGpu; 366 GrGpu* fGpu;
363 const GrCaps* fCaps; 367 const GrCaps* fCaps;
364 GrResourceCache* fResourceCache; 368 GrResourceCache* fResourceCache;
365 // this union exists because the inheritance of GrTextureProvider->GrResourc eProvider 369 // this union exists because the inheritance of GrTextureProvider->GrResourc eProvider
366 // is in a private header. 370 // is in a private header.
367 union { 371 union {
368 GrResourceProvider* fResourceProvider; 372 GrResourceProvider* fResourceProvider;
369 GrTextureProvider* fTextureProvider; 373 GrTextureProvider* fTextureProvider;
370 }; 374 };
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 /** 483 /**
480 * A callback similar to the above for use by the TextBlobCache 484 * A callback similar to the above for use by the TextBlobCache
481 * TODO move textblob draw calls below context so we can use the call above. 485 * TODO move textblob draw calls below context so we can use the call above.
482 */ 486 */
483 static void TextBlobCacheOverBudgetCB(void* data); 487 static void TextBlobCacheOverBudgetCB(void* data);
484 488
485 typedef SkRefCnt INHERITED; 489 typedef SkRefCnt INHERITED;
486 }; 490 };
487 491
488 #endif 492 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/GrGpuResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698