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

Side by Side Diff: src/gpu/GrDrawingManager.h

Issue 2321563006: Make GrResourceCache dynamically change between LRU and random replacement strategies. (Closed)
Patch Set: fix recursive flusing, add asserts Created 4 years, 2 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 | « include/gpu/GrGpuResource.h ('k') | src/gpu/GrDrawingManager.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 2015 Google Inc. 2 * Copyright 2015 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 GrDrawingManager_DEFINED 8 #ifndef GrDrawingManager_DEFINED
9 #define GrDrawingManager_DEFINED 9 #define GrDrawingManager_DEFINED
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 : fContext(context) 69 : fContext(context)
70 , fOptionsForDrawTargets(optionsForDrawTargets) 70 , fOptionsForDrawTargets(optionsForDrawTargets)
71 , fOptionsForPathRendererChain(optionsForPathRendererChain) 71 , fOptionsForPathRendererChain(optionsForPathRendererChain)
72 , fSingleOwner(singleOwner) 72 , fSingleOwner(singleOwner)
73 , fAbandoned(false) 73 , fAbandoned(false)
74 , fAtlasTextContext(nullptr) 74 , fAtlasTextContext(nullptr)
75 , fPathRendererChain(nullptr) 75 , fPathRendererChain(nullptr)
76 , fSoftwarePathRenderer(nullptr) 76 , fSoftwarePathRenderer(nullptr)
77 , fFlushState(context->getGpu(), context->resourceProvider()) 77 , fFlushState(context->getGpu(), context->resourceProvider())
78 , fFlushing(false) 78 , fFlushing(false)
79 , fLastFlushType(GrResourceCache::FlushType::kExternal)
79 , fIsImmediateMode(isImmediateMode) { 80 , fIsImmediateMode(isImmediateMode) {
80 } 81 }
81 82
82 void abandon(); 83 void abandon();
83 void cleanup(); 84 void cleanup();
84 void reset(); 85 void reset();
85 void flush() { this->internalFlush(GrResourceCache::FlushType::kExternal); } 86 void flush() { this->internalFlush(GrResourceCache::FlushType::kExternal); }
86 void internalFlush(GrResourceCache::FlushType); 87 void internalFlush(GrResourceCache::FlushType);
87 88
88 friend class GrContext; // for access to: ctor, abandon, reset & flush 89 friend class GrContext; // for access to: ctor, abandon, reset & flush
(...skipping 11 matching lines...) Expand all
100 bool fAbandoned; 101 bool fAbandoned;
101 SkTDArray<GrDrawTarget*> fDrawTargets; 102 SkTDArray<GrDrawTarget*> fDrawTargets;
102 103
103 SkAutoTDelete<GrAtlasTextContext> fAtlasTextContext; 104 SkAutoTDelete<GrAtlasTextContext> fAtlasTextContext;
104 105
105 GrPathRendererChain* fPathRendererChain; 106 GrPathRendererChain* fPathRendererChain;
106 GrSoftwarePathRenderer* fSoftwarePathRenderer; 107 GrSoftwarePathRenderer* fSoftwarePathRenderer;
107 108
108 GrBatchFlushState fFlushState; 109 GrBatchFlushState fFlushState;
109 bool fFlushing; 110 bool fFlushing;
111 GrResourceCache::FlushType fLastFlushType;
110 112
111 bool fIsImmediateMode; 113 bool fIsImmediateMode;
112 }; 114 };
113 115
114 #endif 116 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrGpuResource.h ('k') | src/gpu/GrDrawingManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698