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

Side by Side Diff: media/base/video_frame_pool_unittest.cc

Issue 1542013004: Switch to standard integer types in media/, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more stddef Created 5 years 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_pool.cc ('k') | media/base/video_frame_unittest.cc » ('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 <stddef.h>
6 #include <stdint.h>
7
5 #include "media/base/video_frame_pool.h" 8 #include "media/base/video_frame_pool.h"
6 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
7 10
8 namespace media { 11 namespace media {
9 12
10 class VideoFramePoolTest : public ::testing::Test { 13 class VideoFramePoolTest : public ::testing::Test {
11 public: 14 public:
12 VideoFramePoolTest() : pool_(new VideoFramePool()) {} 15 VideoFramePoolTest() : pool_(new VideoFramePool()) {}
13 16
14 scoped_refptr<VideoFrame> CreateFrame(VideoPixelFormat format, 17 scoped_refptr<VideoFrame> CreateFrame(VideoPixelFormat format,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Destroy the pool. 85 // Destroy the pool.
83 pool_.reset(); 86 pool_.reset();
84 87
85 // Write to the Y plane. The memory tools should detect a 88 // Write to the Y plane. The memory tools should detect a
86 // use-after-free if the storage was actually removed by pool destruction. 89 // use-after-free if the storage was actually removed by pool destruction.
87 memset(frame->data(VideoFrame::kYPlane), 0xff, 90 memset(frame->data(VideoFrame::kYPlane), 0xff,
88 frame->rows(VideoFrame::kYPlane) * frame->stride(VideoFrame::kYPlane)); 91 frame->rows(VideoFrame::kYPlane) * frame->stride(VideoFrame::kYPlane));
89 } 92 }
90 93
91 } // namespace media 94 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_frame_pool.cc ('k') | media/base/video_frame_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698