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

Unified Diff: cc/resources/video_resource_updater.cc

Issue 2920893003: Revert of cc: Don't use StreamVideoDrawQuad on any platform but Android. (Closed)
Patch Set: Fix merge conflict. Created 3 years, 7 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
« no previous file with comments | « cc/resources/video_resource_updater.h ('k') | cc/resources/video_resource_updater_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/video_resource_updater.cc
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
index 62007f91c67aaa10b4ddf5d2bebebce20698819c..9e697580d3f22d696c93e556f9afb19c9ba23e16 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -35,8 +35,7 @@ namespace {
const ResourceFormat kRGBResourceFormat = RGBA_8888;
VideoFrameExternalResources::ResourceType ResourceTypeForVideoFrame(
- media::VideoFrame* video_frame,
- bool use_stream_video_draw_quad) {
+ media::VideoFrame* video_frame) {
switch (video_frame->format()) {
case media::PIXEL_FORMAT_ARGB:
case media::PIXEL_FORMAT_XRGB:
@@ -47,11 +46,10 @@ VideoFrameExternalResources::ResourceType ResourceTypeForVideoFrame(
? VideoFrameExternalResources::RGB_RESOURCE
: VideoFrameExternalResources::RGBA_PREMULTIPLIED_RESOURCE;
case GL_TEXTURE_EXTERNAL_OES:
- if (use_stream_video_draw_quad &&
- !video_frame->metadata()->IsTrue(
- media::VideoFrameMetadata::COPY_REQUIRED))
- return VideoFrameExternalResources::STREAM_TEXTURE_RESOURCE;
- return VideoFrameExternalResources::RGBA_RESOURCE;
+ return video_frame->metadata()->IsTrue(
+ media::VideoFrameMetadata::COPY_REQUIRED)
+ ? VideoFrameExternalResources::RGBA_RESOURCE
+ : VideoFrameExternalResources::STREAM_TEXTURE_RESOURCE;
case GL_TEXTURE_RECTANGLE_ARB:
return VideoFrameExternalResources::RGB_RESOURCE;
default:
@@ -174,11 +172,9 @@ VideoFrameExternalResources::VideoFrameExternalResources(
VideoFrameExternalResources::~VideoFrameExternalResources() {}
VideoResourceUpdater::VideoResourceUpdater(ContextProvider* context_provider,
- ResourceProvider* resource_provider,
- bool use_stream_video_draw_quad)
+ ResourceProvider* resource_provider)
: context_provider_(context_provider),
resource_provider_(resource_provider),
- use_stream_video_draw_quad_(use_stream_video_draw_quad),
weak_ptr_factory_(this) {}
VideoResourceUpdater::~VideoResourceUpdater() {
@@ -634,8 +630,7 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForHardwarePlanes(
}
gfx::ColorSpace resource_color_space = video_frame->ColorSpace();
- external_resources.type =
- ResourceTypeForVideoFrame(video_frame.get(), use_stream_video_draw_quad_);
+ external_resources.type = ResourceTypeForVideoFrame(video_frame.get());
if (external_resources.type == VideoFrameExternalResources::NONE) {
DLOG(ERROR) << "Unsupported Texture format"
<< media::VideoPixelFormatToString(video_frame->format());
« no previous file with comments | « cc/resources/video_resource_updater.h ('k') | cc/resources/video_resource_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698