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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 1899393002: Turn off flushes and sharing for the android GLHelper context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 kBytesPerPixel; 172 kBytesPerPixel;
173 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits; 173 WebGraphicsContext3DCommandBufferImpl::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 = 179 limits.mapped_memory_reclaim_limit =
180 WebGraphicsContext3DCommandBufferImpl::kNoLimit; 180 WebGraphicsContext3DCommandBufferImpl::kNoLimit;
181 181
182 bool share_resources = true; 182 bool share_resources = false;
183 // TODO(danakj): This should be false probably, it is for the main thread 183 bool automatic_flushes = false;
184 // context which is used for GLHelper.
185 bool automatic_flushes = true;
186 GURL url("chrome://gpu/RenderWidgetHostViewAndroid"); 184 GURL url("chrome://gpu/RenderWidgetHostViewAndroid");
187 185
188 std::unique_ptr<WebGraphicsContext3DCommandBufferImpl> context( 186 std::unique_ptr<WebGraphicsContext3DCommandBufferImpl> context(
189 new WebGraphicsContext3DCommandBufferImpl( 187 new WebGraphicsContext3DCommandBufferImpl(
190 gpu::kNullSurfaceHandle, // offscreen 188 gpu::kNullSurfaceHandle, // offscreen
191 url, gpu_channel_host.get(), attributes, gfx::PreferIntegratedGpu, 189 url, gpu_channel_host.get(), attributes, gfx::PreferIntegratedGpu,
192 share_resources, automatic_flushes, limits, nullptr)); 190 share_resources, automatic_flushes, limits, nullptr));
193 provider_ = new ContextProviderCommandBuffer( 191 provider_ = new ContextProviderCommandBuffer(
194 std::move(context), BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT); 192 std::move(context), BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT);
195 if (!provider_->BindToCurrentThread()) 193 if (!provider_->BindToCurrentThread())
(...skipping 1822 matching lines...) Expand 10 before | Expand all | Expand 10 after
2018 results->orientationAngle = display.RotationAsDegree(); 2016 results->orientationAngle = display.RotationAsDegree();
2019 results->orientationType = 2017 results->orientationType =
2020 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2018 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2021 gfx::DeviceDisplayInfo info; 2019 gfx::DeviceDisplayInfo info;
2022 results->depth = info.GetBitsPerPixel(); 2020 results->depth = info.GetBitsPerPixel();
2023 results->depthPerComponent = info.GetBitsPerComponent(); 2021 results->depthPerComponent = info.GetBitsPerComponent();
2024 results->isMonochrome = (results->depthPerComponent == 0); 2022 results->isMonochrome = (results->depthPerComponent == 0);
2025 } 2023 }
2026 2024
2027 } // namespace content 2025 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698