OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 CC_PAINT_SKIA_PAINT_CANVAS_H_ | 5 #ifndef CC_PAINT_SKIA_PAINT_CANVAS_H_ |
6 #define CC_PAINT_SKIA_PAINT_CANVAS_H_ | 6 #define CC_PAINT_SKIA_PAINT_CANVAS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 void flush() override; | 39 void flush() override; |
40 | 40 |
41 SkISize getBaseLayerSize() const override; | 41 SkISize getBaseLayerSize() const override; |
42 bool writePixels(const SkImageInfo& info, | 42 bool writePixels(const SkImageInfo& info, |
43 const void* pixels, | 43 const void* pixels, |
44 size_t row_bytes, | 44 size_t row_bytes, |
45 int x, | 45 int x, |
46 int y) override; | 46 int y) override; |
47 int save() override; | 47 int save() override; |
48 int saveLayer(const SkRect* bounds, const PaintFlags* flags) override; | 48 int saveLayer(const SkRect* bounds, const PaintFlags* flags) override; |
49 int saveLayerAlpha(const SkRect* bounds, U8CPU alpha) override; | 49 int saveLayerAlpha(const SkRect* bounds, uint8_t alpha) override; |
50 | 50 |
51 void restore() override; | 51 void restore() override; |
52 int getSaveCount() const override; | 52 int getSaveCount() const override; |
53 void restoreToCount(int save_count) override; | 53 void restoreToCount(int save_count) override; |
54 void translate(SkScalar dx, SkScalar dy) override; | 54 void translate(SkScalar dx, SkScalar dy) override; |
55 void scale(SkScalar sx, SkScalar sy) override; | 55 void scale(SkScalar sx, SkScalar sy) override; |
56 void rotate(SkScalar degrees) override; | 56 void rotate(SkScalar degrees) override; |
57 void concat(const SkMatrix& matrix) override; | 57 void concat(const SkMatrix& matrix) override; |
58 void setMatrix(const SkMatrix& matrix) override; | 58 void setMatrix(const SkMatrix& matrix) override; |
59 | 59 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 private: | 156 private: |
157 SkCanvas* canvas_; | 157 SkCanvas* canvas_; |
158 std::unique_ptr<SkCanvas> owned_; | 158 std::unique_ptr<SkCanvas> owned_; |
159 | 159 |
160 DISALLOW_COPY_AND_ASSIGN(SkiaPaintCanvas); | 160 DISALLOW_COPY_AND_ASSIGN(SkiaPaintCanvas); |
161 }; | 161 }; |
162 | 162 |
163 } // namespace cc | 163 } // namespace cc |
164 | 164 |
165 #endif // CC_PAINT_SKIA_PAINT_CANVAS_H_ | 165 #endif // CC_PAINT_SKIA_PAINT_CANVAS_H_ |
OLD | NEW |