diff options
author | amanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 21:51:10 +0000 |
---|---|---|
committer | amanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 21:51:10 +0000 |
commit | 265cf96b080c4196c268c0cc1a87186b0aee3b61 (patch) | |
tree | 820b7cd18d60618c2239da446c5b21678ca09280 /chrome/plugin/webplugin_proxy.cc | |
parent | 172d0abca7044b8b5662f376a2645c22d2351c65 (diff) | |
download | chromium_src-265cf96b080c4196c268c0cc1a87186b0aee3b61.zip chromium_src-265cf96b080c4196c268c0cc1a87186b0aee3b61.tar.gz chromium_src-265cf96b080c4196c268c0cc1a87186b0aee3b61.tar.bz2 |
Adjust color spaces so that Mac Chrome renders colors properly.
BUG=19951,20552
TEST=compare pages rendered in Chromium and Safari. They should appear the same.
mark: review
jrg/brettw: FYI
Review URL: http://codereview.chromium.org/194013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25380 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin/webplugin_proxy.cc')
-rw-r--r-- | chrome/plugin/webplugin_proxy.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc index 739fc74..f2f5090 100644 --- a/chrome/plugin/webplugin_proxy.cc +++ b/chrome/plugin/webplugin_proxy.cc @@ -11,6 +11,9 @@ #include "app/win_util.h" #endif #include "base/gfx/blit.h" +#if defined(OS_MACOSX) +#include "base/mac_util.h" +#endif #include "base/scoped_handle.h" #include "base/shared_memory.h" #include "base/singleton.h" @@ -562,14 +565,12 @@ void WebPluginProxy::SetWindowlessBuffer( // and then use that to create a CGContextRef. windowless_dib_.reset(TransportDIB::Map(windowless_buffer)); background_dib_.reset(TransportDIB::Map(background_buffer)); - scoped_cftyperef<CGColorSpaceRef> rgb_colorspace( - CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB)); windowless_context_.reset(CGBitmapContextCreate( windowless_dib_->memory(), delegate_->GetRect().width(), delegate_->GetRect().height(), 8, 4 * delegate_->GetRect().width(), - rgb_colorspace, + mac_util::GetSystemColorSpace(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host)); CGContextTranslateCTM(windowless_context_, 0, delegate_->GetRect().height()); @@ -580,7 +581,7 @@ void WebPluginProxy::SetWindowlessBuffer( delegate_->GetRect().width(), delegate_->GetRect().height(), 8, 4 * delegate_->GetRect().width(), - rgb_colorspace, + mac_util::GetSystemColorSpace(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host)); CGContextTranslateCTM(background_context_, 0, |