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

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

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 11 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/resources/drawing_display_item.cc ('k') | cc/resources/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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_RESOURCES_FLOAT_CLIP_DISPLAY_ITEM_H_
6 #define CC_RESOURCES_FLOAT_CLIP_DISPLAY_ITEM_H_
7
8 #include <vector>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "cc/base/cc_export.h"
12 #include "cc/resources/display_item.h"
13 #include "ui/gfx/geometry/rect_f.h"
14
15 class SkCanvas;
16 class SkDrawPictureCallback;
17
18 namespace cc {
19
20 class CC_EXPORT FloatClipDisplayItem : public DisplayItem {
21 public:
22 ~FloatClipDisplayItem() override;
23
24 static scoped_ptr<FloatClipDisplayItem> Create(gfx::RectF clip_rect) {
25 return make_scoped_ptr(new FloatClipDisplayItem(clip_rect));
26 }
27
28 void Raster(SkCanvas* canvas, SkDrawPictureCallback* callback) const override;
29
30 bool IsSuitableForGpuRasterization() const override;
31 int ApproximateOpCount() const override;
32 size_t PictureMemoryUsage() const override;
33
34 protected:
35 explicit FloatClipDisplayItem(gfx::RectF clip_rect);
36
37 private:
38 gfx::RectF clip_rect_;
39 };
40
41 class CC_EXPORT EndFloatClipDisplayItem : public DisplayItem {
42 public:
43 ~EndFloatClipDisplayItem() override;
44
45 static scoped_ptr<EndFloatClipDisplayItem> Create() {
46 return make_scoped_ptr(new EndFloatClipDisplayItem());
47 }
48
49 void Raster(SkCanvas* canvas, SkDrawPictureCallback* callback) const override;
50
51 bool IsSuitableForGpuRasterization() const override;
52 int ApproximateOpCount() const override;
53 size_t PictureMemoryUsage() const override;
54
55 protected:
56 EndFloatClipDisplayItem();
57 };
58
59 } // namespace cc
60
61 #endif // CC_RESOURCES_FLOAT_CLIP_DISPLAY_ITEM_H_
OLDNEW
« no previous file with comments | « cc/resources/drawing_display_item.cc ('k') | cc/resources/float_clip_display_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698