| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/hash.h" | 9 #include "base/hash.h" |
| 10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); | 292 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); |
| 293 gpu_channel_manager->Send(new GpuHostMsg_DidDestroyOffscreenContext( | 293 gpu_channel_manager->Send(new GpuHostMsg_DidDestroyOffscreenContext( |
| 294 active_url_)); | 294 active_url_)); |
| 295 } | 295 } |
| 296 | 296 |
| 297 memory_manager_client_state_.reset(); | 297 memory_manager_client_state_.reset(); |
| 298 | 298 |
| 299 while (!sync_points_.empty()) | 299 while (!sync_points_.empty()) |
| 300 OnRetireSyncPoint(sync_points_.front()); | 300 OnRetireSyncPoint(sync_points_.front()); |
| 301 | 301 |
| 302 if (decoder_.get()) |
| 303 decoder_->set_engine(NULL); |
| 304 |
| 302 // The scheduler has raw references to the decoder and the command buffer so | 305 // The scheduler has raw references to the decoder and the command buffer so |
| 303 // destroy it before those. | 306 // destroy it before those. |
| 304 scheduler_.reset(); | 307 scheduler_.reset(); |
| 305 | 308 |
| 306 bool have_context = false; | 309 bool have_context = false; |
| 307 if (decoder_.get()) | 310 if (decoder_.get()) |
| 308 have_context = decoder_->MakeCurrent(); | 311 have_context = decoder_->MakeCurrent(); |
| 309 FOR_EACH_OBSERVER(DestructionObserver, | 312 FOR_EACH_OBSERVER(DestructionObserver, |
| 310 destruction_observers_, | 313 destruction_observers_, |
| 311 OnWillDestroyStub(this)); | 314 OnWillDestroyStub(this)); |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 if (surface_ && MakeCurrent()) | 878 if (surface_ && MakeCurrent()) |
| 876 surface_->SetFrontbufferAllocation( | 879 surface_->SetFrontbufferAllocation( |
| 877 allocation.browser_allocation.suggest_have_frontbuffer); | 880 allocation.browser_allocation.suggest_have_frontbuffer); |
| 878 } | 881 } |
| 879 | 882 |
| 880 last_memory_allocation_valid_ = true; | 883 last_memory_allocation_valid_ = true; |
| 881 last_memory_allocation_ = allocation; | 884 last_memory_allocation_ = allocation; |
| 882 } | 885 } |
| 883 | 886 |
| 884 } // namespace content | 887 } // namespace content |
| OLD | NEW |