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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 base::Bind(&RecycleResource, AsWeakPtr(), recycle_data)); | 306 base::Bind(&RecycleResource, AsWeakPtr(), recycle_data)); |
307 } | 307 } |
308 | 308 |
309 external_resources.type = VideoFrameExternalResources::YUV_RESOURCE; | 309 external_resources.type = VideoFrameExternalResources::YUV_RESOURCE; |
310 return external_resources; | 310 return external_resources; |
311 } | 311 } |
312 | 312 |
313 static void ReturnTexture(const scoped_refptr<media::VideoFrame>& frame, | 313 static void ReturnTexture(const scoped_refptr<media::VideoFrame>& frame, |
314 uint32 sync_point, | 314 uint32 sync_point, |
315 bool lost_resource) { | 315 bool lost_resource) { |
316 frame->mailbox_holder()->sync_point = sync_point; | 316 frame->SetReleaseSyncPoint(sync_point); |
317 } | 317 } |
318 | 318 |
319 VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes( | 319 VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes( |
320 const scoped_refptr<media::VideoFrame>& video_frame) { | 320 const scoped_refptr<media::VideoFrame>& video_frame) { |
321 media::VideoFrame::Format frame_format = video_frame->format(); | 321 media::VideoFrame::Format frame_format = video_frame->format(); |
322 | 322 |
323 DCHECK_EQ(frame_format, media::VideoFrame::NATIVE_TEXTURE); | 323 DCHECK_EQ(frame_format, media::VideoFrame::NATIVE_TEXTURE); |
324 if (frame_format != media::VideoFrame::NATIVE_TEXTURE) | 324 if (frame_format != media::VideoFrame::NATIVE_TEXTURE) |
325 return VideoFrameExternalResources(); | 325 return VideoFrameExternalResources(); |
326 | 326 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 } | 385 } |
386 | 386 |
387 PlaneResource recycled_resource(data.resource_id, | 387 PlaneResource recycled_resource(data.resource_id, |
388 data.resource_size, | 388 data.resource_size, |
389 data.resource_format, | 389 data.resource_format, |
390 data.mailbox); | 390 data.mailbox); |
391 updater->recycled_resources_.push_back(recycled_resource); | 391 updater->recycled_resources_.push_back(recycled_resource); |
392 } | 392 } |
393 | 393 |
394 } // namespace cc | 394 } // namespace cc |
OLD | NEW |