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

Unified Diff: chrome/browser/ui/cocoa/tabpose_window.mm

Issue 5526011: Mac: Use high-quality interpolation to draw tabpose thumbnails. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 10 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gfx/gfx.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/tabpose_window.mm
diff --git a/chrome/browser/ui/cocoa/tabpose_window.mm b/chrome/browser/ui/cocoa/tabpose_window.mm
index eb649725d075c3e2958afbf91c557b951b1ec83e..6137b58c865734ce31d697c4e2522185f0082320 100644
--- a/chrome/browser/ui/cocoa/tabpose_window.mm
+++ b/chrome/browser/ui/cocoa/tabpose_window.mm
@@ -26,6 +26,7 @@
#import "chrome/browser/ui/cocoa/tab_strip_model_observer_bridge.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/pref_names.h"
+#include "gfx/scoped_cg_context_state_mac.h"
#include "grit/app_resources.h"
#include "skia/ext/skia_utils_mac.h"
#include "third_party/skia/include/utils/mac/SkCGUtils.h"
@@ -222,6 +223,8 @@ void ThumbnailLoader::LoadThumbnail() {
// TODO(thakis): Add a sublayer for each accelerated surface in the rwhv.
// Until then, accelerated layers (CoreAnimation NPAPI plugins, compositor)
// won't show up in tabpose.
+ gfx::ScopedCGContextSaveGState CGContextSaveGState(context);
+ CGContextSetInterpolationQuality(context, kCGInterpolationHigh);
if (backing_store->cg_layer()) {
CGContextDrawLayerInRect(context, destRect, backing_store->cg_layer());
} else {
@@ -295,6 +298,8 @@ void ThumbnailLoader::LoadThumbnail() {
[self drawBackingStore:backing_store inRect:destRect context:context];
} else if (thumbnail_) {
// No cache hit, but the renderer returned a thumbnail to us.
+ gfx::ScopedCGContextSaveGState CGContextSaveGState(context);
+ CGContextSetInterpolationQuality(context, kCGInterpolationHigh);
CGContextDrawImage(context, destRect, thumbnail_.get());
}
}
« no previous file with comments | « no previous file | gfx/gfx.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698