summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 8bcc94d)
raw | patch | inline | side by side (from parent 1: 8bcc94d)
author | Tomi Valkeinen <tomi.valkeinen@iki.fi> | |
Sat, 3 Oct 2015 20:26:58 +0000 (23:26 +0300) | ||
committer | Tomi Valkeinen <tomi.valkeinen@iki.fi> | |
Sun, 4 Oct 2015 07:21:56 +0000 (10:21 +0300) |
libkms++/dumbframebuffer.cpp | patch | blob | history | |
libkms++/dumbframebuffer.h | patch | blob | history |
index 0defd3a19932e8d0d6d240dd4290e1e8240997c2..abea762955744a06905f235a0202828f779841dd 100644 (file)
{
DumbFramebuffer::DumbFramebuffer(Card &card, uint32_t width, uint32_t height, const string& fourcc)
- :Framebuffer(card, width, height)
+ :DumbFramebuffer(card, width, height, FourCCToPixelFormat(fourcc))
{
- uint32_t a, b, c, d;
- a = fourcc[0];
- b = fourcc[1];
- c = fourcc[2];
- d = fourcc[3];
-
- uint32_t code = ((uint32_t)(a) | ((uint32_t)(b) << 8) | ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24));
+}
- Create(width, height, code);
+DumbFramebuffer::DumbFramebuffer(Card& card, uint32_t width, uint32_t height, PixelFormat format)
+ :Framebuffer(card, width, height)
+{
+ Create(width, height, (uint32_t)format);
}
DumbFramebuffer::~DumbFramebuffer()
index 24e791aad9eadd3441d1342ebcf463a24e21df06..25a3c2e83f9ff2f64bc8e59c944fdf08ed899166 100644 (file)
#pragma once
#include "framebuffer.h"
+#include "pixelformats.h"
namespace kms
{
{
public:
DumbFramebuffer(Card& card, uint32_t width, uint32_t height, const std::string& fourcc);
+ DumbFramebuffer(Card& card, uint32_t width, uint32_t height, PixelFormat format);
virtual ~DumbFramebuffer();
void print_short() const;