| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ImageBitmapRenderingContext_h | 5 #ifndef ImageBitmapRenderingContext_h |
| 6 #define ImageBitmapRenderingContext_h | 6 #define ImageBitmapRenderingContext_h |
| 7 | 7 |
| 8 #include "core/html/canvas/CanvasRenderingContext.h" | 8 #include "core/html/canvas/CanvasRenderingContext.h" |
| 9 #include "core/html/canvas/CanvasRenderingContextFactory.h" | 9 #include "core/html/canvas/CanvasRenderingContextFactory.h" |
| 10 #include "modules/ModulesExport.h" | 10 #include "modules/ModulesExport.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 CanvasRenderingContext* create(HTMLCanvasElement*, | 29 CanvasRenderingContext* create(HTMLCanvasElement*, |
| 30 const CanvasContextCreationAttributes&, | 30 const CanvasContextCreationAttributes&, |
| 31 Document&) override; | 31 Document&) override; |
| 32 CanvasRenderingContext::ContextType getContextType() const override { | 32 CanvasRenderingContext::ContextType getContextType() const override { |
| 33 return CanvasRenderingContext::ContextImageBitmap; | 33 return CanvasRenderingContext::ContextImageBitmap; |
| 34 } | 34 } |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 // Script API | 37 // Script API |
| 38 void transferFromImageBitmap(ImageBitmap*, ExceptionState&); | 38 void transferFromImageBitmap(ImageBitmap*); |
| 39 | 39 |
| 40 // CanvasRenderingContext implementation | 40 // CanvasRenderingContext implementation |
| 41 ContextType getContextType() const override { | 41 ContextType getContextType() const override { |
| 42 return CanvasRenderingContext::ContextImageBitmap; | 42 return CanvasRenderingContext::ContextImageBitmap; |
| 43 } | 43 } |
| 44 void setIsHidden(bool) override {} | 44 void setIsHidden(bool) override {} |
| 45 bool isContextLost() const override { return false; } | 45 bool isContextLost() const override { return false; } |
| 46 bool paint(GraphicsContext&, const IntRect&) override; | 46 bool paint(GraphicsContext&, const IntRect&) override; |
| 47 void setCanvasGetContextResult(RenderingContext&) final; | 47 void setCanvasGetContextResult(RenderingContext&) final; |
| 48 PassRefPtr<Image> getImage(AccelerationHint, SnapshotReason) const final { | 48 PassRefPtr<Image> getImage(AccelerationHint, SnapshotReason) const final { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 72 CanvasRenderingContext, | 72 CanvasRenderingContext, |
| 73 context, | 73 context, |
| 74 context->getContextType() == | 74 context->getContextType() == |
| 75 CanvasRenderingContext::ContextImageBitmap, | 75 CanvasRenderingContext::ContextImageBitmap, |
| 76 context.getContextType() == | 76 context.getContextType() == |
| 77 CanvasRenderingContext::ContextImageBitmap); | 77 CanvasRenderingContext::ContextImageBitmap); |
| 78 | 78 |
| 79 } // blink | 79 } // blink |
| 80 | 80 |
| 81 #endif | 81 #endif |
| OLD | NEW |