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

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

Issue 659873002: Making display list canvases fall back to gpu-accelerated when appropriate (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: response to comments 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 | « 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 class CanvasContextAttributes; 48 class CanvasContextAttributes;
49 class CanvasRenderingContext; 49 class CanvasRenderingContext;
50 class GraphicsContext; 50 class GraphicsContext;
51 class GraphicsContextStateSaver; 51 class GraphicsContextStateSaver;
52 class HTMLCanvasElement; 52 class HTMLCanvasElement;
53 class Image; 53 class Image;
54 class ImageData; 54 class ImageData;
55 class ImageBuffer; 55 class ImageBuffer;
56 class ImageBufferSurface; 56 class ImageBufferSurface;
57 class IntSize; 57 class IntSize;
58 class RecordingImageBufferFallbackSurfaceFactory;
58 59
59 class CanvasObserver : public WillBeGarbageCollectedMixin { 60 class CanvasObserver : public WillBeGarbageCollectedMixin {
60 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(CanvasObserver); 61 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(CanvasObserver);
61 public: 62 public:
62 virtual void canvasChanged(HTMLCanvasElement*, const FloatRect& changedRect) = 0; 63 virtual void canvasChanged(HTMLCanvasElement*, const FloatRect& changedRect) = 0;
63 virtual void canvasResized(HTMLCanvasElement*) = 0; 64 virtual void canvasResized(HTMLCanvasElement*) = 0;
64 #if !ENABLE(OILPAN) 65 #if !ENABLE(OILPAN)
65 virtual void canvasDestroyed(HTMLCanvasElement*) = 0; 66 virtual void canvasDestroyed(HTMLCanvasElement*) = 0;
66 #endif 67 #endif
67 68
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 168
168 private: 169 private:
169 explicit HTMLCanvasElement(Document&); 170 explicit HTMLCanvasElement(Document&);
170 171
171 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide; 172 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide;
172 virtual RenderObject* createRenderer(RenderStyle*) override; 173 virtual RenderObject* createRenderer(RenderStyle*) override;
173 virtual bool areAuthorShadowsAllowed() const override { return false; } 174 virtual bool areAuthorShadowsAllowed() const override { return false; }
174 175
175 void reset(); 176 void reset();
176 177
178 PassOwnPtr<RecordingImageBufferFallbackSurfaceFactory> createSurfaceFactory( const IntSize& deviceSize, int* msaaSampleCount) const;
177 PassOwnPtr<ImageBufferSurface> createImageBufferSurface(const IntSize& devic eSize, int* msaaSampleCount); 179 PassOwnPtr<ImageBufferSurface> createImageBufferSurface(const IntSize& devic eSize, int* msaaSampleCount);
178 void createImageBuffer(); 180 void createImageBuffer();
179 void createImageBufferInternal(); 181 void createImageBufferInternal();
180 void clearImageBuffer(); 182 void clearImageBuffer();
181 183
182 void resetDirtyRect(); 184 void resetDirtyRect();
183 185
184 void setSurfaceSize(const IntSize&); 186 void setSurfaceSize(const IntSize&);
185 187
186 bool paintsIntoCanvasBuffer() const; 188 bool paintsIntoCanvasBuffer() const;
(...skipping 23 matching lines...) Expand all
210 OwnPtr<ImageBuffer> m_imageBuffer; 212 OwnPtr<ImageBuffer> m_imageBuffer;
211 mutable OwnPtr<GraphicsContextStateSaver> m_contextStateSaver; 213 mutable OwnPtr<GraphicsContextStateSaver> m_contextStateSaver;
212 214
213 mutable RefPtr<Image> m_presentedImage; 215 mutable RefPtr<Image> m_presentedImage;
214 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue). 216 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue).
215 }; 217 };
216 218
217 } // namespace blink 219 } // namespace blink
218 220
219 #endif // HTMLCanvasElement_h 221 #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