OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 "cc/paint/paint_canvas.h" |
| 6 |
| 7 namespace cc { |
| 8 |
| 9 PaintCanvasPassThrough::PaintCanvasPassThrough(SkCanvas* canvas) |
| 10 : SkNWayCanvas(canvas->getBaseLayerSize().width(), |
| 11 canvas->getBaseLayerSize().height()) { |
| 12 SkIRect raster_bounds; |
| 13 canvas->getDeviceClipBounds(&raster_bounds); |
| 14 clipRect(SkRect::MakeFromIRect(raster_bounds)); |
| 15 setMatrix(canvas->getTotalMatrix()); |
| 16 addCanvas(canvas); |
| 17 } |
| 18 |
| 19 PaintCanvasPassThrough::PaintCanvasPassThrough(int width, int height) |
| 20 : SkNWayCanvas(width, height) {} |
| 21 |
| 22 PaintCanvasPassThrough::~PaintCanvasPassThrough() = default; |
| 23 |
| 24 } // namespace cc |
OLD | NEW |