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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 // provide them here explicitly so that DisplayItemList doesn't have | 368 // provide them here explicitly so that DisplayItemList doesn't have |
369 // to be defined in this header. | 369 // to be defined in this header. |
370 DrawDisplayItemListOp(const DrawDisplayItemListOp& op); | 370 DrawDisplayItemListOp(const DrawDisplayItemListOp& op); |
371 DrawDisplayItemListOp& operator=(const DrawDisplayItemListOp& op); | 371 DrawDisplayItemListOp& operator=(const DrawDisplayItemListOp& op); |
372 ~DrawDisplayItemListOp(); | 372 ~DrawDisplayItemListOp(); |
373 static void Raster(const PaintOp* op, | 373 static void Raster(const PaintOp* op, |
374 SkCanvas* canvas, | 374 SkCanvas* canvas, |
375 const SkMatrix& original_ctm); | 375 const SkMatrix& original_ctm); |
376 size_t AdditionalBytesUsed() const; | 376 size_t AdditionalBytesUsed() const; |
377 bool HasDiscardableImages() const; | 377 bool HasDiscardableImages() const; |
378 // TODO(enne): DisplayItemList should know number of slow paths. | 378 int CountSlowPaths() const; |
379 | 379 |
380 scoped_refptr<DisplayItemList> list; | 380 scoped_refptr<DisplayItemList> list; |
381 }; | 381 }; |
382 | 382 |
383 struct CC_PAINT_EXPORT DrawDRRectOp final : PaintOpWithFlags { | 383 struct CC_PAINT_EXPORT DrawDRRectOp final : PaintOpWithFlags { |
384 static constexpr PaintOpType kType = PaintOpType::DrawDRRect; | 384 static constexpr PaintOpType kType = PaintOpType::DrawDRRect; |
385 static constexpr bool kIsDrawOp = true; | 385 static constexpr bool kIsDrawOp = true; |
386 DrawDRRectOp(const SkRRect& outer, | 386 DrawDRRectOp(const SkRRect& outer, |
387 const SkRRect& inner, | 387 const SkRRect& inner, |
388 const PaintFlags& flags) | 388 const PaintFlags& flags) |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 // Record additional bytes used by referenced sub-records and display lists. | 965 // Record additional bytes used by referenced sub-records and display lists. |
966 size_t subrecord_bytes_used_ = 0; | 966 size_t subrecord_bytes_used_ = 0; |
967 bool has_discardable_images_ = false; | 967 bool has_discardable_images_ = false; |
968 | 968 |
969 DISALLOW_COPY_AND_ASSIGN(PaintOpBuffer); | 969 DISALLOW_COPY_AND_ASSIGN(PaintOpBuffer); |
970 }; | 970 }; |
971 | 971 |
972 } // namespace cc | 972 } // namespace cc |
973 | 973 |
974 #endif // CC_PAINT_PAINT_OP_BUFFER_H_ | 974 #endif // CC_PAINT_PAINT_OP_BUFFER_H_ |
OLD | NEW |