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

Side by Side Diff: services/ui/public/cpp/gles2_context.cc

Issue 2431753002: Mus experiment in content shell on Android.
Patch Set: Fixed gn check Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "services/ui/public/cpp/gles2_context.h" 5 #include "services/ui/public/cpp/gles2_context.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 11 matching lines...) Expand all
22 namespace ui { 22 namespace ui {
23 23
24 GLES2Context::GLES2Context() {} 24 GLES2Context::GLES2Context() {}
25 25
26 GLES2Context::~GLES2Context() {} 26 GLES2Context::~GLES2Context() {}
27 27
28 bool GLES2Context::Initialize( 28 bool GLES2Context::Initialize(
29 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host, 29 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host,
30 scoped_refptr<base::SingleThreadTaskRunner> task_runner) { 30 scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
31 DCHECK(gpu_channel_host); 31 DCHECK(gpu_channel_host);
32 gpu::SurfaceHandle surface_handle = gfx::kNullAcceleratedWidget; 32 gpu::SurfaceHandle surface_handle = gpu::kNullSurfaceHandle;
33 // TODO(penghuang): support shared group. 33 // TODO(penghuang): support shared group.
34 gpu::CommandBufferProxyImpl* shared_command_buffer = nullptr; 34 gpu::CommandBufferProxyImpl* shared_command_buffer = nullptr;
35 gpu::GpuStreamId stream_id = gpu::GpuStreamId::GPU_STREAM_DEFAULT; 35 gpu::GpuStreamId stream_id = gpu::GpuStreamId::GPU_STREAM_DEFAULT;
36 gpu::GpuStreamPriority stream_priority = gpu::GpuStreamPriority::NORMAL; 36 gpu::GpuStreamPriority stream_priority = gpu::GpuStreamPriority::NORMAL;
37 gpu::gles2::ContextCreationAttribHelper attributes; 37 gpu::gles2::ContextCreationAttribHelper attributes;
38 // TODO(penghuang): figure a useful active_url. 38 // TODO(penghuang): figure a useful active_url.
39 GURL active_url; 39 GURL active_url;
40 command_buffer_proxy_impl_ = gpu::CommandBufferProxyImpl::Create( 40 command_buffer_proxy_impl_ = gpu::CommandBufferProxyImpl::Create(
41 std::move(gpu_channel_host), surface_handle, shared_command_buffer, 41 std::move(gpu_channel_host), surface_handle, shared_command_buffer,
42 stream_id, stream_priority, attributes, active_url, 42 stream_id, stream_priority, attributes, active_url,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Return the GLES2Context only if it is successfully initialized. If 81 // Return the GLES2Context only if it is successfully initialized. If
82 // initialization fails, then return null. 82 // initialization fails, then return null.
83 std::unique_ptr<GLES2Context> gles2_context(new GLES2Context); 83 std::unique_ptr<GLES2Context> gles2_context(new GLES2Context);
84 if (!gles2_context->Initialize(std::move(gpu_channel_host), 84 if (!gles2_context->Initialize(std::move(gpu_channel_host),
85 std::move(task_runner))) 85 std::move(task_runner)))
86 gles2_context.reset(); 86 gles2_context.reset();
87 return gles2_context; 87 return gles2_context;
88 } 88 }
89 89
90 } // namespace ui 90 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698