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

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

Issue 2748263002: Move cc::DisplayItemList and related classes into cc/paint/ (Closed)
Patch Set: none 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_
6 #define CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_
7
8 #include <stddef.h>
9
10 #include <memory>
11
12 #include "base/memory/ptr_util.h"
13 #include "cc/base/cc_export.h"
14 #include "cc/playback/display_item.h"
15 #include "ui/gfx/transform.h"
16
17 class SkCanvas;
18
19 namespace cc {
20
21 class CC_EXPORT TransformDisplayItem : public DisplayItem {
22 public:
23 explicit TransformDisplayItem(const gfx::Transform& transform);
24 ~TransformDisplayItem() override;
25
26 void Raster(SkCanvas* canvas,
27 SkPicture::AbortCallback* callback) const override;
28
29 size_t ExternalMemoryUsage() const { return 0; }
30 int ApproximateOpCount() const { return 1; }
31
32 const gfx::Transform& transform() const { return transform_; }
33
34 private:
35 void SetNew(const gfx::Transform& transform);
36
37 gfx::Transform transform_;
38 };
39
40 class CC_EXPORT EndTransformDisplayItem : public DisplayItem {
41 public:
42 EndTransformDisplayItem();
43 ~EndTransformDisplayItem() override;
44
45 static std::unique_ptr<EndTransformDisplayItem> Create() {
46 return base::MakeUnique<EndTransformDisplayItem>();
47 }
48
49 void Raster(SkCanvas* canvas,
50 SkPicture::AbortCallback* callback) const override;
51
52 int ApproximateOpCount() const { return 0; }
53 };
54
55 } // namespace cc
56
57 #endif // CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698