Index: cc/resources/video_resource_updater_unittest.cc |
diff --git a/cc/resources/video_resource_updater_unittest.cc b/cc/resources/video_resource_updater_unittest.cc |
index 689de6817943dc7c92ebdc73fd96b289fea1ccc4..72107b8769a24f5b302a4fc2b7eb6eb8259f58e3 100644 |
--- a/cc/resources/video_resource_updater_unittest.cc |
+++ b/cc/resources/video_resource_updater_unittest.cc |
@@ -84,18 +84,21 @@ class VideoResourceUpdaterTest : public testing::Test { |
static uint8 u_data[kDimension * kDimension / 2] = { 0 }; |
static uint8 v_data[kDimension * kDimension / 2] = { 0 }; |
- return media::VideoFrame::WrapExternalYuvData( |
- media::PIXEL_FORMAT_YV16, // format |
- size, // coded_size |
- gfx::Rect(size), // visible_rect |
- size, // natural_size |
- size.width(), // y_stride |
- size.width() / 2, // u_stride |
- size.width() / 2, // v_stride |
- y_data, // y_data |
- u_data, // u_data |
- v_data, // v_data |
- base::TimeDelta()); // timestamp |
+ scoped_refptr<media::VideoFrame> video_frame = |
+ media::VideoFrame::WrapExternalYuvData( |
+ media::PIXEL_FORMAT_YV16, // format |
+ size, // coded_size |
+ gfx::Rect(size), // visible_rect |
+ size, // natural_size |
+ size.width(), // y_stride |
+ size.width() / 2, // u_stride |
+ size.width() / 2, // v_stride |
+ y_data, // y_data |
+ u_data, // u_data |
+ v_data, // v_data |
+ base::TimeDelta()); // timestamp |
+ CHECK(video_frame); |
+ return video_frame; |
} |
static void ReleaseMailboxCB(const gpu::SyncToken& sync_token) {} |
@@ -109,14 +112,17 @@ class VideoResourceUpdaterTest : public testing::Test { |
const gpu::SyncToken sync_token(7); |
const unsigned target = GL_TEXTURE_2D; |
- return media::VideoFrame::WrapNativeTexture( |
- media::PIXEL_FORMAT_ARGB, |
- gpu::MailboxHolder(mailbox, sync_token, target), |
- base::Bind(&ReleaseMailboxCB), |
- size, // coded_size |
- gfx::Rect(size), // visible_rect |
- size, // natural_size |
- base::TimeDelta()); // timestamp |
+ scoped_refptr<media::VideoFrame> video_frame = |
+ media::VideoFrame::WrapNativeTexture( |
+ media::PIXEL_FORMAT_ARGB, |
+ gpu::MailboxHolder(mailbox, sync_token, target), |
+ base::Bind(&ReleaseMailboxCB), |
+ size, // coded_size |
+ gfx::Rect(size), // visible_rect |
+ size, // natural_size |
+ base::TimeDelta()); // timestamp |
+ CHECK(video_frame); |
+ return video_frame; |
} |
scoped_refptr<media::VideoFrame> CreateTestYUVHardareVideoFrame() { |
@@ -130,18 +136,21 @@ class VideoResourceUpdaterTest : public testing::Test { |
} |
const gpu::SyncToken sync_token(7); |
const unsigned target = GL_TEXTURE_RECTANGLE_ARB; |
- return media::VideoFrame::WrapYUV420NativeTextures( |
- gpu::MailboxHolder(mailbox[media::VideoFrame::kYPlane], sync_token, |
- target), |
- gpu::MailboxHolder(mailbox[media::VideoFrame::kUPlane], sync_token, |
- target), |
- gpu::MailboxHolder(mailbox[media::VideoFrame::kVPlane], sync_token, |
- target), |
- base::Bind(&ReleaseMailboxCB), |
- size, // coded_size |
- gfx::Rect(size), // visible_rect |
- size, // natural_size |
- base::TimeDelta()); // timestamp |
+ scoped_refptr<media::VideoFrame> video_frame = |
+ media::VideoFrame::WrapYUV420NativeTextures( |
+ gpu::MailboxHolder(mailbox[media::VideoFrame::kYPlane], sync_token, |
+ target), |
+ gpu::MailboxHolder(mailbox[media::VideoFrame::kUPlane], sync_token, |
+ target), |
+ gpu::MailboxHolder(mailbox[media::VideoFrame::kVPlane], sync_token, |
+ target), |
+ base::Bind(&ReleaseMailboxCB), |
+ size, // coded_size |
+ gfx::Rect(size), // visible_rect |
+ size, // natural_size |
+ base::TimeDelta()); // timestamp |
+ CHECK(video_frame); |
mcasas
2015/12/15 17:14:33
Prefer ASSERT_xx() to CHECK (see last
entry in [1]
emircan
2015/12/16 15:57:10
Thanks, changing all to ASSERT_TRUE.
|
+ return video_frame; |
} |
WebGraphicsContext3DUploadCounter* context3d_; |