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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/float_clip_display_item.h
diff --git a/cc/resources/float_clip_display_item.h b/cc/resources/float_clip_display_item.h
new file mode 100644
index 0000000000000000000000000000000000000000..6d9529d9d1f6928ca5a591c568e54634839e003f
--- /dev/null
+++ b/cc/resources/float_clip_display_item.h
@@ -0,0 +1,61 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_RESOURCES_FLOAT_CLIP_DISPLAY_ITEM_H_
+#define CC_RESOURCES_FLOAT_CLIP_DISPLAY_ITEM_H_
+
+#include <vector>
+
+#include "base/memory/scoped_ptr.h"
+#include "cc/base/cc_export.h"
+#include "cc/resources/display_item.h"
+#include "ui/gfx/geometry/rect_f.h"
+
+class SkCanvas;
+class SkDrawPictureCallback;
+
+namespace cc {
+
+class CC_EXPORT FloatClipDisplayItem : public DisplayItem {
+ public:
+ ~FloatClipDisplayItem() override;
+
+ static scoped_ptr<FloatClipDisplayItem> Create(gfx::RectF clip_rect) {
+ return make_scoped_ptr(new FloatClipDisplayItem(clip_rect));
+ }
+
+ void Raster(SkCanvas* canvas, SkDrawPictureCallback* callback) const override;
+
+ bool IsSuitableForGpuRasterization() const override;
+ int ApproximateOpCount() const override;
+ size_t PictureMemoryUsage() const override;
+
+ protected:
+ explicit FloatClipDisplayItem(gfx::RectF clip_rect);
+
+ private:
+ gfx::RectF clip_rect_;
+};
+
+class CC_EXPORT EndFloatClipDisplayItem : public DisplayItem {
+ public:
+ ~EndFloatClipDisplayItem() override;
+
+ static scoped_ptr<EndFloatClipDisplayItem> Create() {
+ return make_scoped_ptr(new EndFloatClipDisplayItem());
+ }
+
+ void Raster(SkCanvas* canvas, SkDrawPictureCallback* callback) const override;
+
+ bool IsSuitableForGpuRasterization() const override;
+ int ApproximateOpCount() const override;
+ size_t PictureMemoryUsage() const override;
+
+ protected:
+ EndFloatClipDisplayItem();
+};
+
+} // namespace cc
+
+#endif // CC_RESOURCES_FLOAT_CLIP_DISPLAY_ITEM_H_
« 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