| 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 OffscreenCanvasRenderingContext2D_h | 5 #ifndef OffscreenCanvasRenderingContext2D_h |
| 6 #define OffscreenCanvasRenderingContext2D_h | 6 #define OffscreenCanvasRenderingContext2D_h |
| 7 | 7 |
| 8 #include "core/html/canvas/CanvasContextCreationAttributes.h" | 8 #include "core/html/canvas/CanvasContextCreationAttributes.h" |
| 9 #include "core/html/canvas/CanvasRenderingContext.h" | 9 #include "core/html/canvas/CanvasRenderingContext.h" |
| 10 #include "core/html/canvas/CanvasRenderingContextFactory.h" | 10 #include "core/html/canvas/CanvasRenderingContextFactory.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 sk_sp<SkImageFilter> StateGetFilter() final; | 89 sk_sp<SkImageFilter> StateGetFilter() final; |
| 90 void SnapshotStateForFilter() final {} | 90 void SnapshotStateForFilter() final {} |
| 91 | 91 |
| 92 void ValidateStateStack() const final; | 92 void ValidateStateStack() const final; |
| 93 | 93 |
| 94 bool HasAlpha() const final { return CreationAttributes().alpha(); } | 94 bool HasAlpha() const final { return CreationAttributes().alpha(); } |
| 95 bool isContextLost() const override; | 95 bool isContextLost() const override; |
| 96 | 96 |
| 97 ImageBitmap* TransferToImageBitmap(ScriptState*) final; | 97 ImageBitmap* TransferToImageBitmap(ScriptState*) final; |
| 98 | 98 |
| 99 ColorBehavior DrawImageColorBehavior() const final; | |
| 100 | |
| 101 protected: | 99 protected: |
| 102 OffscreenCanvasRenderingContext2D( | 100 OffscreenCanvasRenderingContext2D( |
| 103 ScriptState*, | 101 ScriptState*, |
| 104 OffscreenCanvas*, | 102 OffscreenCanvas*, |
| 105 const CanvasContextCreationAttributes& attrs); | 103 const CanvasContextCreationAttributes& attrs); |
| 106 DECLARE_VIRTUAL_TRACE(); | 104 DECLARE_VIRTUAL_TRACE(); |
| 107 | 105 |
| 108 virtual void NeedsFinalizeFrame() { | 106 virtual void NeedsFinalizeFrame() { |
| 109 CanvasRenderingContext::NeedsFinalizeFrame(); | 107 CanvasRenderingContext::NeedsFinalizeFrame(); |
| 110 } | 108 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 121 | 119 |
| 122 DEFINE_TYPE_CASTS(OffscreenCanvasRenderingContext2D, | 120 DEFINE_TYPE_CASTS(OffscreenCanvasRenderingContext2D, |
| 123 CanvasRenderingContext, | 121 CanvasRenderingContext, |
| 124 context, | 122 context, |
| 125 context->Is2d() && context->host(), | 123 context->Is2d() && context->host(), |
| 126 context.Is2d() && context.host()); | 124 context.Is2d() && context.host()); |
| 127 | 125 |
| 128 } // namespace blink | 126 } // namespace blink |
| 129 | 127 |
| 130 #endif // OffscreenCanvasRenderingContext2D_h | 128 #endif // OffscreenCanvasRenderingContext2D_h |
| OLD | NEW |