Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(781)

Side by Side Diff: cc/paint/paint_op_buffer.h

Issue 2876033005: Track slow paths in DisplayItemList (Closed)
Patch Set: danakj review Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/paint/display_item_list.cc ('k') | cc/paint/paint_op_buffer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 // Record additional bytes used by referenced sub-records and display lists. 966 // Record additional bytes used by referenced sub-records and display lists.
967 size_t subrecord_bytes_used_ = 0; 967 size_t subrecord_bytes_used_ = 0;
968 bool has_discardable_images_ = false; 968 bool has_discardable_images_ = false;
969 969
970 DISALLOW_COPY_AND_ASSIGN(PaintOpBuffer); 970 DISALLOW_COPY_AND_ASSIGN(PaintOpBuffer);
971 }; 971 };
972 972
973 } // namespace cc 973 } // namespace cc
974 974
975 #endif // CC_PAINT_PAINT_OP_BUFFER_H_ 975 #endif // CC_PAINT_PAINT_OP_BUFFER_H_
OLDNEW
« no previous file with comments | « cc/paint/display_item_list.cc ('k') | cc/paint/paint_op_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698