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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

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: Rebase Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 #include "platform/exported/WebActiveGestureAnimation.h" 111 #include "platform/exported/WebActiveGestureAnimation.h"
112 #include "platform/fonts/FontCache.h" 112 #include "platform/fonts/FontCache.h"
113 #include "platform/graphics/Color.h" 113 #include "platform/graphics/Color.h"
114 #include "platform/graphics/CompositorFactory.h" 114 #include "platform/graphics/CompositorFactory.h"
115 #include "platform/graphics/FirstPaintInvalidationTracking.h" 115 #include "platform/graphics/FirstPaintInvalidationTracking.h"
116 #include "platform/graphics/GraphicsContext.h" 116 #include "platform/graphics/GraphicsContext.h"
117 #include "platform/graphics/Image.h" 117 #include "platform/graphics/Image.h"
118 #include "platform/graphics/ImageBuffer.h" 118 #include "platform/graphics/ImageBuffer.h"
119 #include "platform/graphics/gpu/DrawingBuffer.h" 119 #include "platform/graphics/gpu/DrawingBuffer.h"
120 #include "platform/graphics/paint/DrawingRecorder.h" 120 #include "platform/graphics/paint/DrawingRecorder.h"
121 #include "platform/image-decoders/ImageDecoder.h"
121 #include "platform/scroll/ScrollbarTheme.h" 122 #include "platform/scroll/ScrollbarTheme.h"
122 #include "platform/weborigin/SchemeRegistry.h" 123 #include "platform/weborigin/SchemeRegistry.h"
123 #include "public/platform/Platform.h" 124 #include "public/platform/Platform.h"
124 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h" 125 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h"
125 #include "public/platform/WebCompositorSupport.h" 126 #include "public/platform/WebCompositorSupport.h"
126 #include "public/platform/WebDragData.h" 127 #include "public/platform/WebDragData.h"
127 #include "public/platform/WebFloatPoint.h" 128 #include "public/platform/WebFloatPoint.h"
128 #include "public/platform/WebGestureCurve.h" 129 #include "public/platform/WebGestureCurve.h"
129 #include "public/platform/WebImage.h" 130 #include "public/platform/WebImage.h"
130 #include "public/platform/WebLayerTreeView.h" 131 #include "public/platform/WebLayerTreeView.h"
(...skipping 3101 matching lines...) Expand 10 before | Expand all | Expand 10 after
3232 setZoomLevel(m_zoomLevel); 3233 setZoomLevel(m_zoomLevel);
3233 } 3234 }
3234 3235
3235 void WebViewImpl::setDeviceColorProfile(const WebVector<char>& colorProfile) 3236 void WebViewImpl::setDeviceColorProfile(const WebVector<char>& colorProfile)
3236 { 3237 {
3237 if (!page()) 3238 if (!page())
3238 return; 3239 return;
3239 3240
3240 Vector<char> deviceProfile; 3241 Vector<char> deviceProfile;
3241 deviceProfile.append(colorProfile.data(), colorProfile.size()); 3242 deviceProfile.append(colorProfile.data(), colorProfile.size());
3243 ImageDecoder::setOutputDeviceColorProfile(deviceProfile);
3242 3244
3243 page()->setDeviceColorProfile(deviceProfile); 3245 page()->setDeviceColorProfile(deviceProfile);
3244 } 3246 }
3245 3247
3246 void WebViewImpl::resetDeviceColorProfileForTesting() 3248 void WebViewImpl::resetDeviceColorProfileForTesting()
3247 { 3249 {
3248 if (!page()) 3250 if (!page())
3249 return; 3251 return;
3250 3252
3251 page()->resetDeviceColorProfileForTesting(); 3253 page()->resetDeviceColorProfileForTesting();
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after
4529 { 4531 {
4530 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4532 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4531 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4533 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4532 if (!page()) 4534 if (!page())
4533 return 1; 4535 return 1;
4534 4536
4535 return page()->deviceScaleFactor(); 4537 return page()->deviceScaleFactor();
4536 } 4538 }
4537 4539
4538 } // namespace blink 4540 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698