| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 202 |
| 203 gpu::gles2::ContextCreationAttribHelper attrib_parser; | 203 gpu::gles2::ContextCreationAttribHelper attrib_parser; |
| 204 attrib_parser.Parse(requested_attribs_); | 204 attrib_parser.Parse(requested_attribs_); |
| 205 | 205 |
| 206 if (share_group) { | 206 if (share_group) { |
| 207 context_group_ = share_group->context_group_; | 207 context_group_ = share_group->context_group_; |
| 208 DCHECK(context_group_->bind_generates_resource() == | 208 DCHECK(context_group_->bind_generates_resource() == |
| 209 attrib_parser.bind_generates_resource); | 209 attrib_parser.bind_generates_resource); |
| 210 } else { | 210 } else { |
| 211 context_group_ = new gpu::gles2::ContextGroup( | 211 context_group_ = new gpu::gles2::ContextGroup( |
| 212 mailbox_manager, | 212 mailbox_manager, new GpuCommandBufferMemoryTracker(channel), |
| 213 new GpuCommandBufferMemoryTracker(channel), | |
| 214 channel_->gpu_channel_manager()->shader_translator_cache(), | 213 channel_->gpu_channel_manager()->shader_translator_cache(), |
| 215 NULL, | 214 channel_->gpu_channel_manager()->framebuffer_completeness_cache(), NULL, |
| 216 subscription_ref_set, | 215 subscription_ref_set, pending_valuebuffer_state, |
| 217 pending_valuebuffer_state, | |
| 218 attrib_parser.bind_generates_resource); | 216 attrib_parser.bind_generates_resource); |
| 219 } | 217 } |
| 220 | 218 |
| 221 use_virtualized_gl_context_ |= | 219 use_virtualized_gl_context_ |= |
| 222 context_group_->feature_info()->workarounds().use_virtualized_gl_contexts; | 220 context_group_->feature_info()->workarounds().use_virtualized_gl_contexts; |
| 223 | 221 |
| 224 bool is_offscreen = surface_id_ == 0; | 222 bool is_offscreen = surface_id_ == 0; |
| 225 if (is_offscreen && initial_size_.IsEmpty()) { | 223 if (is_offscreen && initial_size_.IsEmpty()) { |
| 226 // If we're an offscreen surface with zero width and/or height, set to a | 224 // If we're an offscreen surface with zero width and/or height, set to a |
| 227 // non-zero size so that we have a complete framebuffer for operations like | 225 // non-zero size so that we have a complete framebuffer for operations like |
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1172 result)); | 1170 result)); |
| 1173 } | 1171 } |
| 1174 | 1172 |
| 1175 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, | 1173 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, |
| 1176 base::TimeDelta interval) { | 1174 base::TimeDelta interval) { |
| 1177 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, | 1175 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, |
| 1178 interval)); | 1176 interval)); |
| 1179 } | 1177 } |
| 1180 | 1178 |
| 1181 } // namespace content | 1179 } // namespace content |
| OLD | NEW |