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 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1170 if (SynchronousCompositorFactory* factory = | 1170 if (SynchronousCompositorFactory* factory = |
1171 SynchronousCompositorFactory::GetInstance()) { | 1171 SynchronousCompositorFactory::GetInstance()) { |
1172 shared_main_thread_contexts_ = factory->CreateOffscreenContextProvider( | 1172 shared_main_thread_contexts_ = factory->CreateOffscreenContextProvider( |
1173 GetOffscreenAttribs(), "Offscreen-MainThread"); | 1173 GetOffscreenAttribs(), "Offscreen-MainThread"); |
1174 } | 1174 } |
1175 #endif | 1175 #endif |
1176 if (!shared_main_thread_contexts_) { | 1176 if (!shared_main_thread_contexts_) { |
1177 shared_main_thread_contexts_ = ContextProviderCommandBuffer::Create( | 1177 shared_main_thread_contexts_ = ContextProviderCommandBuffer::Create( |
1178 CreateOffscreenContext3d(), "Offscreen-MainThread"); | 1178 CreateOffscreenContext3d(), "Offscreen-MainThread"); |
1179 } | 1179 } |
1180 if (shared_main_thread_contexts_ && | |
1181 !shared_main_thread_contexts_->BindToCurrentThread()) | |
dshwang
2014/08/15 14:54:01
BindToCurrentThread() should be called one time wh
danakj
2014/08/15 15:28:44
This seems like a separate change, can you do this
dshwang
2014/08/15 16:02:32
Ok, I'll separate it on another CL.
| |
1182 shared_main_thread_contexts_ = NULL; | |
1180 } | 1183 } |
1181 if (shared_main_thread_contexts_ && | |
1182 !shared_main_thread_contexts_->BindToCurrentThread()) | |
1183 shared_main_thread_contexts_ = NULL; | |
1184 return shared_main_thread_contexts_; | 1184 return shared_main_thread_contexts_; |
1185 } | 1185 } |
1186 | 1186 |
1187 AudioRendererMixerManager* RenderThreadImpl::GetAudioRendererMixerManager() { | 1187 AudioRendererMixerManager* RenderThreadImpl::GetAudioRendererMixerManager() { |
1188 if (!audio_renderer_mixer_manager_) { | 1188 if (!audio_renderer_mixer_manager_) { |
1189 audio_renderer_mixer_manager_.reset(new AudioRendererMixerManager( | 1189 audio_renderer_mixer_manager_.reset(new AudioRendererMixerManager( |
1190 GetAudioHardwareConfig())); | 1190 GetAudioHardwareConfig())); |
1191 } | 1191 } |
1192 | 1192 |
1193 return audio_renderer_mixer_manager_.get(); | 1193 return audio_renderer_mixer_manager_.get(); |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1653 hidden_widget_count_--; | 1653 hidden_widget_count_--; |
1654 | 1654 |
1655 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1655 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1656 return; | 1656 return; |
1657 } | 1657 } |
1658 | 1658 |
1659 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1659 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1660 } | 1660 } |
1661 | 1661 |
1662 } // namespace content | 1662 } // namespace content |
OLD | NEW |