| 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/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 return new DevToolsChannelData(res.release()); | 141 return new DevToolsChannelData(res.release()); |
| 142 } | 142 } |
| 143 | 143 |
| 144 } // namespace | 144 } // namespace |
| 145 | 145 |
| 146 GpuCommandBufferStub::GpuCommandBufferStub( | 146 GpuCommandBufferStub::GpuCommandBufferStub( |
| 147 GpuChannel* channel, | 147 GpuChannel* channel, |
| 148 GpuCommandBufferStub* share_group, | 148 GpuCommandBufferStub* share_group, |
| 149 const gfx::GLSurfaceHandle& handle, | 149 const gfx::GLSurfaceHandle& handle, |
| 150 gpu::gles2::MailboxManager* mailbox_manager, | 150 gpu::gles2::MailboxManager* mailbox_manager, |
| 151 gpu::gles2::SubscriptionRefSet* subscription_ref_set, |
| 151 gpu::ValueStateMap* pending_valuebuffer_state, | 152 gpu::ValueStateMap* pending_valuebuffer_state, |
| 152 const gfx::Size& size, | 153 const gfx::Size& size, |
| 153 const gpu::gles2::DisallowedFeatures& disallowed_features, | 154 const gpu::gles2::DisallowedFeatures& disallowed_features, |
| 154 const std::vector<int32>& attribs, | 155 const std::vector<int32>& attribs, |
| 155 gfx::GpuPreference gpu_preference, | 156 gfx::GpuPreference gpu_preference, |
| 156 bool use_virtualized_gl_context, | 157 bool use_virtualized_gl_context, |
| 157 int32 route_id, | 158 int32 route_id, |
| 158 int32 surface_id, | 159 int32 surface_id, |
| 159 GpuWatchdog* watchdog, | 160 GpuWatchdog* watchdog, |
| 160 bool software, | 161 bool software, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 186 if (share_group) { | 187 if (share_group) { |
| 187 context_group_ = share_group->context_group_; | 188 context_group_ = share_group->context_group_; |
| 188 DCHECK(context_group_->bind_generates_resource() == | 189 DCHECK(context_group_->bind_generates_resource() == |
| 189 attrib_parser.bind_generates_resource); | 190 attrib_parser.bind_generates_resource); |
| 190 } else { | 191 } else { |
| 191 context_group_ = new gpu::gles2::ContextGroup( | 192 context_group_ = new gpu::gles2::ContextGroup( |
| 192 mailbox_manager, | 193 mailbox_manager, |
| 193 new GpuCommandBufferMemoryTracker(channel), | 194 new GpuCommandBufferMemoryTracker(channel), |
| 194 channel_->gpu_channel_manager()->shader_translator_cache(), | 195 channel_->gpu_channel_manager()->shader_translator_cache(), |
| 195 NULL, | 196 NULL, |
| 197 subscription_ref_set, |
| 196 pending_valuebuffer_state, | 198 pending_valuebuffer_state, |
| 197 attrib_parser.bind_generates_resource); | 199 attrib_parser.bind_generates_resource); |
| 198 } | 200 } |
| 199 | 201 |
| 200 use_virtualized_gl_context_ |= | 202 use_virtualized_gl_context_ |= |
| 201 context_group_->feature_info()->workarounds().use_virtualized_gl_contexts; | 203 context_group_->feature_info()->workarounds().use_virtualized_gl_contexts; |
| 202 } | 204 } |
| 203 | 205 |
| 204 GpuCommandBufferStub::~GpuCommandBufferStub() { | 206 GpuCommandBufferStub::~GpuCommandBufferStub() { |
| 205 Destroy(); | 207 Destroy(); |
| (...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 uint64 GpuCommandBufferStub::GetMemoryUsage() const { | 1085 uint64 GpuCommandBufferStub::GetMemoryUsage() const { |
| 1084 return GetMemoryManager()->GetClientMemoryUsage(this); | 1086 return GetMemoryManager()->GetClientMemoryUsage(this); |
| 1085 } | 1087 } |
| 1086 | 1088 |
| 1087 void GpuCommandBufferStub::SwapBuffersCompleted( | 1089 void GpuCommandBufferStub::SwapBuffersCompleted( |
| 1088 const std::vector<ui::LatencyInfo>& latency_info) { | 1090 const std::vector<ui::LatencyInfo>& latency_info) { |
| 1089 Send(new GpuCommandBufferMsg_SwapBuffersCompleted(route_id_, latency_info)); | 1091 Send(new GpuCommandBufferMsg_SwapBuffersCompleted(route_id_, latency_info)); |
| 1090 } | 1092 } |
| 1091 | 1093 |
| 1092 } // namespace content | 1094 } // namespace content |
| OLD | NEW |