| 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 18 matching lines...) Expand all Loading... |
| 29 explicit SkiaPaintCanvas(const SkBitmap& bitmap); | 29 explicit SkiaPaintCanvas(const SkBitmap& bitmap); |
| 30 explicit SkiaPaintCanvas(const SkBitmap& bitmap, const SkSurfaceProps& props); | 30 explicit SkiaPaintCanvas(const SkBitmap& bitmap, const SkSurfaceProps& props); |
| 31 ~SkiaPaintCanvas(); | 31 ~SkiaPaintCanvas(); |
| 32 | 32 |
| 33 SkMetaData& getMetaData() override; | 33 SkMetaData& getMetaData() override; |
| 34 SkImageInfo imageInfo() const override; | 34 SkImageInfo imageInfo() const override; |
| 35 | 35 |
| 36 void flush() override; | 36 void flush() override; |
| 37 | 37 |
| 38 SkISize getBaseLayerSize() const override; | 38 SkISize getBaseLayerSize() const override; |
| 39 bool peekPixels(SkPixmap* pixmap) override; | |
| 40 bool readPixels(const SkImageInfo& dest_info, | 39 bool readPixels(const SkImageInfo& dest_info, |
| 41 void* dest_pixels, | 40 void* dest_pixels, |
| 42 size_t dest_row_bytes, | 41 size_t dest_row_bytes, |
| 43 int src_x, | 42 int src_x, |
| 44 int src_y) override; | 43 int src_y) override; |
| 45 bool readPixels(SkBitmap* bitmap, int src_x, int src_y) override; | 44 bool readPixels(SkBitmap* bitmap, int src_x, int src_y) override; |
| 46 bool readPixels(const SkIRect& srcRect, SkBitmap* bitmap) override; | 45 bool readPixels(const SkIRect& srcRect, SkBitmap* bitmap) override; |
| 47 bool writePixels(const SkImageInfo& info, | 46 bool writePixels(const SkImageInfo& info, |
| 48 const void* pixels, | 47 const void* pixels, |
| 49 size_t row_bytes, | 48 size_t row_bytes, |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 using PaintCanvas::drawImage; | 167 using PaintCanvas::drawImage; |
| 169 | 168 |
| 170 private: | 169 private: |
| 171 SkCanvas* canvas_; | 170 SkCanvas* canvas_; |
| 172 std::unique_ptr<SkCanvas> owned_; | 171 std::unique_ptr<SkCanvas> owned_; |
| 173 }; | 172 }; |
| 174 | 173 |
| 175 } // namespace cc | 174 } // namespace cc |
| 176 | 175 |
| 177 #endif // CC_PAINT_SKIA_PAINT_CANVAS_H_ | 176 #endif // CC_PAINT_SKIA_PAINT_CANVAS_H_ |
| OLD | NEW |