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

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

Issue 15137009: Refactor shadow rendering logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: merge upstream changes Created 7 years, 7 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
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.cpp ('k') | no next file » | 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 FloatRect repaintRect = m_object->repaintRectInLocalCoordinates(); 108 FloatRect repaintRect = m_object->repaintRectInLocalCoordinates();
109 109
110 if (opacity < 1) { 110 if (opacity < 1) {
111 m_paintInfo->context->clip(repaintRect); 111 m_paintInfo->context->clip(repaintRect);
112 m_paintInfo->context->beginTransparencyLayer(opacity); 112 m_paintInfo->context->beginTransparencyLayer(opacity);
113 m_renderingFlags |= EndOpacityLayer; 113 m_renderingFlags |= EndOpacityLayer;
114 } 114 }
115 115
116 if (shadow) { 116 if (shadow) {
117 m_paintInfo->context->clip(repaintRect); 117 m_paintInfo->context->clip(repaintRect);
118 m_paintInfo->context->setShadow(IntSize(roundToInt(shadow->x()), rou ndToInt(shadow->y())), shadow->blur(), shadow->color(), style->colorSpace()); 118 m_paintInfo->context->setShadow(IntSize(roundToInt(shadow->x()), rou ndToInt(shadow->y())), shadow->blur(), shadow->color());
119 m_paintInfo->context->beginTransparencyLayer(1); 119 m_paintInfo->context->beginTransparencyLayer(1);
120 m_renderingFlags |= EndShadowLayer; 120 m_renderingFlags |= EndShadowLayer;
121 } 121 }
122 } 122 }
123 123
124 ClipPathOperation* clipPathOperation = style->clipPath(); 124 ClipPathOperation* clipPathOperation = style->clipPath();
125 if (clipPathOperation && clipPathOperation->getOperationType() == ClipPathOp eration::SHAPE) { 125 if (clipPathOperation && clipPathOperation->getOperationType() == ClipPathOp eration::SHAPE) {
126 ShapeClipPathOperation* clipPath = static_cast<ShapeClipPathOperation*>( clipPathOperation); 126 ShapeClipPathOperation* clipPath = static_cast<ShapeClipPathOperation*>( clipPathOperation);
127 m_paintInfo->context->clipPath(clipPath->path(object->objectBoundingBox( )), clipPath->windRule()); 127 m_paintInfo->context->clipPath(clipPath->path(object->objectBoundingBox( )), clipPath->windRule());
128 } 128 }
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 toRenderSVGImage(m_object)->paintForeground(bufferedInfo); 342 toRenderSVGImage(m_object)->paintForeground(bufferedInfo);
343 } else 343 } else
344 return false; 344 return false;
345 } 345 }
346 346
347 m_paintInfo->context->drawImageBuffer(imageBuffer.get(), ColorSpaceDeviceRGB , boundingBox); 347 m_paintInfo->context->drawImageBuffer(imageBuffer.get(), ColorSpaceDeviceRGB , boundingBox);
348 return true; 348 return true;
349 } 349 }
350 350
351 } 351 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698