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

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

Issue 2748273003: HDR: Force raster into sRGB space when HDR is enabled (Closed)
Patch Set: Created 3 years, 9 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 | « content/browser/renderer_host/render_view_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index ead180c02ce45052c963e15b4e5780a0e4eead62..175f1687e6f05778a8a79f281bf0831e8737ec5e 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -82,6 +82,7 @@
#include "storage/browser/fileapi/isolated_context.h"
#include "third_party/WebKit/public/web/WebCompositionUnderline.h"
#include "ui/base/clipboard/clipboard.h"
+#include "ui/base/ui_base_switches.h"
#include "ui/events/blink/web_input_event_traits.h"
#include "ui/events/event.h"
#include "ui/events/keycodes/keyboard_codes.h"
@@ -667,6 +668,16 @@ bool RenderWidgetHostImpl::GetResizeParams(ResizeParams* resize_params) {
*resize_params = ResizeParams();
GetScreenInfo(&resize_params->screen_info);
+
+ // Pretend that HDR displays are sRGB so that we do not have inconsistent
+ // coloring.
+ // TODO(ccameron): Disable this once color correct rasterization is functional
+ // https://crbug.com/701942
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableHDR)) {
+ gfx::ColorSpace::CreateSRGB().GetICCProfile(
+ &resize_params->screen_info.icc_profile);
+ }
+
if (delegate_) {
resize_params->is_fullscreen_granted =
delegate_->IsFullscreenForCurrentTab();
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698