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

Unified Diff: cc/resources/video_resource_updater.cc

Issue 2235623003: cc: Add gfx::ColorSpace to cc::ResourceProvider resource creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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/test/fake_ui_resource_layer_tree_host_impl.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 3f943723c3785cd20dd073226b4aba27143841c8..cdeb363e1ecdd4d6a3144fe6dfc105986996f61a 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -174,6 +174,7 @@ VideoResourceUpdater::~VideoResourceUpdater() {
VideoResourceUpdater::ResourceList::iterator
VideoResourceUpdater::AllocateResource(const gfx::Size& plane_size,
ResourceFormat format,
+ const gfx::ColorSpace& color_space,
bool has_mailbox,
bool immutable_hint) {
// TODO(danakj): Abstract out hw/sw resource create/delete from
@@ -181,7 +182,7 @@ VideoResourceUpdater::AllocateResource(const gfx::Size& plane_size,
const ResourceId resource_id = resource_provider_->CreateResource(
plane_size, immutable_hint ? ResourceProvider::TEXTURE_HINT_IMMUTABLE
: ResourceProvider::TEXTURE_HINT_DEFAULT,
- format);
+ format, color_space);
if (resource_id == 0)
return all_resources_.end();
@@ -356,9 +357,9 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes(
// Check if we need to allocate a new resource.
if (resource_it == all_resources_.end()) {
const bool is_immutable = true;
- resource_it =
- AllocateResource(output_plane_resource_size, output_resource_format,
- !software_compositor, is_immutable);
+ resource_it = AllocateResource(
+ output_plane_resource_size, output_resource_format,
+ video_frame->ColorSpace(), !software_compositor, is_immutable);
}
if (resource_it == all_resources_.end())
break;
@@ -583,7 +584,7 @@ void VideoResourceUpdater::CopyPlaneTexture(
if (resource == all_resources_.end()) {
const bool is_immutable = false;
resource = AllocateResource(output_plane_resource_size, copy_target_format,
- true, is_immutable);
+ video_frame->ColorSpace(), true, is_immutable);
}
resource->add_ref();
« no previous file with comments | « cc/resources/video_resource_updater.h ('k') | cc/test/fake_ui_resource_layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698