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

Side by Side Diff: gpu/ipc/client/gpu_in_process_context_tests.cc

Issue 2106103005: Revert of Pass initial size and GPU preference via context attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months 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
« no previous file with comments | « gpu/ipc/client/command_buffer_proxy_impl.cc ('k') | gpu/ipc/common/OWNERS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stdio.h> 5 #include <stdio.h>
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 18 matching lines...) Expand all
29 attributes.stencil_size = 8; 29 attributes.stencil_size = 8;
30 attributes.samples = 4; 30 attributes.samples = 4;
31 attributes.sample_buffers = 1; 31 attributes.sample_buffers = 1;
32 attributes.bind_generates_resource = false; 32 attributes.bind_generates_resource = false;
33 33
34 context_.reset(gpu::GLInProcessContext::Create( 34 context_.reset(gpu::GLInProcessContext::Create(
35 nullptr, /* service */ 35 nullptr, /* service */
36 nullptr, /* surface */ 36 nullptr, /* surface */
37 true, /* offscreen */ 37 true, /* offscreen */
38 gfx::kNullAcceleratedWidget, /* window */ 38 gfx::kNullAcceleratedWidget, /* window */
39 gfx::Size(1, 1), /* size */
39 nullptr, /* share_context */ 40 nullptr, /* share_context */
40 attributes, gpu::SharedMemoryLimits(), 41 attributes, gl::PreferDiscreteGpu, gpu::SharedMemoryLimits(),
41 nullptr, /* gpu_memory_buffer_manager */ 42 nullptr, /* gpu_memory_buffer_manager */
42 nullptr /* image_factory */)); 43 nullptr /* image_factory */));
43 gl_ = context_->GetImplementation(); 44 gl_ = context_->GetImplementation();
44 context_support_ = context_->GetImplementation(); 45 context_support_ = context_->GetImplementation();
45 } 46 }
46 47
47 void TearDown() override { context_.reset(NULL); } 48 void TearDown() override { context_.reset(NULL); }
48 49
49 protected: 50 protected:
50 gpu::gles2::GLES2Interface* gl_; 51 gpu::gles2::GLES2Interface* gl_;
51 gpu::ContextSupport* context_support_; 52 gpu::ContextSupport* context_support_;
52 53
53 private: 54 private:
54 std::unique_ptr<gpu::GLInProcessContext> context_; 55 std::unique_ptr<gpu::GLInProcessContext> context_;
55 }; 56 };
56 57
57 } // namespace 58 } // namespace
58 59
59 // Include the actual tests. 60 // Include the actual tests.
60 #define CONTEXT_TEST_F TEST_F 61 #define CONTEXT_TEST_F TEST_F
61 #include "gpu/ipc/client/gpu_context_tests.h" 62 #include "gpu/ipc/client/gpu_context_tests.h"
OLDNEW
« no previous file with comments | « gpu/ipc/client/command_buffer_proxy_impl.cc ('k') | gpu/ipc/common/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698