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

Unified Diff: cc/resources/video_resource_updater_unittest.cc

Issue 2122573003: media: replace LUMINANCE_F16 by RG_88 for 9/10-bit h264 videos Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: introduce --disable-half-float-conversion-texture flag Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
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 938c0fc546bdcaef7301b99a822963244e29274a..4f426c0875c3edb51251a0b4a47bd477b45e0080 100644
--- a/cc/resources/video_resource_updater_unittest.cc
+++ b/cc/resources/video_resource_updater_unittest.cc
@@ -253,7 +253,7 @@ TEST_F(VideoResourceUpdaterTest, SoftwareFrame) {
EXPECT_EQ(VideoFrameExternalResources::YUV_RESOURCE, resources.type);
}
-TEST_F(VideoResourceUpdaterTest, HighBitFrameNoF16) {
+TEST_F(VideoResourceUpdaterTest, HighBitFrameNo16bitTexture) {
VideoResourceUpdater updater(context_provider_.get(),
resource_provider3d_.get());
scoped_refptr<media::VideoFrame> video_frame = CreateTestHighBitFrame();
@@ -280,6 +280,23 @@ TEST_F(VideoResourceUpdaterTestWithF16, HighBitFrame) {
EXPECT_EQ(VideoFrameExternalResources::YUV_RESOURCE, resources.type);
}
+class VideoResourceUpdaterTestWithRG : public VideoResourceUpdaterTest {
+ public:
+ VideoResourceUpdaterTestWithRG() : VideoResourceUpdaterTest() {
+ context3d_->set_support_texture_rg(true);
+ }
+};
+
+TEST_F(VideoResourceUpdaterTestWithRG, HighBitFrame) {
+ VideoResourceUpdater updater(context_provider_.get(),
+ resource_provider3d_.get());
+ scoped_refptr<media::VideoFrame> video_frame = CreateTestHighBitFrame();
+
+ VideoFrameExternalResources resources =
+ updater.CreateExternalResourcesFromVideoFrame(video_frame);
+ EXPECT_EQ(VideoFrameExternalResources::YUV_RESOURCE, resources.type);
+}
+
TEST_F(VideoResourceUpdaterTest, HighBitFrameSoftwareCompositor) {
VideoResourceUpdater updater(nullptr, resource_provider_software_.get());
scoped_refptr<media::VideoFrame> video_frame = CreateTestHighBitFrame();

Powered by Google App Engine
This is Rietveld 408576698