mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 15:02:58 +02:00
- formatting code using astyle
Conflicts: libarmbox/dmx.cpp libgeneric-pc/video_lib.h libspark/dmx.cpp Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
/*
|
||||
Copyright 2013 Stefan Seyfried <seife@tuxboxcvs.slipkontur.de>
|
||||
Copyright 2013 Stefan Seyfried <seife@tuxboxcvs.slipkontur.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
The GLFB namespace is just because it's already established by the
|
||||
generic-pc implementation.
|
||||
The GLFB namespace is just because it's already established by the
|
||||
generic-pc implementation.
|
||||
*/
|
||||
|
||||
#include <vector>
|
||||
@@ -50,10 +50,10 @@ static VC_IMAGE_TYPE_T type = VC_IMAGE_ARGB8888;
|
||||
static OpenThreads::Mutex blit_mutex;
|
||||
static OpenThreads::Condition blit_cond;
|
||||
|
||||
static bool goodbye = false; /* if set main loop is left */
|
||||
static bool ready = false; /* condition predicate */
|
||||
static bool goodbye = false; /* if set main loop is left */
|
||||
static bool ready = false; /* condition predicate */
|
||||
|
||||
static int width; /* width and height, fixed for a framebuffer instance */
|
||||
static int width; /* width and height, fixed for a framebuffer instance */
|
||||
static int height;
|
||||
|
||||
GLFramebuffer::GLFramebuffer(int x, int y)
|
||||
@@ -126,11 +126,12 @@ void GLFramebuffer::setup()
|
||||
/* 32bit FB depth, *2 because tuxtxt uses a shadow buffer */
|
||||
osd_buf.resize(pitch * height * 2);
|
||||
hal_info("GLFB: Display is %d x %d, FB is %d x %d, memory size %d\n",
|
||||
info.width, info.height, width, height, osd_buf.size());
|
||||
info.width, info.height, width, height, osd_buf.size());
|
||||
image = &osd_buf[0];
|
||||
/* initialize to half-transparent grey */
|
||||
memset(image, 0x7f, osd_buf.size());
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
res[i] = vc_dispmanx_resource_create(type, width, height, &vc_img_ptr[i]);
|
||||
CHECK(res[i]);
|
||||
}
|
||||
@@ -142,15 +143,15 @@ void GLFramebuffer::setup()
|
||||
vc_dispmanx_rect_set(&src_rect, 0, 0, width << 16, height << 16);
|
||||
vc_dispmanx_rect_set(&dsp_rect, 0, 0, info.width, info.height);
|
||||
element = vc_dispmanx_element_add(update,
|
||||
display,
|
||||
2000 /*layer*/,
|
||||
&dsp_rect,
|
||||
res[curr_res],
|
||||
&src_rect,
|
||||
DISPMANX_PROTECTION_NONE,
|
||||
&alpha,
|
||||
NULL,
|
||||
DISPMANX_NO_ROTATE);
|
||||
display,
|
||||
2000 /*layer*/,
|
||||
&dsp_rect,
|
||||
res[curr_res],
|
||||
&src_rect,
|
||||
DISPMANX_PROTECTION_NONE,
|
||||
&alpha,
|
||||
NULL,
|
||||
DISPMANX_NO_ROTATE);
|
||||
ret = vc_dispmanx_update_submit_sync(update);
|
||||
CHECK(ret == 0);
|
||||
curr_res = !curr_res;
|
||||
|
Reference in New Issue
Block a user