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

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

Issue 1406213005: [tracing] Add names to memory-infra dumpers for debugging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@memory-infra-runtime
Patch Set: Rebase + fix android Created 5 years, 1 month 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
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/vpx_video_decoder.h" 5 #include "media/filters/vpx_video_decoder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 335
336 vpx_codec_ = InitializeVpxContext(vpx_codec_, config); 336 vpx_codec_ = InitializeVpxContext(vpx_codec_, config);
337 if (!vpx_codec_) 337 if (!vpx_codec_)
338 return false; 338 return false;
339 339
340 // We use our own buffers for VP9 so that there is no need to copy data after 340 // We use our own buffers for VP9 so that there is no need to copy data after
341 // decoding. 341 // decoding.
342 if (config.codec() == kCodecVP9) { 342 if (config.codec() == kCodecVP9) {
343 memory_pool_ = new MemoryPool(); 343 memory_pool_ = new MemoryPool();
344 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 344 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
345 memory_pool_.get(), task_runner_); 345 memory_pool_.get(), "VpxVideoDecoder", task_runner_);
346 if (vpx_codec_set_frame_buffer_functions(vpx_codec_, 346 if (vpx_codec_set_frame_buffer_functions(vpx_codec_,
347 &MemoryPool::GetVP9FrameBuffer, 347 &MemoryPool::GetVP9FrameBuffer,
348 &MemoryPool::ReleaseVP9FrameBuffer, 348 &MemoryPool::ReleaseVP9FrameBuffer,
349 memory_pool_.get())) { 349 memory_pool_.get())) {
350 LOG(ERROR) << "Failed to configure external buffers."; 350 LOG(ERROR) << "Failed to configure external buffers.";
351 return false; 351 return false;
352 } 352 }
353 } 353 }
354 354
355 if (config.format() == PIXEL_FORMAT_YV12A) { 355 if (config.format() == PIXEL_FORMAT_YV12A) {
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 vpx_image->stride[VPX_PLANE_Y], vpx_image->d_h, video_frame->get()); 612 vpx_image->stride[VPX_PLANE_Y], vpx_image->d_h, video_frame->get());
613 return; 613 return;
614 } 614 }
615 CopyAPlane(vpx_image_alpha->planes[VPX_PLANE_Y], 615 CopyAPlane(vpx_image_alpha->planes[VPX_PLANE_Y],
616 vpx_image_alpha->stride[VPX_PLANE_Y], 616 vpx_image_alpha->stride[VPX_PLANE_Y],
617 vpx_image_alpha->d_h, 617 vpx_image_alpha->d_h,
618 video_frame->get()); 618 video_frame->get());
619 } 619 }
620 620
621 } // namespace media 621 } // namespace media
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/transfer_buffer_manager.cc ('k') | media/video/gpu_memory_buffer_video_frame_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698