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

Unified Diff: content/browser/renderer_host/backing_store_mac.mm

Issue 10807052: mac: Remove code that was only needed on 10.5 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: kill workspaceIDCache_ Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/panels/panel_window_controller_cocoa.mm ('k') | content/common/common.sb » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/backing_store_mac.mm
diff --git a/content/browser/renderer_host/backing_store_mac.mm b/content/browser/renderer_host/backing_store_mac.mm
index ebc0c0d8aafcfb9acba0ede7acf34c322b7b58a2..a00788b037e8285f9829556484f7c9300530355e 100644
--- a/content/browser/renderer_host/backing_store_mac.mm
+++ b/content/browser/renderer_host/backing_store_mac.mm
@@ -180,24 +180,7 @@ void BackingStoreMac::ScrollBackingStore(int dx, int dy,
if ((dx || dy) && abs(dx) < size().width() && abs(dy) < size().height()) {
if (cg_layer()) {
- // Whether this version of OS X has broken CGLayers. See
- // http://crbug.com/45553 , comments 5 and 6.
- bool needs_layer_workaround = base::mac::IsOSLeopardOrEarlier();
-
- base::mac::ScopedCFTypeRef<CGLayerRef> new_layer;
- CGContextRef layer;
-
- if (needs_layer_workaround) {
- new_layer.reset(CreateCGLayer());
- // If the current view is in a window, the replacement must be too.
- DCHECK(new_layer);
-
- layer = CGLayerGetContext(new_layer);
- CGContextDrawLayerAtPoint(layer, CGPointMake(0, 0), cg_layer());
- } else {
- layer = CGLayerGetContext(cg_layer());
- }
-
+ CGContextRef layer = CGLayerGetContext(cg_layer());
CGContextSaveGState(layer);
CGContextClipToRect(layer,
CGRectMake(clip_rect.x(),
@@ -206,9 +189,6 @@ void BackingStoreMac::ScrollBackingStore(int dx, int dy,
clip_rect.height()));
CGContextDrawLayerAtPoint(layer, CGPointMake(dx, -dy), cg_layer());
CGContextRestoreGState(layer);
-
- if (needs_layer_workaround)
- cg_layer_.swap(new_layer);
} else {
// We don't have a layer, so scroll the contents of the CGBitmapContext.
base::mac::ScopedCFTypeRef<CGImageRef> bitmap_image(
« no previous file with comments | « chrome/browser/ui/panels/panel_window_controller_cocoa.mm ('k') | content/common/common.sb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698