| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 void stop() override; | 46 void stop() override; |
| 47 | 47 |
| 48 virtual ~ImageBitmapRenderingContext(); | 48 virtual ~ImageBitmapRenderingContext(); |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 ImageBitmapRenderingContext(HTMLCanvasElement*, CanvasContextCreationAttribu
tes, Document&); | 51 ImageBitmapRenderingContext(HTMLCanvasElement*, CanvasContextCreationAttribu
tes, Document&); |
| 52 | 52 |
| 53 bool m_hasAlpha; | 53 bool m_hasAlpha; |
| 54 RefPtr<Image> m_image; | 54 RefPtr<Image> m_image; |
| 55 |
| 56 bool isPaintable() const final { return m_image.get(); } |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 DEFINE_TYPE_CASTS(ImageBitmapRenderingContext, CanvasRenderingContext, context, | 59 DEFINE_TYPE_CASTS(ImageBitmapRenderingContext, CanvasRenderingContext, context, |
| 58 context->getContextType() == CanvasRenderingContext::ContextImageBitmap, | 60 context->getContextType() == CanvasRenderingContext::ContextImageBitmap, |
| 59 context.getContextType() == CanvasRenderingContext::ContextImageBitmap); | 61 context.getContextType() == CanvasRenderingContext::ContextImageBitmap); |
| 60 | 62 |
| 61 } // blink | 63 } // blink |
| 62 | 64 |
| 63 #endif | 65 #endif |
| OLD | NEW |