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

Unified Diff: gpu/command_buffer/tests/gl_manager.cc

Issue 732423002: Update from chromium https://crrev.com/304586 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/tests/gl_manager.h ('k') | gpu/command_buffer/tests/gl_query_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/tests/gl_manager.cc
diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc
index ebd821c345895c360342ffbfcbbca6466f8ee683..c09901f5e0b3c3562b645ce7d258c1601ad58c41 100644
--- a/gpu/command_buffer/tests/gl_manager.cc
+++ b/gpu/command_buffer/tests/gl_manager.cc
@@ -139,6 +139,10 @@ scoped_ptr<gfx::GpuMemoryBuffer> GLManager::CreateGpuMemoryBuffer(
}
void GLManager::Initialize(const GLManager::Options& options) {
+ InitializeWithCommandLine(options, nullptr);
+}
+void GLManager::InitializeWithCommandLine(const GLManager::Options& options,
+ base::CommandLine* command_line) {
const int32 kCommandBufferSize = 1024 * 1024;
const size_t kStartTransferBufferSize = 4 * 1024 * 1024;
const size_t kMinTransferBufferSize = 1 * 256 * 1024;
@@ -186,14 +190,19 @@ void GLManager::Initialize(const GLManager::Options& options) {
attrib_helper.blue_size = 8;
attrib_helper.alpha_size = 8;
attrib_helper.depth_size = 16;
+ attrib_helper.stencil_size = 8;
attrib_helper.Serialize(&attribs);
+ DCHECK(!command_line || !context_group);
if (!context_group) {
+ scoped_refptr<gles2::FeatureInfo> feature_info;
+ if (command_line)
+ feature_info = new gles2::FeatureInfo(*command_line);
context_group =
new gles2::ContextGroup(mailbox_manager_.get(),
NULL,
new gpu::gles2::ShaderTranslatorCache,
- NULL,
+ feature_info,
options.bind_generates_resource);
}
« no previous file with comments | « gpu/command_buffer/tests/gl_manager.h ('k') | gpu/command_buffer/tests/gl_query_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698