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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "core/page/PageVisibilityObserver.h" | 43 #include "core/page/PageVisibilityObserver.h" |
44 #include "platform/bindings/ScriptWrappableVisitor.h" | 44 #include "platform/bindings/ScriptWrappableVisitor.h" |
45 #include "platform/geometry/FloatRect.h" | 45 #include "platform/geometry/FloatRect.h" |
46 #include "platform/geometry/IntSize.h" | 46 #include "platform/geometry/IntSize.h" |
47 #include "platform/graphics/CanvasSurfaceLayerBridge.h" | 47 #include "platform/graphics/CanvasSurfaceLayerBridge.h" |
48 #include "platform/graphics/GraphicsTypes.h" | 48 #include "platform/graphics/GraphicsTypes.h" |
49 #include "platform/graphics/GraphicsTypes3D.h" | 49 #include "platform/graphics/GraphicsTypes3D.h" |
50 #include "platform/graphics/ImageBufferClient.h" | 50 #include "platform/graphics/ImageBufferClient.h" |
51 #include "platform/graphics/OffscreenCanvasPlaceholder.h" | 51 #include "platform/graphics/OffscreenCanvasPlaceholder.h" |
52 #include "platform/heap/Handle.h" | 52 #include "platform/heap/Handle.h" |
| 53 #include "third_party/WebKit/public/platform/WebSurfaceLayerBridgeObserver.h" |
53 | 54 |
54 #define CanvasDefaultInterpolationQuality kInterpolationLow | 55 #define CanvasDefaultInterpolationQuality kInterpolationLow |
55 | 56 |
56 namespace blink { | 57 namespace blink { |
57 | 58 |
58 class AffineTransform; | 59 class AffineTransform; |
59 class CanvasColorParams; | 60 class CanvasColorParams; |
60 class CanvasContextCreationAttributes; | 61 class CanvasContextCreationAttributes; |
61 class CanvasRenderingContext; | 62 class CanvasRenderingContext; |
62 class CanvasRenderingContextFactory; | 63 class CanvasRenderingContextFactory; |
(...skipping 11 matching lines...) Expand all Loading... |
74 CanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContextOrIma
geBitmapRenderingContext; | 75 CanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContextOrIma
geBitmapRenderingContext; |
75 typedef CanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContextO
rImageBitmapRenderingContext | 76 typedef CanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContextO
rImageBitmapRenderingContext |
76 RenderingContext; | 77 RenderingContext; |
77 | 78 |
78 class CORE_EXPORT HTMLCanvasElement final | 79 class CORE_EXPORT HTMLCanvasElement final |
79 : public HTMLElement, | 80 : public HTMLElement, |
80 public ContextLifecycleObserver, | 81 public ContextLifecycleObserver, |
81 public PageVisibilityObserver, | 82 public PageVisibilityObserver, |
82 public CanvasImageSource, | 83 public CanvasImageSource, |
83 public CanvasRenderingContextHost, | 84 public CanvasRenderingContextHost, |
84 public CanvasSurfaceLayerBridgeObserver, | 85 public WebSurfaceLayerBridgeObserver, |
85 public ImageBufferClient, | 86 public ImageBufferClient, |
86 public ImageBitmapSource, | 87 public ImageBitmapSource, |
87 public OffscreenCanvasPlaceholder { | 88 public OffscreenCanvasPlaceholder { |
88 DEFINE_WRAPPERTYPEINFO(); | 89 DEFINE_WRAPPERTYPEINFO(); |
89 USING_GARBAGE_COLLECTED_MIXIN(HTMLCanvasElement); | 90 USING_GARBAGE_COLLECTED_MIXIN(HTMLCanvasElement); |
90 USING_PRE_FINALIZER(HTMLCanvasElement, Dispose); | 91 USING_PRE_FINALIZER(HTMLCanvasElement, Dispose); |
91 | 92 |
92 public: | 93 public: |
93 using Node::GetExecutionContext; | 94 using Node::GetExecutionContext; |
94 | 95 |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 | 339 |
339 // Used for OffscreenCanvas that controls this HTML canvas element | 340 // Used for OffscreenCanvas that controls this HTML canvas element |
340 std::unique_ptr<CanvasSurfaceLayerBridge> surface_layer_bridge_; | 341 std::unique_ptr<CanvasSurfaceLayerBridge> surface_layer_bridge_; |
341 | 342 |
342 bool did_notify_listeners_for_current_frame_ = false; | 343 bool did_notify_listeners_for_current_frame_ = false; |
343 }; | 344 }; |
344 | 345 |
345 } // namespace blink | 346 } // namespace blink |
346 | 347 |
347 #endif // HTMLCanvasElement_h | 348 #endif // HTMLCanvasElement_h |
OLD | NEW |