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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 2742613002: color: Always use parametric color spaces for raster (Closed)
Patch Set: More comment cleanup 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #import <Carbon/Carbon.h> 7 #import <Carbon/Carbon.h>
8 #import <objc/runtime.h> 8 #import <objc/runtime.h>
9 #include <OpenGL/gl.h> 9 #include <OpenGL/gl.h>
10 #include <QuartzCore/QuartzCore.h> 10 #include <QuartzCore/QuartzCore.h>
(...skipping 3300 matching lines...) Expand 10 before | Expand all | Expand 10 after
3311 NSScreen* screen = [[self window] screen]; 3311 NSScreen* screen = [[self window] screen];
3312 if (screen) { 3312 if (screen) {
3313 CGColorSpaceRef color_space = [[screen colorSpace] CGColorSpace]; 3313 CGColorSpaceRef color_space = [[screen colorSpace] CGColorSpace];
3314 // On Sierra, we need to operate in a single screen's color space because 3314 // On Sierra, we need to operate in a single screen's color space because
3315 // IOSurfaces do not opt-out of color correction. 3315 // IOSurfaces do not opt-out of color correction.
3316 // https://crbug.com/654488 3316 // https://crbug.com/654488
3317 if (base::mac::IsAtLeastOS10_12()) 3317 if (base::mac::IsAtLeastOS10_12())
3318 color_space = base::mac::GetSystemColorSpace(); 3318 color_space = base::mac::GetSystemColorSpace();
3319 gfx::ICCProfile icc_profile = 3319 gfx::ICCProfile icc_profile =
3320 gfx::ICCProfile::FromCGColorSpace(color_space); 3320 gfx::ICCProfile::FromCGColorSpace(color_space);
3321 renderWidgetHostView_->browser_compositor_->SetDisplayColorSpace( 3321 renderWidgetHostView_->browser_compositor_->SetDisplayColorProfile(
3322 icc_profile.GetColorSpace()); 3322 icc_profile);
3323 } 3323 }
3324 } 3324 }
3325 3325
3326 - (void)undo:(id)sender { 3326 - (void)undo:(id)sender {
3327 WebContents* web_contents = renderWidgetHostView_->GetWebContents(); 3327 WebContents* web_contents = renderWidgetHostView_->GetWebContents();
3328 if (web_contents) 3328 if (web_contents)
3329 web_contents->Undo(); 3329 web_contents->Undo();
3330 } 3330 }
3331 3331
3332 - (void)redo:(id)sender { 3332 - (void)redo:(id)sender {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
3492 3492
3493 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3493 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3494 // regions that are not draggable. (See ControlRegionView in 3494 // regions that are not draggable. (See ControlRegionView in
3495 // native_app_window_cocoa.mm). This requires the render host view to be 3495 // native_app_window_cocoa.mm). This requires the render host view to be
3496 // draggable by default. 3496 // draggable by default.
3497 - (BOOL)mouseDownCanMoveWindow { 3497 - (BOOL)mouseDownCanMoveWindow {
3498 return YES; 3498 return YES;
3499 } 3499 }
3500 3500
3501 @end 3501 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698