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

Side by Side Diff: media/filters/gpu_video_decoder.cc

Issue 1134643002: Add distinction between RGB and RGBA native texture video frames and resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test breakage from bad merge Created 5 years, 7 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 | « media/base/video_frame_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "media/filters/gpu_video_decoder.h" 5 #include "media/filters/gpu_video_decoder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 GetBufferData(picture.bitstream_buffer_id(), &timestamp, &visible_rect, 398 GetBufferData(picture.bitstream_buffer_id(), &timestamp, &visible_rect,
399 &natural_size); 399 &natural_size);
400 DCHECK(decoder_texture_target_); 400 DCHECK(decoder_texture_target_);
401 401
402 scoped_refptr<VideoFrame> frame(VideoFrame::WrapNativeTexture( 402 scoped_refptr<VideoFrame> frame(VideoFrame::WrapNativeTexture(
403 gpu::MailboxHolder(pb.texture_mailbox(), decoder_texture_target_, 403 gpu::MailboxHolder(pb.texture_mailbox(), decoder_texture_target_,
404 0 /* sync_point */), 404 0 /* sync_point */),
405 BindToCurrentLoop(base::Bind( 405 BindToCurrentLoop(base::Bind(
406 &GpuVideoDecoder::ReleaseMailbox, weak_factory_.GetWeakPtr(), 406 &GpuVideoDecoder::ReleaseMailbox, weak_factory_.GetWeakPtr(),
407 factories_, picture.picture_buffer_id(), pb.texture_id())), 407 factories_, picture.picture_buffer_id(), pb.texture_id())),
408 pb.size(), visible_rect, natural_size, timestamp, 408 pb.size(), visible_rect, natural_size, timestamp, picture.allow_overlay(),
409 picture.allow_overlay())); 409 true /* has_alpha */));
410 CHECK_GT(available_pictures_, 0); 410 CHECK_GT(available_pictures_, 0);
411 --available_pictures_; 411 --available_pictures_;
412 bool inserted = 412 bool inserted =
413 picture_buffers_at_display_.insert(std::make_pair( 413 picture_buffers_at_display_.insert(std::make_pair(
414 picture.picture_buffer_id(), 414 picture.picture_buffer_id(),
415 pb.texture_id())).second; 415 pb.texture_id())).second;
416 DCHECK(inserted); 416 DCHECK(inserted);
417 417
418 DeliverFrame(frame); 418 DeliverFrame(frame);
419 } 419 }
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 } 584 }
585 return false; 585 return false;
586 } 586 }
587 587
588 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 588 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
589 const { 589 const {
590 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 590 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
591 } 591 }
592 592
593 } // namespace media 593 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_frame_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698