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_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 #include "content/renderer/p2p/socket_dispatcher.h" | 96 #include "content/renderer/p2p/socket_dispatcher.h" |
97 #include "content/renderer/render_frame_proxy.h" | 97 #include "content/renderer/render_frame_proxy.h" |
98 #include "content/renderer/render_process_impl.h" | 98 #include "content/renderer/render_process_impl.h" |
99 #include "content/renderer/render_view_impl.h" | 99 #include "content/renderer/render_view_impl.h" |
100 #include "content/renderer/renderer_blink_platform_impl.h" | 100 #include "content/renderer/renderer_blink_platform_impl.h" |
101 #include "content/renderer/scheduler/renderer_scheduler.h" | 101 #include "content/renderer/scheduler/renderer_scheduler.h" |
102 #include "content/renderer/service_worker/embedded_worker_context_message_filter
.h" | 102 #include "content/renderer/service_worker/embedded_worker_context_message_filter
.h" |
103 #include "content/renderer/service_worker/embedded_worker_dispatcher.h" | 103 #include "content/renderer/service_worker/embedded_worker_dispatcher.h" |
104 #include "content/renderer/shared_worker/embedded_shared_worker_stub.h" | 104 #include "content/renderer/shared_worker/embedded_shared_worker_stub.h" |
105 #include "gin/public/debug.h" | 105 #include "gin/public/debug.h" |
| 106 #include "gpu/GLES2/gl2extchromium.h" |
| 107 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
106 #include "ipc/ipc_channel_handle.h" | 108 #include "ipc/ipc_channel_handle.h" |
107 #include "ipc/ipc_platform_file.h" | 109 #include "ipc/ipc_platform_file.h" |
108 #include "ipc/mojo/ipc_channel_mojo.h" | 110 #include "ipc/mojo/ipc_channel_mojo.h" |
109 #include "media/base/audio_hardware_config.h" | 111 #include "media/base/audio_hardware_config.h" |
110 #include "media/base/media.h" | 112 #include "media/base/media.h" |
111 #include "media/filters/gpu_video_accelerator_factories.h" | 113 #include "media/filters/gpu_video_accelerator_factories.h" |
112 #include "mojo/common/common_type_converters.h" | 114 #include "mojo/common/common_type_converters.h" |
113 #include "net/base/net_errors.h" | 115 #include "net/base/net_errors.h" |
114 #include "net/base/net_util.h" | 116 #include "net/base/net_util.h" |
115 #include "skia/ext/event_tracer_impl.h" | 117 #include "skia/ext/event_tracer_impl.h" |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 | 517 |
516 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 518 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
517 // TODO(danakj): If changing these also update NumberOfRendererRasterThreads | 519 // TODO(danakj): If changing these also update NumberOfRendererRasterThreads |
518 // in compositor_util.cc. We should be using methods from compositor_util here | 520 // in compositor_util.cc. We should be using methods from compositor_util here |
519 // instead of inspecting flags. | 521 // instead of inspecting flags. |
520 is_one_copy_enabled_ = command_line.HasSwitch(switches::kEnableOneCopy); | 522 is_one_copy_enabled_ = command_line.HasSwitch(switches::kEnableOneCopy); |
521 #else | 523 #else |
522 is_one_copy_enabled_ = !command_line.HasSwitch(switches::kDisableOneCopy); | 524 is_one_copy_enabled_ = !command_line.HasSwitch(switches::kDisableOneCopy); |
523 #endif | 525 #endif |
524 | 526 |
525 use_image_external_ = command_line.HasSwitch(switches::kUseImageExternal); | 527 use_image_texture_target_ = GL_TEXTURE_2D; |
| 528 if (command_line.HasSwitch(switches::kUseImageTextureTarget)) { |
| 529 std::string target_string = |
| 530 command_line.GetSwitchValueASCII(switches::kUseImageTextureTarget); |
| 531 const unsigned targets[] = { |
| 532 GL_TEXTURE_RECTANGLE_ARB, |
| 533 GL_TEXTURE_EXTERNAL_OES |
| 534 }; |
| 535 for (auto target : targets) { |
| 536 if (target_string == gpu::gles2::GLES2Util::GetStringEnum(target)) |
| 537 use_image_texture_target_ = target; |
| 538 } |
| 539 } |
526 | 540 |
527 if (command_line.HasSwitch(switches::kDisableLCDText)) { | 541 if (command_line.HasSwitch(switches::kDisableLCDText)) { |
528 is_lcd_text_enabled_ = false; | 542 is_lcd_text_enabled_ = false; |
529 } else if (command_line.HasSwitch(switches::kEnableLCDText)) { | 543 } else if (command_line.HasSwitch(switches::kEnableLCDText)) { |
530 is_lcd_text_enabled_ = true; | 544 is_lcd_text_enabled_ = true; |
531 } else { | 545 } else { |
532 #if defined(OS_ANDROID) | 546 #if defined(OS_ANDROID) |
533 is_lcd_text_enabled_ = false; | 547 is_lcd_text_enabled_ = false; |
534 #else | 548 #else |
535 is_lcd_text_enabled_ = true; | 549 is_lcd_text_enabled_ = true; |
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1622 hidden_widget_count_--; | 1636 hidden_widget_count_--; |
1623 | 1637 |
1624 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1638 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1625 return; | 1639 return; |
1626 } | 1640 } |
1627 | 1641 |
1628 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1642 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1629 } | 1643 } |
1630 | 1644 |
1631 } // namespace content | 1645 } // namespace content |
OLD | NEW |