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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <dwmapi.h> | 8 #include <dwmapi.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "gpu/config/gpu_info_collector.h" | 40 #include "gpu/config/gpu_info_collector.h" |
41 #include "gpu/config/gpu_switches.h" | 41 #include "gpu/config/gpu_switches.h" |
42 #include "gpu/config/gpu_util.h" | 42 #include "gpu/config/gpu_util.h" |
43 #include "ui/events/platform/platform_event_source.h" | 43 #include "ui/events/platform/platform_event_source.h" |
44 #include "ui/gl/gl_context.h" | 44 #include "ui/gl/gl_context.h" |
45 #include "ui/gl/gl_implementation.h" | 45 #include "ui/gl/gl_implementation.h" |
46 #include "ui/gl/gl_surface.h" | 46 #include "ui/gl/gl_surface.h" |
47 #include "ui/gl/gl_switches.h" | 47 #include "ui/gl/gl_switches.h" |
48 #include "ui/gl/gpu_switching_manager.h" | 48 #include "ui/gl/gpu_switching_manager.h" |
49 | 49 |
| 50 #if defined(OS_ANDROID) |
| 51 #include "base/trace_event/memory_dump_manager.h" |
| 52 #include "components/tracing/graphics_memory_dump_provider_android.h" |
| 53 #endif |
| 54 |
50 #if defined(OS_WIN) | 55 #if defined(OS_WIN) |
51 #include "base/win/windows_version.h" | 56 #include "base/win/windows_version.h" |
52 #include "base/win/scoped_com_initializer.h" | 57 #include "base/win/scoped_com_initializer.h" |
53 #include "sandbox/win/src/sandbox.h" | 58 #include "sandbox/win/src/sandbox.h" |
54 #endif | 59 #endif |
55 | 60 |
56 #if defined(USE_X11) | 61 #if defined(USE_X11) |
57 #include "ui/base/x/x11_util.h" | 62 #include "ui/base/x/x11_util.h" |
58 #endif | 63 #endif |
59 | 64 |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 while (!deferred_messages.Get().empty()) | 381 while (!deferred_messages.Get().empty()) |
377 deferred_messages.Get().pop(); | 382 deferred_messages.Get().pop(); |
378 | 383 |
379 child_thread->Init(start_time); | 384 child_thread->Init(start_time); |
380 | 385 |
381 gpu_process.set_main_thread(child_thread); | 386 gpu_process.set_main_thread(child_thread); |
382 | 387 |
383 if (watchdog_thread.get()) | 388 if (watchdog_thread.get()) |
384 watchdog_thread->AddPowerObserver(); | 389 watchdog_thread->AddPowerObserver(); |
385 | 390 |
| 391 #if defined(OS_ANDROID) |
| 392 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 393 tracing::GraphicsMemoryDumpProvider::GetInstance()); |
| 394 #endif |
| 395 |
386 { | 396 { |
387 TRACE_EVENT0("gpu", "Run Message Loop"); | 397 TRACE_EVENT0("gpu", "Run Message Loop"); |
388 main_message_loop.Run(); | 398 main_message_loop.Run(); |
389 } | 399 } |
390 | 400 |
391 child_thread->StopWatchdog(); | 401 child_thread->StopWatchdog(); |
392 | 402 |
393 return 0; | 403 return 0; |
394 } | 404 } |
395 | 405 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 return true; | 559 return true; |
550 } | 560 } |
551 | 561 |
552 return false; | 562 return false; |
553 } | 563 } |
554 #endif // defined(OS_WIN) | 564 #endif // defined(OS_WIN) |
555 | 565 |
556 } // namespace. | 566 } // namespace. |
557 | 567 |
558 } // namespace content | 568 } // namespace content |
OLD | NEW |