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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 base::Bind(&RecycleResource, AsWeakPtr(), recycle_data)); | 276 base::Bind(&RecycleResource, AsWeakPtr(), recycle_data)); |
277 } | 277 } |
278 | 278 |
279 external_resources.type = VideoFrameExternalResources::YUV_RESOURCE; | 279 external_resources.type = VideoFrameExternalResources::YUV_RESOURCE; |
280 return external_resources; | 280 return external_resources; |
281 } | 281 } |
282 | 282 |
283 static void ReturnTexture(const scoped_refptr<media::VideoFrame>& frame, | 283 static void ReturnTexture(const scoped_refptr<media::VideoFrame>& frame, |
284 uint32 sync_point, | 284 uint32 sync_point, |
285 bool lost_resource) { | 285 bool lost_resource) { |
286 frame->AppendReleaseSyncPoint(sync_point); | 286 frame->AppendReleaseSyncPoint("compositor", sync_point); |
287 } | 287 } |
288 | 288 |
289 VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes( | 289 VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes( |
290 const scoped_refptr<media::VideoFrame>& video_frame) { | 290 const scoped_refptr<media::VideoFrame>& video_frame) { |
291 media::VideoFrame::Format frame_format = video_frame->format(); | 291 media::VideoFrame::Format frame_format = video_frame->format(); |
292 | 292 |
293 DCHECK_EQ(frame_format, media::VideoFrame::NATIVE_TEXTURE); | 293 DCHECK_EQ(frame_format, media::VideoFrame::NATIVE_TEXTURE); |
294 if (frame_format != media::VideoFrame::NATIVE_TEXTURE) | 294 if (frame_format != media::VideoFrame::NATIVE_TEXTURE) |
295 return VideoFrameExternalResources(); | 295 return VideoFrameExternalResources(); |
296 | 296 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 } | 355 } |
356 | 356 |
357 PlaneResource recycled_resource(data.resource_id, | 357 PlaneResource recycled_resource(data.resource_id, |
358 data.resource_size, | 358 data.resource_size, |
359 data.resource_format, | 359 data.resource_format, |
360 data.mailbox); | 360 data.mailbox); |
361 updater->recycled_resources_.push_back(recycled_resource); | 361 updater->recycled_resources_.push_back(recycled_resource); |
362 } | 362 } |
363 | 363 |
364 } // namespace cc | 364 } // namespace cc |
OLD | NEW |