| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * Copyright (C) 2013 Google Inc. All rights reserved. | 7 * Copyright (C) 2013 Google Inc. 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 filterContext->drawImageBuffer(imageBuffer2, drawingRegionOfInputImage(i
n2->absolutePaintRect())); | 324 filterContext->drawImageBuffer(imageBuffer2, drawingRegionOfInputImage(i
n2->absolutePaintRect())); |
| 325 filterContext->drawImageBuffer(imageBuffer, drawingRegionOfInputImage(in
->absolutePaintRect())); | 325 filterContext->drawImageBuffer(imageBuffer, drawingRegionOfInputImage(in
->absolutePaintRect())); |
| 326 break; | 326 break; |
| 327 case FECOMPOSITE_OPERATOR_IN: { | 327 case FECOMPOSITE_OPERATOR_IN: { |
| 328 // Applies only to the intersected region. | 328 // Applies only to the intersected region. |
| 329 IntRect destinationRect = in->absolutePaintRect(); | 329 IntRect destinationRect = in->absolutePaintRect(); |
| 330 destinationRect.intersect(in2->absolutePaintRect()); | 330 destinationRect.intersect(in2->absolutePaintRect()); |
| 331 destinationRect.intersect(absolutePaintRect()); | 331 destinationRect.intersect(absolutePaintRect()); |
| 332 if (destinationRect.isEmpty()) | 332 if (destinationRect.isEmpty()) |
| 333 break; | 333 break; |
| 334 IntPoint destinationPoint(destinationRect.x() - absolutePaintRect().x(),
destinationRect.y() - absolutePaintRect().y()); | |
| 335 FloatRect sourceRect(IntPoint(destinationRect.x() - in->absolutePaintRec
t().x(), | 334 FloatRect sourceRect(IntPoint(destinationRect.x() - in->absolutePaintRec
t().x(), |
| 336 destinationRect.y() - in->absolutePaintRect(
).y()), destinationRect.size()); | 335 destinationRect.y() - in->absolutePaintRect(
).y()), destinationRect.size()); |
| 337 FloatRect source2Rect(IntPoint(destinationRect.x() - in2->absolutePaintR
ect().x(), | 336 FloatRect source2Rect(IntPoint(destinationRect.x() - in2->absolutePaintR
ect().x(), |
| 338 destinationRect.y() - in2->absolutePaintRec
t().y()), destinationRect.size()); | 337 destinationRect.y() - in2->absolutePaintRec
t().y()), destinationRect.size()); |
| 339 filterContext->drawImageBuffer(imageBuffer2, | 338 destinationRect.move(-absolutePaintRect().x(), -absolutePaintRect().y())
; |
| 340 FloatRect(destinationPoint, imageBuffer2->size()), &source2Rect); | 339 filterContext->drawImageBuffer(imageBuffer2, destinationRect, &source2Re
ct); |
| 341 filterContext->drawImageBuffer(imageBuffer, | 340 filterContext->drawImageBuffer(imageBuffer, destinationRect, &sourceRect
, CompositeSourceIn); |
| 342 FloatRect(destinationPoint, imageBuffer->size()), &sourceRect, Compo
siteSourceIn); | |
| 343 break; | 341 break; |
| 344 } | 342 } |
| 345 case FECOMPOSITE_OPERATOR_OUT: | 343 case FECOMPOSITE_OPERATOR_OUT: |
| 346 filterContext->drawImageBuffer(imageBuffer, drawingRegionOfInputImage(in
->absolutePaintRect())); | 344 filterContext->drawImageBuffer(imageBuffer, drawingRegionOfInputImage(in
->absolutePaintRect())); |
| 347 filterContext->drawImageBuffer(imageBuffer2, drawingRegionOfInputImage(i
n2->absolutePaintRect()), 0, CompositeDestinationOut); | 345 filterContext->drawImageBuffer(imageBuffer2, drawingRegionOfInputImage(i
n2->absolutePaintRect()), 0, CompositeDestinationOut); |
| 348 break; | 346 break; |
| 349 case FECOMPOSITE_OPERATOR_ATOP: | 347 case FECOMPOSITE_OPERATOR_ATOP: |
| 350 filterContext->drawImageBuffer(imageBuffer2, drawingRegionOfInputImage(i
n2->absolutePaintRect())); | 348 filterContext->drawImageBuffer(imageBuffer2, drawingRegionOfInputImage(i
n2->absolutePaintRect())); |
| 351 filterContext->drawImageBuffer(imageBuffer, drawingRegionOfInputImage(in
->absolutePaintRect()), 0, CompositeSourceAtop); | 349 filterContext->drawImageBuffer(imageBuffer, drawingRegionOfInputImage(in
->absolutePaintRect()), 0, CompositeSourceAtop); |
| 352 break; | 350 break; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 ts << " operation=\"" << m_type << "\""; | 435 ts << " operation=\"" << m_type << "\""; |
| 438 if (m_type == FECOMPOSITE_OPERATOR_ARITHMETIC) | 436 if (m_type == FECOMPOSITE_OPERATOR_ARITHMETIC) |
| 439 ts << " k1=\"" << m_k1 << "\" k2=\"" << m_k2 << "\" k3=\"" << m_k3 << "\
" k4=\"" << m_k4 << "\""; | 437 ts << " k1=\"" << m_k1 << "\" k2=\"" << m_k2 << "\" k3=\"" << m_k3 << "\
" k4=\"" << m_k4 << "\""; |
| 440 ts << "]\n"; | 438 ts << "]\n"; |
| 441 inputEffect(0)->externalRepresentation(ts, indent + 1); | 439 inputEffect(0)->externalRepresentation(ts, indent + 1); |
| 442 inputEffect(1)->externalRepresentation(ts, indent + 1); | 440 inputEffect(1)->externalRepresentation(ts, indent + 1); |
| 443 return ts; | 441 return ts; |
| 444 } | 442 } |
| 445 | 443 |
| 446 } // namespace WebCore | 444 } // namespace WebCore |
| OLD | NEW |