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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 // If we are swapping in, we call AddRefProcess to prevent the process from | 294 // If we are swapping in, we call AddRefProcess to prevent the process from |
295 // exiting. | 295 // exiting. |
296 if (!is_swapped_out) | 296 if (!is_swapped_out) |
297 RenderProcess::current()->AddRefProcess(); | 297 RenderProcess::current()->AddRefProcess(); |
298 } | 298 } |
299 | 299 |
300 bool RenderWidget::AllowPartialSwap() const { | 300 bool RenderWidget::AllowPartialSwap() const { |
301 return true; | 301 return true; |
302 } | 302 } |
303 | 303 |
304 bool RenderWidget::SynchronouslyDisableVSync() const { | 304 bool RenderWidget::UsingSynchronousRendererCompositor() const { |
305 #if defined(OS_ANDROID) | 305 #if defined(OS_ANDROID) |
306 if (CommandLine::ForCurrentProcess()->HasSwitch( | 306 if (CommandLine::ForCurrentProcess()->HasSwitch( |
307 switches::kEnableSynchronousRendererCompositor)) { | 307 switches::kEnableSynchronousRendererCompositor)) { |
308 return true; | 308 return true; |
309 } | 309 } |
310 #endif | 310 #endif |
311 return false; | 311 return false; |
312 } | 312 } |
313 | 313 |
314 bool RenderWidget::OnMessageReceived(const IPC::Message& message) { | 314 bool RenderWidget::OnMessageReceived(const IPC::Message& message) { |
(...skipping 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2375 | 2375 |
2376 if (!context->Initialize( | 2376 if (!context->Initialize( |
2377 attributes, | 2377 attributes, |
2378 false /* bind generates resources */, | 2378 false /* bind generates resources */, |
2379 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
) | 2379 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
) |
2380 return NULL; | 2380 return NULL; |
2381 return context.release(); | 2381 return context.release(); |
2382 } | 2382 } |
2383 | 2383 |
2384 } // namespace content | 2384 } // namespace content |
OLD | NEW |