Syncing Test harness for Scissor/Viewport
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / test-graphics-buffer.h
index 6a0acac..87c9f87 100644 (file)
  */
 
 #include <dali/graphics-api/graphics-buffer.h>
+#include <dali/graphics-api/graphics-types.h>
+
+#include "test-gl-abstraction.h"
+#include "test-trace-call-stack.h"
 
 namespace Dali
 {
+class TestGraphicsProgram;
 class TestGraphicsBuffer : public Graphics::Buffer
 {
 public:
-  TestGraphicsBuffer() = default;
+  TestGraphicsBuffer(TraceCallStack& callStack, TestGlAbstraction& glAbstraction, uint32_t size, Graphics::BufferUsageFlags usage);
+  void   Bind();
+  void   Unbind();
+  void   Upload(uint32_t offset, uint32_t size);
+  GLenum GetTarget();
+
+  bool IsCPUAllocated() const
+  {
+    return true;
+  }
+
+  void BindAsUniformBuffer(const TestGraphicsProgram* program) const;
+
+  TraceCallStack&            mCallStack;
+  TestGlAbstraction&         mGl;
+  std::vector<uint8_t>       memory;
+  Graphics::BufferUsageFlags mUsage;
+  GLuint                     mId{0};
+  bool                       mCreated{false};
 };
 
 } // namespace Dali