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

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

Issue 1235203003: WIP cc: remove unused and legacy GetMappedMemoryLimit code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
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 "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 gfx::DeviceDisplayInfo display_info; 196 gfx::DeviceDisplayInfo display_info;
197 size_t full_screen_texture_size_in_bytes = display_info.GetDisplayHeight() * 197 size_t full_screen_texture_size_in_bytes = display_info.GetDisplayHeight() *
198 display_info.GetDisplayWidth() * 198 display_info.GetDisplayWidth() *
199 kBytesPerPixel; 199 kBytesPerPixel;
200 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits; 200 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits;
201 limits.command_buffer_size = 64 * 1024; 201 limits.command_buffer_size = 64 * 1024;
202 limits.start_transfer_buffer_size = 64 * 1024; 202 limits.start_transfer_buffer_size = 64 * 1024;
203 limits.min_transfer_buffer_size = 64 * 1024; 203 limits.min_transfer_buffer_size = 64 * 1024;
204 limits.max_transfer_buffer_size = std::min( 204 limits.max_transfer_buffer_size = std::min(
205 3 * full_screen_texture_size_in_bytes, kDefaultMaxTransferBufferSize); 205 3 * full_screen_texture_size_in_bytes, kDefaultMaxTransferBufferSize);
206 limits.mapped_memory_reclaim_limit =
207 WebGraphicsContext3DCommandBufferImpl::kNoLimit;
208 bool lose_context_when_out_of_memory = false; 206 bool lose_context_when_out_of_memory = false;
209 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( 207 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context(
210 new WebGraphicsContext3DCommandBufferImpl( 208 new WebGraphicsContext3DCommandBufferImpl(
211 0, // offscreen 209 0, // offscreen
212 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,
213 limits, nullptr)); 211 limits, nullptr));
214 context->SetContextType(BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT); 212 context->SetContextType(BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT);
215 if (context->InitializeOnCurrentThread()) { 213 if (context->InitializeOnCurrentThread()) {
216 context->traceBeginCHROMIUM( 214 context->traceBeginCHROMIUM(
217 "gpu_toplevel", 215 "gpu_toplevel",
(...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after
2047 results->orientationAngle = display.RotationAsDegree(); 2045 results->orientationAngle = display.RotationAsDegree();
2048 results->orientationType = 2046 results->orientationType =
2049 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2047 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2050 gfx::DeviceDisplayInfo info; 2048 gfx::DeviceDisplayInfo info;
2051 results->depth = info.GetBitsPerPixel(); 2049 results->depth = info.GetBitsPerPixel();
2052 results->depthPerComponent = info.GetBitsPerComponent(); 2050 results->depthPerComponent = info.GetBitsPerComponent();
2053 results->isMonochrome = (results->depthPerComponent == 0); 2051 results->isMonochrome = (results->depthPerComponent == 0);
2054 } 2052 }
2055 2053
2056 } // namespace content 2054 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698