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

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

Issue 14081010: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some gtk issues Created 7 years, 8 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 | Annotate | Revision Log
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 <dlfcn.h> 5 #include <dlfcn.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 GLX_BIND_TO_TEXTURE_TARGETS_EXT, GLX_TEXTURE_2D_BIT_EXT, 472 GLX_BIND_TO_TEXTURE_TARGETS_EXT, GLX_TEXTURE_2D_BIT_EXT,
473 GLX_BIND_TO_TEXTURE_RGB_EXT, GL_TRUE, 473 GLX_BIND_TO_TEXTURE_RGB_EXT, GL_TRUE,
474 GLX_Y_INVERTED_EXT, GL_TRUE, 474 GLX_Y_INVERTED_EXT, GL_TRUE,
475 GL_NONE, 475 GL_NONE,
476 }; 476 };
477 477
478 int num_fbconfigs; 478 int num_fbconfigs;
479 scoped_ptr_malloc<GLXFBConfig, ScopedPtrXFree> glx_fb_configs( 479 scoped_ptr_malloc<GLXFBConfig, ScopedPtrXFree> glx_fb_configs(
480 glXChooseFBConfig(x_display_, DefaultScreen(x_display_), fbconfig_attr, 480 glXChooseFBConfig(x_display_, DefaultScreen(x_display_), fbconfig_attr,
481 &num_fbconfigs)); 481 &num_fbconfigs));
482 if (!glx_fb_configs.get()) 482 if (!glx_fb_configs)
483 return false; 483 return false;
484 if (!num_fbconfigs) 484 if (!num_fbconfigs)
485 return false; 485 return false;
486 486
487 fb_config_ = glx_fb_configs.get()[0]; 487 fb_config_ = glx_fb_configs.get()[0];
488 return true; 488 return true;
489 } 489 }
490 490
491 bool VaapiH264Decoder::Initialize( 491 bool VaapiH264Decoder::Initialize(
492 media::VideoCodecProfile profile, 492 media::VideoCodecProfile profile,
(...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after
2011 for (; output_candidate != not_outputted.end() && 2011 for (; output_candidate != not_outputted.end() &&
2012 (*output_candidate)->pic_order_cnt <= last_output_poc_ + 2; 2012 (*output_candidate)->pic_order_cnt <= last_output_poc_ + 2;
2013 ++output_candidate) { 2013 ++output_candidate) {
2014 DCHECK_GE((*output_candidate)->pic_order_cnt, last_output_poc_); 2014 DCHECK_GE((*output_candidate)->pic_order_cnt, last_output_poc_);
2015 if (!OutputPic(*output_candidate)) 2015 if (!OutputPic(*output_candidate))
2016 return false; 2016 return false;
2017 2017
2018 if (!(*output_candidate)->ref) { 2018 if (!(*output_candidate)->ref) {
2019 // Current picture hasn't been inserted into DPB yet, so don't remove it 2019 // Current picture hasn't been inserted into DPB yet, so don't remove it
2020 // if we managed to output it immediately. 2020 // if we managed to output it immediately.
2021 if (*output_candidate != pic.get()) 2021 if (*output_candidate != pic)
2022 dpb_.RemoveByPOC((*output_candidate)->pic_order_cnt); 2022 dpb_.RemoveByPOC((*output_candidate)->pic_order_cnt);
2023 // Mark as unused. 2023 // Mark as unused.
2024 UnassignSurfaceFromPoC((*output_candidate)->pic_order_cnt); 2024 UnassignSurfaceFromPoC((*output_candidate)->pic_order_cnt);
2025 } 2025 }
2026 } 2026 }
2027 2027
2028 // If we haven't managed to output the picture that we just decoded, or if 2028 // If we haven't managed to output the picture that we just decoded, or if
2029 // it's a reference picture, we have to store it in DPB. 2029 // it's a reference picture, we have to store it in DPB.
2030 if (!pic->outputted || pic->ref) { 2030 if (!pic->outputted || pic->ref) {
2031 if (dpb_.IsFull()) { 2031 if (dpb_.IsFull()) {
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
2406 VAAPI_SyncSurface && 2406 VAAPI_SyncSurface &&
2407 VAAPI_BeginPicture && 2407 VAAPI_BeginPicture &&
2408 VAAPI_RenderPicture && 2408 VAAPI_RenderPicture &&
2409 VAAPI_EndPicture && 2409 VAAPI_EndPicture &&
2410 VAAPI_CreateBuffer && 2410 VAAPI_CreateBuffer &&
2411 VAAPI_DestroyBuffer && 2411 VAAPI_DestroyBuffer &&
2412 VAAPI_ErrorStr; 2412 VAAPI_ErrorStr;
2413 } 2413 }
2414 2414
2415 } // namespace content 2415 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/gpu_video_decode_accelerator.cc ('k') | content/common/gpu/texture_image_transport_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698