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

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

Issue 1982893002: [blimp] Add SkPicture caching support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments from vmpstr, including adding //cc/blimp Created 4 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/playback/filter_display_item.cc ('k') | cc/playback/float_clip_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_FLOAT_CLIP_DISPLAY_ITEM_H_ 5 #ifndef CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_
6 #define CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_ 6 #define CC_PLAYBACK_FLOAT_CLIP_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 "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "cc/base/cc_export.h" 14 #include "cc/base/cc_export.h"
15 #include "cc/playback/display_item.h" 15 #include "cc/playback/display_item.h"
16 #include "ui/gfx/geometry/rect_f.h" 16 #include "ui/gfx/geometry/rect_f.h"
17 17
18 class SkCanvas; 18 class SkCanvas;
19 19
20 namespace cc { 20 namespace cc {
21 class ImageSerializationProcessor;
22 21
23 class CC_EXPORT FloatClipDisplayItem : public DisplayItem { 22 class CC_EXPORT FloatClipDisplayItem : public DisplayItem {
24 public: 23 public:
25 explicit FloatClipDisplayItem(const gfx::RectF& clip_rect); 24 explicit FloatClipDisplayItem(const gfx::RectF& clip_rect);
26 explicit FloatClipDisplayItem(const proto::DisplayItem& proto); 25 explicit FloatClipDisplayItem(const proto::DisplayItem& proto);
27 ~FloatClipDisplayItem() override; 26 ~FloatClipDisplayItem() override;
28 27
29 void ToProtobuf(proto::DisplayItem* proto, 28 void ToProtobuf(proto::DisplayItem* proto) const override;
30 ImageSerializationProcessor* image_serialization_processor)
31 const override;
32 void Raster(SkCanvas* canvas, 29 void Raster(SkCanvas* canvas,
33 SkPicture::AbortCallback* callback) const override; 30 SkPicture::AbortCallback* callback) const override;
34 void AsValueInto(const gfx::Rect& visual_rect, 31 void AsValueInto(const gfx::Rect& visual_rect,
35 base::trace_event::TracedValue* array) const override; 32 base::trace_event::TracedValue* array) const override;
36 size_t ExternalMemoryUsage() const override; 33 size_t ExternalMemoryUsage() const override;
37 34
38 int ApproximateOpCount() const { return 1; } 35 int ApproximateOpCount() const { return 1; }
39 36
40 private: 37 private:
41 void SetNew(const gfx::RectF& clip_rect); 38 void SetNew(const gfx::RectF& clip_rect);
42 39
43 gfx::RectF clip_rect_; 40 gfx::RectF clip_rect_;
44 }; 41 };
45 42
46 class CC_EXPORT EndFloatClipDisplayItem : public DisplayItem { 43 class CC_EXPORT EndFloatClipDisplayItem : public DisplayItem {
47 public: 44 public:
48 EndFloatClipDisplayItem(); 45 EndFloatClipDisplayItem();
49 explicit EndFloatClipDisplayItem(const proto::DisplayItem& proto); 46 explicit EndFloatClipDisplayItem(const proto::DisplayItem& proto);
50 ~EndFloatClipDisplayItem() override; 47 ~EndFloatClipDisplayItem() override;
51 48
52 static std::unique_ptr<EndFloatClipDisplayItem> Create() { 49 static std::unique_ptr<EndFloatClipDisplayItem> Create() {
53 return base::WrapUnique(new EndFloatClipDisplayItem()); 50 return base::WrapUnique(new EndFloatClipDisplayItem());
54 } 51 }
55 52
56 void ToProtobuf(proto::DisplayItem* proto, 53 void ToProtobuf(proto::DisplayItem* proto) const override;
57 ImageSerializationProcessor* image_serialization_processor)
58 const override;
59 void Raster(SkCanvas* canvas, 54 void Raster(SkCanvas* canvas,
60 SkPicture::AbortCallback* callback) const override; 55 SkPicture::AbortCallback* callback) const override;
61 void AsValueInto(const gfx::Rect& visual_rect, 56 void AsValueInto(const gfx::Rect& visual_rect,
62 base::trace_event::TracedValue* array) const override; 57 base::trace_event::TracedValue* array) const override;
63 size_t ExternalMemoryUsage() const override; 58 size_t ExternalMemoryUsage() const override;
64 59
65 int ApproximateOpCount() const { return 0; } 60 int ApproximateOpCount() const { return 0; }
66 }; 61 };
67 62
68 } // namespace cc 63 } // namespace cc
69 64
70 #endif // CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_ 65 #endif // CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_
OLDNEW
« no previous file with comments | « cc/playback/filter_display_item.cc ('k') | cc/playback/float_clip_display_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698