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

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: leave empty check Created 4 years, 5 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 #include "platform/exported/WebActiveGestureAnimation.h" 112 #include "platform/exported/WebActiveGestureAnimation.h"
113 #include "platform/fonts/FontCache.h" 113 #include "platform/fonts/FontCache.h"
114 #include "platform/graphics/Color.h" 114 #include "platform/graphics/Color.h"
115 #include "platform/graphics/CompositorMutatorClient.h" 115 #include "platform/graphics/CompositorMutatorClient.h"
116 #include "platform/graphics/FirstPaintInvalidationTracking.h" 116 #include "platform/graphics/FirstPaintInvalidationTracking.h"
117 #include "platform/graphics/GraphicsContext.h" 117 #include "platform/graphics/GraphicsContext.h"
118 #include "platform/graphics/Image.h" 118 #include "platform/graphics/Image.h"
119 #include "platform/graphics/ImageBuffer.h" 119 #include "platform/graphics/ImageBuffer.h"
120 #include "platform/graphics/gpu/DrawingBuffer.h" 120 #include "platform/graphics/gpu/DrawingBuffer.h"
121 #include "platform/graphics/paint/DrawingRecorder.h" 121 #include "platform/graphics/paint/DrawingRecorder.h"
122 #include "platform/image-decoders/ImageDecoder.h"
122 #include "platform/scroll/ScrollbarTheme.h" 123 #include "platform/scroll/ScrollbarTheme.h"
123 #include "platform/weborigin/SchemeRegistry.h" 124 #include "platform/weborigin/SchemeRegistry.h"
124 #include "public/platform/Platform.h" 125 #include "public/platform/Platform.h"
125 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h" 126 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h"
126 #include "public/platform/WebCompositorSupport.h" 127 #include "public/platform/WebCompositorSupport.h"
127 #include "public/platform/WebDragData.h" 128 #include "public/platform/WebDragData.h"
128 #include "public/platform/WebFloatPoint.h" 129 #include "public/platform/WebFloatPoint.h"
129 #include "public/platform/WebGestureCurve.h" 130 #include "public/platform/WebGestureCurve.h"
130 #include "public/platform/WebImage.h" 131 #include "public/platform/WebImage.h"
131 #include "public/platform/WebLayerTreeView.h" 132 #include "public/platform/WebLayerTreeView.h"
(...skipping 3138 matching lines...) Expand 10 before | Expand all | Expand 10 after
3270 setZoomLevel(m_zoomLevel); 3271 setZoomLevel(m_zoomLevel);
3271 } 3272 }
3272 3273
3273 void WebViewImpl::setDeviceColorProfile(const WebVector<char>& colorProfile) 3274 void WebViewImpl::setDeviceColorProfile(const WebVector<char>& colorProfile)
3274 { 3275 {
3275 if (!page()) 3276 if (!page())
3276 return; 3277 return;
3277 3278
3278 Vector<char> deviceProfile; 3279 Vector<char> deviceProfile;
3279 deviceProfile.append(colorProfile.data(), colorProfile.size()); 3280 deviceProfile.append(colorProfile.data(), colorProfile.size());
3281 ImageDecoder::setTargetColorProfile(deviceProfile);
3280 3282
3281 page()->setDeviceColorProfile(deviceProfile); 3283 page()->setDeviceColorProfile(deviceProfile);
3282 } 3284 }
3283 3285
3284 void WebViewImpl::resetDeviceColorProfileForTesting() 3286 void WebViewImpl::resetDeviceColorProfileForTesting()
3285 { 3287 {
3286 if (!page()) 3288 if (!page())
3287 return; 3289 return;
3288 3290
3289 page()->resetDeviceColorProfileForTesting(); 3291 page()->resetDeviceColorProfileForTesting();
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after
4521 { 4523 {
4522 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4524 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4523 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4525 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4524 if (!page()) 4526 if (!page())
4525 return 1; 4527 return 1;
4526 4528
4527 return page()->deviceScaleFactor(); 4529 return page()->deviceScaleFactor();
4528 } 4530 }
4529 4531
4530 } // namespace blink 4532 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp ('k') | third_party/WebKit/public/platform/Platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698