| OLD | NEW |
| 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 27 matching lines...) Expand all Loading... |
| 38 namespace WebCore { | 38 namespace WebCore { |
| 39 | 39 |
| 40 class CanvasContextAttributes; | 40 class CanvasContextAttributes; |
| 41 class CanvasRenderingContext; | 41 class CanvasRenderingContext; |
| 42 class GraphicsContext; | 42 class GraphicsContext; |
| 43 class GraphicsContextStateSaver; | 43 class GraphicsContextStateSaver; |
| 44 class HTMLCanvasElement; | 44 class HTMLCanvasElement; |
| 45 class Image; | 45 class Image; |
| 46 class ImageData; | 46 class ImageData; |
| 47 class ImageBuffer; | 47 class ImageBuffer; |
| 48 class ImageBufferSurface; |
| 48 class IntSize; | 49 class IntSize; |
| 49 | 50 |
| 50 class CanvasObserver { | 51 class CanvasObserver { |
| 51 public: | 52 public: |
| 52 virtual ~CanvasObserver() { } | 53 virtual ~CanvasObserver() { } |
| 53 | 54 |
| 54 virtual void canvasChanged(HTMLCanvasElement*, const FloatRect& changedRect)
= 0; | 55 virtual void canvasChanged(HTMLCanvasElement*, const FloatRect& changedRect)
= 0; |
| 55 virtual void canvasResized(HTMLCanvasElement*) = 0; | 56 virtual void canvasResized(HTMLCanvasElement*) = 0; |
| 56 virtual void canvasDestroyed(HTMLCanvasElement*) = 0; | 57 virtual void canvasDestroyed(HTMLCanvasElement*) = 0; |
| 57 }; | 58 }; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 129 |
| 129 private: | 130 private: |
| 130 explicit HTMLCanvasElement(Document&); | 131 explicit HTMLCanvasElement(Document&); |
| 131 | 132 |
| 132 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 133 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
| 133 virtual RenderObject* createRenderer(RenderStyle*); | 134 virtual RenderObject* createRenderer(RenderStyle*); |
| 134 virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; } | 135 virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; } |
| 135 | 136 |
| 136 void reset(); | 137 void reset(); |
| 137 | 138 |
| 139 PassOwnPtr<ImageBufferSurface> createImageBufferSurface(const IntSize& devic
eSize, int* msaaSampleCount); |
| 138 void createImageBuffer(); | 140 void createImageBuffer(); |
| 139 void clearImageBuffer(); | 141 void clearImageBuffer(); |
| 140 | 142 |
| 141 void setSurfaceSize(const IntSize&); | 143 void setSurfaceSize(const IntSize&); |
| 142 IntSize convertLogicalToDevice(const IntSize&) const; | 144 IntSize convertLogicalToDevice(const IntSize&) const; |
| 143 | 145 |
| 144 bool paintsIntoCanvasBuffer() const; | 146 bool paintsIntoCanvasBuffer() const; |
| 145 | 147 |
| 146 void setExternallyAllocatedMemory(intptr_t); | 148 void setExternallyAllocatedMemory(intptr_t); |
| 147 | 149 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 171 | 173 |
| 172 mutable RefPtr<Image> m_presentedImage; | 174 mutable RefPtr<Image> m_presentedImage; |
| 173 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor
ms that have to copy the image buffer to render (and for CSSCanvasValue). | 175 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor
ms that have to copy the image buffer to render (and for CSSCanvasValue). |
| 174 }; | 176 }; |
| 175 | 177 |
| 176 DEFINE_NODE_TYPE_CASTS(HTMLCanvasElement, hasTagName(HTMLNames::canvasTag)); | 178 DEFINE_NODE_TYPE_CASTS(HTMLCanvasElement, hasTagName(HTMLNames::canvasTag)); |
| 177 | 179 |
| 178 } //namespace | 180 } //namespace |
| 179 | 181 |
| 180 #endif | 182 #endif |
| OLD | NEW |