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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 // If we are swapping in, we call AddRefProcess to prevent the process from | 289 // If we are swapping in, we call AddRefProcess to prevent the process from |
290 // exiting. | 290 // exiting. |
291 if (!is_swapped_out) | 291 if (!is_swapped_out) |
292 RenderProcess::current()->AddRefProcess(); | 292 RenderProcess::current()->AddRefProcess(); |
293 } | 293 } |
294 | 294 |
295 bool RenderWidget::AllowPartialSwap() const { | 295 bool RenderWidget::AllowPartialSwap() const { |
296 return true; | 296 return true; |
297 } | 297 } |
298 | 298 |
299 bool RenderWidget::SynchronouslyDisableVSync() const { | 299 bool RenderWidget::UsingSynchronousRendererCompositor() const { |
300 #if defined(OS_ANDROID) | 300 #if defined(OS_ANDROID) |
301 if (CommandLine::ForCurrentProcess()->HasSwitch( | 301 if (CommandLine::ForCurrentProcess()->HasSwitch( |
302 switches::kEnableSynchronousRendererCompositor)) { | 302 switches::kEnableSynchronousRendererCompositor)) { |
303 return true; | 303 return true; |
304 } | 304 } |
305 #endif | 305 #endif |
306 return false; | 306 return false; |
307 } | 307 } |
308 | 308 |
309 bool RenderWidget::OnMessageReceived(const IPC::Message& message) { | 309 bool RenderWidget::OnMessageReceived(const IPC::Message& message) { |
(...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2348 | 2348 |
2349 if (!context->Initialize( | 2349 if (!context->Initialize( |
2350 attributes, | 2350 attributes, |
2351 false /* bind generates resources */, | 2351 false /* bind generates resources */, |
2352 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
) | 2352 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
) |
2353 return NULL; | 2353 return NULL; |
2354 return context.release(); | 2354 return context.release(); |
2355 } | 2355 } |
2356 | 2356 |
2357 } // namespace content | 2357 } // namespace content |
OLD | NEW |