Cleanup for last commit

This commit is contained in:
heckflosse
2017-06-25 21:42:43 +02:00
parent e4c75c4d38
commit ebbb44c3f5
4 changed files with 1 additions and 26 deletions

View File

@@ -1330,26 +1330,6 @@ BackBuffer::BackBuffer(int width, int height, Cairo::Format format) : x(0), y(0)
}
}
BackBuffer::BackBuffer(int width, int height, Glib::RefPtr<Gdk::Window> referenceWindow) : x(0), y(0), w(width), h(height), offset(0, 0), dirty(true)
{
if (w > 0 && h > 0 && referenceWindow) {
Cairo::RefPtr<Cairo::Surface> surf = referenceWindow->create_similar_image_surface(Cairo::FORMAT_RGB24, w, h, 0);
Cairo::SurfaceType type = surf->get_type();
if (type == Cairo::SURFACE_TYPE_IMAGE || type == Cairo::SURFACE_TYPE_WIN32) {
surface = Cairo::RefPtr<Cairo::ImageSurface>::cast_static(surf);
if (!surface || !surface->get_width() || !surface->get_height()) {
printf("ERRRROOOOORRRR!\n");
}
} else {
printf("ERROR: wrong surface type. 0 or 7 was expected, but we've got %d instead.\n", type);
}
} else {
w = h = 0;
}
}
void BackBuffer::setDestPosition(int x, int y)
{
// values will be clamped when used...