diff options
Diffstat (limited to 'include/private/SkDeferredDisplayList.h')
-rw-r--r-- | include/private/SkDeferredDisplayList.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/include/private/SkDeferredDisplayList.h b/include/private/SkDeferredDisplayList.h new file mode 100644 index 0000000000..37e792ff20 --- /dev/null +++ b/include/private/SkDeferredDisplayList.h @@ -0,0 +1,43 @@ +/* + * Copyright 2017 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef SkDeferredDisplayList_DEFINED +#define SkDeferredDisplayList_DEFINED + +#include "SkSurfaceCharacterization.h" + +class SkImage; // TODO: rm this + +/* + * This class contains pre-processed gpu operations that can be replayed into + * an SkSurface via draw(SkDeferredDisplayList*). + * + * TODO: we probably need to expose this class so users can query it for memory usage. + */ +class SkDeferredDisplayList { +public: + SkDeferredDisplayList(const SkSurfaceCharacterization& characterization, + sk_sp<SkImage> image) // TODO rm this parameter + : fCharacterization(characterization) + , fImage(std::move(image)) { + } + + const SkSurfaceCharacterization& characterization() const { + return fCharacterization; + } + + // TODO: remove this. It is just scaffolding to get something up & running + void draw(SkSurface*); + +private: + SkSurfaceCharacterization fCharacterization; + + // TODO: actually store the GPU opLists + sk_sp<SkImage> fImage; +}; + +#endif |