| 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/hash.h" | 8 #include "base/hash.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 } | 553 } |
| 554 | 554 |
| 555 if (!context->GetGLStateRestorer()) { | 555 if (!context->GetGLStateRestorer()) { |
| 556 context->SetGLStateRestorer( | 556 context->SetGLStateRestorer( |
| 557 new gpu::GLStateRestorerImpl(decoder_->AsWeakPtr())); | 557 new gpu::GLStateRestorerImpl(decoder_->AsWeakPtr())); |
| 558 } | 558 } |
| 559 | 559 |
| 560 if (!context->GetTotalGpuMemory(&total_gpu_memory_)) | 560 if (!context->GetTotalGpuMemory(&total_gpu_memory_)) |
| 561 total_gpu_memory_ = 0; | 561 total_gpu_memory_ = 0; |
| 562 | 562 |
| 563 if (!context_group_->has_program_cache()) { | 563 if (!context_group_->has_program_cache() && |
| 564 !context_group_->feature_info()->workarounds().disable_program_cache) { |
| 564 context_group_->set_program_cache( | 565 context_group_->set_program_cache( |
| 565 channel_->gpu_channel_manager()->program_cache()); | 566 channel_->gpu_channel_manager()->program_cache()); |
| 566 } | 567 } |
| 567 | 568 |
| 568 // Initialize the decoder with either the view or pbuffer GLContext. | 569 // Initialize the decoder with either the view or pbuffer GLContext. |
| 569 if (!decoder_->Initialize(surface_, | 570 if (!decoder_->Initialize(surface_, |
| 570 context, | 571 context, |
| 571 !surface_id(), | 572 !surface_id(), |
| 572 initial_size_, | 573 initial_size_, |
| 573 disallowed_features_, | 574 disallowed_features_, |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1133 result)); | 1134 result)); |
| 1134 } | 1135 } |
| 1135 | 1136 |
| 1136 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, | 1137 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, |
| 1137 base::TimeDelta interval) { | 1138 base::TimeDelta interval) { |
| 1138 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, | 1139 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, |
| 1139 interval)); | 1140 interval)); |
| 1140 } | 1141 } |
| 1141 | 1142 |
| 1142 } // namespace content | 1143 } // namespace content |
| OLD | NEW |