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

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

Issue 2298003003: Don't purge resources for trivial GrContext flushes (Closed)
Patch Set: Fix speeling Created 4 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 | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.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 GrDrawTarget_DEFINED 8 #ifndef GrDrawTarget_DEFINED
9 #define GrDrawTarget_DEFINED 9 #define GrDrawTarget_DEFINED
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 * Dump out the drawTarget dependency DAG 89 * Dump out the drawTarget dependency DAG
90 */ 90 */
91 SkDEBUGCODE(void dump() const;) 91 SkDEBUGCODE(void dump() const;)
92 92
93 /** 93 /**
94 * Empties the draw buffer of any queued up draws. 94 * Empties the draw buffer of any queued up draws.
95 */ 95 */
96 void reset(); 96 void reset();
97 97
98 /** 98 /**
99 * Together these two functions flush all queued up draws to the Gpu. 99 * Together these two functions flush all queued up draws to GrCommandBuffer . The return value
100 * of drawBatches() indicates whether any commands were actually issued to t he GPU.
100 */ 101 */
101 void prepareBatches(GrBatchFlushState* flushState); 102 void prepareBatches(GrBatchFlushState* flushState);
102 void drawBatches(GrBatchFlushState* flushState); 103 bool drawBatches(GrBatchFlushState* flushState);
103 104
104 /** 105 /**
105 * Gets the capabilities of the draw target. 106 * Gets the capabilities of the draw target.
106 */ 107 */
107 const GrCaps* caps() const { return fGpu->caps(); } 108 const GrCaps* caps() const { return fGpu->caps(); }
108 109
109 void drawBatch(const GrPipelineBuilder&, GrDrawContext*, const GrClip&, GrDr awBatch*); 110 void drawBatch(const GrPipelineBuilder&, GrDrawContext*, const GrClip&, GrDr awBatch*);
110 111
111 void addBatch(sk_sp<GrBatch>); 112 void addBatch(sk_sp<GrBatch>);
112 113
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 bool fDrawBatchBounds; 240 bool fDrawBatchBounds;
240 int fMaxBatchLookback; 241 int fMaxBatchLookback;
241 int fMaxBatchLookahead; 242 int fMaxBatchLookahead;
242 243
243 SkAutoTDelete<gr_instanced::InstancedRendering> fInstancedRendering; 244 SkAutoTDelete<gr_instanced::InstancedRendering> fInstancedRendering;
244 245
245 typedef SkRefCnt INHERITED; 246 typedef SkRefCnt INHERITED;
246 }; 247 };
247 248
248 #endif 249 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698