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

Side by Side Diff: Source/core/rendering/svg/RenderSVGImage.h

Issue 603053002: Move RenderSVGImage's paint code to SVGImagePainter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/SVGImagePainter.cpp ('k') | Source/core/rendering/svg/RenderSVGImage.cpp » ('j') | 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) 2006 Alexander Kellett <lypanov@kde.org> 2 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Rob Buis <buis@kde.org> 4 * Copyright (C) 2007 Rob Buis <buis@kde.org>
5 * Copyright (C) 2009 Google, Inc. 5 * Copyright (C) 2009 Google, Inc.
6 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 6 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
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 25 matching lines...) Expand all
36 explicit RenderSVGImage(SVGImageElement*); 36 explicit RenderSVGImage(SVGImageElement*);
37 virtual ~RenderSVGImage(); 37 virtual ~RenderSVGImage();
38 virtual void destroy() OVERRIDE; 38 virtual void destroy() OVERRIDE;
39 39
40 bool updateImageViewport(); 40 bool updateImageViewport();
41 virtual void setNeedsBoundariesUpdate() OVERRIDE { m_needsBoundariesUpdate = true; } 41 virtual void setNeedsBoundariesUpdate() OVERRIDE { m_needsBoundariesUpdate = true; }
42 virtual void setNeedsTransformUpdate() OVERRIDE { m_needsTransformUpdate = t rue; } 42 virtual void setNeedsTransformUpdate() OVERRIDE { m_needsTransformUpdate = t rue; }
43 43
44 RenderImageResource* imageResource() { return m_imageResource.get(); } 44 RenderImageResource* imageResource() { return m_imageResource.get(); }
45 45
46 // Note: Assumes the PaintInfo context has had all local transforms applied. 46 virtual const AffineTransform& localToParentTransform() const OVERRIDE { ret urn m_localTransform; }
47 void paintForeground(PaintInfo&); 47 OwnPtr<ImageBuffer>& bufferedForeground() { return m_bufferedForeground; }
f(malita) 2014/10/24 20:11:53 Belated comment: encapsulation-- :( Do we have a
48
49 virtual FloatRect paintInvalidationRectInLocalCoordinates() const OVERRIDE { return m_paintInvalidationBoundingBox; }
50 virtual FloatRect objectBoundingBox() const OVERRIDE { return m_objectBoundi ngBox; }
48 51
49 private: 52 private:
50 virtual const char* renderName() const OVERRIDE { return "RenderSVGImage"; } 53 virtual const char* renderName() const OVERRIDE { return "RenderSVGImage"; }
51 virtual bool isSVGImage() const OVERRIDE { return true; } 54 virtual bool isSVGImage() const OVERRIDE { return true; }
52 55
53 virtual const AffineTransform& localToParentTransform() const OVERRIDE { ret urn m_localTransform; }
54
55 virtual FloatRect objectBoundingBox() const OVERRIDE { return m_objectBoundi ngBox; }
56 virtual FloatRect strokeBoundingBox() const OVERRIDE { return m_objectBoundi ngBox; } 56 virtual FloatRect strokeBoundingBox() const OVERRIDE { return m_objectBoundi ngBox; }
57 virtual FloatRect paintInvalidationRectInLocalCoordinates() const OVERRIDE { return m_paintInvalidationBoundingBox; }
58 57
59 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset, const RenderLayerModelObject* paintContainer) const OVERRIDE; 58 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset, const RenderLayerModelObject* paintContainer) const OVERRIDE;
60 59
61 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE; 60 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE;
62 61
63 virtual void layout() OVERRIDE; 62 virtual void layout() OVERRIDE;
64 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; 63 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE;
65 64
66 bool forceNonUniformScaling(SVGImageElement*) const; 65 bool forceNonUniformScaling(SVGImageElement*) const;
67 void invalidateBufferedForeground(); 66 void invalidateBufferedForeground();
(...skipping 10 matching lines...) Expand all
78 OwnPtr<RenderImageResource> m_imageResource; 77 OwnPtr<RenderImageResource> m_imageResource;
79 78
80 OwnPtr<ImageBuffer> m_bufferedForeground; 79 OwnPtr<ImageBuffer> m_bufferedForeground;
81 }; 80 };
82 81
83 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGImage, isSVGImage()); 82 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGImage, isSVGImage());
84 83
85 } // namespace blink 84 } // namespace blink
86 85
87 #endif // RenderSVGImage_h 86 #endif // RenderSVGImage_h
OLDNEW
« no previous file with comments | « Source/core/paint/SVGImagePainter.cpp ('k') | Source/core/rendering/svg/RenderSVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698