| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 gfx::DeviceDisplayInfo display_info; | 169 gfx::DeviceDisplayInfo display_info; |
| 170 size_t full_screen_texture_size_in_bytes = display_info.GetDisplayHeight() * | 170 size_t full_screen_texture_size_in_bytes = display_info.GetDisplayHeight() * |
| 171 display_info.GetDisplayWidth() * | 171 display_info.GetDisplayWidth() * |
| 172 kBytesPerPixel; | 172 kBytesPerPixel; |
| 173 gpu::SharedMemoryLimits limits; | 173 gpu::SharedMemoryLimits limits; |
| 174 limits.command_buffer_size = 64 * 1024; | 174 limits.command_buffer_size = 64 * 1024; |
| 175 limits.start_transfer_buffer_size = 64 * 1024; | 175 limits.start_transfer_buffer_size = 64 * 1024; |
| 176 limits.min_transfer_buffer_size = 64 * 1024; | 176 limits.min_transfer_buffer_size = 64 * 1024; |
| 177 limits.max_transfer_buffer_size = std::min( | 177 limits.max_transfer_buffer_size = std::min( |
| 178 3 * full_screen_texture_size_in_bytes, kDefaultMaxTransferBufferSize); | 178 3 * full_screen_texture_size_in_bytes, kDefaultMaxTransferBufferSize); |
| 179 limits.mapped_memory_reclaim_limit = 2 * 1024 * 1024; |
| 179 | 180 |
| 180 bool share_resources = true; | 181 bool share_resources = true; |
| 181 // TODO(danakj): This should be false probably, it is for the main thread | 182 // TODO(danakj): This should be false probably, it is for the main thread |
| 182 // context which is used for GLHelper. | 183 // context which is used for GLHelper. |
| 183 bool automatic_flushes = true; | 184 bool automatic_flushes = true; |
| 184 GURL url("chrome://gpu/RenderWidgetHostViewAndroid"); | 185 GURL url("chrome://gpu/RenderWidgetHostViewAndroid"); |
| 185 | 186 |
| 186 std::unique_ptr<WebGraphicsContext3DCommandBufferImpl> context( | 187 std::unique_ptr<WebGraphicsContext3DCommandBufferImpl> context( |
| 187 new WebGraphicsContext3DCommandBufferImpl( | 188 new WebGraphicsContext3DCommandBufferImpl( |
| 188 gpu::kNullSurfaceHandle, // offscreen | 189 gpu::kNullSurfaceHandle, // offscreen |
| (...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2016 results->orientationAngle = display.RotationAsDegree(); | 2017 results->orientationAngle = display.RotationAsDegree(); |
| 2017 results->orientationType = | 2018 results->orientationType = |
| 2018 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2019 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 2019 gfx::DeviceDisplayInfo info; | 2020 gfx::DeviceDisplayInfo info; |
| 2020 results->depth = info.GetBitsPerPixel(); | 2021 results->depth = info.GetBitsPerPixel(); |
| 2021 results->depthPerComponent = info.GetBitsPerComponent(); | 2022 results->depthPerComponent = info.GetBitsPerComponent(); |
| 2022 results->isMonochrome = (results->depthPerComponent == 0); | 2023 results->isMonochrome = (results->depthPerComponent == 0); |
| 2023 } | 2024 } |
| 2024 | 2025 |
| 2025 } // namespace content | 2026 } // namespace content |
| OLD | NEW |