Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /** | 1 /** |
| 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007 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) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * Copyright (C) 2012 Zoltan Herczeg <zherczeg@webkit.org>. | 7 * Copyright (C) 2012 Zoltan Herczeg <zherczeg@webkit.org>. |
| 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 |
| 11 * License as published by the Free Software Foundation; either | 11 * License as published by the Free Software Foundation; either |
| 12 * version 2 of the License, or (at your option) any later version. | 12 * version 2 of the License, or (at your option) any later version. |
| 13 * | 13 * |
| 14 * This library is distributed in the hope that it will be useful, | 14 * This library is distributed in the hope that it will be useful, |
| 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 17 * Library General Public License for more details. | 17 * Library General Public License for more details. |
| 18 * | 18 * |
| 19 * You should have received a copy of the GNU Library General Public License | 19 * You should have received a copy of the GNU Library General Public License |
| 20 * along with this library; see the file COPYING.LIB. If not, write to | 20 * along with this library; see the file COPYING.LIB. If not, write to |
| 21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 22 * Boston, MA 02110-1301, USA. | 22 * Boston, MA 02110-1301, USA. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef SVGPaintContext_h | 25 #ifndef SVGPaintContext_h |
| 26 #define SVGPaintContext_h | 26 #define SVGPaintContext_h |
| 27 | 27 |
| 28 #include "core/layout/PaintInfo.h" | 28 #include "core/layout/PaintInfo.h" |
| 29 #include "core/layout/svg/LayoutSVGResourceClipper.h" | 29 #include "core/layout/svg/LayoutSVGResourceClipper.h" |
| 30 #include "core/layout/svg/LayoutSVGResourcePaintServer.h" | |
| 30 #include "core/paint/CompositingRecorder.h" | 31 #include "core/paint/CompositingRecorder.h" |
| 31 #include "core/paint/FloatClipRecorder.h" | 32 #include "core/paint/FloatClipRecorder.h" |
| 32 #include "core/paint/SVGClipPainter.h" | 33 #include "core/paint/SVGClipPainter.h" |
| 33 #include "platform/graphics/paint/ClipPathRecorder.h" | 34 #include "platform/graphics/paint/ClipPathRecorder.h" |
| 34 #include "platform/transforms/AffineTransform.h" | 35 #include "platform/transforms/AffineTransform.h" |
| 35 | 36 |
| 36 namespace blink { | 37 namespace blink { |
| 37 | 38 |
| 38 class LayoutObject; | 39 class LayoutObject; |
| 39 class LayoutSVGResourceFilter; | 40 class LayoutSVGResourceFilter; |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 58 | 59 |
| 59 ~SVGPaintContext(); | 60 ~SVGPaintContext(); |
| 60 | 61 |
| 61 PaintInfo& paintInfo() { return m_paintInfo; } | 62 PaintInfo& paintInfo() { return m_paintInfo; } |
| 62 | 63 |
| 63 // Return true if these operations aren't necessary or if they are successfu lly applied. | 64 // Return true if these operations aren't necessary or if they are successfu lly applied. |
| 64 bool applyClipMaskAndFilterIfNecessary(); | 65 bool applyClipMaskAndFilterIfNecessary(); |
| 65 | 66 |
| 66 static void paintSubtree(GraphicsContext*, LayoutObject*); | 67 static void paintSubtree(GraphicsContext*, LayoutObject*); |
| 67 | 68 |
| 69 // TODO(fs): This functions feels a bit misplaced (we don't want this to | |
| 70 // turn into the new kitchen sink). Move it if a better location surfaces. | |
| 71 static bool paintForLayoutObject(const PaintInfo&, const ComputedStyle&, Lay outObject&, LayoutSVGResourceMode, SkPaint&, const AffineTransform* additionalPa intServerTransform = nullptr); | |
|
f(malita)
2015/04/08 14:49:14
I wonder if at some point we'll be able to just fo
fs
2015/04/08 15:03:39
Yes, I hope it'll be possible to merge this with S
| |
| 72 | |
| 68 private: | 73 private: |
| 69 void applyCompositingIfNecessary(); | 74 void applyCompositingIfNecessary(); |
| 70 | 75 |
| 71 // Return true if no clipping is necessary or if the clip is successfully ap plied. | 76 // Return true if no clipping is necessary or if the clip is successfully ap plied. |
| 72 bool applyClipIfNecessary(SVGResources*); | 77 bool applyClipIfNecessary(SVGResources*); |
| 73 | 78 |
| 74 // Return true if no masking is necessary or if the mask is successfully app lied. | 79 // Return true if no masking is necessary or if the mask is successfully app lied. |
| 75 bool applyMaskIfNecessary(SVGResources*); | 80 bool applyMaskIfNecessary(SVGResources*); |
| 76 | 81 |
| 77 // Return true if no filtering is necessary or if the filter is successfully applied. | 82 // Return true if no filtering is necessary or if the filter is successfully applied. |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 90 OwnPtr<FloatClipRecorder> m_clipRecorder; | 95 OwnPtr<FloatClipRecorder> m_clipRecorder; |
| 91 OwnPtr<ClipPathRecorder> m_clipPathRecorder; | 96 OwnPtr<ClipPathRecorder> m_clipPathRecorder; |
| 92 #if ENABLE(ASSERT) | 97 #if ENABLE(ASSERT) |
| 93 bool m_applyClipMaskAndFilterIfNecessaryCalled; | 98 bool m_applyClipMaskAndFilterIfNecessaryCalled; |
| 94 #endif | 99 #endif |
| 95 }; | 100 }; |
| 96 | 101 |
| 97 } // namespace blink | 102 } // namespace blink |
| 98 | 103 |
| 99 #endif // SVGPaintContext_h | 104 #endif // SVGPaintContext_h |
| OLD | NEW |