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

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

Issue 1796293003: Image decode color: Push color profile from browser to renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: leave empty check Created 4 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 | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/common/render_process_messages.h » ('j') | 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 f2f8ace175bbe0b6f985d2273aee64cc0b7bcd27..7b808c30a06811d6267ab445cd19877f6eb05cad 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -76,6 +76,7 @@
#include "third_party/WebKit/public/web/WebCompositionUnderline.h"
#include "ui/events/event.h"
#include "ui/events/keycodes/keyboard_codes.h"
+#include "ui/gfx/color_profile.h"
#include "ui/gfx/geometry/size_conversions.h"
#include "ui/gfx/geometry/vector2d_conversions.h"
#include "ui/gfx/skbitmap_operations.h"
@@ -217,6 +218,16 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
CHECK(delegate_);
CHECK_NE(MSG_ROUTING_NONE, routing_id_);
+#if defined(OS_WIN)
+ // Update the display color profile cache so that it is likely to be up to
+ // date when the renderer process requests the color profile.
+ if (gfx::ColorProfile::CachedProfilesNeedUpdate()) {
+ BrowserThread::PostBlockingPoolTask(
+ FROM_HERE,
+ base::Bind(&gfx::ColorProfile::UpdateCachedProfilesOnBackgroundThread));
+ }
+#endif
+
std::pair<RoutingIDWidgetMap::iterator, bool> result =
g_routing_id_widget_map.Get().insert(std::make_pair(
RenderWidgetHostID(process->GetID(), routing_id_), this));
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/common/render_process_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698