OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "cc/resources/video_resource_updater.h" | 5 #include "cc/resources/video_resource_updater.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "cc/output/gl_renderer.h" | 8 #include "cc/output/gl_renderer.h" |
9 #include "cc/resources/resource_provider.h" | 9 #include "cc/resources/resource_provider.h" |
10 #include "gpu/GLES2/gl2extchromium.h" | 10 #include "gpu/GLES2/gl2extchromium.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 } | 189 } |
190 } | 190 } |
191 | 191 |
192 if (resource_id == 0) { | 192 if (resource_id == 0) { |
193 // TODO(danakj): Abstract out hw/sw resource create/delete from | 193 // TODO(danakj): Abstract out hw/sw resource create/delete from |
194 // ResourceProvider and stop using ResourceProvider in this class. | 194 // ResourceProvider and stop using ResourceProvider in this class. |
195 resource_id = | 195 resource_id = |
196 resource_provider_->CreateResource(output_plane_resource_size, | 196 resource_provider_->CreateResource(output_plane_resource_size, |
197 output_resource_format, | 197 output_resource_format, |
198 GL_CLAMP_TO_EDGE, | 198 GL_CLAMP_TO_EDGE, |
199 ResourceProvider::TextureUsageAny); | 199 ResourceProvider::TextureUsageAny, |
| 200 ResourceProvider::RGBA_8888); |
200 | 201 |
201 DCHECK(mailbox.IsZero()); | 202 DCHECK(mailbox.IsZero()); |
202 | 203 |
203 if (!software_compositor) { | 204 if (!software_compositor) { |
204 DCHECK(context_provider_); | 205 DCHECK(context_provider_); |
205 | 206 |
206 WebKit::WebGraphicsContext3D* context = | 207 WebKit::WebGraphicsContext3D* context = |
207 context_provider_->Context3d(); | 208 context_provider_->Context3d(); |
208 | 209 |
209 GLC(context, context->genMailboxCHROMIUM(mailbox.name)); | 210 GLC(context, context->genMailboxCHROMIUM(mailbox.name)); |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 } | 401 } |
401 | 402 |
402 PlaneResource recycled_resource(data.resource_id, | 403 PlaneResource recycled_resource(data.resource_id, |
403 data.resource_size, | 404 data.resource_size, |
404 data.resource_format, | 405 data.resource_format, |
405 data.mailbox); | 406 data.mailbox); |
406 updater->recycled_resources_.push_back(recycled_resource); | 407 updater->recycled_resources_.push_back(recycled_resource); |
407 } | 408 } |
408 | 409 |
409 } // namespace cc | 410 } // namespace cc |
OLD | NEW |