OLD | NEW |
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 Loading... |
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 automatic_flushes, support_locking, limits, attributes, nullptr, | 192 gl::PreferIntegratedGpu, automatic_flushes, support_locking, limits, |
| 193 attributes, nullptr, |
193 command_buffer_metrics::BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT); | 194 command_buffer_metrics::BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT); |
194 if (!provider_->BindToCurrentThread()) | 195 if (!provider_->BindToCurrentThread()) |
195 return; | 196 return; |
196 provider_->ContextGL()->TraceBeginCHROMIUM( | 197 provider_->ContextGL()->TraceBeginCHROMIUM( |
197 "gpu_toplevel", | 198 "gpu_toplevel", |
198 base::StringPrintf("CmdBufferImageTransportFactory-%p", provider_.get()) | 199 base::StringPrintf("CmdBufferImageTransportFactory-%p", provider_.get()) |
199 .c_str()); | 200 .c_str()); |
200 provider_->SetLostContextCallback( | 201 provider_->SetLostContextCallback( |
201 base::Bind(&GLHelperHolder::OnContextLost, base::Unretained(this))); | 202 base::Bind(&GLHelperHolder::OnContextLost, base::Unretained(this))); |
202 gl_helper_.reset(new display_compositor::GLHelper( | 203 gl_helper_.reset(new display_compositor::GLHelper( |
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2011 case ui::MotionEvent::ACTION_UP: | 2012 case ui::MotionEvent::ACTION_UP: |
2012 case ui::MotionEvent::ACTION_POINTER_UP: | 2013 case ui::MotionEvent::ACTION_POINTER_UP: |
2013 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", | 2014 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", |
2014 delta.InMicroseconds(), 1, 1000000, 50); | 2015 delta.InMicroseconds(), 1, 1000000, 50); |
2015 default: | 2016 default: |
2016 return; | 2017 return; |
2017 } | 2018 } |
2018 } | 2019 } |
2019 | 2020 |
2020 } // namespace content | 2021 } // namespace content |
OLD | NEW |