| 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 PaintRenderingContext2D_h | 5 #ifndef PaintRenderingContext2D_h |
| 6 #define PaintRenderingContext2D_h | 6 #define PaintRenderingContext2D_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
| 10 #include "modules/canvas2d/BaseRenderingContext2D.h" | 10 #include "modules/canvas2d/BaseRenderingContext2D.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 { | 26 { |
| 27 return new PaintRenderingContext2D(std::move(imageBuffer)); | 27 return new PaintRenderingContext2D(std::move(imageBuffer)); |
| 28 } | 28 } |
| 29 | 29 |
| 30 // BaseRenderingContext2D | 30 // BaseRenderingContext2D |
| 31 | 31 |
| 32 // PaintRenderingContext2D doesn't have any pixel readback so the origin | 32 // PaintRenderingContext2D doesn't have any pixel readback so the origin |
| 33 // is always clean, and unable to taint it. | 33 // is always clean, and unable to taint it. |
| 34 bool originClean() const final { return true; } | 34 bool originClean() const final { return true; } |
| 35 void setOriginTainted() final { } | 35 void setOriginTainted() final { } |
| 36 bool wouldTaintOrigin(CanvasImageSource*, ScriptState*) final { return false
; } | 36 bool wouldTaintOrigin(CanvasImageSource*, ExecutionContext*) final { return
false; } |
| 37 | 37 |
| 38 int width() const final; | 38 int width() const final; |
| 39 int height() const final; | 39 int height() const final; |
| 40 | 40 |
| 41 bool hasImageBuffer() const final { return m_imageBuffer.get(); } | 41 bool hasImageBuffer() const final { return m_imageBuffer.get(); } |
| 42 ImageBuffer* imageBuffer() const final { return m_imageBuffer.get(); } | 42 ImageBuffer* imageBuffer() const final { return m_imageBuffer.get(); } |
| 43 | 43 |
| 44 bool parseColorOrCurrentColor(Color&, const String& colorString) const final
; | 44 bool parseColorOrCurrentColor(Color&, const String& colorString) const final
; |
| 45 | 45 |
| 46 SkCanvas* drawingCanvas() const final; | 46 SkCanvas* drawingCanvas() const final; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 explicit PaintRenderingContext2D(PassOwnPtr<ImageBuffer>); | 70 explicit PaintRenderingContext2D(PassOwnPtr<ImageBuffer>); |
| 71 | 71 |
| 72 OwnPtr<ImageBuffer> m_imageBuffer; | 72 OwnPtr<ImageBuffer> m_imageBuffer; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace blink | 75 } // namespace blink |
| 76 | 76 |
| 77 #endif // PaintRenderingContext2D_h | 77 #endif // PaintRenderingContext2D_h |
| OLD | NEW |