Introduce MetaRenderer
MetaRenderer is meant to be the object responsible for rendering the scene graph. It will contain the logic related to the cogl winsys backend, the clutter backend, and the clutter stage window. https://bugzilla.gnome.org/show_bug.cgi?id=768976
This commit is contained in:
@ -39,6 +39,7 @@
|
||||
#include "backends/meta-cursor-tracker-private.h"
|
||||
#include "backends/meta-pointer-constraint.h"
|
||||
#include "backends/native/meta-clutter-backend-native.h"
|
||||
#include "backends/native/meta-renderer-native.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@ -280,6 +281,12 @@ meta_backend_native_create_cursor_renderer (MetaBackend *backend)
|
||||
return g_object_new (META_TYPE_CURSOR_RENDERER_NATIVE, NULL);
|
||||
}
|
||||
|
||||
static MetaRenderer *
|
||||
meta_backend_native_create_renderer (MetaBackend *backend)
|
||||
{
|
||||
return g_object_new (META_TYPE_RENDERER_NATIVE, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_backend_native_warp_pointer (MetaBackend *backend,
|
||||
int x,
|
||||
@ -371,6 +378,7 @@ meta_backend_native_class_init (MetaBackendNativeClass *klass)
|
||||
backend_class->create_idle_monitor = meta_backend_native_create_idle_monitor;
|
||||
backend_class->create_monitor_manager = meta_backend_native_create_monitor_manager;
|
||||
backend_class->create_cursor_renderer = meta_backend_native_create_cursor_renderer;
|
||||
backend_class->create_renderer = meta_backend_native_create_renderer;
|
||||
|
||||
backend_class->warp_pointer = meta_backend_native_warp_pointer;
|
||||
backend_class->set_keymap = meta_backend_native_set_keymap;
|
||||
|
51
src/backends/native/meta-renderer-native.c
Normal file
51
src/backends/native/meta-renderer-native.c
Normal file
@ -0,0 +1,51 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2016 Red Hat
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use, copy,
|
||||
* modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
* of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Written by:
|
||||
* Jonas Ådahl <jadahl@gmail.com>
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "backends/native/meta-renderer-native.h"
|
||||
|
||||
struct _MetaRendererNative
|
||||
{
|
||||
MetaRenderer parent;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (MetaRendererNative, meta_renderer_native, META_TYPE_RENDERER)
|
||||
|
||||
static void
|
||||
meta_renderer_native_init (MetaRendererNative *renderer_native)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
meta_renderer_native_class_init (MetaRendererNativeClass *klass)
|
||||
{
|
||||
}
|
37
src/backends/native/meta-renderer-native.h
Normal file
37
src/backends/native/meta-renderer-native.h
Normal file
@ -0,0 +1,37 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2016 Red Hat
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*
|
||||
* Written by:
|
||||
* Jonas Ådahl <jadahl@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef META_RENDERER_NATIVE_H
|
||||
#define META_RENDERER_NATIVE_H
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "backends/meta-renderer.h"
|
||||
|
||||
#define META_TYPE_RENDERER_NATIVE (meta_renderer_native_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (MetaRendererNative, meta_renderer_native,
|
||||
META, RENDERER_NATIVE,
|
||||
MetaRenderer)
|
||||
|
||||
#endif /* META_RENDERER_NATIVE_H */
|
Reference in New Issue
Block a user