| 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_
|
|
|