| 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 #include "modules/csspaint/PaintRenderingContext2D.h" | 5 #include "modules/csspaint/PaintRenderingContext2D.h" |
| 6 | 6 |
| 7 #include <memory> |
| 7 #include "platform/graphics/ImageBuffer.h" | 8 #include "platform/graphics/ImageBuffer.h" |
| 8 #include "platform/graphics/paint/PaintCanvas.h" | 9 #include "platform/graphics/paint/PaintCanvas.h" |
| 9 #include <memory> | |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 PaintRenderingContext2D::PaintRenderingContext2D( | 13 PaintRenderingContext2D::PaintRenderingContext2D( |
| 14 std::unique_ptr<ImageBuffer> image_buffer, | 14 std::unique_ptr<ImageBuffer> image_buffer, |
| 15 bool has_alpha, | 15 bool has_alpha, |
| 16 float zoom) | 16 float zoom) |
| 17 : image_buffer_(std::move(image_buffer)), has_alpha_(has_alpha) { | 17 : image_buffer_(std::move(image_buffer)), has_alpha_(has_alpha) { |
| 18 clip_antialiasing_ = kAntiAliased; | 18 clip_antialiasing_ = kAntiAliased; |
| 19 ModifiableState().SetShouldAntialias(true); | 19 ModifiableState().SetShouldAntialias(true); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 bool PaintRenderingContext2D::StateHasFilter() { | 79 bool PaintRenderingContext2D::StateHasFilter() { |
| 80 return GetState().HasFilterForOffscreenCanvas(IntSize(Width(), Height())); | 80 return GetState().HasFilterForOffscreenCanvas(IntSize(Width(), Height())); |
| 81 } | 81 } |
| 82 | 82 |
| 83 sk_sp<SkImageFilter> PaintRenderingContext2D::StateGetFilter() { | 83 sk_sp<SkImageFilter> PaintRenderingContext2D::StateGetFilter() { |
| 84 return GetState().GetFilterForOffscreenCanvas(IntSize(Width(), Height())); | 84 return GetState().GetFilterForOffscreenCanvas(IntSize(Width(), Height())); |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace blink | 87 } // namespace blink |
| OLD | NEW |