Chromium Code Reviews| 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 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 124 { | 124 { |
| 125 IntRect paintRect = filter->sourceImageRect(); | 125 IntRect paintRect = filter->sourceImageRect(); |
| 126 // Don't create empty ImageBuffers. | 126 // Don't create empty ImageBuffers. |
| 127 if (paintRect.isEmpty()) | 127 if (paintRect.isEmpty()) |
| 128 return false; | 128 return false; |
| 129 | 129 |
| 130 OwnPtr<ImageBufferSurface> surface = adoptPtr(new UnacceleratedImageBufferSu rface(paintRect.size())); | 130 OwnPtr<ImageBufferSurface> surface = adoptPtr(new UnacceleratedImageBufferSu rface(paintRect.size())); |
| 131 if (!surface->isValid()) | 131 if (!surface->isValid()) |
| 132 return false; | 132 return false; |
| 133 OwnPtr<ImageBuffer> image = ImageBuffer::create(surface.release()); | 133 OwnPtr<ImageBuffer> image = ImageBuffer::create(surface.release()); |
| 134 if (!image) | |
|
Stephen White
2014/09/12 19:12:20
This change seems harmless, but note that this cod
sivag
2014/09/12 20:52:06
Thanks Stephen. Please let me know if some changes
| |
| 135 return false; | |
| 134 | 136 |
| 135 GraphicsContext* imageContext = image->context(); | 137 GraphicsContext* imageContext = image->context(); |
| 136 ASSERT(imageContext); | 138 ASSERT(imageContext); |
| 137 | 139 |
| 138 imageContext->translate(-paintRect.x(), -paintRect.y()); | 140 imageContext->translate(-paintRect.x(), -paintRect.y()); |
| 139 imageContext->concatCTM(filter->absoluteTransform()); | 141 imageContext->concatCTM(filter->absoluteTransform()); |
| 140 imageBuffer = image.release(); | 142 imageBuffer = image.release(); |
| 141 return true; | 143 return true; |
| 142 } | 144 } |
| 143 | 145 |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 446 markAllClientLayersForInvalidation(); | 448 markAllClientLayersForInvalidation(); |
| 447 } | 449 } |
| 448 | 450 |
| 449 FloatRect RenderSVGResourceFilter::drawingRegion(RenderObject* object) const | 451 FloatRect RenderSVGResourceFilter::drawingRegion(RenderObject* object) const |
| 450 { | 452 { |
| 451 FilterData* filterData = m_filter.get(object); | 453 FilterData* filterData = m_filter.get(object); |
| 452 return filterData ? filterData->drawingRegion : FloatRect(); | 454 return filterData ? filterData->drawingRegion : FloatRect(); |
| 453 } | 455 } |
| 454 | 456 |
| 455 } | 457 } |
| OLD | NEW |