Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: gpu/command_buffer/service/framebuffer_manager_unittest.cc

Issue 2444813002: Remove unsafe mode to enable es3 api by default for WebGL2 and ES3 context (Closed)
Patch Set: fix a bug Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 public: 111 public:
112 static const GLuint kClient1Id = 1; 112 static const GLuint kClient1Id = 1;
113 static const GLuint kService1Id = 11; 113 static const GLuint kService1Id = 11;
114 114
115 explicit FramebufferInfoTestBase(ContextType context_type) 115 explicit FramebufferInfoTestBase(ContextType context_type)
116 : context_type_(context_type), 116 : context_type_(context_type),
117 manager_(kMaxDrawBuffers, 117 manager_(kMaxDrawBuffers,
118 kMaxColorAttachments, 118 kMaxColorAttachments,
119 new FramebufferCompletenessCache), 119 new FramebufferCompletenessCache),
120 feature_info_(new FeatureInfo()) { 120 feature_info_(new FeatureInfo()) {
121 feature_info_->SetES3APIsSwitch(false);
121 texture_manager_.reset(new TextureManager( 122 texture_manager_.reset(new TextureManager(
122 nullptr, feature_info_.get(), kMaxTextureSize, kMaxCubemapSize, 123 nullptr, feature_info_.get(), kMaxTextureSize, kMaxCubemapSize,
123 kMaxRectangleTextureSize, kMax3DTextureSize, kMaxArrayTextureLayers, 124 kMaxRectangleTextureSize, kMax3DTextureSize, kMaxArrayTextureLayers,
124 kUseDefaultTextures, nullptr)); 125 kUseDefaultTextures, nullptr));
125 renderbuffer_manager_.reset(new RenderbufferManager(nullptr, 126 renderbuffer_manager_.reset(new RenderbufferManager(nullptr,
126 kMaxRenderbufferSize, 127 kMaxRenderbufferSize,
127 kMaxSamples, 128 kMaxSamples,
128 feature_info_.get())); 129 feature_info_.get()));
129 } 130 }
130 ~FramebufferInfoTestBase() override { 131 ~FramebufferInfoTestBase() override {
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 renderbuffer_manager_->GetRenderbuffer(kRenderbufferClientId); 1644 renderbuffer_manager_->GetRenderbuffer(kRenderbufferClientId);
1644 ASSERT_TRUE(renderbuffer != nullptr); 1645 ASSERT_TRUE(renderbuffer != nullptr);
1645 framebuffer_->AttachRenderbuffer(GL_COLOR_ATTACHMENT1, renderbuffer); 1646 framebuffer_->AttachRenderbuffer(GL_COLOR_ATTACHMENT1, renderbuffer);
1646 EXPECT_TRUE(framebuffer_->GetReadBufferAttachment()); 1647 EXPECT_TRUE(framebuffer_->GetReadBufferAttachment());
1647 } 1648 }
1648 1649
1649 } // namespace gles2 1650 } // namespace gles2
1650 } // namespace gpu 1651 } // namespace gpu
1651 1652
1652 1653
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info_unittest.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698