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

Side by Side Diff: Source/core/paint/ThemePainterMac.mm

Issue 1170523002: Removing GraphicsContext from ImageBuffer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix for shape bug Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/shapes/Shape.cpp ('k') | Source/platform/DragImage.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Google, Inc. 3 * Copyright (C) 2008, 2009 Google, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 trackInfo.attributes = kThemeTrackHorizontal; 238 trackInfo.attributes = kThemeTrackHorizontal;
239 trackInfo.enableState = LayoutTheme::isActive(layoutObject) ? kThemeTrackAct ive : kThemeTrackInactive; 239 trackInfo.enableState = LayoutTheme::isActive(layoutObject) ? kThemeTrackAct ive : kThemeTrackInactive;
240 trackInfo.reserved = 0; 240 trackInfo.reserved = 0;
241 trackInfo.filler1 = 0; 241 trackInfo.filler1 = 0;
242 242
243 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(inflatedRect.size()); 243 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(inflatedRect.size());
244 if (!imageBuffer) 244 if (!imageBuffer)
245 return true; 245 return true;
246 246
247 IntRect clipRect = IntRect(IntPoint(), inflatedRect.size()); 247 IntRect clipRect = IntRect(IntPoint(), inflatedRect.size());
248 LocalCurrentGraphicsContext localContext(imageBuffer->context(), &clipRect, clipRect); 248 LocalCurrentGraphicsContext localContext(imageBuffer->canvas(), 1, &clipRect , clipRect);
249 CGContextRef cgContext = localContext.cgContext(); 249 CGContextRef cgContext = localContext.cgContext();
250 HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal); 250 HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal);
251 251
252 GraphicsContextStateSaver stateSaver(*paintInfo.context); 252 GraphicsContextStateSaver stateSaver(*paintInfo.context);
253 253
254 if (!layoutProgress->style()->isLeftToRightDirection()) { 254 if (!layoutProgress->style()->isLeftToRightDirection()) {
255 paintInfo.context->translate(2 * inflatedRect.x() + inflatedRect.width() , 0); 255 paintInfo.context->translate(2 * inflatedRect.x() + inflatedRect.width() , 0);
256 paintInfo.context->scale(-1, 1); 256 paintInfo.context->scale(-1, 1);
257 } 257 }
258 258
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 [search setSearchMenuTemplate:nil]; 592 [search setSearchMenuTemplate:nil];
593 593
594 m_layoutTheme.updateActiveState([search searchButtonCell], o); 594 m_layoutTheme.updateActiveState([search searchButtonCell], o);
595 595
596 [[search searchButtonCell] drawWithFrame:unzoomedRect inView:m_layoutTheme.d ocumentViewFor(o)]; 596 [[search searchButtonCell] drawWithFrame:unzoomedRect inView:m_layoutTheme.d ocumentViewFor(o)];
597 [[search searchButtonCell] setControlView:nil]; 597 [[search searchButtonCell] setControlView:nil];
598 return false; 598 return false;
599 } 599 }
600 600
601 } // namespace blink 601 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/shapes/Shape.cpp ('k') | Source/platform/DragImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698