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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.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 (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 "content/browser/renderer_host/render_widget_host_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // screen readback to be mapped. 182 // screen readback to be mapped.
183 limits.mapped_memory_reclaim_limit = full_screen_texture_size_in_bytes; 183 limits.mapped_memory_reclaim_limit = full_screen_texture_size_in_bytes;
184 184
185 constexpr bool automatic_flushes = false; 185 constexpr bool automatic_flushes = false;
186 constexpr bool support_locking = false; 186 constexpr bool support_locking = false;
187 const GURL url("chrome://gpu/RenderWidgetHostViewAndroid"); 187 const GURL url("chrome://gpu/RenderWidgetHostViewAndroid");
188 188
189 provider_ = new ContextProviderCommandBuffer( 189 provider_ = new ContextProviderCommandBuffer(
190 std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, 190 std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT,
191 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, url, 191 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, url,
192 gl::PreferIntegratedGpu, automatic_flushes, support_locking, limits, 192 automatic_flushes, support_locking, limits, attributes, nullptr,
193 attributes, nullptr,
194 command_buffer_metrics::BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT); 193 command_buffer_metrics::BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT);
195 if (!provider_->BindToCurrentThread()) 194 if (!provider_->BindToCurrentThread())
196 return; 195 return;
197 provider_->ContextGL()->TraceBeginCHROMIUM( 196 provider_->ContextGL()->TraceBeginCHROMIUM(
198 "gpu_toplevel", 197 "gpu_toplevel",
199 base::StringPrintf("CmdBufferImageTransportFactory-%p", provider_.get()) 198 base::StringPrintf("CmdBufferImageTransportFactory-%p", provider_.get())
200 .c_str()); 199 .c_str());
201 provider_->SetLostContextCallback( 200 provider_->SetLostContextCallback(
202 base::Bind(&GLHelperHolder::OnContextLost, base::Unretained(this))); 201 base::Bind(&GLHelperHolder::OnContextLost, base::Unretained(this)));
203 gl_helper_.reset(new display_compositor::GLHelper( 202 gl_helper_.reset(new display_compositor::GLHelper(
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after
2012 case ui::MotionEvent::ACTION_UP: 2011 case ui::MotionEvent::ACTION_UP:
2013 case ui::MotionEvent::ACTION_POINTER_UP: 2012 case ui::MotionEvent::ACTION_POINTER_UP:
2014 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 2013 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
2015 delta.InMicroseconds(), 1, 1000000, 50); 2014 delta.InMicroseconds(), 1, 1000000, 50);
2016 default: 2015 default:
2017 return; 2016 return;
2018 } 2017 }
2019 } 2018 }
2020 2019
2021 } // namespace content 2020 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.cc ('k') | content/common/gpu/client/context_provider_command_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698