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 #include "content/renderer/pepper_platform_context_3d_impl.h" | 5 #include "content/renderer/pepper_platform_context_3d_impl.h" |
6 | 6 |
7 #include "content/renderer/render_thread.h" | 7 #include "content/renderer/render_thread.h" |
8 #include "content/renderer/gpu/renderer_gl_context.h" | 8 #include "content/renderer/gpu/renderer_gl_context.h" |
9 #include "content/renderer/gpu/gpu_channel_host.h" | 9 #include "content/renderer/gpu/gpu_channel_host.h" |
10 #include "content/renderer/gpu/command_buffer_proxy.h" | 10 #include "content/renderer/gpu/command_buffer_proxy.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 break; | 88 break; |
89 } | 89 } |
90 } | 90 } |
91 attribs.push_back(RendererGLContext::NONE); | 91 attribs.push_back(RendererGLContext::NONE); |
92 } | 92 } |
93 | 93 |
94 CommandBufferProxy* parent_command_buffer = | 94 CommandBufferProxy* parent_command_buffer = |
95 parent_context_->GetCommandBufferProxy(); | 95 parent_context_->GetCommandBufferProxy(); |
96 command_buffer_ = channel_->CreateOffscreenCommandBuffer( | 96 command_buffer_ = channel_->CreateOffscreenCommandBuffer( |
97 surface_size, | 97 surface_size, |
| 98 NULL, |
98 "*", | 99 "*", |
99 attribs, | 100 attribs, |
100 GURL::EmptyGURL()); | 101 GURL::EmptyGURL()); |
101 if (!command_buffer_) | 102 if (!command_buffer_) |
102 return false; | 103 return false; |
103 | 104 |
104 if (!command_buffer_->SetParent(parent_command_buffer, parent_texture_id_)) | 105 if (!command_buffer_->SetParent(parent_command_buffer, parent_texture_id_)) |
105 return false; | 106 return false; |
106 | 107 |
107 command_buffer_->SetChannelErrorCallback(callback_factory_.NewCallback( | 108 command_buffer_->SetChannelErrorCallback(callback_factory_.NewCallback( |
(...skipping 26 matching lines...) Expand all Loading... |
134 } | 135 } |
135 | 136 |
136 void PlatformContext3DImpl::OnContextLost() { | 137 void PlatformContext3DImpl::OnContextLost() { |
137 DCHECK(command_buffer_); | 138 DCHECK(command_buffer_); |
138 | 139 |
139 if (context_lost_callback_.get()) | 140 if (context_lost_callback_.get()) |
140 context_lost_callback_->Run(); | 141 context_lost_callback_->Run(); |
141 } | 142 } |
142 | 143 |
143 #endif // ENABLE_GPU | 144 #endif // ENABLE_GPU |
OLD | NEW |