| 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_PAINT_OP_BUFFER_H_ | 5 #ifndef CC_PAINT_PAINT_OP_BUFFER_H_ |
| 6 #define CC_PAINT_PAINT_OP_BUFFER_H_ | 6 #define CC_PAINT_PAINT_OP_BUFFER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 PaintOpType GetType() const { return static_cast<PaintOpType>(type); } | 79 PaintOpType GetType() const { return static_cast<PaintOpType>(type); } |
| 80 | 80 |
| 81 // Subclasses should provide a static Raster() method which is called from | 81 // Subclasses should provide a static Raster() method which is called from |
| 82 // here. The Raster method should take a const PaintOp* parameter. It is | 82 // here. The Raster method should take a const PaintOp* parameter. It is |
| 83 // static with a pointer to the base type so that we can use it as a function | 83 // static with a pointer to the base type so that we can use it as a function |
| 84 // pointer. | 84 // pointer. |
| 85 void Raster(SkCanvas* canvas, const SkMatrix& original_ctm) const; | 85 void Raster(SkCanvas* canvas, const SkMatrix& original_ctm) const; |
| 86 bool IsDrawOp() const; | 86 bool IsDrawOp() const; |
| 87 | 87 |
| 88 // Only valid for draw ops. | 88 // Only valid for draw ops. |
| 89 void RasterWithAlpha(SkCanvas* canvas, uint8_t alpha) const; | 89 void RasterWithAlpha(SkCanvas* canvas, |
| 90 const SkRect& bounds, |
| 91 uint8_t alpha) const; |
| 90 | 92 |
| 91 int CountSlowPaths() const { return 0; } | 93 int CountSlowPaths() const { return 0; } |
| 92 int CountSlowPathsFromFlags() const { return 0; } | 94 int CountSlowPathsFromFlags() const { return 0; } |
| 93 | 95 |
| 94 bool HasDiscardableImages() const { return false; } | 96 bool HasDiscardableImages() const { return false; } |
| 95 bool HasDiscardableImagesFromFlags() const { return false; } | 97 bool HasDiscardableImagesFromFlags() const { return false; } |
| 96 | 98 |
| 97 // Returns the number of bytes used by this op in referenced sub records | 99 // Returns the number of bytes used by this op in referenced sub records |
| 98 // and display lists. This doesn't count other objects like paths or blobs. | 100 // and display lists. This doesn't count other objects like paths or blobs. |
| 99 size_t AdditionalBytesUsed() const { return 0; } | 101 size_t AdditionalBytesUsed() const { return 0; } |
| (...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 // Record additional bytes used by referenced sub-records and display lists. | 971 // Record additional bytes used by referenced sub-records and display lists. |
| 970 size_t subrecord_bytes_used_ = 0; | 972 size_t subrecord_bytes_used_ = 0; |
| 971 bool has_discardable_images_ = false; | 973 bool has_discardable_images_ = false; |
| 972 | 974 |
| 973 DISALLOW_COPY_AND_ASSIGN(PaintOpBuffer); | 975 DISALLOW_COPY_AND_ASSIGN(PaintOpBuffer); |
| 974 }; | 976 }; |
| 975 | 977 |
| 976 } // namespace cc | 978 } // namespace cc |
| 977 | 979 |
| 978 #endif // CC_PAINT_PAINT_OP_BUFFER_H_ | 980 #endif // CC_PAINT_PAINT_OP_BUFFER_H_ |
| OLD | NEW |