Trace dump tool, for dumping pngs (and in the future more stuff).

This commit is contained in:
Ben Vanik
2015-12-13 11:59:14 -08:00
parent aec43ffb2e
commit 7419e7eb4a
12 changed files with 510 additions and 7 deletions

View File

@@ -11,6 +11,7 @@
#define XENIA_UI_GRAPHICS_CONTEXT_H_
#include <memory>
#include <vector>
namespace xe {
namespace ui {
@@ -19,6 +20,17 @@ class GraphicsProvider;
class ImmediateDrawer;
class Window;
class RawImage {
public:
RawImage() = default;
~RawImage() = default;
size_t width = 0;
size_t height = 0;
size_t stride = 0;
std::vector<uint8_t> data;
};
class GraphicsContext {
public:
virtual ~GraphicsContext();
@@ -36,6 +48,8 @@ class GraphicsContext {
virtual void BeginSwap() = 0;
virtual void EndSwap() = 0;
virtual std::unique_ptr<RawImage> Capture() = 0;
protected:
explicit GraphicsContext(GraphicsProvider* provider, Window* target_window);