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

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

Issue 1155553005: Android: Set browser offscreen ctx type for stats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = 206 limits.mapped_memory_reclaim_limit =
207 WebGraphicsContext3DCommandBufferImpl::kNoLimit; 207 WebGraphicsContext3DCommandBufferImpl::kNoLimit;
208 bool lose_context_when_out_of_memory = false; 208 bool lose_context_when_out_of_memory = false;
209 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( 209 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context(
210 new WebGraphicsContext3DCommandBufferImpl( 210 new WebGraphicsContext3DCommandBufferImpl(
211 0, // offscreen 211 0, // offscreen
212 url, gpu_channel_host.get(), attrs, lose_context_when_out_of_memory, 212 url, gpu_channel_host.get(), attrs, lose_context_when_out_of_memory,
213 limits, nullptr)); 213 limits, nullptr));
214 context->SetContextType(BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT);
214 if (context->InitializeOnCurrentThread()) { 215 if (context->InitializeOnCurrentThread()) {
215 context->traceBeginCHROMIUM( 216 context->traceBeginCHROMIUM(
216 "gpu_toplevel", 217 "gpu_toplevel",
217 base::StringPrintf("CmdBufferImageTransportFactory-%p", 218 base::StringPrintf("CmdBufferImageTransportFactory-%p",
218 context.get()).c_str()); 219 context.get()).c_str());
219 } else { 220 } else {
220 context.reset(); 221 context.reset();
221 } 222 }
222 223
223 return context.Pass(); 224 return context.Pass();
(...skipping 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after
2036 results->orientationAngle = display.RotationAsDegree(); 2037 results->orientationAngle = display.RotationAsDegree();
2037 results->orientationType = 2038 results->orientationType =
2038 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2039 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2039 gfx::DeviceDisplayInfo info; 2040 gfx::DeviceDisplayInfo info;
2040 results->depth = info.GetBitsPerPixel(); 2041 results->depth = info.GetBitsPerPixel();
2041 results->depthPerComponent = info.GetBitsPerComponent(); 2042 results->depthPerComponent = info.GetBitsPerComponent();
2042 results->isMonochrome = (results->depthPerComponent == 0); 2043 results->isMonochrome = (results->depthPerComponent == 0);
2043 } 2044 }
2044 2045
2045 } // namespace content 2046 } // 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