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 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/android/build_info.h" | 10 #include "base/android/build_info.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 }; | 139 }; |
140 | 140 |
141 GLHelperHolder* GLHelperHolder::Create() { | 141 GLHelperHolder* GLHelperHolder::Create() { |
142 GLHelperHolder* holder = new GLHelperHolder; | 142 GLHelperHolder* holder = new GLHelperHolder; |
143 holder->Initialize(); | 143 holder->Initialize(); |
144 return holder; | 144 return holder; |
145 } | 145 } |
146 | 146 |
147 void GLHelperHolder::Initialize() { | 147 void GLHelperHolder::Initialize() { |
148 auto* factory = BrowserGpuChannelHostFactory::instance(); | 148 auto* factory = BrowserGpuChannelHostFactory::instance(); |
149 scoped_refptr<GpuChannelHost> gpu_channel_host(factory->GetGpuChannel()); | 149 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host(factory->GetGpuChannel()); |
150 | 150 |
151 // The Browser Compositor is in charge of reestablishing the channel if its | 151 // The Browser Compositor is in charge of reestablishing the channel if its |
152 // missing. | 152 // missing. |
153 if (!gpu_channel_host) | 153 if (!gpu_channel_host) |
154 return; | 154 return; |
155 | 155 |
156 // This is for an offscreen context, so we don't need the default framebuffer | 156 // This is for an offscreen context, so we don't need the default framebuffer |
157 // to have alpha, stencil, depth, antialiasing. | 157 // to have alpha, stencil, depth, antialiasing. |
158 gpu::gles2::ContextCreationAttribHelper attributes; | 158 gpu::gles2::ContextCreationAttribHelper attributes; |
159 attributes.alpha_size = -1; | 159 attributes.alpha_size = -1; |
(...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2017 results->orientationAngle = display.RotationAsDegree(); | 2017 results->orientationAngle = display.RotationAsDegree(); |
2018 results->orientationType = | 2018 results->orientationType = |
2019 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2019 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
2020 gfx::DeviceDisplayInfo info; | 2020 gfx::DeviceDisplayInfo info; |
2021 results->depth = info.GetBitsPerPixel(); | 2021 results->depth = info.GetBitsPerPixel(); |
2022 results->depthPerComponent = info.GetBitsPerComponent(); | 2022 results->depthPerComponent = info.GetBitsPerComponent(); |
2023 results->isMonochrome = (results->depthPerComponent == 0); | 2023 results->isMonochrome = (results->depthPerComponent == 0); |
2024 } | 2024 } |
2025 | 2025 |
2026 } // namespace content | 2026 } // namespace content |
OLD | NEW |