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

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/SVGImage.h

Issue 2500533003: Cache display items from SVGImage contents. (Closed)
Patch Set: none Created 4 years, 1 month 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 | « no previous file | third_party/WebKit/Source/core/svg/graphics/SVGImage.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 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org>
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 20 matching lines...) Expand all
31 #include "platform/graphics/Image.h" 31 #include "platform/graphics/Image.h"
32 #include "platform/heap/Handle.h" 32 #include "platform/heap/Handle.h"
33 #include "platform/weborigin/KURL.h" 33 #include "platform/weborigin/KURL.h"
34 #include "third_party/skia/include/core/SkRefCnt.h" 34 #include "third_party/skia/include/core/SkRefCnt.h"
35 #include "wtf/Allocator.h" 35 #include "wtf/Allocator.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class Document; 39 class Document;
40 class Page; 40 class Page;
41 class PaintController;
41 class LayoutReplaced; 42 class LayoutReplaced;
42 class SVGImageChromeClient; 43 class SVGImageChromeClient;
43 class SVGImageForContainer; 44 class SVGImageForContainer;
44 45
45 // SVGImage does not use Skia to draw images (as BitmapImage does) but instead 46 // SVGImage does not use Skia to draw images (as BitmapImage does) but instead
46 // handles drawing itself. Internally, SVGImage creates a detached & sandboxed 47 // handles drawing itself. Internally, SVGImage creates a detached & sandboxed
47 // Page containing an SVGDocument and reuses the existing paint code in Blink to 48 // Page containing an SVGDocument and reuses the existing paint code in Blink to
48 // draw the image. Because a single SVGImage can be referenced by multiple 49 // draw the image. Because a single SVGImage can be referenced by multiple
49 // containers (see: SVGImageForContainer.h), each call to SVGImage::draw() may 50 // containers (see: SVGImageForContainer.h), each call to SVGImage::draw() may
50 // require (re-)laying out the inner SVGDocument. 51 // require (re-)laying out the inner SVGDocument.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 RespectImageOrientationEnum, 152 RespectImageOrientationEnum,
152 ImageClampingMode, 153 ImageClampingMode,
153 const KURL&); 154 const KURL&);
154 155
155 void stopAnimation(); 156 void stopAnimation();
156 void scheduleTimelineRewind(); 157 void scheduleTimelineRewind();
157 void flushPendingTimelineRewind(); 158 void flushPendingTimelineRewind();
158 159
159 Persistent<SVGImageChromeClient> m_chromeClient; 160 Persistent<SVGImageChromeClient> m_chromeClient;
160 Persistent<Page> m_page; 161 Persistent<Page> m_page;
162 std::unique_ptr<PaintController> m_paintController;
161 163
162 // When an SVG image has no intrinsic size, the size depends on the default 164 // When an SVG image has no intrinsic size, the size depends on the default
163 // object size, which in turn depends on the container. One SVGImage may 165 // object size, which in turn depends on the container. One SVGImage may
164 // belong to multiple containers so the final image size can't be known in 166 // belong to multiple containers so the final image size can't be known in
165 // SVGImage. SVGImageForContainer carries the final image size, also called 167 // SVGImage. SVGImageForContainer carries the final image size, also called
166 // the "concrete object size". For more, see: SVGImageForContainer.h 168 // the "concrete object size". For more, see: SVGImageForContainer.h
167 IntSize m_intrinsicSize; 169 IntSize m_intrinsicSize;
168 bool m_hasPendingTimelineRewind; 170 bool m_hasPendingTimelineRewind;
169 }; 171 };
170 172
(...skipping 10 matching lines...) Expand all
181 183
182 ~ImageObserverDisabler() { m_image->setImageObserverDisabled(false); } 184 ~ImageObserverDisabler() { m_image->setImageObserverDisabled(false); }
183 185
184 private: 186 private:
185 Image* m_image; 187 Image* m_image;
186 }; 188 };
187 189
188 } // namespace blink 190 } // namespace blink
189 191
190 #endif // SVGImage_h 192 #endif // SVGImage_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698