| Flutter Linux Embedder |

fl_framebuffer_test.cc
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "gtest/gtest.h"
6
7 #include "flutter/shell/platform/linux/fl_framebuffer.h"
8 #include "flutter/shell/platform/linux/testing/mock_epoxy.h"
9
10 TEST(FlFramebufferTest, HasDepthStencil) {
11 ::testing::NiceMock<flutter::testing::MockEpoxy> epoxy;
12
13 g_autoptr(FlFramebuffer) framebuffer = fl_framebuffer_new(GL_RGB, 100, 100);
14
15 GLint depth_type = GL_NONE;
16 glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
17 GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE,
18 &depth_type);
19 EXPECT_NE(depth_type, GL_NONE);
20
21 GLint stencil_type = GL_NONE;
22 glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT,
23 GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE,
24 &stencil_type);
25 EXPECT_NE(stencil_type, GL_NONE);
26 }
fl_framebuffer_new
FlFramebuffer * fl_framebuffer_new(GLint format, size_t width, size_t height)
Definition: fl_framebuffer.cc:42
fl_framebuffer.h
TEST
TEST(FlFramebufferTest, HasDepthStencil)
Definition: fl_framebuffer_test.cc:10