Chromium Code Reviews| Index: cc/paint/paint_canvas.h |
| diff --git a/cc/paint/paint_canvas.h b/cc/paint/paint_canvas.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ac4849dec2b7d1165d3c40020466ae87c34dce4c |
| --- /dev/null |
| +++ b/cc/paint/paint_canvas.h |
| @@ -0,0 +1,32 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CC_PAINT_PAINT_CANVAS_H_ |
| +#define CC_PAINT_PAINT_CANVAS_H_ |
| + |
| +#include "cc/paint/paint_export.h" |
| +#include "third_party/skia/include/core/SkCanvas.h" |
| +#include "third_party/skia/include/utils/SkNWayCanvas.h" |
| +#include "third_party/skia/include/utils/SkNoDrawCanvas.h" |
| + |
| +namespace cc { |
| + |
| +typedef SkCanvas PaintCanvas; |
|
danakj
2017/01/20 23:34:13
s/typedef/using/g
|
| +typedef SkNoDrawCanvas PaintCanvasNoDraw; |
| +typedef SkAutoCanvasRestore PaintCanvasAutoRestore; |
| + |
| +class CC_PAINT_EXPORT PaintCanvasPassThrough : public SkNWayCanvas { |
| + public: |
| + explicit PaintCanvasPassThrough(SkCanvas* canvas); |
| + PaintCanvasPassThrough(int width, int height); |
| + ~PaintCanvasPassThrough() override; |
| +}; |
| + |
| +inline SkCanvas* GetSkCanvas(PaintCanvas* canvas) { |
| + return canvas; |
| +} |
| + |
| +} // namespace cc |
| + |
| +#endif // CC_PAINT_PAINT_CANVAS_H_ |