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

Side by Side Diff: content/browser/gpu/gpu_ipc_browsertests.cc

Issue 2107783003: Pass initial size and GPU preference via context attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gyp fix 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
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/memory/ptr_util.h" 6 #include "base/memory/ptr_util.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 9 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
10 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 10 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
(...skipping 22 matching lines...) Expand all
33 attributes.depth_size = 0; 33 attributes.depth_size = 0;
34 attributes.stencil_size = 0; 34 attributes.stencil_size = 0;
35 attributes.samples = 0; 35 attributes.samples = 0;
36 attributes.sample_buffers = 0; 36 attributes.sample_buffers = 0;
37 attributes.bind_generates_resource = false; 37 attributes.bind_generates_resource = false;
38 constexpr bool automatic_flushes = false; 38 constexpr bool automatic_flushes = false;
39 constexpr bool support_locking = false; 39 constexpr bool support_locking = false;
40 return make_scoped_refptr(new content::ContextProviderCommandBuffer( 40 return make_scoped_refptr(new content::ContextProviderCommandBuffer(
41 std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, 41 std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT,
42 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, GURL(), 42 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, GURL(),
43 gl::PreferIntegratedGpu, automatic_flushes, support_locking, 43 automatic_flushes, support_locking, gpu::SharedMemoryLimits(), attributes,
44 gpu::SharedMemoryLimits(), attributes, nullptr, 44 nullptr, content::command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_TESTING));
45 content::command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_TESTING));
46 } 45 }
47 46
48 class ContextTestBase : public content::ContentBrowserTest { 47 class ContextTestBase : public content::ContentBrowserTest {
49 public: 48 public:
50 void SetUpOnMainThread() override { 49 void SetUpOnMainThread() override {
51 // This may leave the provider_ null in some cases, so tests need to early 50 // This may leave the provider_ null in some cases, so tests need to early
52 // out. 51 // out.
53 if (!content::BrowserGpuChannelHostFactory::CanUseForTesting()) 52 if (!content::BrowserGpuChannelHostFactory::CanUseForTesting())
54 return; 53 return;
55 54
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 shim->SimulateCrash(); 282 shim->SimulateCrash();
284 run_loop.Run(); 283 run_loop.Run();
285 284
286 EXPECT_EQ(1, counter); 285 EXPECT_EQ(1, counter);
287 EXPECT_FALSE(IsChannelEstablished()); 286 EXPECT_FALSE(IsChannelEstablished());
288 EstablishAndWait(); 287 EstablishAndWait();
289 EXPECT_TRUE(IsChannelEstablished()); 288 EXPECT_TRUE(IsChannelEstablished());
290 } 289 }
291 290
292 } // namespace content 291 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.cc ('k') | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698