| Flutter Linux Embedder |

Functions
fl_framebuffer_test.cc File Reference
`#include "gtest/gtest.h"`
`#include "flutter/shell/platform/linux/fl_framebuffer.h"`
`#include "flutter/shell/platform/linux/testing/mock_epoxy.h"`

Go to the source code of this file.

## Functions
| TEST (FlFramebufferTest, HasDepthStencil)
| TEST (FlFramebufferTest, ResourcesRemoved)
| TEST (FlFramebufferTest, Sibling)

## Function Documentation

## ◆ TEST() [1/3]

TEST | ( | FlFramebufferTest | ,
|  | HasDepthStencil |
| ) |  |

Definition at line 10 of file fl_framebuffer_test.cc.

10 {
11 ::testing::NiceMock<flutter::testing::MockEpoxy> epoxy;
12
13 g_autoptr(FlFramebuffer) framebuffer =
14 fl_framebuffer_new(GL_RGB, 100, 100, FALSE);
15
16 GLint depth_type = GL_NONE;
17 glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
18 GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE,
19 &depth_type);
20 EXPECT_NE(depth_type, GL_NONE);
21
22 GLint stencil_type = GL_NONE;
23 glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT,
24 GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE,
25 &stencil_type);
26 EXPECT_NE(stencil_type, GL_NONE);
27 }
g_autoptr
g_autoptr(GMutexLocker) locker
fl_framebuffer_new
FlFramebuffer * fl_framebuffer_new(GLint format, size_t width, size_t height, gboolean shareable)
Definition: fl_framebuffer.cc:69

References fl_framebuffer_new(), and g_autoptr().

## ◆ TEST() [2/3]

TEST | ( | FlFramebufferTest | ,
|  | ResourcesRemoved |
| ) |  |

Definition at line 29 of file fl_framebuffer_test.cc.

29 {
30 ::testing::NiceMock<flutter::testing::MockEpoxy> epoxy;
31
32 EXPECT_CALL(epoxy, glGenFramebuffers);
33 EXPECT_CALL(epoxy, glGenTextures);
34 EXPECT_CALL(epoxy, glGenRenderbuffers);
35 FlFramebuffer* framebuffer = fl_framebuffer_new(GL_RGB, 100, 100, FALSE);
36
37 EXPECT_CALL(epoxy, glDeleteFramebuffers);
38 EXPECT_CALL(epoxy, glDeleteTextures);
39 EXPECT_CALL(epoxy, glDeleteRenderbuffers);
40 g_object_unref(framebuffer);
41 }

References fl_framebuffer_new().

## ◆ TEST() [3/3]

TEST | ( | FlFramebufferTest | ,
|  | Sibling |
| ) |  |

Definition at line 43 of file fl_framebuffer_test.cc.

43 {
44 ::testing::NiceMock<flutter::testing::MockEpoxy> epoxy;
45
46 EXPECT_CALL(epoxy, eglCreateImage);
47 g_autoptr(FlFramebuffer) framebuffer =
48 fl_framebuffer_new(GL_RGB, 100, 100, TRUE);
49 g_autoptr(FlFramebuffer) sibling = fl_framebuffer_create_sibling(framebuffer);
50 }
TRUE
return TRUE
Definition: fl_compositor_software.cc:68
fl_framebuffer_create_sibling
FlFramebuffer * fl_framebuffer_create_sibling(FlFramebuffer *self)
Definition: fl_framebuffer.cc:120

References fl_framebuffer_create_sibling(), fl_framebuffer_new(), g_autoptr(), and TRUE.