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

Unified Diff: cc/surfaces/display.cc

Issue 2496913003: Display linear-srgb color managed canvas (Closed)
Patch Set: Created 4 years, 1 month 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/surfaces/display.cc
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc
index a0ffb2ce35fce3f46f4c5674d1de15016926f006..0a8609334d98ef9cf50a628600b9cd0d2df64238 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -6,8 +6,10 @@
#include <stddef.h>
+#include "base/command_line.h"
#include "base/memory/ptr_util.h"
#include "base/trace_event/trace_event.h"
+#include "cc/base/switches.h"
#include "cc/debug/benchmark_instrumentation.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/direct_renderer.h"
@@ -175,12 +177,17 @@ void Display::SetOutputIsSecure(bool secure) {
void Display::InitializeRenderer() {
// Not relevant for display compositor since it's not delegated.
bool delegated_sync_points_required = false;
+ // Check if color correct rendering is enabled.
+ base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
+ bool color_correct_rendering =
+ cmd->HasSwitch(switches::kEnableColorCorrectRendering);
+
resource_provider_.reset(new ResourceProvider(
output_surface_->context_provider(), bitmap_manager_,
gpu_memory_buffer_manager_, nullptr, settings_.highp_threshold_min,
settings_.texture_id_allocation_chunk_size,
delegated_sync_points_required, settings_.use_gpu_memory_buffer_resources,
- false, settings_.buffer_to_texture_target_map));
+ color_correct_rendering, settings_.buffer_to_texture_target_map));
if (output_surface_->context_provider()) {
DCHECK(texture_mailbox_deleter_);

Powered by Google App Engine
This is Rietveld 408576698