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

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: rebase 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 FloatRect repaintRect = m_object->repaintRectInLocalCoordinates(); 109 FloatRect repaintRect = m_object->repaintRectInLocalCoordinates();
110 110
111 if (opacity < 1) { 111 if (opacity < 1) {
112 m_paintInfo->context->clip(repaintRect); 112 m_paintInfo->context->clip(repaintRect);
113 m_paintInfo->context->beginTransparencyLayer(opacity); 113 m_paintInfo->context->beginTransparencyLayer(opacity);
114 m_renderingFlags |= EndOpacityLayer; 114 m_renderingFlags |= EndOpacityLayer;
115 } 115 }
116 116
117 if (shadow) { 117 if (shadow) {
118 m_paintInfo->context->clip(repaintRect); 118 m_paintInfo->context->clip(repaintRect);
119 m_paintInfo->context->setShadow(IntSize(roundToInt(shadow->x()), rou ndToInt(shadow->y())), shadow->blur(), shadow->color(), style->colorSpace()); 119 m_paintInfo->context->setShadow(IntSize(roundToInt(shadow->x()), rou ndToInt(shadow->y())), shadow->blur(), shadow->color());
120 m_paintInfo->context->beginTransparencyLayer(1); 120 m_paintInfo->context->beginTransparencyLayer(1);
121 m_renderingFlags |= EndShadowLayer; 121 m_renderingFlags |= EndShadowLayer;
122 } 122 }
123 } 123 }
124 124
125 ClipPathOperation* clipPathOperation = style->clipPath(); 125 ClipPathOperation* clipPathOperation = style->clipPath();
126 if (clipPathOperation && clipPathOperation->getOperationType() == ClipPathOp eration::SHAPE) { 126 if (clipPathOperation && clipPathOperation->getOperationType() == ClipPathOp eration::SHAPE) {
127 ShapeClipPathOperation* clipPath = static_cast<ShapeClipPathOperation*>( clipPathOperation); 127 ShapeClipPathOperation* clipPath = static_cast<ShapeClipPathOperation*>( clipPathOperation);
128 m_paintInfo->context->clipPath(clipPath->path(object->objectBoundingBox( )), clipPath->windRule()); 128 m_paintInfo->context->clipPath(clipPath->path(object->objectBoundingBox( )), clipPath->windRule());
129 } 129 }
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 return false; 345 return false;
346 } 346 }
347 347
348 m_paintInfo->context->drawImageBuffer(imageBuffer.get(), ColorSpaceDeviceRGB , boundingBox); 348 m_paintInfo->context->drawImageBuffer(imageBuffer.get(), ColorSpaceDeviceRGB , boundingBox);
349 return true; 349 return true;
350 } 350 }
351 351
352 } 352 }
353 353
354 #endif 354 #endif
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