Chromium Code Reviews| 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 "base/android/build_info.h" | 9 #include "base/android/build_info.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 203 3 * full_screen_texture_size_in_bytes, kDefaultMaxTransferBufferSize); | 203 3 * full_screen_texture_size_in_bytes, kDefaultMaxTransferBufferSize); |
| 204 limits.mapped_memory_reclaim_limit = | 204 limits.mapped_memory_reclaim_limit = |
| 205 WebGraphicsContext3DCommandBufferImpl::kNoLimit; | 205 WebGraphicsContext3DCommandBufferImpl::kNoLimit; |
| 206 bool lose_context_when_out_of_memory = false; | 206 bool lose_context_when_out_of_memory = false; |
| 207 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( | 207 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( |
| 208 new WebGraphicsContext3DCommandBufferImpl( | 208 new WebGraphicsContext3DCommandBufferImpl( |
| 209 0, // offscreen | 209 0, // offscreen |
| 210 url, gpu_channel_host.get(), attrs, lose_context_when_out_of_memory, | 210 url, gpu_channel_host.get(), attrs, lose_context_when_out_of_memory, |
| 211 limits, nullptr)); | 211 limits, nullptr)); |
| 212 if (context->InitializeOnCurrentThread()) { | 212 if (context->InitializeOnCurrentThread()) { |
| 213 context->traceBeginCHROMIUM( | 213 const std::string label = |
| 214 "gpu_toplevel", | |
| 215 base::StringPrintf("CmdBufferImageTransportFactory-%p", | 214 base::StringPrintf("CmdBufferImageTransportFactory-%p", |
| 216 context.get()).c_str()); | 215 context.get()).c_str() |
|
no sievers
2015/05/12 17:51:44
);
David Yen
2015/05/12 17:56:13
Done.
| |
| 216 context->pushGroupMarkerEXT(label.c_str()); | |
| 217 context->traceBeginCHROMIUM("gpu_toplevel", label.c_str()); | |
| 217 } else { | 218 } else { |
| 218 context.reset(); | 219 context.reset(); |
| 219 } | 220 } |
| 220 | 221 |
| 221 return context.Pass(); | 222 return context.Pass(); |
| 222 } | 223 } |
| 223 | 224 |
| 224 // This can only be used for readback postprocessing. It may return null if the | 225 // This can only be used for readback postprocessing. It may return null if the |
| 225 // channel was lost and not reestablished yet. | 226 // channel was lost and not reestablished yet. |
| 226 GLHelper* GetPostReadbackGLHelper() { | 227 GLHelper* GetPostReadbackGLHelper() { |
| (...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2015 results->orientationAngle = display.RotationAsDegree(); | 2016 results->orientationAngle = display.RotationAsDegree(); |
| 2016 results->orientationType = | 2017 results->orientationType = |
| 2017 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2018 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 2018 gfx::DeviceDisplayInfo info; | 2019 gfx::DeviceDisplayInfo info; |
| 2019 results->depth = info.GetBitsPerPixel(); | 2020 results->depth = info.GetBitsPerPixel(); |
| 2020 results->depthPerComponent = info.GetBitsPerComponent(); | 2021 results->depthPerComponent = info.GetBitsPerComponent(); |
| 2021 results->isMonochrome = (results->depthPerComponent == 0); | 2022 results->isMonochrome = (results->depthPerComponent == 0); |
| 2022 } | 2023 } |
| 2023 | 2024 |
| 2024 } // namespace content | 2025 } // namespace content |
| OLD | NEW |