* honors new frame size in the LockGL() method of the renderer, FrameResized() now notifies the renderer.
* checks whether the rendered bitmap size matches the direct info size, if not, the renderer doesn't draw. * we don't lock the view looper anymore in LockGL(), this avoids deadlocks with FrameResized(). * lock drawing when modifying the direct connection info. * the renderer now locks the view looper with a timeout, as on resize the looper is locked and FrameResized called. * the bug #3027 is fixed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30472 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -297,6 +297,12 @@ MesaSoftwareRenderer::MesaSoftwareRenderer(BGLView* view, ulong options,
|
|||||||
_mesa_enable_1_3_extensions(fContext);
|
_mesa_enable_1_3_extensions(fContext);
|
||||||
_mesa_enable_1_4_extensions(fContext);
|
_mesa_enable_1_4_extensions(fContext);
|
||||||
_mesa_enable_1_5_extensions(fContext);
|
_mesa_enable_1_5_extensions(fContext);
|
||||||
|
_mesa_enable_2_0_extensions(fContext);
|
||||||
|
_mesa_enable_2_1_extensions(fContext);
|
||||||
|
|
||||||
|
BRect bounds = view->Bounds();
|
||||||
|
fWidth = fNewWidth = (GLint)bounds.Width();
|
||||||
|
fHeight = fNewHeight = (GLint)bounds.Height();
|
||||||
|
|
||||||
// some stupid applications (Quake2) don't even think about calling LockGL()
|
// some stupid applications (Quake2) don't even think about calling LockGL()
|
||||||
// before using glGetString and its glGet*() friends...
|
// before using glGetString and its glGet*() friends...
|
||||||
@@ -326,93 +332,89 @@ MesaSoftwareRenderer::LockGL()
|
|||||||
|
|
||||||
_mesa_make_current(fContext, fFrameBuffer, fFrameBuffer);
|
_mesa_make_current(fContext, fFrameBuffer, fFrameBuffer);
|
||||||
|
|
||||||
BRect b = GLView()->Bounds();
|
|
||||||
color_space cs = B_RGBA32;
|
color_space cs = B_RGBA32;
|
||||||
|
|
||||||
|
BAutolock lock(fInfoLocker);
|
||||||
if (fDirectModeEnabled && fInfo != NULL) {
|
if (fDirectModeEnabled && fInfo != NULL) {
|
||||||
cs = BScreen(GLView()->Window()).ColorSpace();
|
cs = BScreen(GLView()->Window()).ColorSpace();
|
||||||
|
fNewWidth = fInfo->window_bounds.right
|
||||||
|
- fInfo->window_bounds.left + 1;
|
||||||
|
fNewHeight = fInfo->window_bounds.bottom
|
||||||
|
- fInfo->window_bounds.top + 1;
|
||||||
}
|
}
|
||||||
uint32 width = b.IntegerWidth() + 1;
|
|
||||||
uint32 height = b.IntegerHeight() + 1;
|
|
||||||
if (width != fWidth || height != fHeight || !fBitmap || cs != fColorSpace) {
|
|
||||||
if (cs != fColorSpace) {
|
|
||||||
switch (cs) {
|
|
||||||
case B_RGBA32:
|
|
||||||
fRenderBuffer->GetRow = get_row_RGBA32;
|
|
||||||
fRenderBuffer->GetValues = get_values_RGBA32;
|
|
||||||
fRenderBuffer->PutRow = put_row_RGBA32;
|
|
||||||
fRenderBuffer->PutRowRGB = put_row_rgb_RGBA32;
|
|
||||||
fRenderBuffer->PutMonoRow = put_mono_row_RGBA32;
|
|
||||||
fRenderBuffer->PutValues = put_values_RGBA32;
|
|
||||||
fRenderBuffer->PutMonoValues = put_mono_values_RGBA32;
|
|
||||||
break;
|
|
||||||
case B_RGB32:
|
|
||||||
fRenderBuffer->GetRow = get_row_RGB32;
|
|
||||||
fRenderBuffer->GetValues = get_values_RGB32;
|
|
||||||
fRenderBuffer->PutRow = put_row_RGB32;
|
|
||||||
fRenderBuffer->PutRowRGB = put_row_rgb_RGB32;
|
|
||||||
fRenderBuffer->PutMonoRow = put_mono_row_RGB32;
|
|
||||||
fRenderBuffer->PutValues = put_values_RGB32;
|
|
||||||
fRenderBuffer->PutMonoValues = put_mono_values_RGB32;
|
|
||||||
break;
|
|
||||||
case B_RGB24:
|
|
||||||
fRenderBuffer->GetRow = get_row_RGB24;
|
|
||||||
fRenderBuffer->GetValues = get_values_RGB24;
|
|
||||||
fRenderBuffer->PutRow = put_row_RGB24;
|
|
||||||
fRenderBuffer->PutRowRGB = put_row_rgb_RGB24;
|
|
||||||
fRenderBuffer->PutMonoRow = put_mono_row_RGB24;
|
|
||||||
fRenderBuffer->PutValues = put_values_RGB24;
|
|
||||||
fRenderBuffer->PutMonoValues = put_mono_values_RGB24;
|
|
||||||
break;
|
|
||||||
case B_RGB16:
|
|
||||||
fRenderBuffer->GetRow = get_row_RGB16;
|
|
||||||
fRenderBuffer->GetValues = get_values_RGB16;
|
|
||||||
fRenderBuffer->PutRow = put_row_RGB16;
|
|
||||||
fRenderBuffer->PutRowRGB = put_row_rgb_RGB16;
|
|
||||||
fRenderBuffer->PutMonoRow = put_mono_row_RGB16;
|
|
||||||
fRenderBuffer->PutValues = put_values_RGB16;
|
|
||||||
fRenderBuffer->PutMonoValues = put_mono_values_RGB16;
|
|
||||||
break;
|
|
||||||
case B_RGB15:
|
|
||||||
fRenderBuffer->GetRow = get_row_RGB15;
|
|
||||||
fRenderBuffer->GetValues = get_values_RGB15;
|
|
||||||
fRenderBuffer->PutRow = put_row_RGB15;
|
|
||||||
fRenderBuffer->PutRowRGB = put_row_rgb_RGB15;
|
|
||||||
fRenderBuffer->PutMonoRow = put_mono_row_RGB15;
|
|
||||||
fRenderBuffer->PutValues = put_values_RGB15;
|
|
||||||
fRenderBuffer->PutMonoValues = put_mono_values_RGB15;
|
|
||||||
break;
|
|
||||||
case B_CMAP8:
|
|
||||||
fRenderBuffer->GetRow = get_row_CMAP8;
|
|
||||||
fRenderBuffer->GetValues = get_values_CMAP8;
|
|
||||||
fRenderBuffer->PutRow = put_row_CMAP8;
|
|
||||||
fRenderBuffer->PutRowRGB = put_row_rgb_CMAP8;
|
|
||||||
fRenderBuffer->PutMonoRow = put_mono_row_CMAP8;
|
|
||||||
fRenderBuffer->PutValues = put_values_CMAP8;
|
|
||||||
fRenderBuffer->PutMonoValues = put_mono_values_CMAP8;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
fprintf(stderr, "unsupported screen color space %d\n", cs);
|
|
||||||
debugger("unsupported OpenGL color space");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// allocate new size of back buffer bitmap
|
if (fBitmap && cs == fColorSpace && fNewWidth == fWidth
|
||||||
delete fBitmap;
|
&& fNewHeight == fHeight)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (cs != fColorSpace) {
|
||||||
fColorSpace = cs;
|
fColorSpace = cs;
|
||||||
BRect rect(0.0, 0.0, width - 1, height - 1);
|
switch (fColorSpace) {
|
||||||
fBitmap = new BBitmap(rect, fColorSpace);
|
case B_RGBA32:
|
||||||
for (uint i = 0; i < height; i++) {
|
fRenderBuffer->GetRow = get_row_RGBA32;
|
||||||
fRowAddr[height - i - 1] = (GLvoid *)((GLubyte *)fBitmap->Bits()
|
fRenderBuffer->GetValues = get_values_RGBA32;
|
||||||
+ i * fBitmap->BytesPerRow());
|
fRenderBuffer->PutRow = put_row_RGBA32;
|
||||||
|
fRenderBuffer->PutRowRGB = put_row_rgb_RGBA32;
|
||||||
|
fRenderBuffer->PutMonoRow = put_mono_row_RGBA32;
|
||||||
|
fRenderBuffer->PutValues = put_values_RGBA32;
|
||||||
|
fRenderBuffer->PutMonoValues = put_mono_values_RGBA32;
|
||||||
|
break;
|
||||||
|
case B_RGB32:
|
||||||
|
fRenderBuffer->GetRow = get_row_RGB32;
|
||||||
|
fRenderBuffer->GetValues = get_values_RGB32;
|
||||||
|
fRenderBuffer->PutRow = put_row_RGB32;
|
||||||
|
fRenderBuffer->PutRowRGB = put_row_rgb_RGB32;
|
||||||
|
fRenderBuffer->PutMonoRow = put_mono_row_RGB32;
|
||||||
|
fRenderBuffer->PutValues = put_values_RGB32;
|
||||||
|
fRenderBuffer->PutMonoValues = put_mono_values_RGB32;
|
||||||
|
break;
|
||||||
|
case B_RGB24:
|
||||||
|
fRenderBuffer->GetRow = get_row_RGB24;
|
||||||
|
fRenderBuffer->GetValues = get_values_RGB24;
|
||||||
|
fRenderBuffer->PutRow = put_row_RGB24;
|
||||||
|
fRenderBuffer->PutRowRGB = put_row_rgb_RGB24;
|
||||||
|
fRenderBuffer->PutMonoRow = put_mono_row_RGB24;
|
||||||
|
fRenderBuffer->PutValues = put_values_RGB24;
|
||||||
|
fRenderBuffer->PutMonoValues = put_mono_values_RGB24;
|
||||||
|
break;
|
||||||
|
case B_RGB16:
|
||||||
|
fRenderBuffer->GetRow = get_row_RGB16;
|
||||||
|
fRenderBuffer->GetValues = get_values_RGB16;
|
||||||
|
fRenderBuffer->PutRow = put_row_RGB16;
|
||||||
|
fRenderBuffer->PutRowRGB = put_row_rgb_RGB16;
|
||||||
|
fRenderBuffer->PutMonoRow = put_mono_row_RGB16;
|
||||||
|
fRenderBuffer->PutValues = put_values_RGB16;
|
||||||
|
fRenderBuffer->PutMonoValues = put_mono_values_RGB16;
|
||||||
|
break;
|
||||||
|
case B_RGB15:
|
||||||
|
fRenderBuffer->GetRow = get_row_RGB15;
|
||||||
|
fRenderBuffer->GetValues = get_values_RGB15;
|
||||||
|
fRenderBuffer->PutRow = put_row_RGB15;
|
||||||
|
fRenderBuffer->PutRowRGB = put_row_rgb_RGB15;
|
||||||
|
fRenderBuffer->PutMonoRow = put_mono_row_RGB15;
|
||||||
|
fRenderBuffer->PutValues = put_values_RGB15;
|
||||||
|
fRenderBuffer->PutMonoValues = put_mono_values_RGB15;
|
||||||
|
break;
|
||||||
|
case B_CMAP8:
|
||||||
|
fRenderBuffer->GetRow = get_row_CMAP8;
|
||||||
|
fRenderBuffer->GetValues = get_values_CMAP8;
|
||||||
|
fRenderBuffer->PutRow = put_row_CMAP8;
|
||||||
|
fRenderBuffer->PutRowRGB = put_row_rgb_CMAP8;
|
||||||
|
fRenderBuffer->PutMonoRow = put_mono_row_CMAP8;
|
||||||
|
fRenderBuffer->PutValues = put_values_CMAP8;
|
||||||
|
fRenderBuffer->PutMonoValues = put_mono_values_CMAP8;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fprintf(stderr, "unsupported screen color space %d\n", fColorSpace);
|
||||||
|
debugger("unsupported OpenGL color space");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
_mesa_resize_framebuffer(fContext, fFrameBuffer, width, height);
|
|
||||||
fWidth = width;
|
|
||||||
fHeight = height;
|
|
||||||
fRenderBuffer->Data = fBitmap->Bits();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fWidth = fNewWidth;
|
||||||
|
fHeight = fNewHeight;
|
||||||
|
|
||||||
|
_AllocateBitmap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -435,35 +437,45 @@ MesaSoftwareRenderer::SwapBuffers(bool VSync)
|
|||||||
|
|
||||||
// TODO: support VSync
|
// TODO: support VSync
|
||||||
|
|
||||||
if (fBitmap) {
|
if (!fBitmap)
|
||||||
if (fVisual->doubleBufferMode)
|
return;
|
||||||
_mesa_notifySwapBuffers(fContext);
|
if (fVisual->doubleBufferMode)
|
||||||
|
_mesa_notifySwapBuffers(fContext);
|
||||||
|
|
||||||
if (!fDirectModeEnabled || fInfo == NULL) {
|
if (!fDirectModeEnabled || fInfo == NULL) {
|
||||||
GLView()->LockLooper();
|
if (GLView()->LockLooperWithTimeout(1000) == B_OK) {
|
||||||
GLView()->DrawBitmap(fBitmap);
|
GLView()->DrawBitmap(fBitmap);
|
||||||
GLView()->UnlockLooper();
|
GLView()->UnlockLooper();
|
||||||
} else {
|
}
|
||||||
BAutolock lock(fInfoLocker);
|
return;
|
||||||
uint8 bytesPerPixel = fInfo->bits_per_pixel / 8;
|
}
|
||||||
uint32 bytesPerRow = fBitmap->BytesPerRow();
|
|
||||||
for (uint32 i = 0; i < fInfo->clip_list_count; i++) {
|
|
||||||
clipping_rect *clip = &fInfo->clip_list[i];
|
|
||||||
int32 height = clip->bottom - clip->top + 1;
|
|
||||||
int32 bytesWidth
|
|
||||||
= (clip->right - clip->left + 1) * bytesPerPixel;
|
|
||||||
uint8 *p = (uint8 *)fInfo->bits + clip->top
|
|
||||||
* fInfo->bytes_per_row + clip->left * bytesPerPixel;
|
|
||||||
uint8 *b = (uint8 *)fBitmap->Bits()
|
|
||||||
+ (clip->top - fInfo->window_bounds.top) * bytesPerRow
|
|
||||||
+ (clip->left - fInfo->window_bounds.left) * bytesPerPixel;
|
|
||||||
|
|
||||||
for (int y = 0; y < height; y++) {
|
BAutolock lock(fInfoLocker);
|
||||||
memcpy(p, b, bytesWidth);
|
|
||||||
p += fInfo->bytes_per_row;
|
// check the bitmap size still matches the size
|
||||||
b += bytesPerRow;
|
if (fInfo->window_bounds.bottom - fInfo->window_bounds.top
|
||||||
}
|
!= fBitmap->Bounds().IntegerHeight()
|
||||||
}
|
|| fInfo->window_bounds.right - fInfo->window_bounds.left
|
||||||
|
!= fBitmap->Bounds().IntegerWidth())
|
||||||
|
return;
|
||||||
|
uint8 bytesPerPixel = fInfo->bits_per_pixel / 8;
|
||||||
|
uint32 bytesPerRow = fBitmap->BytesPerRow();
|
||||||
|
for (uint32 i = 0; i < fInfo->clip_list_count; i++) {
|
||||||
|
clipping_rect *clip = &fInfo->clip_list[i];
|
||||||
|
int32 height = clip->bottom - clip->top + 1;
|
||||||
|
int32 bytesWidth
|
||||||
|
= (clip->right - clip->left + 1) * bytesPerPixel;
|
||||||
|
uint8 *p = (uint8 *)fInfo->bits + clip->top
|
||||||
|
* fInfo->bytes_per_row + clip->left * bytesPerPixel;
|
||||||
|
uint8 *b = (uint8 *)fBitmap->Bits()
|
||||||
|
+ (clip->top - fInfo->window_bounds.top) * bytesPerRow
|
||||||
|
+ (clip->left - fInfo->window_bounds.left)
|
||||||
|
* bytesPerPixel;
|
||||||
|
|
||||||
|
for (int y = 0; y < height; y++) {
|
||||||
|
memcpy(p, b, bytesWidth);
|
||||||
|
p += fInfo->bytes_per_row;
|
||||||
|
b += bytesPerRow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -579,6 +591,32 @@ MesaSoftwareRenderer::DirectConnected(direct_buffer_info *info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
MesaSoftwareRenderer::FrameResized(float width, float height)
|
||||||
|
{
|
||||||
|
BAutolock lock(fInfoLocker);
|
||||||
|
fNewWidth = (GLuint)width;
|
||||||
|
fNewHeight = (GLuint)height;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
MesaSoftwareRenderer::_AllocateBitmap()
|
||||||
|
{
|
||||||
|
// allocate new size of back buffer bitmap
|
||||||
|
delete fBitmap;
|
||||||
|
BRect rect(0.0, 0.0, fWidth - 1, fHeight - 1);
|
||||||
|
fBitmap = new BBitmap(rect, fColorSpace);
|
||||||
|
for (uint i = 0; i < fHeight; i++) {
|
||||||
|
fRowAddr[fHeight - i - 1] = (GLvoid *)((GLubyte *)fBitmap->Bits()
|
||||||
|
+ i * fBitmap->BytesPerRow());
|
||||||
|
}
|
||||||
|
|
||||||
|
_mesa_resize_framebuffer(fContext, fFrameBuffer, fWidth, fHeight);
|
||||||
|
fRenderBuffer->Data = fBitmap->Bits();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark - static
|
// #pragma mark - static
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -35,8 +35,9 @@ public:
|
|||||||
|
|
||||||
virtual void SwapBuffers(bool VSync = false);
|
virtual void SwapBuffers(bool VSync = false);
|
||||||
virtual void Draw(BRect updateRect);
|
virtual void Draw(BRect updateRect);
|
||||||
virtual status_t CopyPixelsOut(BPoint source, BBitmap* dest);
|
virtual status_t CopyPixelsOut(BPoint source, BBitmap* dest);
|
||||||
virtual status_t CopyPixelsIn(BBitmap* source, BPoint dest);
|
virtual status_t CopyPixelsIn(BBitmap* source, BPoint dest);
|
||||||
|
virtual void FrameResized(float width, float height);
|
||||||
|
|
||||||
GLvoid** GetRows() { return fRowAddr; }
|
GLvoid** GetRows() { return fRowAddr; }
|
||||||
|
|
||||||
@@ -60,6 +61,8 @@ private:
|
|||||||
GLuint width, GLuint height);
|
GLuint width, GLuint height);
|
||||||
static void Flush(GLcontext *ctx);
|
static void Flush(GLcontext *ctx);
|
||||||
|
|
||||||
|
void _AllocateBitmap();
|
||||||
|
|
||||||
BBitmap* fBitmap;
|
BBitmap* fBitmap;
|
||||||
bool fDirectModeEnabled;
|
bool fDirectModeEnabled;
|
||||||
direct_buffer_info* fInfo;
|
direct_buffer_info* fInfo;
|
||||||
@@ -73,8 +76,8 @@ private:
|
|||||||
|
|
||||||
GLchan fClearColor[4]; // buffer clear color
|
GLchan fClearColor[4]; // buffer clear color
|
||||||
GLuint fClearIndex; // buffer clear color index
|
GLuint fClearIndex; // buffer clear color index
|
||||||
GLuint fWidth;
|
GLuint fWidth, fNewWidth;
|
||||||
GLuint fHeight;
|
GLuint fHeight, fNewHeight;
|
||||||
color_space fColorSpace;
|
color_space fColorSpace;
|
||||||
|
|
||||||
GLvoid* fRowAddr[MAX_HEIGHT];
|
GLvoid* fRowAddr[MAX_HEIGHT];
|
||||||
|
|||||||
@@ -84,8 +84,6 @@ BGLView::LockGL()
|
|||||||
{
|
{
|
||||||
// TODO: acquire the OpenGL API lock it on this glview
|
// TODO: acquire the OpenGL API lock it on this glview
|
||||||
|
|
||||||
if (!LockLooper())
|
|
||||||
return;
|
|
||||||
fDisplayLock.Lock();
|
fDisplayLock.Lock();
|
||||||
if (fRenderer)
|
if (fRenderer)
|
||||||
fRenderer->LockGL();
|
fRenderer->LockGL();
|
||||||
@@ -95,12 +93,9 @@ BGLView::LockGL()
|
|||||||
void
|
void
|
||||||
BGLView::UnlockGL()
|
BGLView::UnlockGL()
|
||||||
{
|
{
|
||||||
if (!fDisplayLock.IsLocked())
|
|
||||||
return;
|
|
||||||
fDisplayLock.Unlock();
|
|
||||||
if (fRenderer)
|
if (fRenderer)
|
||||||
fRenderer->UnlockGL();
|
fRenderer->UnlockGL();
|
||||||
UnlockLooper();
|
fDisplayLock.Unlock();
|
||||||
|
|
||||||
// TODO: release the GL API lock to others glviews
|
// TODO: release the GL API lock to others glviews
|
||||||
}
|
}
|
||||||
@@ -137,7 +132,7 @@ BGLView::CopyPixelsOut(BPoint source, BBitmap *dest)
|
|||||||
if (!fRenderer)
|
if (!fRenderer)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
if (! dest || ! dest->Bounds().IsValid())
|
if (!dest || !dest->Bounds().IsValid())
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
return fRenderer->CopyPixelsOut(source, dest);
|
return fRenderer->CopyPixelsOut(source, dest);
|
||||||
@@ -150,7 +145,7 @@ BGLView::CopyPixelsIn(BBitmap *source, BPoint dest)
|
|||||||
if (!fRenderer)
|
if (!fRenderer)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
if (! source || ! source->Bounds().IsValid())
|
if (!source || !source->Bounds().IsValid())
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
return fRenderer->CopyPixelsIn(source, dest);
|
return fRenderer->CopyPixelsIn(source, dest);
|
||||||
@@ -211,6 +206,7 @@ BGLView::AttachedToWindow()
|
|||||||
#endif
|
#endif
|
||||||
// Set default OpenGL viewport:
|
// Set default OpenGL viewport:
|
||||||
glViewport(0, 0, Bounds().IntegerWidth(), Bounds().IntegerHeight());
|
glViewport(0, 0, Bounds().IntegerWidth(), Bounds().IntegerHeight());
|
||||||
|
fRenderer->FrameResized(Bounds().IntegerWidth(), Bounds().IntegerHeight());
|
||||||
|
|
||||||
if (fClipInfo) {
|
if (fClipInfo) {
|
||||||
fRenderer->DirectConnected(
|
fRenderer->DirectConnected(
|
||||||
@@ -263,8 +259,13 @@ BGLView::FrameResized(float width, float height)
|
|||||||
for (BView *v = this; v; v = v->Parent())
|
for (BView *v = this; v; v = v->Parent())
|
||||||
v->ConvertToParent(&fBounds);
|
v->ConvertToParent(&fBounds);
|
||||||
|
|
||||||
if (fRenderer)
|
if (fRenderer) {
|
||||||
|
LockGL();
|
||||||
|
_LockDraw();
|
||||||
fRenderer->FrameResized(width, height);
|
fRenderer->FrameResized(width, height);
|
||||||
|
_UnlockDraw();
|
||||||
|
UnlockGL();
|
||||||
|
}
|
||||||
|
|
||||||
BView::FrameResized(width, height);
|
BView::FrameResized(width, height);
|
||||||
}
|
}
|
||||||
@@ -344,6 +345,7 @@ BGLView::DirectConnected(direct_buffer_info *info)
|
|||||||
_UnlockDraw();
|
_UnlockDraw();
|
||||||
case B_DIRECT_MODIFY:
|
case B_DIRECT_MODIFY:
|
||||||
{
|
{
|
||||||
|
_LockDraw();
|
||||||
localInfo->buffer_state = info->buffer_state;
|
localInfo->buffer_state = info->buffer_state;
|
||||||
localInfo->driver_state = info->driver_state;
|
localInfo->driver_state = info->driver_state;
|
||||||
localInfo->bits = info->bits;
|
localInfo->bits = info->bits;
|
||||||
@@ -371,6 +373,7 @@ BGLView::DirectConnected(direct_buffer_info *info)
|
|||||||
for (uint32 c = 0; c < localInfo->clip_list_count; c++)
|
for (uint32 c = 0; c < localInfo->clip_list_count; c++)
|
||||||
localInfo->clip_list[c] = region.RectAtInt(c);
|
localInfo->clip_list[c] = region.RectAtInt(c);
|
||||||
|
|
||||||
|
_UnlockDraw();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case B_DIRECT_STOP:
|
case B_DIRECT_STOP:
|
||||||
|
|||||||
Reference in New Issue
Block a user