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

Side by Side Diff: cc/playback/drawing_display_item.h

Issue 2747273002: cc: Remove AsValue virtual from DisplayItem. (Closed)
Patch Set: Created 3 years, 9 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/playback/display_item_list_unittest.cc ('k') | cc/playback/drawing_display_item.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PLAYBACK_DRAWING_DISPLAY_ITEM_H_ 5 #ifndef CC_PLAYBACK_DRAWING_DISPLAY_ITEM_H_
6 #define CC_PLAYBACK_DRAWING_DISPLAY_ITEM_H_ 6 #define CC_PLAYBACK_DRAWING_DISPLAY_ITEM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 11 matching lines...) Expand all
22 22
23 class CC_EXPORT DrawingDisplayItem : public DisplayItem { 23 class CC_EXPORT DrawingDisplayItem : public DisplayItem {
24 public: 24 public:
25 DrawingDisplayItem(); 25 DrawingDisplayItem();
26 explicit DrawingDisplayItem(sk_sp<const PaintRecord> record); 26 explicit DrawingDisplayItem(sk_sp<const PaintRecord> record);
27 explicit DrawingDisplayItem(const DrawingDisplayItem& item); 27 explicit DrawingDisplayItem(const DrawingDisplayItem& item);
28 ~DrawingDisplayItem() override; 28 ~DrawingDisplayItem() override;
29 29
30 void Raster(SkCanvas* canvas, 30 void Raster(SkCanvas* canvas,
31 SkPicture::AbortCallback* callback) const override; 31 SkPicture::AbortCallback* callback) const override;
32 void AsValueInto(const gfx::Rect& visual_rect,
33 base::trace_event::TracedValue* array) const override;
34 32
35 size_t ExternalMemoryUsage() const; 33 size_t ExternalMemoryUsage() const;
36 int ApproximateOpCount() const; 34 int ApproximateOpCount() const;
37 35
38 void CloneTo(DrawingDisplayItem* item) const; 36 void CloneTo(DrawingDisplayItem* item) const;
39 37
38 const PaintRecord& picture() const { return *picture_; }
39
40 private: 40 private:
41 void SetNew(sk_sp<const PaintRecord> record); 41 void SetNew(sk_sp<const PaintRecord> record);
42 42
43 sk_sp<const PaintRecord> picture_; 43 sk_sp<const PaintRecord> picture_;
44 }; 44 };
45 45
46 } // namespace cc 46 } // namespace cc
47 47
48 #endif // CC_PLAYBACK_DRAWING_DISPLAY_ITEM_H_ 48 #endif // CC_PLAYBACK_DRAWING_DISPLAY_ITEM_H_
OLDNEW
« no previous file with comments | « cc/playback/display_item_list_unittest.cc ('k') | cc/playback/drawing_display_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698