1 // Copyright 2014 The Chromium 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.
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_H_
8 #include "gpu/command_buffer/common/gles2_cmd_format.h"
9 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
10 #include "gpu/command_buffer/service/buffer_manager.h"
11 #include "gpu/command_buffer/service/cmd_buffer_engine.h"
12 #include "gpu/command_buffer/service/context_group.h"
13 #include "gpu/command_buffer/service/framebuffer_manager.h"
14 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
15 #include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h"
16 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
17 #include "gpu/command_buffer/service/program_manager.h"
18 #include "gpu/command_buffer/service/query_manager.h"
19 #include "gpu/command_buffer/service/renderbuffer_manager.h"
20 #include "gpu/command_buffer/service/shader_manager.h"
21 #include "gpu/command_buffer/service/test_helper.h"
22 #include "gpu/command_buffer/service/texture_manager.h"
23 #include "gpu/command_buffer/service/vertex_array_manager.h"
24 #include "testing/gtest/include/gtest/gtest.h"
25 #include "ui/gl/gl_context_stub_with_extensions.h"
26 #include "ui/gl/gl_mock.h"
27 #include "ui/gl/gl_surface_stub.h"
36 class GLES2DecoderTest
: public GLES2DecoderTestBase
{
41 void CheckReadPixelsOutOfRange(GLint in_read_x
,
43 GLsizei in_read_width
,
44 GLsizei in_read_height
,
48 class GLES2DecoderWithShaderTest
: public GLES2DecoderWithShaderTestBase
{
50 GLES2DecoderWithShaderTest() : GLES2DecoderWithShaderTestBase() {}
52 void CheckTextureChangesMarkFBOAsNotComplete(bool bound_fbo
);
53 void CheckRenderbufferChangesMarkFBOAsNotComplete(bool bound_fbo
);
56 class GLES2DecoderRGBBackbufferTest
: public GLES2DecoderWithShaderTest
{
58 GLES2DecoderRGBBackbufferTest() {}
60 void SetUp() override
;
63 class GLES2DecoderManualInitTest
: public GLES2DecoderWithShaderTest
{
65 GLES2DecoderManualInitTest() {}
67 // Override default setup so nothing gets setup.
68 void SetUp() override
;
70 void DirtyStateMaskTest(GLuint color_bits
,
72 GLuint front_stencil_mask
,
73 GLuint back_stencil_mask
);
74 void EnableDisableTest(GLenum cap
, bool enable
, bool expect_set
);
80 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_H_