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

Side by Side Diff: Source/core/rendering/svg/SVGRenderingContext.cpp

Issue 58543002: Use a boolean hasCompositedLayerMapping() accessor instead of the pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update comment for hasCompositedLayerMapping Created 7 years, 1 month 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/rendering/RenderTreeAsText.cpp ('k') | Source/core/testing/Internals.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) 2007, 2008 Rob Buis <buis@kde.org> 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org>
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Google, Inc. All rights reserved. 5 * Copyright (C) 2009 Google, Inc. All rights reserved.
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 // Continue walking up the layer tree, accumulating CSS transforms. 222 // Continue walking up the layer tree, accumulating CSS transforms.
223 RenderLayer* layer = renderer ? renderer->enclosingLayer() : 0; 223 RenderLayer* layer = renderer ? renderer->enclosingLayer() : 0;
224 while (layer) { 224 while (layer) {
225 if (TransformationMatrix* layerTransform = layer->transform()) 225 if (TransformationMatrix* layerTransform = layer->transform())
226 absoluteTransform = layerTransform->toAffineTransform() * absoluteTr ansform; 226 absoluteTransform = layerTransform->toAffineTransform() * absoluteTr ansform;
227 227
228 // We can stop at compositing layers, to match the backing resolution. 228 // We can stop at compositing layers, to match the backing resolution.
229 // FIXME: should we be computing the transform to the nearest composited layer, 229 // FIXME: should we be computing the transform to the nearest composited layer,
230 // or the nearest composited layer that does not paint into its ancestor ? 230 // or the nearest composited layer that does not paint into its ancestor ?
231 if (layer->compositedLayerMapping()) 231 // I think this is the nearest composited ancestor since we will inherit its
232 // transforms in the composited layer tree.
233 if (layer->hasCompositedLayerMapping())
232 break; 234 break;
233 235
234 layer = layer->parent(); 236 layer = layer->parent();
235 } 237 }
236 238
237 if (deviceScaleFactor != 1) 239 if (deviceScaleFactor != 1)
238 absoluteTransform.scale(deviceScaleFactor); 240 absoluteTransform.scale(deviceScaleFactor);
239 } 241 }
240 242
241 bool SVGRenderingContext::createImageBufferForPattern(const FloatRect& absoluteT argetRect, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>& imag eBuffer, RenderingMode renderingMode) 243 bool SVGRenderingContext::createImageBufferForPattern(const FloatRect& absoluteT argetRect, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>& imag eBuffer, RenderingMode renderingMode)
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 toRenderSVGImage(m_object)->paintForeground(bufferedInfo); 325 toRenderSVGImage(m_object)->paintForeground(bufferedInfo);
324 } else 326 } else
325 return false; 327 return false;
326 } 328 }
327 329
328 m_paintInfo->context->drawImageBuffer(imageBuffer.get(), boundingBox); 330 m_paintInfo->context->drawImageBuffer(imageBuffer.get(), boundingBox);
329 return true; 331 return true;
330 } 332 }
331 333
332 } 334 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTreeAsText.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698