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

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

Issue 1297663002: Eliminate deferral overhead with canvas to canvas draws (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: git cl web Created 5 years, 4 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 | « no previous file | Source/core/html/HTMLCanvasElement.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) 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 String toDataURL(const String& mimeType, const ScriptValue& qualityArgument, ExceptionState&) const; 113 String toDataURL(const String& mimeType, const ScriptValue& qualityArgument, ExceptionState&) const;
114 String toDataURL(const String& mimeType, ExceptionState& exceptionState) con st { return toDataURL(mimeType, ScriptValue(), exceptionState); } 114 String toDataURL(const String& mimeType, ExceptionState& exceptionState) con st { return toDataURL(mimeType, ScriptValue(), exceptionState); }
115 115
116 // Used for rendering 116 // Used for rendering
117 void didDraw(const FloatRect&); 117 void didDraw(const FloatRect&);
118 void notifyObserversCanvasChanged(const FloatRect&); 118 void notifyObserversCanvasChanged(const FloatRect&);
119 119
120 void paint(GraphicsContext*, const LayoutRect&); 120 void paint(GraphicsContext*, const LayoutRect&);
121 121
122 SkCanvas* drawingCanvas() const; 122 SkCanvas* drawingCanvas() const;
123 SkCanvas* immediateDrawingCanvas() const; // Guarantees draws will not be de ferred. Use sparingly. 123 void disableDeferral() const;
124 SkCanvas* existingDrawingCanvas() const; 124 SkCanvas* existingDrawingCanvas() const;
125 125
126 void setRenderingContext(PassOwnPtrWillBeRawPtr<CanvasRenderingContext>); 126 void setRenderingContext(PassOwnPtrWillBeRawPtr<CanvasRenderingContext>);
127 CanvasRenderingContext* renderingContext() const { return m_context.get(); } 127 CanvasRenderingContext* renderingContext() const { return m_context.get(); }
128 128
129 void ensureUnacceleratedImageBuffer(); 129 void ensureUnacceleratedImageBuffer();
130 ImageBuffer* buffer() const; 130 ImageBuffer* buffer() const;
131 PassRefPtr<Image> copiedImage(SourceDrawingBuffer) const; 131 PassRefPtr<Image> copiedImage(SourceDrawingBuffer) const;
132 void clearCopiedImage(); 132 void clearCopiedImage();
133 133
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 mutable bool m_didFailToCreateImageBuffer; 225 mutable bool m_didFailToCreateImageBuffer;
226 bool m_imageBufferIsClear; 226 bool m_imageBufferIsClear;
227 OwnPtr<ImageBuffer> m_imageBuffer; 227 OwnPtr<ImageBuffer> m_imageBuffer;
228 228
229 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue). 229 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue).
230 }; 230 };
231 231
232 } // namespace blink 232 } // namespace blink
233 233
234 #endif // HTMLCanvasElement_h 234 #endif // HTMLCanvasElement_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698