mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 07:20:10 +01:00
* Drop old-timey GLDisplatcher * Refactor haiku-softpipe fixing some hacks * Bubble BBitmap up to winsys Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8323>
54 lines
1.3 KiB
C++
54 lines
1.3 KiB
C++
/*
|
|
* Copyright 2006-2012, Haiku, Inc. All rights reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* Jérôme Duval, korli@users.berlios.de
|
|
* Philippe Houdoin, philippe.houdoin@free.fr
|
|
* Artur Wyszynski, harakash@gmail.com
|
|
* Alexander von Gluck IV, kallisti5@unixzen.com
|
|
*/
|
|
#ifndef SOFTWARERENDERER_H
|
|
#define SOFTWARERENDERER_H
|
|
|
|
|
|
#include <kernel/image.h>
|
|
|
|
#include "GLRenderer.h"
|
|
#include "GalliumContext.h"
|
|
|
|
|
|
class SoftwareRenderer : public BGLRenderer, public HGLWinsysContext {
|
|
public:
|
|
SoftwareRenderer(BGLView *view,
|
|
ulong bgl_options);
|
|
virtual ~SoftwareRenderer();
|
|
|
|
void LockGL();
|
|
void UnlockGL();
|
|
|
|
void Display(BBitmap* bitmap, BRect* updateRect);
|
|
|
|
void SwapBuffers(bool vsync = false);
|
|
void Draw(BRect updateRect);
|
|
status_t CopyPixelsOut(BPoint source, BBitmap *dest);
|
|
status_t CopyPixelsIn(BBitmap *source, BPoint dest);
|
|
void FrameResized(float width, float height);
|
|
|
|
void EnableDirectMode(bool enabled);
|
|
void DirectConnected(direct_buffer_info *info);
|
|
|
|
private:
|
|
GalliumContext* fContextObj;
|
|
context_id fContextID;
|
|
|
|
bool fDirectModeEnabled;
|
|
direct_buffer_info* fInfo;
|
|
BLocker fInfoLocker;
|
|
ulong fOptions;
|
|
GLuint fWidth;
|
|
GLuint fHeight;
|
|
color_space fColorSpace;
|
|
};
|
|
|
|
#endif // SOFTPIPERENDERER_H
|