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 21 matching lines...) Expand all Loading... |
32 ~SkiaPaintCanvas() override; | 32 ~SkiaPaintCanvas() override; |
33 | 33 |
34 SkiaPaintCanvas& operator=(SkiaPaintCanvas&& other) = default; | 34 SkiaPaintCanvas& operator=(SkiaPaintCanvas&& other) = default; |
35 | 35 |
36 SkMetaData& getMetaData() override; | 36 SkMetaData& getMetaData() override; |
37 SkImageInfo imageInfo() const override; | 37 SkImageInfo imageInfo() const override; |
38 | 38 |
39 void flush() override; | 39 void flush() override; |
40 | 40 |
41 SkISize getBaseLayerSize() const override; | 41 SkISize getBaseLayerSize() const override; |
42 bool readPixels(const SkImageInfo& dest_info, | |
43 void* dest_pixels, | |
44 size_t dest_row_bytes, | |
45 int src_x, | |
46 int src_y) override; | |
47 bool readPixels(SkBitmap* bitmap, int src_x, int src_y) override; | |
48 bool readPixels(const SkIRect& srcRect, SkBitmap* bitmap) override; | |
49 bool writePixels(const SkImageInfo& info, | 42 bool writePixels(const SkImageInfo& info, |
50 const void* pixels, | 43 const void* pixels, |
51 size_t row_bytes, | 44 size_t row_bytes, |
52 int x, | 45 int x, |
53 int y) override; | 46 int y) override; |
54 int save() override; | 47 int save() override; |
55 int saveLayer(const SkRect* bounds, const PaintFlags* flags) override; | 48 int saveLayer(const SkRect* bounds, const PaintFlags* flags) override; |
56 int saveLayerAlpha(const SkRect* bounds, U8CPU alpha) override; | 49 int saveLayerAlpha(const SkRect* bounds, U8CPU alpha) override; |
57 | 50 |
58 void restore() override; | 51 void restore() override; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 private: | 156 private: |
164 SkCanvas* canvas_; | 157 SkCanvas* canvas_; |
165 std::unique_ptr<SkCanvas> owned_; | 158 std::unique_ptr<SkCanvas> owned_; |
166 | 159 |
167 DISALLOW_COPY_AND_ASSIGN(SkiaPaintCanvas); | 160 DISALLOW_COPY_AND_ASSIGN(SkiaPaintCanvas); |
168 }; | 161 }; |
169 | 162 |
170 } // namespace cc | 163 } // namespace cc |
171 | 164 |
172 #endif // CC_PAINT_SKIA_PAINT_CANVAS_H_ | 165 #endif // CC_PAINT_SKIA_PAINT_CANVAS_H_ |
OLD | NEW |