Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Side by Side Diff: cc/resources/video_resource_updater.cc

Issue 313623003: WIP: Option2: Android media: VideoFrame should not store so many sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698