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

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

Issue 1406173003: Loosen requirement that there be only one GrDrawTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix comment Created 5 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 | « src/gpu/GrDrawContext.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class GrPathRangeDraw; 42 class GrPathRangeDraw;
43 43
44 class GrDrawTarget final : public SkRefCnt { 44 class GrDrawTarget final : public SkRefCnt {
45 public: 45 public:
46 // The context may not be fully constructed and should not be used during Gr DrawTarget 46 // The context may not be fully constructed and should not be used during Gr DrawTarget
47 // construction. 47 // construction.
48 GrDrawTarget(GrGpu* gpu, GrResourceProvider*); 48 GrDrawTarget(GrGpu* gpu, GrResourceProvider*);
49 49
50 ~GrDrawTarget() override; 50 ~GrDrawTarget() override;
51 51
52 void makeClosed() {
53 // We only close drawTargets When MDB is enabled. When MDB is disabled t here is only
54 // ever one drawTarget and all calls will be funnelled into it.
55 #ifdef ENABLE_MDB
56 fClosed = true;
57 #endif
58 }
59 bool isClosed() const { return fClosed; }
60
52 /** 61 /**
53 * Empties the draw buffer of any queued up draws. 62 * Empties the draw buffer of any queued up draws.
54 */ 63 */
55 void reset(); 64 void reset();
56 65
57 /** 66 /**
58 * This plays any queued up draws to its GrGpu target. It also resets this o bject (i.e. flushing 67 * This plays any queued up draws to its GrGpu target. It also resets this o bject (i.e. flushing
59 * is destructive). 68 * is destructive).
60 */ 69 */
61 void flush(); 70 void flush();
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 SkSTArray<256, SkAutoTUnref<GrBatch>, true> fBatches; 237 SkSTArray<256, SkAutoTUnref<GrBatch>, true> fBatches;
229 SkAutoTDelete<GrClipMaskManager> fClipMaskManager; 238 SkAutoTDelete<GrClipMaskManager> fClipMaskManager;
230 // The context is only in service of the clip mask manager, remove once CMM doesn't need this. 239 // The context is only in service of the clip mask manager, remove once CMM doesn't need this.
231 GrContext* fContext; 240 GrContext* fContext;
232 GrGpu* fGpu; 241 GrGpu* fGpu;
233 GrResourceProvider* fResourceProvider; 242 GrResourceProvider* fResourceProvider;
234 GrBatchFlushState fFlushState; 243 GrBatchFlushState fFlushState;
235 bool fFlushing; 244 bool fFlushing;
236 int fFirstUnpreparedBatch; 245 int fFirstUnpreparedBatch;
237 246
247 bool fClosed;
248
238 typedef SkRefCnt INHERITED; 249 typedef SkRefCnt INHERITED;
239 }; 250 };
240 251
241 #endif 252 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698