summaryrefslogtreecommitdiff
path: root/ucoo
diff options
context:
space:
mode:
authorNicolas Schodet2016-10-11 12:08:35 +0200
committerNicolas Schodet2019-10-09 23:05:51 +0200
commitf72bcb2ecff195011892002dda694714853e14d3 (patch)
tree98c5d3f2fce0b0639056917226c4e86480b00729 /ucoo
parentef384d2cbfcb7074a0c35444a2c55ba657fe2526 (diff)
ucoo/{intf, hal/frame_buffer}: add on method in frame_buffer interface
Diffstat (limited to 'ucoo')
-rw-r--r--ucoo/hal/frame_buffer/sdl_frame_buffer.host.cc5
-rw-r--r--ucoo/hal/frame_buffer/sdl_frame_buffer.host.hh1
-rw-r--r--ucoo/intf/frame_buffer.hh2
3 files changed, 8 insertions, 0 deletions
diff --git a/ucoo/hal/frame_buffer/sdl_frame_buffer.host.cc b/ucoo/hal/frame_buffer/sdl_frame_buffer.host.cc
index cbeebbd..e28bfa9 100644
--- a/ucoo/hal/frame_buffer/sdl_frame_buffer.host.cc
+++ b/ucoo/hal/frame_buffer/sdl_frame_buffer.host.cc
@@ -55,6 +55,11 @@ SdlFrameBuffer::disable ()
}
void
+SdlFrameBuffer::on (bool state)
+{
+}
+
+void
SdlFrameBuffer::refresh ()
{
SDL_UpdateTexture (tex_, nullptr, pixels_, width * 4);
diff --git a/ucoo/hal/frame_buffer/sdl_frame_buffer.host.hh b/ucoo/hal/frame_buffer/sdl_frame_buffer.host.hh
index 3bf8960..92b136d 100644
--- a/ucoo/hal/frame_buffer/sdl_frame_buffer.host.hh
+++ b/ucoo/hal/frame_buffer/sdl_frame_buffer.host.hh
@@ -36,6 +36,7 @@ class SdlFrameBuffer : public FrameBuffer
: FrameBuffer (w, h) { }
void enable () override;
void disable () override;
+ void on (bool state = true) override;
void refresh () override;
void fill (uint32_t color) override;
void fill (uint32_t color, const Surface::Rect &rect) override;
diff --git a/ucoo/intf/frame_buffer.hh b/ucoo/intf/frame_buffer.hh
index c8774f2..5df91e3 100644
--- a/ucoo/intf/frame_buffer.hh
+++ b/ucoo/intf/frame_buffer.hh
@@ -87,6 +87,8 @@ class FrameBuffer
virtual void enable () = 0;
/// Disable.
virtual void disable () = 0;
+ /// Turn display on or off.
+ virtual void on (bool state = true) = 0;
/// Show hidden buffer on screen.
virtual void refresh () = 0;
/// Fill with color.