OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include "gpu/command_buffer/service/error_state_mock.h" | 8 #include "gpu/command_buffer/service/error_state_mock.h" |
9 #include "gpu/command_buffer/service/feature_info.h" | 9 #include "gpu/command_buffer/service/feature_info.h" |
10 #include "gpu/command_buffer/service/framebuffer_manager.h" | 10 #include "gpu/command_buffer/service/framebuffer_manager.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 const GLint kMaxRenderbufferSize = 64; | 30 const GLint kMaxRenderbufferSize = 64; |
31 const GLint kMaxSamples = 4; | 31 const GLint kMaxSamples = 4; |
32 const uint32_t kMaxDrawBuffers = 16; | 32 const uint32_t kMaxDrawBuffers = 16; |
33 const uint32_t kMaxColorAttachments = 16; | 33 const uint32_t kMaxColorAttachments = 16; |
34 const bool kUseDefaultTextures = false; | 34 const bool kUseDefaultTextures = false; |
35 | 35 |
36 } // namespace | 36 } // namespace |
37 | 37 |
38 class FramebufferManagerTest : public GpuServiceTest { | 38 class FramebufferManagerTest : public GpuServiceTest { |
39 public: | 39 public: |
40 FramebufferManagerTest() | 40 FramebufferManagerTest() : manager_(1, 1, CONTEXT_TYPE_OPENGLES2, NULL) { |
41 : manager_(1, 1, CONTEXT_TYPE_OPENGLES2, NULL), | 41 GpuDriverBugWorkarounds::Initialize(gpu_driver_bug_workarounds_); |
42 feature_info_(new FeatureInfo()) { | 42 feature_info_ = new FeatureInfo(gpu_driver_bug_workarounds_); |
43 texture_manager_.reset(new TextureManager(NULL, | 43 texture_manager_.reset(new TextureManager(NULL, |
44 feature_info_.get(), | 44 feature_info_.get(), |
45 kMaxTextureSize, | 45 kMaxTextureSize, |
46 kMaxCubemapSize, | 46 kMaxCubemapSize, |
47 kMaxRectangleTextureSize, | 47 kMaxRectangleTextureSize, |
48 kMax3DTextureSize, | 48 kMax3DTextureSize, |
49 kUseDefaultTextures)); | 49 kUseDefaultTextures)); |
50 renderbuffer_manager_.reset(new RenderbufferManager(NULL, | 50 renderbuffer_manager_.reset(new RenderbufferManager(NULL, |
51 kMaxRenderbufferSize, | 51 kMaxRenderbufferSize, |
52 kMaxSamples, | 52 kMaxSamples, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 class FramebufferInfoTestBase : public GpuServiceTest { | 112 class FramebufferInfoTestBase : public GpuServiceTest { |
113 public: | 113 public: |
114 static const GLuint kClient1Id = 1; | 114 static const GLuint kClient1Id = 1; |
115 static const GLuint kService1Id = 11; | 115 static const GLuint kService1Id = 11; |
116 | 116 |
117 explicit FramebufferInfoTestBase(ContextType context_type) | 117 explicit FramebufferInfoTestBase(ContextType context_type) |
118 : manager_(kMaxDrawBuffers, | 118 : manager_(kMaxDrawBuffers, |
119 kMaxColorAttachments, | 119 kMaxColorAttachments, |
120 context_type, | 120 context_type, |
121 new FramebufferCompletenessCache), | 121 new FramebufferCompletenessCache) { |
122 feature_info_(new FeatureInfo()) { | 122 GpuDriverBugWorkarounds::Initialize(gpu_driver_bug_workarounds_); |
| 123 feature_info_ = new FeatureInfo(gpu_driver_bug_workarounds_); |
123 texture_manager_.reset(new TextureManager(NULL, | 124 texture_manager_.reset(new TextureManager(NULL, |
124 feature_info_.get(), | 125 feature_info_.get(), |
125 kMaxTextureSize, | 126 kMaxTextureSize, |
126 kMaxCubemapSize, | 127 kMaxCubemapSize, |
127 kMaxRectangleTextureSize, | 128 kMaxRectangleTextureSize, |
128 kMax3DTextureSize, | 129 kMax3DTextureSize, |
129 kUseDefaultTextures)); | 130 kUseDefaultTextures)); |
130 renderbuffer_manager_.reset(new RenderbufferManager(NULL, | 131 renderbuffer_manager_.reset(new RenderbufferManager(NULL, |
131 kMaxRenderbufferSize, | 132 kMaxRenderbufferSize, |
132 kMaxSamples, | 133 kMaxSamples, |
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1183 renderbuffer_manager_->GetRenderbuffer(kRenderbufferClientId); | 1184 renderbuffer_manager_->GetRenderbuffer(kRenderbufferClientId); |
1184 ASSERT_TRUE(renderbuffer != NULL); | 1185 ASSERT_TRUE(renderbuffer != NULL); |
1185 framebuffer_->AttachRenderbuffer(GL_COLOR_ATTACHMENT1, renderbuffer); | 1186 framebuffer_->AttachRenderbuffer(GL_COLOR_ATTACHMENT1, renderbuffer); |
1186 EXPECT_TRUE(framebuffer_->GetReadBufferAttachment()); | 1187 EXPECT_TRUE(framebuffer_->GetReadBufferAttachment()); |
1187 } | 1188 } |
1188 | 1189 |
1189 } // namespace gles2 | 1190 } // namespace gles2 |
1190 } // namespace gpu | 1191 } // namespace gpu |
1191 | 1192 |
1192 | 1193 |
OLD | NEW |