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 "base/android/build_info.h" | 9 #include "base/android/build_info.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 3 * full_screen_texture_size_in_bytes, kDefaultMaxTransferBufferSize); | 184 3 * full_screen_texture_size_in_bytes, kDefaultMaxTransferBufferSize); |
185 limits.mapped_memory_reclaim_limit = | 185 limits.mapped_memory_reclaim_limit = |
186 WebGraphicsContext3DCommandBufferImpl::kNoLimit; | 186 WebGraphicsContext3DCommandBufferImpl::kNoLimit; |
187 bool lose_context_when_out_of_memory = false; | 187 bool lose_context_when_out_of_memory = false; |
188 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( | 188 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( |
189 new WebGraphicsContext3DCommandBufferImpl( | 189 new WebGraphicsContext3DCommandBufferImpl( |
190 0, // offscreen | 190 0, // offscreen |
191 url, gpu_channel_host.get(), attrs, lose_context_when_out_of_memory, | 191 url, gpu_channel_host.get(), attrs, lose_context_when_out_of_memory, |
192 limits, nullptr)); | 192 limits, nullptr)); |
193 if (context->InitializeOnCurrentThread()) { | 193 if (context->InitializeOnCurrentThread()) { |
194 context->pushGroupMarkerEXT( | 194 context->traceBeginCHROMIUM( |
| 195 "gpu_toplevel", |
195 base::StringPrintf("CmdBufferImageTransportFactory-%p", | 196 base::StringPrintf("CmdBufferImageTransportFactory-%p", |
196 context.get()).c_str()); | 197 context.get()).c_str()); |
197 } else { | 198 } else { |
198 context.reset(); | 199 context.reset(); |
199 } | 200 } |
200 | 201 |
201 return context.Pass(); | 202 return context.Pass(); |
202 } | 203 } |
203 | 204 |
204 // This can only be used for readback postprocessing. It may return null if the | 205 // This can only be used for readback postprocessing. It may return null if the |
(...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1921 results->orientationAngle = display.RotationAsDegree(); | 1922 results->orientationAngle = display.RotationAsDegree(); |
1922 results->orientationType = | 1923 results->orientationType = |
1923 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 1924 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
1924 gfx::DeviceDisplayInfo info; | 1925 gfx::DeviceDisplayInfo info; |
1925 results->depth = info.GetBitsPerPixel(); | 1926 results->depth = info.GetBitsPerPixel(); |
1926 results->depthPerComponent = info.GetBitsPerComponent(); | 1927 results->depthPerComponent = info.GetBitsPerComponent(); |
1927 results->isMonochrome = (results->depthPerComponent == 0); | 1928 results->isMonochrome = (results->depthPerComponent == 0); |
1928 } | 1929 } |
1929 | 1930 |
1930 } // namespace content | 1931 } // namespace content |
OLD | NEW |