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

Unified Diff: cc/resources/compositing_display_item.h

Issue 942403002: Add a compositing display item which replaces transparency display item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Forward decls and imports oh my Created 5 years, 10 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/cc.gyp ('k') | cc/resources/compositing_display_item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/compositing_display_item.h
diff --git a/cc/resources/transparency_display_item.h b/cc/resources/compositing_display_item.h
similarity index 51%
copy from cc/resources/transparency_display_item.h
copy to cc/resources/compositing_display_item.h
index d7ae7bee2132893ccdde9f0d2f79550bb8be6579..5e485bc6a780c8115c2062e42f4e3b06dcf45b1a 100644
--- a/cc/resources/transparency_display_item.h
+++ b/cc/resources/compositing_display_item.h
@@ -1,14 +1,15 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// 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_TRANSPARENCY_DISPLAY_ITEM_H_
-#define CC_RESOURCES_TRANSPARENCY_DISPLAY_ITEM_H_
+#ifndef CC_RESOURCES_COMPOSITING_DISPLAY_ITEM_H_
+#define CC_RESOURCES_COMPOSITING_DISPLAY_ITEM_H_
#include "base/memory/scoped_ptr.h"
#include "cc/base/cc_export.h"
#include "cc/resources/display_item.h"
#include "skia/ext/refptr.h"
+#include "third_party/skia/include/core/SkColorFilter.h"
#include "third_party/skia/include/core/SkXfermode.h"
#include "ui/gfx/geometry/rect_f.h"
@@ -17,14 +18,16 @@ class SkDrawPictureCallback;
namespace cc {
-class CC_EXPORT TransparencyDisplayItem : public DisplayItem {
+class CC_EXPORT CompositingDisplayItem : public DisplayItem {
public:
- ~TransparencyDisplayItem() override;
+ ~CompositingDisplayItem() override;
- static scoped_ptr<TransparencyDisplayItem> Create(
+ static scoped_ptr<CompositingDisplayItem> Create(
float opacity,
- SkXfermode::Mode blend_mode) {
- return make_scoped_ptr(new TransparencyDisplayItem(opacity, blend_mode));
+ SkXfermode::Mode xfermode,
+ skia::RefPtr<SkColorFilter> color_filter) {
+ return make_scoped_ptr(
+ new CompositingDisplayItem(opacity, xfermode, color_filter));
}
void Raster(SkCanvas* canvas, SkDrawPictureCallback* callback) const override;
@@ -35,19 +38,22 @@ class CC_EXPORT TransparencyDisplayItem : public DisplayItem {
void AsValueInto(base::trace_event::TracedValue* array) const override;
protected:
- TransparencyDisplayItem(float opacity, SkXfermode::Mode blend_mode);
+ CompositingDisplayItem(float opacity,
+ SkXfermode::Mode,
+ skia::RefPtr<SkColorFilter>);
private:
float opacity_;
- SkXfermode::Mode blend_mode_;
+ SkXfermode::Mode xfermode_;
+ skia::RefPtr<SkColorFilter> color_filter_;
};
-class CC_EXPORT EndTransparencyDisplayItem : public DisplayItem {
+class CC_EXPORT EndCompositingDisplayItem : public DisplayItem {
public:
- ~EndTransparencyDisplayItem() override;
+ ~EndCompositingDisplayItem() override;
- static scoped_ptr<EndTransparencyDisplayItem> Create() {
- return make_scoped_ptr(new EndTransparencyDisplayItem());
+ static scoped_ptr<EndCompositingDisplayItem> Create() {
+ return make_scoped_ptr(new EndCompositingDisplayItem());
}
void Raster(SkCanvas* canvas, SkDrawPictureCallback* callback) const override;
@@ -58,9 +64,9 @@ class CC_EXPORT EndTransparencyDisplayItem : public DisplayItem {
void AsValueInto(base::trace_event::TracedValue* array) const override;
protected:
- EndTransparencyDisplayItem();
+ EndCompositingDisplayItem();
};
} // namespace cc
-#endif // CC_RESOURCES_TRANSPARENCY_DISPLAY_ITEM_H_
+#endif // CC_RESOURCES_COMPOSITING_DISPLAY_ITEM_H_
« no previous file with comments | « cc/cc.gyp ('k') | cc/resources/compositing_display_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698