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

Side by Side Diff: cc/playback/transform_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/playback/float_clip_display_item.cc ('k') | cc/playback/transform_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_TRANSFORM_DISPLAY_ITEM_H_ 5 #ifndef CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_
6 #define CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_ 6 #define CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
12 #include "cc/playback/display_item.h" 12 #include "cc/playback/display_item.h"
13 #include "ui/gfx/transform.h" 13 #include "ui/gfx/transform.h"
14 14
15 class SkCanvas; 15 class SkCanvas;
16 16
17 namespace cc { 17 namespace cc {
18 class ImageSerializationProcessor; 18 class ImageSerializationProcessor;
19 19
20 class CC_EXPORT TransformDisplayItem : public DisplayItem { 20 class CC_EXPORT TransformDisplayItem : public DisplayItem {
21 public: 21 public:
22 explicit TransformDisplayItem(const gfx::Transform& transform); 22 explicit TransformDisplayItem(const gfx::Transform& transform);
23 explicit TransformDisplayItem(const proto::DisplayItem& proto); 23 explicit TransformDisplayItem(const proto::DisplayItem& proto);
24 ~TransformDisplayItem() override; 24 ~TransformDisplayItem() override;
25 25
26 void ToProtobuf(proto::DisplayItem* proto, 26 void ToProtobuf(proto::DisplayItem* proto,
27 ImageSerializationProcessor* image_serialization_processor) 27 ImageSerializationProcessor* image_serialization_processor)
28 const override; 28 const override;
29 void Raster(SkCanvas* canvas, 29 void Raster(SkCanvas* canvas,
30 const gfx::Rect& canvas_target_playback_rect,
31 SkPicture::AbortCallback* callback) const override; 30 SkPicture::AbortCallback* callback) const override;
32 void AsValueInto(const gfx::Rect& visual_rect, 31 void AsValueInto(const gfx::Rect& visual_rect,
33 base::trace_event::TracedValue* array) const override; 32 base::trace_event::TracedValue* array) const override;
34 size_t ExternalMemoryUsage() const override; 33 size_t ExternalMemoryUsage() const override;
35 34
36 int ApproximateOpCount() const { return 1; } 35 int ApproximateOpCount() const { return 1; }
37 bool IsSuitableForGpuRasterization() const { return true; } 36 bool IsSuitableForGpuRasterization() const { return true; }
38 37
39 private: 38 private:
40 void SetNew(const gfx::Transform& transform); 39 void SetNew(const gfx::Transform& transform);
41 40
42 gfx::Transform transform_; 41 gfx::Transform transform_;
43 }; 42 };
44 43
45 class CC_EXPORT EndTransformDisplayItem : public DisplayItem { 44 class CC_EXPORT EndTransformDisplayItem : public DisplayItem {
46 public: 45 public:
47 EndTransformDisplayItem(); 46 EndTransformDisplayItem();
48 explicit EndTransformDisplayItem(const proto::DisplayItem& proto); 47 explicit EndTransformDisplayItem(const proto::DisplayItem& proto);
49 ~EndTransformDisplayItem() override; 48 ~EndTransformDisplayItem() override;
50 49
51 static scoped_ptr<EndTransformDisplayItem> Create() { 50 static scoped_ptr<EndTransformDisplayItem> Create() {
52 return make_scoped_ptr(new EndTransformDisplayItem()); 51 return make_scoped_ptr(new EndTransformDisplayItem());
53 } 52 }
54 53
55 void ToProtobuf(proto::DisplayItem* proto, 54 void ToProtobuf(proto::DisplayItem* proto,
56 ImageSerializationProcessor* image_serialization_processor) 55 ImageSerializationProcessor* image_serialization_processor)
57 const override; 56 const override;
58 void Raster(SkCanvas* canvas, 57 void Raster(SkCanvas* canvas,
59 const gfx::Rect& canvas_target_playback_rect,
60 SkPicture::AbortCallback* callback) const override; 58 SkPicture::AbortCallback* callback) const override;
61 void AsValueInto(const gfx::Rect& visual_rect, 59 void AsValueInto(const gfx::Rect& visual_rect,
62 base::trace_event::TracedValue* array) const override; 60 base::trace_event::TracedValue* array) const override;
63 size_t ExternalMemoryUsage() const override; 61 size_t ExternalMemoryUsage() const override;
64 62
65 int ApproximateOpCount() const { return 0; } 63 int ApproximateOpCount() const { return 0; }
66 bool IsSuitableForGpuRasterization() const { return true; } 64 bool IsSuitableForGpuRasterization() const { return true; }
67 }; 65 };
68 66
69 } // namespace cc 67 } // namespace cc
70 68
71 #endif // CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_ 69 #endif // CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_
OLDNEW
« no previous file with comments | « cc/playback/float_clip_display_item.cc ('k') | cc/playback/transform_display_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698