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

Unified Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 2953393002: android WCG support: Add missing plumbing (Closed)
Patch Set: Fix build again Created 3 years, 6 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 | « no previous file | content/browser/web_contents/web_contents_view_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/compositor_impl_android.cc
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index 801425c5c5ad362d4d77a4f0adebf2bc6edf1c2d..341cd87fb2349283373ad7fd94f3b0c2871a9b97 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -74,6 +74,7 @@
#include "ui/android/window_android.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
+#include "ui/gfx/color_space_switches.h"
#include "ui/gfx/swap_result.h"
namespace gpu {
@@ -794,6 +795,8 @@ void CompositorImpl::InitializeDisplay(
cc::RendererSettings renderer_settings;
renderer_settings.allow_antialiasing = false;
renderer_settings.highp_threshold_min = 2048;
+ renderer_settings.enable_color_correct_rendering =
+ base::FeatureList::IsEnabled(features::kColorCorrectRendering);
display_.reset(new cc::Display(
viz::HostSharedBitmapManager::current(),
BrowserGpuMemoryBufferManager::current(), renderer_settings,
@@ -812,6 +815,11 @@ void CompositorImpl::InitializeDisplay(
display_->SetVisible(true);
display_->Resize(size_);
+ const gfx::ColorSpace& display_color_space =
+ display::Screen::GetScreen()
+ ->GetDisplayNearestWindow(root_window_)
+ .color_space();
+ display_->SetColorSpace(display_color_space, display_color_space);
GetSurfaceManager()->RegisterBeginFrameSource(
root_window_->GetBeginFrameSource(), frame_sink_id_);
host_->SetLayerTreeFrameSink(std::move(layer_tree_frame_sink));
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698