OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright 2015 Google Inc. | |
3 * | |
4 * Use of this source code is governed by a BSD-style license that can be | |
5 * found in the LICENSE file. | |
6 */ | |
7 | |
8 #ifndef GrImmediateDrawTarget_DEFINED | |
9 #define GrImmediateDrawTarget_DEFINED | |
10 | |
11 #include "GrDrawTarget.h" | |
12 | |
13 #include "GrBatchFlushState.h" | |
14 | |
15 /** | |
16 * A debug GrDrawTarget which immediately flushes every command it receives | |
17 */ | |
18 class GrImmediateDrawTarget : public GrClipTarget { | |
19 public: | |
20 /** | |
21 * Creates a GrImmediateDrawTarget | |
22 * | |
23 * @param context the context object that owns this draw buffer. | |
24 */ | |
25 GrImmediateDrawTarget(GrContext* context); | |
26 | |
27 ~GrImmediateDrawTarget() override; | |
28 | |
29 protected: | |
30 void onDrawBatch(GrBatch*) override; | |
31 | |
32 private: | |
33 void onReset() override; | |
34 void onFlush() override; | |
35 | |
36 uint32_t fDrawID; | |
37 | |
38 typedef GrClipTarget INHERITED; | |
39 }; | |
40 | |
41 #endif | |
OLD | NEW |