| Index: cc/playback/filter_display_item.cc
|
| diff --git a/cc/playback/filter_display_item.cc b/cc/playback/filter_display_item.cc
|
| deleted file mode 100644
|
| index 8bf8e6a498a918c30e5d2b09a930c449112aaf86..0000000000000000000000000000000000000000
|
| --- a/cc/playback/filter_display_item.cc
|
| +++ /dev/null
|
| @@ -1,65 +0,0 @@
|
| -// Copyright 2014 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.
|
| -
|
| -#include "cc/playback/filter_display_item.h"
|
| -
|
| -#include <stddef.h>
|
| -
|
| -#include "base/strings/stringprintf.h"
|
| -#include "base/trace_event/trace_event_argument.h"
|
| -#include "cc/output/render_surface_filters.h"
|
| -#include "third_party/skia/include/core/SkCanvas.h"
|
| -#include "third_party/skia/include/core/SkImageFilter.h"
|
| -#include "third_party/skia/include/core/SkPaint.h"
|
| -#include "third_party/skia/include/core/SkRefCnt.h"
|
| -#include "ui/gfx/skia_util.h"
|
| -
|
| -namespace cc {
|
| -
|
| -FilterDisplayItem::FilterDisplayItem(const FilterOperations& filters,
|
| - const gfx::RectF& bounds,
|
| - const gfx::PointF& origin)
|
| - : DisplayItem(FILTER) {
|
| - SetNew(filters, bounds, origin);
|
| -}
|
| -
|
| -FilterDisplayItem::~FilterDisplayItem() {}
|
| -
|
| -void FilterDisplayItem::SetNew(const FilterOperations& filters,
|
| - const gfx::RectF& bounds,
|
| - const gfx::PointF& origin) {
|
| - filters_ = filters;
|
| - bounds_ = bounds;
|
| - origin_ = origin;
|
| -}
|
| -
|
| -void FilterDisplayItem::Raster(SkCanvas* canvas,
|
| - SkPicture::AbortCallback* callback) const {
|
| - canvas->save();
|
| - canvas->translate(origin_.x(), origin_.y());
|
| -
|
| - sk_sp<SkImageFilter> image_filter = RenderSurfaceFilters::BuildImageFilter(
|
| - filters_, gfx::SizeF(bounds_.width(), bounds_.height()));
|
| - SkRect boundaries = RectFToSkRect(bounds_);
|
| - boundaries.offset(-origin_.x(), -origin_.y());
|
| -
|
| - SkPaint paint;
|
| - paint.setBlendMode(SkBlendMode::kSrcOver);
|
| - paint.setImageFilter(std::move(image_filter));
|
| - canvas->saveLayer(&boundaries, &paint);
|
| -
|
| - canvas->translate(-origin_.x(), -origin_.y());
|
| -}
|
| -
|
| -EndFilterDisplayItem::EndFilterDisplayItem() : DisplayItem(END_FILTER) {}
|
| -
|
| -EndFilterDisplayItem::~EndFilterDisplayItem() {}
|
| -
|
| -void EndFilterDisplayItem::Raster(SkCanvas* canvas,
|
| - SkPicture::AbortCallback* callback) const {
|
| - canvas->restore();
|
| - canvas->restore();
|
| -}
|
| -
|
| -} // namespace cc
|
|
|