summaryrefslogtreecommitdiffstats
path: root/gfx
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-08 18:25:22 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-08 18:25:22 +0000
commit9db9ac7f2be75ce92155463fa0c27292db08fb5f (patch)
tree2f384d1e850e8e52a884021f1128f9e6712f91bb /gfx
parentb3f8993357927deaf669cbb746155dab4320513b (diff)
downloadchromium_src-9db9ac7f2be75ce92155463fa0c27292db08fb5f.zip
chromium_src-9db9ac7f2be75ce92155463fa0c27292db08fb5f.tar.gz
chromium_src-9db9ac7f2be75ce92155463fa0c27292db08fb5f.tar.bz2
Mac: Use high-quality interpolation to draw tabpose thumbnails.
BUG=50307,65894 TEST=Activate tabpose, thumbnails should look nicer, but the feature shouldn't be visibly slower. Review URL: http://codereview.chromium.org/5526011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx')
-rw-r--r--gfx/gfx.gyp1
-rw-r--r--gfx/scoped_cg_context_state_mac.h30
2 files changed, 31 insertions, 0 deletions
diff --git a/gfx/gfx.gyp b/gfx/gfx.gyp
index c180f3e..706f9ba 100644
--- a/gfx/gfx.gyp
+++ b/gfx/gfx.gyp
@@ -124,6 +124,7 @@
'point.h',
'rect.cc',
'rect.h',
+ 'scoped_cg_context_state_mac.h',
'scoped_image.h',
'scrollbar_size.cc',
'scrollbar_size.h',
diff --git a/gfx/scoped_cg_context_state_mac.h b/gfx/scoped_cg_context_state_mac.h
new file mode 100644
index 0000000..4ba7fac
--- /dev/null
+++ b/gfx/scoped_cg_context_state_mac.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef GFX_SCOPED_CG_CONTEXT_STATE_MAC_H_
+#define GFX_SCOPED_CG_CONTEXT_STATE_MAC_H_
+
+#import <QuartzCore/QuartzCore.h>
+
+namespace gfx {
+
+class ScopedCGContextSaveGState {
+ public:
+ explicit ScopedCGContextSaveGState(CGContextRef context) : context_(context) {
+ CGContextSaveGState(context_);
+ }
+
+ ~ScopedCGContextSaveGState() {
+ CGContextRestoreGState(context_);
+ }
+
+ private:
+ CGContextRef context_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedCGContextSaveGState);
+};
+
+} // namespace gfx
+
+#endif // GFX_SCOPED_CG_CONTEXT_STATE_MAC_H_