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

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

Issue 1835843002: WIP: Fix foreignObject cullrect Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/layers/picture_image_layer.cc ('k') | cc/playback/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 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_CLIP_DISPLAY_ITEM_H_ 5 #ifndef CC_PLAYBACK_CLIP_DISPLAY_ITEM_H_
6 #define CC_PLAYBACK_CLIP_DISPLAY_ITEM_H_ 6 #define CC_PLAYBACK_CLIP_DISPLAY_ITEM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 13 matching lines...) Expand all
24 public: 24 public:
25 ClipDisplayItem(const gfx::Rect& clip_rect, 25 ClipDisplayItem(const gfx::Rect& clip_rect,
26 const std::vector<SkRRect>& rounded_clip_rects); 26 const std::vector<SkRRect>& rounded_clip_rects);
27 explicit ClipDisplayItem(const proto::DisplayItem& proto); 27 explicit ClipDisplayItem(const proto::DisplayItem& proto);
28 ~ClipDisplayItem() override; 28 ~ClipDisplayItem() override;
29 29
30 void ToProtobuf(proto::DisplayItem* proto, 30 void ToProtobuf(proto::DisplayItem* proto,
31 ImageSerializationProcessor* image_serialization_processor) 31 ImageSerializationProcessor* image_serialization_processor)
32 const override; 32 const override;
33 void Raster(SkCanvas* canvas, 33 void Raster(SkCanvas* canvas,
34 const gfx::Rect& canvas_target_playback_rect,
35 SkPicture::AbortCallback* callback) const override; 34 SkPicture::AbortCallback* callback) const override;
36 void AsValueInto(const gfx::Rect& visual_rect, 35 void AsValueInto(const gfx::Rect& visual_rect,
37 base::trace_event::TracedValue* array) const override; 36 base::trace_event::TracedValue* array) const override;
38 size_t ExternalMemoryUsage() const override; 37 size_t ExternalMemoryUsage() const override;
39 38
40 int ApproximateOpCount() const { return 1; } 39 int ApproximateOpCount() const { return 1; }
41 bool IsSuitableForGpuRasterization() const { return true; } 40 bool IsSuitableForGpuRasterization() const { return true; }
42 41
43 private: 42 private:
44 void SetNew(const gfx::Rect& clip_rect, 43 void SetNew(const gfx::Rect& clip_rect,
45 const std::vector<SkRRect>& rounded_clip_rects); 44 const std::vector<SkRRect>& rounded_clip_rects);
46 45
47 gfx::Rect clip_rect_; 46 gfx::Rect clip_rect_;
48 std::vector<SkRRect> rounded_clip_rects_; 47 std::vector<SkRRect> rounded_clip_rects_;
49 }; 48 };
50 49
51 class CC_EXPORT EndClipDisplayItem : public DisplayItem { 50 class CC_EXPORT EndClipDisplayItem : public DisplayItem {
52 public: 51 public:
53 EndClipDisplayItem(); 52 EndClipDisplayItem();
54 explicit EndClipDisplayItem(const proto::DisplayItem& proto); 53 explicit EndClipDisplayItem(const proto::DisplayItem& proto);
55 ~EndClipDisplayItem() override; 54 ~EndClipDisplayItem() override;
56 55
57 void ToProtobuf(proto::DisplayItem* proto, 56 void ToProtobuf(proto::DisplayItem* proto,
58 ImageSerializationProcessor* image_serialization_processor) 57 ImageSerializationProcessor* image_serialization_processor)
59 const override; 58 const override;
60 void Raster(SkCanvas* canvas, 59 void Raster(SkCanvas* canvas,
61 const gfx::Rect& canvas_target_playback_rect,
62 SkPicture::AbortCallback* callback) const override; 60 SkPicture::AbortCallback* callback) const override;
63 void AsValueInto(const gfx::Rect& visual_rect, 61 void AsValueInto(const gfx::Rect& visual_rect,
64 base::trace_event::TracedValue* array) const override; 62 base::trace_event::TracedValue* array) const override;
65 size_t ExternalMemoryUsage() const override; 63 size_t ExternalMemoryUsage() const override;
66 64
67 int ApproximateOpCount() const { return 0; } 65 int ApproximateOpCount() const { return 0; }
68 bool IsSuitableForGpuRasterization() const { return true; } 66 bool IsSuitableForGpuRasterization() const { return true; }
69 }; 67 };
70 68
71 } // namespace cc 69 } // namespace cc
72 70
73 #endif // CC_PLAYBACK_CLIP_DISPLAY_ITEM_H_ 71 #endif // CC_PLAYBACK_CLIP_DISPLAY_ITEM_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_image_layer.cc ('k') | cc/playback/clip_display_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698