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/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 allowed_extensions_(allowed_extensions), | 42 allowed_extensions_(allowed_extensions), |
43 requested_attribs_(attribs), | 43 requested_attribs_(attribs), |
44 gpu_preference_(gpu_preference), | 44 gpu_preference_(gpu_preference), |
45 route_id_(route_id), | 45 route_id_(route_id), |
46 software_(software), | 46 software_(software), |
47 last_flush_count_(0), | 47 last_flush_count_(0), |
48 renderer_id_(renderer_id), | 48 renderer_id_(renderer_id), |
49 render_view_id_(render_view_id), | 49 render_view_id_(render_view_id), |
50 parent_stub_for_initialization_(), | 50 parent_stub_for_initialization_(), |
51 parent_texture_for_initialization_(0), | 51 parent_texture_for_initialization_(0), |
52 watchdog_(watchdog), | 52 watchdog_(watchdog) { |
53 task_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { | |
54 if (share_group) { | 53 if (share_group) { |
55 context_group_ = share_group->context_group_; | 54 context_group_ = share_group->context_group_; |
56 } else { | 55 } else { |
57 // TODO(gman): this needs to be false for everything but Pepper. | 56 // TODO(gman): this needs to be false for everything but Pepper. |
58 bool bind_generates_resource = true; | 57 bool bind_generates_resource = true; |
59 context_group_ = new gpu::gles2::ContextGroup(bind_generates_resource); | 58 context_group_ = new gpu::gles2::ContextGroup(bind_generates_resource); |
60 } | 59 } |
61 } | 60 } |
62 | 61 |
63 GpuCommandBufferStub::~GpuCommandBufferStub() { | 62 GpuCommandBufferStub::~GpuCommandBufferStub() { |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) { | 512 void GpuCommandBufferStub::OnDestroyVideoDecoder(int decoder_route_id) { |
514 channel_->RemoveRoute(decoder_route_id); | 513 channel_->RemoveRoute(decoder_route_id); |
515 video_decoders_.Remove(decoder_route_id); | 514 video_decoders_.Remove(decoder_route_id); |
516 } | 515 } |
517 | 516 |
518 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { | 517 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { |
519 surface_->SetVisible(visible); | 518 surface_->SetVisible(visible); |
520 } | 519 } |
521 | 520 |
522 #endif // defined(ENABLE_GPU) | 521 #endif // defined(ENABLE_GPU) |
OLD | NEW |