| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 requested_attribs_(attribs), | 49 requested_attribs_(attribs), |
| 50 route_id_(route_id), | 50 route_id_(route_id), |
| 51 software_(software), | 51 software_(software), |
| 52 last_flush_count_(0), | 52 last_flush_count_(0), |
| 53 renderer_id_(renderer_id), | 53 renderer_id_(renderer_id), |
| 54 render_view_id_(render_view_id), | 54 render_view_id_(render_view_id), |
| 55 parent_stub_for_initialization_(), | 55 parent_stub_for_initialization_(), |
| 56 parent_texture_for_initialization_(0), | 56 parent_texture_for_initialization_(0), |
| 57 watchdog_(watchdog), | 57 watchdog_(watchdog), |
| 58 task_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { | 58 task_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { |
| 59 if (share_group) | 59 if (share_group) { |
| 60 context_group_ = share_group->context_group_; | 60 context_group_ = share_group->context_group_; |
| 61 else | 61 } else { |
| 62 context_group_ = new gpu::gles2::ContextGroup; | 62 // TODO(gman): this needs to be false for everything but Pepper. |
| 63 bool bind_generates_resource = true; |
| 64 context_group_ = new gpu::gles2::ContextGroup(bind_generates_resource); |
| 65 } |
| 63 } | 66 } |
| 64 | 67 |
| 65 GpuCommandBufferStub::~GpuCommandBufferStub() { | 68 GpuCommandBufferStub::~GpuCommandBufferStub() { |
| 66 if (scheduler_.get()) { | 69 if (scheduler_.get()) { |
| 67 scheduler_->Destroy(); | 70 scheduler_->Destroy(); |
| 68 } | 71 } |
| 69 | 72 |
| 70 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); | 73 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); |
| 71 gpu_channel_manager->Send(new GpuHostMsg_DestroyCommandBuffer( | 74 gpu_channel_manager->Send(new GpuHostMsg_DestroyCommandBuffer( |
| 72 handle_, renderer_id_, render_view_id_)); | 75 handle_, renderer_id_, render_view_id_)); |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 new GpuVideoDecodeAccelerator(this, route_id_, this)); | 573 new GpuVideoDecodeAccelerator(this, route_id_, this)); |
| 571 video_decoder_->Initialize(configs); | 574 video_decoder_->Initialize(configs); |
| 572 } | 575 } |
| 573 | 576 |
| 574 void GpuCommandBufferStub::OnDestroyVideoDecoder() { | 577 void GpuCommandBufferStub::OnDestroyVideoDecoder() { |
| 575 LOG(ERROR) << "GpuCommandBufferStub::OnDestroyVideoDecoder"; | 578 LOG(ERROR) << "GpuCommandBufferStub::OnDestroyVideoDecoder"; |
| 576 video_decoder_.reset(); | 579 video_decoder_.reset(); |
| 577 } | 580 } |
| 578 | 581 |
| 579 #endif // defined(ENABLE_GPU) | 582 #endif // defined(ENABLE_GPU) |
| OLD | NEW |