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

Side by Side Diff: content/common/gpu/media/vaapi_video_decode_accelerator.cc

Issue 1380493004: VAVDA: Don't pass coded size as visible rect to PictureReady. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | 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 "content/common/gpu/media/vaapi_video_decode_accelerator.h" 5 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 RETURN_AND_NOTIFY_ON_FAILURE(picture->DownloadFromSurface(va_surface), 390 RETURN_AND_NOTIFY_ON_FAILURE(picture->DownloadFromSurface(va_surface),
391 "Failed putting surface into pixmap", 391 "Failed putting surface into pixmap",
392 PLATFORM_FAILURE, ); 392 PLATFORM_FAILURE, );
393 393
394 // Notify the client a picture is ready to be displayed. 394 // Notify the client a picture is ready to be displayed.
395 ++num_frames_at_client_; 395 ++num_frames_at_client_;
396 TRACE_COUNTER1("Video Decoder", "Textures at client", num_frames_at_client_); 396 TRACE_COUNTER1("Video Decoder", "Textures at client", num_frames_at_client_);
397 DVLOG(4) << "Notifying output picture id " << output_id 397 DVLOG(4) << "Notifying output picture id " << output_id
398 << " for input "<< input_id << " is ready"; 398 << " for input "<< input_id << " is ready";
399 // TODO(posciak): Use visible size from decoder here instead 399 // TODO(posciak): Use visible size from decoder here instead
400 // (crbug.com/402760). 400 // (crbug.com/402760). Passing (0, 0) results in the client using the
401 // visible size extracted from the container instead.
401 if (client_) 402 if (client_)
402 client_->PictureReady(media::Picture(output_id, input_id, 403 client_->PictureReady(media::Picture(output_id, input_id,
403 gfx::Rect(picture->size()), 404 gfx::Rect(0, 0),
404 picture->AllowOverlay())); 405 picture->AllowOverlay()));
405 } 406 }
406 407
407 void VaapiVideoDecodeAccelerator::TryOutputSurface() { 408 void VaapiVideoDecodeAccelerator::TryOutputSurface() {
408 DCHECK_EQ(message_loop_, base::MessageLoop::current()); 409 DCHECK_EQ(message_loop_, base::MessageLoop::current());
409 410
410 // Handle Destroy() arriving while pictures are queued for output. 411 // Handle Destroy() arriving while pictures are queued for output.
411 if (!client_) 412 if (!client_)
412 return; 413 return;
413 414
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 return vaapi_pic->dec_surface(); 1726 return vaapi_pic->dec_surface();
1726 } 1727 }
1727 1728
1728 // static 1729 // static
1729 media::VideoDecodeAccelerator::SupportedProfiles 1730 media::VideoDecodeAccelerator::SupportedProfiles
1730 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { 1731 VaapiVideoDecodeAccelerator::GetSupportedProfiles() {
1731 return VaapiWrapper::GetSupportedDecodeProfiles(); 1732 return VaapiWrapper::GetSupportedDecodeProfiles();
1732 } 1733 }
1733 1734
1734 } // namespace content 1735 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698