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

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

Issue 1572553002: Create stub GrAuditTrail class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: minor nit Created 4 years, 11 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/private/GrAuditTrail.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
11 #include "GrCaps.h" 11 #include "GrCaps.h"
12 #include "GrClip.h" 12 #include "GrClip.h"
13 #include "GrColor.h" 13 #include "GrColor.h"
14 #include "GrPaint.h" 14 #include "GrPaint.h"
15 #include "GrRenderTarget.h" 15 #include "GrRenderTarget.h"
16 #include "GrTextureProvider.h" 16 #include "GrTextureProvider.h"
17 #include "SkMatrix.h" 17 #include "SkMatrix.h"
18 #include "SkPathEffect.h" 18 #include "SkPathEffect.h"
19 #include "SkTypes.h" 19 #include "SkTypes.h"
20 #include "../private/GrAuditTrail.h"
20 #include "../private/GrSingleOwner.h" 21 #include "../private/GrSingleOwner.h"
21 #include "../private/SkMutex.h" 22 #include "../private/SkMutex.h"
22 23
23 struct GrBatchAtlasConfig; 24 struct GrBatchAtlasConfig;
24 class GrBatchFontCache; 25 class GrBatchFontCache;
25 struct GrContextOptions; 26 struct GrContextOptions;
26 class GrDrawingManager; 27 class GrDrawingManager;
27 class GrDrawContext; 28 class GrDrawContext;
28 class GrDrawTarget; 29 class GrDrawTarget;
29 class GrFragmentProcessor; 30 class GrFragmentProcessor;
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 /** Specify the sizes of the GrAtlasTextContext atlases. The configs pointe r below should be 352 /** Specify the sizes of the GrAtlasTextContext atlases. The configs pointe r below should be
352 to an array of 3 entries */ 353 to an array of 3 entries */
353 void setTextContextAtlasSizes_ForTesting(const GrBatchAtlasConfig* configs); 354 void setTextContextAtlasSizes_ForTesting(const GrBatchAtlasConfig* configs);
354 355
355 /** Enumerates all cached GPU resources and dumps their memory to traceMemor yDump. */ 356 /** Enumerates all cached GPU resources and dumps their memory to traceMemor yDump. */
356 void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const; 357 void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const;
357 358
358 /** Get pointer to atlas texture for given mask format */ 359 /** Get pointer to atlas texture for given mask format */
359 GrTexture* getFontAtlasTexture(GrMaskFormat format); 360 GrTexture* getFontAtlasTexture(GrMaskFormat format);
360 361
362 SkString dumpAuditTrailToJson() const { return fAuditTrail.toJson(); }
363
361 private: 364 private:
362 GrGpu* fGpu; 365 GrGpu* fGpu;
363 const GrCaps* fCaps; 366 const GrCaps* fCaps;
364 GrResourceCache* fResourceCache; 367 GrResourceCache* fResourceCache;
365 // this union exists because the inheritance of GrTextureProvider->GrResourc eProvider 368 // this union exists because the inheritance of GrTextureProvider->GrResourc eProvider
366 // is in a private header. 369 // is in a private header.
367 union { 370 union {
368 GrResourceProvider* fResourceProvider; 371 GrResourceProvider* fResourceProvider;
369 GrTextureProvider* fTextureProvider; 372 GrTextureProvider* fTextureProvider;
370 }; 373 };
(...skipping 27 matching lines...) Expand all
398 PFCleanUpFunc fFunc; 401 PFCleanUpFunc fFunc;
399 void* fInfo; 402 void* fInfo;
400 }; 403 };
401 404
402 SkTDArray<CleanUpData> fCleanUpData; 405 SkTDArray<CleanUpData> fCleanUpData;
403 406
404 const uint32_t fUniqueID; 407 const uint32_t fUniqueID;
405 408
406 SkAutoTDelete<GrDrawingManager> fDrawingManager; 409 SkAutoTDelete<GrDrawingManager> fDrawingManager;
407 410
411 GrAuditTrail fAuditTrail;
412
408 // TODO: have the CMM use drawContexts and rm this friending 413 // TODO: have the CMM use drawContexts and rm this friending
409 friend class GrClipMaskManager; // the CMM is friended just so it can call ' drawingManager' 414 friend class GrClipMaskManager; // the CMM is friended just so it can call ' drawingManager'
410 friend class GrDrawingManager; // for access to drawingManager for ProgramU nitTest 415 friend class GrDrawingManager; // for access to drawingManager for ProgramU nitTest
411 GrDrawingManager* drawingManager() { return fDrawingManager; } 416 GrDrawingManager* drawingManager() { return fDrawingManager; }
412 417
413 GrContext(); // init must be called after the constructor. 418 GrContext(); // init must be called after the constructor.
414 bool init(GrBackend, GrBackendContext, const GrContextOptions& options); 419 bool init(GrBackend, GrBackendContext, const GrContextOptions& options);
415 420
416 void initMockContext(); 421 void initMockContext();
417 void initCommon(const GrContextOptions&); 422 void initCommon(const GrContextOptions&);
(...skipping 24 matching lines...) Expand all
442 /** 447 /**
443 * A callback similar to the above for use by the TextBlobCache 448 * A callback similar to the above for use by the TextBlobCache
444 * TODO move textblob draw calls below context so we can use the call above. 449 * TODO move textblob draw calls below context so we can use the call above.
445 */ 450 */
446 static void TextBlobCacheOverBudgetCB(void* data); 451 static void TextBlobCacheOverBudgetCB(void* data);
447 452
448 typedef SkRefCnt INHERITED; 453 typedef SkRefCnt INHERITED;
449 }; 454 };
450 455
451 #endif 456 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | include/private/GrAuditTrail.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698