| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright 2011 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 GrBufferedDrawTarget_DEFINED | |
| 9 #define GrBufferedDrawTarget_DEFINED | |
| 10 | |
| 11 #include "GrDrawTarget.h" | |
| 12 #include "GrCommandBuilder.h" | |
| 13 #include "SkChunkAlloc.h" | |
| 14 | |
| 15 /** | |
| 16 * GrBufferedDrawTarget is an implementation of GrDrawTarget that queues up draw
s for eventual | |
| 17 * playback into a GrGpu. In theory one draw buffer could playback into another.
Similarly, it is | |
| 18 * the caller's responsibility to ensure that all referenced textures, buffers,
and render-targets | |
| 19 * are associated in the GrGpu object that the buffer is played back into. | |
| 20 */ | |
| 21 class GrBufferedDrawTarget : public GrClipTarget { | |
| 22 public: | |
| 23 /** | |
| 24 * Creates a GrBufferedDrawTarget | |
| 25 * | |
| 26 * @param context the context object that owns this draw buffer. | |
| 27 */ | |
| 28 GrBufferedDrawTarget(GrContext* context); | |
| 29 | |
| 30 ~GrBufferedDrawTarget() override; | |
| 31 | |
| 32 protected: | |
| 33 void onDrawBatch(GrBatch*) override; | |
| 34 | |
| 35 private: | |
| 36 void onReset() override; | |
| 37 void onFlush() override; | |
| 38 | |
| 39 SkAutoTDelete<GrCommandBuilder> fCommands; | |
| 40 uint32_t fDrawID; | |
| 41 | |
| 42 typedef GrClipTarget INHERITED; | |
| 43 }; | |
| 44 | |
| 45 #endif | |
| OLD | NEW |