Flutter Engine
The Flutter Engine
Classes | Functions
mock_renderer.cc File Reference
#include "flutter/shell/platform/linux/testing/mock_renderer.h"

Go to the source code of this file.

Classes

struct  _FlMockRenderer
 

Functions

static void fl_mock_renderer_make_current (FlRenderer *renderer)
 
static void fl_mock_renderer_make_resource_current (FlRenderer *renderer)
 
static void fl_mock_renderer_clear_current (FlRenderer *renderer)
 
static gdouble fl_mock_renderer_default_get_refresh_rate (FlRenderer *renderer)
 
static void fl_mock_renderer_class_init (FlMockRendererClass *klass)
 
static void fl_mock_renderer_init (FlMockRenderer *self)
 
FlMockRenderer * fl_mock_renderer_new (FlMockRendererGetRefreshRate get_refresh_rate)
 

Function Documentation

◆ fl_mock_renderer_class_init()

static void fl_mock_renderer_class_init ( FlMockRendererClass *  klass)
static

Definition at line 32 of file mock_renderer.cc.

32 {
33 FL_RENDERER_CLASS(klass)->make_current = fl_mock_renderer_make_current;
34 FL_RENDERER_CLASS(klass)->make_resource_current =
36 FL_RENDERER_CLASS(klass)->clear_current = fl_mock_renderer_clear_current;
37 FL_RENDERER_CLASS(klass)->get_refresh_rate =
39}
static gdouble fl_mock_renderer_default_get_refresh_rate(FlRenderer *renderer)
static void fl_mock_renderer_make_current(FlRenderer *renderer)
static void fl_mock_renderer_make_resource_current(FlRenderer *renderer)
static void fl_mock_renderer_clear_current(FlRenderer *renderer)

◆ fl_mock_renderer_clear_current()

static void fl_mock_renderer_clear_current ( FlRenderer *  renderer)
static

Definition at line 21 of file mock_renderer.cc.

21{}

◆ fl_mock_renderer_default_get_refresh_rate()

static gdouble fl_mock_renderer_default_get_refresh_rate ( FlRenderer *  renderer)
static

Definition at line 24 of file mock_renderer.cc.

24 {
25 FlMockRenderer* self = FL_MOCK_RENDERER(renderer);
26 if (self->get_refresh_rate != nullptr) {
27 return self->get_refresh_rate(renderer);
28 }
29 return -1.0;
30}

◆ fl_mock_renderer_init()

static void fl_mock_renderer_init ( FlMockRenderer *  self)
static

Definition at line 41 of file mock_renderer.cc.

41{}

◆ fl_mock_renderer_make_current()

static void fl_mock_renderer_make_current ( FlRenderer *  renderer)
static

Definition at line 15 of file mock_renderer.cc.

15{}

◆ fl_mock_renderer_make_resource_current()

static void fl_mock_renderer_make_resource_current ( FlRenderer *  renderer)
static

Definition at line 18 of file mock_renderer.cc.

18{}

◆ fl_mock_renderer_new()

FlMockRenderer * fl_mock_renderer_new ( FlMockRendererGetRefreshRate  get_refresh_rate)

Definition at line 44 of file mock_renderer.cc.

45 {
46 FlMockRenderer* fl_mock_renderer = FL_MOCK_RENDERER(
47 g_object_new_valist(fl_mock_renderer_get_type(), nullptr, nullptr));
48 fl_mock_renderer->get_refresh_rate = get_refresh_rate;
49 return fl_mock_renderer;
50}