forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfl_framebuffer_test.cc
More file actions
28 lines (22 loc) · 1.1 KB
/
fl_framebuffer_test.cc
File metadata and controls
28 lines (22 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "gtest/gtest.h"
#include "flutter/common/constants.h"
#include "flutter/fml/logging.h"
#include "flutter/shell/platform/linux/fl_framebuffer.h"
#include "flutter/shell/platform/linux/testing/mock_epoxy.h"
TEST(FlFramebufferTest, HasDepthStencil) {
::testing::NiceMock<flutter::testing::MockEpoxy> epoxy;
g_autoptr(FlFramebuffer) framebuffer = fl_framebuffer_new(GL_RGB, 100, 100);
GLint depth_type = GL_NONE;
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE,
&depth_type);
EXPECT_NE(depth_type, GL_NONE);
GLint stencil_type = GL_NONE;
glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT,
GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE,
&stencil_type);
EXPECT_NE(stencil_type, GL_NONE);
}