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

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

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "cc/base/cc_export.h" 13 #include "cc/base/cc_export.h"
14 #include "cc/playback/display_item.h" 14 #include "cc/playback/display_item.h"
15 #include "skia/ext/cdl_common.h"
15 #include "third_party/skia/include/core/SkRefCnt.h" 16 #include "third_party/skia/include/core/SkRefCnt.h"
16 #include "ui/gfx/geometry/point_f.h" 17 #include "ui/gfx/geometry/point_f.h"
17 18
18 class SkCanvas; 19 class SkCanvas;
19 class SkPicture; 20 class SkPicture;
20 21
21 namespace cc { 22 namespace cc {
22 class ClientPictureCache; 23 class ClientPictureCache;
23 24
24 class CC_EXPORT DrawingDisplayItem : public DisplayItem { 25 class CC_EXPORT DrawingDisplayItem : public DisplayItem {
25 public: 26 public:
26 DrawingDisplayItem(); 27 DrawingDisplayItem();
27 explicit DrawingDisplayItem(sk_sp<const SkPicture> picture); 28 explicit DrawingDisplayItem(sk_sp<const CdlPicture> picture);
28 explicit DrawingDisplayItem(const proto::DisplayItem& proto, 29 explicit DrawingDisplayItem(const proto::DisplayItem& proto,
29 ClientPictureCache* client_picture_cache, 30 ClientPictureCache* client_picture_cache,
30 std::vector<uint32_t>* used_engine_picture_ids); 31 std::vector<uint32_t>* used_engine_picture_ids);
31 explicit DrawingDisplayItem(const DrawingDisplayItem& item); 32 explicit DrawingDisplayItem(const DrawingDisplayItem& item);
32 ~DrawingDisplayItem() override; 33 ~DrawingDisplayItem() override;
33 34
34 void ToProtobuf(proto::DisplayItem* proto) const override; 35 void ToProtobuf(proto::DisplayItem* proto) const override;
35 sk_sp<const SkPicture> GetPicture() const override; 36 sk_sp<const CdlPicture> GetPicture() const override;
36 void Raster(SkCanvas* canvas, 37 void Raster(CdlCanvas* canvas,
37 SkPicture::AbortCallback* callback) const override; 38 SkPicture::AbortCallback* callback) const override;
38 void AsValueInto(const gfx::Rect& visual_rect, 39 void AsValueInto(const gfx::Rect& visual_rect,
39 base::trace_event::TracedValue* array) const override; 40 base::trace_event::TracedValue* array) const override;
40 size_t ExternalMemoryUsage() const override; 41 size_t ExternalMemoryUsage() const override;
41 42
42 int ApproximateOpCount() const; 43 int ApproximateOpCount() const;
43 44
44 void CloneTo(DrawingDisplayItem* item) const; 45 void CloneTo(DrawingDisplayItem* item) const;
45 46
46 private: 47 private:
47 void SetNew(sk_sp<const SkPicture> picture); 48 void SetNew(sk_sp<const CdlPicture> picture);
48 49
49 sk_sp<const SkPicture> picture_; 50 sk_sp<const CdlPicture> picture_;
50 }; 51 };
51 52
52 } // namespace cc 53 } // namespace cc
53 54
54 #endif // CC_PLAYBACK_DRAWING_DISPLAY_ITEM_H_ 55 #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