OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h" |
| 6 |
| 7 #include "bindings/modules/v8/UnionTypesModules.h" |
| 8 #include "platform/NotImplemented.h" |
| 9 #include "wtf/Assertions.h" |
| 10 |
| 11 #define UNIMPLEMENTED ASSERT_NOT_REACHED |
| 12 |
| 13 namespace blink { |
| 14 |
| 15 OffscreenCanvasRenderingContext2D::~OffscreenCanvasRenderingContext2D() |
| 16 { |
| 17 } |
| 18 |
| 19 OffscreenCanvasRenderingContext2D::OffscreenCanvasRenderingContext2D(OffscreenCa
nvas* canvas, const CanvasContextCreationAttributes& attrs) |
| 20 : OffscreenCanvasRenderingContext(canvas) |
| 21 , m_hasAlpha(attrs.alpha()) |
| 22 { |
| 23 } |
| 24 |
| 25 DEFINE_TRACE(OffscreenCanvasRenderingContext2D) |
| 26 { |
| 27 OffscreenCanvasRenderingContext::trace(visitor); |
| 28 BaseRenderingContext2D::trace(visitor); |
| 29 } |
| 30 |
| 31 // BaseRenderingContext2D implementation |
| 32 bool OffscreenCanvasRenderingContext2D::originClean() const |
| 33 { |
| 34 notImplemented(); |
| 35 return true; |
| 36 } |
| 37 |
| 38 void OffscreenCanvasRenderingContext2D::setOriginTainted() |
| 39 { |
| 40 notImplemented(); |
| 41 } |
| 42 |
| 43 bool OffscreenCanvasRenderingContext2D::wouldTaintOrigin(CanvasImageSource* sour
ce) |
| 44 { |
| 45 notImplemented(); |
| 46 return false; |
| 47 } |
| 48 |
| 49 int OffscreenCanvasRenderingContext2D::width() const |
| 50 { |
| 51 return offscreenCanvas()->height(); |
| 52 } |
| 53 |
| 54 int OffscreenCanvasRenderingContext2D::height() const |
| 55 { |
| 56 return offscreenCanvas()->width(); |
| 57 } |
| 58 |
| 59 bool OffscreenCanvasRenderingContext2D::hasImageBuffer() const |
| 60 { |
| 61 notImplemented(); |
| 62 return false; |
| 63 } |
| 64 |
| 65 ImageBuffer* OffscreenCanvasRenderingContext2D::imageBuffer() const |
| 66 { |
| 67 notImplemented(); |
| 68 return nullptr; |
| 69 } |
| 70 |
| 71 bool OffscreenCanvasRenderingContext2D::parseColorOrCurrentColor(Color&, const S
tring& colorString) const |
| 72 { |
| 73 notImplemented(); |
| 74 return false; |
| 75 } |
| 76 |
| 77 SkCanvas* OffscreenCanvasRenderingContext2D::drawingCanvas() const |
| 78 { |
| 79 notImplemented(); |
| 80 return nullptr; |
| 81 } |
| 82 |
| 83 SkCanvas* OffscreenCanvasRenderingContext2D::existingDrawingCanvas() const |
| 84 { |
| 85 notImplemented(); |
| 86 return nullptr; |
| 87 } |
| 88 |
| 89 void OffscreenCanvasRenderingContext2D::disableDeferral(DisableDeferralReason) |
| 90 { |
| 91 notImplemented(); |
| 92 } |
| 93 |
| 94 AffineTransform OffscreenCanvasRenderingContext2D::baseTransform() const |
| 95 { |
| 96 notImplemented(); |
| 97 return 0; |
| 98 } |
| 99 |
| 100 void OffscreenCanvasRenderingContext2D::didDraw(const SkIRect& dirtyRect) |
| 101 { |
| 102 notImplemented(); |
| 103 } |
| 104 |
| 105 bool OffscreenCanvasRenderingContext2D::stateHasFilter() |
| 106 { |
| 107 notImplemented(); |
| 108 return false; |
| 109 } |
| 110 |
| 111 SkImageFilter* OffscreenCanvasRenderingContext2D::stateGetFilter() |
| 112 { |
| 113 notImplemented(); |
| 114 return nullptr; |
| 115 } |
| 116 |
| 117 void OffscreenCanvasRenderingContext2D::validateStateStack() |
| 118 { |
| 119 notImplemented(); |
| 120 } |
| 121 |
| 122 bool OffscreenCanvasRenderingContext2D::isContextLost() const |
| 123 { |
| 124 notImplemented(); |
| 125 return false; |
| 126 } |
| 127 |
| 128 } |
OLD | NEW |