]> git.sesse.net Git - nageru/blobdiff - futatabi/jpeg_frame.h
Change Futatabi frames to be cached as textures instead of in system memory.
[nageru] / futatabi / jpeg_frame.h
index 6fd0d4b9d05cfb685495ae8e86287b61efb09f4f..5e94cbbdc58acf70612d3b4a302cc12b9df12fc5 100644 (file)
@@ -4,15 +4,19 @@
 #include <memory>
 #include <string>
 
+#include "shared/ref_counted_gl_sync.h"
+#include "shared/ref_counted_texture.h"
+
 struct Frame {
        bool is_semiplanar = false;
-       std::unique_ptr<uint8_t[]> y;
-       std::unique_ptr<uint8_t[]> cb, cr;  // For planar.
-       std::unique_ptr<uint8_t[]> cbcr;  // For semiplanar.
+       RefCountedTexture y;
+       RefCountedTexture cb, cr;  // For planar.
+       RefCountedTexture cbcr;  // For semiplanar.
        unsigned width, height;
        unsigned chroma_subsampling_x, chroma_subsampling_y;
-       unsigned pitch_y, pitch_chroma;
        std::string exif_data;
+       RefCountedGLsync uploaded_ui_thread;
+       RefCountedGLsync uploaded_interpolation;
 };
 
 #endif  // !defined(_JPEG_FRAME_H)