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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.h

Issue 1767633002: Support canvas size as default object size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-default-object-size
Patch Set: Save image size on stack Created 4 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 const AtomicString imageSourceURL() const override; 146 const AtomicString imageSourceURL() const override;
147 147
148 InsertionNotificationRequest insertedInto(ContainerNode*) override; 148 InsertionNotificationRequest insertedInto(ContainerNode*) override;
149 149
150 // DocumentVisibilityObserver implementation 150 // DocumentVisibilityObserver implementation
151 void didChangeVisibilityState(PageVisibilityState) override; 151 void didChangeVisibilityState(PageVisibilityState) override;
152 void willDetachDocument() override; 152 void willDetachDocument() override;
153 153
154 // CanvasImageSource implementation 154 // CanvasImageSource implementation
155 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, AccelerationHi nt, SnapshotReason) const override; 155 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, AccelerationHi nt, SnapshotReason, const FloatSize&) const override;
156 bool wouldTaintOrigin(SecurityOrigin*) const override; 156 bool wouldTaintOrigin(SecurityOrigin*) const override;
157 FloatSize elementSize() const override; 157 FloatSize elementSize(const FloatSize&) const override;
158 bool isCanvasElement() const override { return true; } 158 bool isCanvasElement() const override { return true; }
159 bool isOpaque() const override; 159 bool isOpaque() const override;
160 160
161 // ImageBufferClient implementation 161 // ImageBufferClient implementation
162 void notifySurfaceInvalid() override; 162 void notifySurfaceInvalid() override;
163 bool isDirty() override { return !m_dirtyRect.isEmpty(); } 163 bool isDirty() override { return !m_dirtyRect.isEmpty(); }
164 void didFinalizeFrame() override; 164 void didFinalizeFrame() override;
165 void restoreCanvasMatrixClipStack(SkCanvas*) const override; 165 void restoreCanvasMatrixClipStack(SkCanvas*) const override;
166 166
167 void doDeferredPaintInvalidation(); 167 void doDeferredPaintInvalidation();
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 mutable bool m_didFailToCreateImageBuffer; 230 mutable bool m_didFailToCreateImageBuffer;
231 bool m_imageBufferIsClear; 231 bool m_imageBufferIsClear;
232 OwnPtr<ImageBuffer> m_imageBuffer; 232 OwnPtr<ImageBuffer> m_imageBuffer;
233 233
234 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue). 234 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue).
235 }; 235 };
236 236
237 } // namespace blink 237 } // namespace blink
238 238
239 #endif // HTMLCanvasElement_h 239 #endif // HTMLCanvasElement_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/ImageBitmap.cpp ('k') | third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698