| Index: ui/compositor/clip_recorder.cc
|
| diff --git a/ui/compositor/clip_transform_recorder.cc b/ui/compositor/clip_recorder.cc
|
| similarity index 65%
|
| rename from ui/compositor/clip_transform_recorder.cc
|
| rename to ui/compositor/clip_recorder.cc
|
| index 8afd8be2cb6741e0987247d59c808d8b158ca021..e4668032d68a35aaa3c0ab403d626accd15071fb 100644
|
| --- a/ui/compositor/clip_transform_recorder.cc
|
| +++ b/ui/compositor/clip_recorder.cc
|
| @@ -2,24 +2,22 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "ui/compositor/clip_transform_recorder.h"
|
| +#include "ui/compositor/clip_recorder.h"
|
|
|
| -#include "base/logging.h"
|
| #include "cc/playback/clip_display_item.h"
|
| #include "cc/playback/clip_path_display_item.h"
|
| #include "cc/playback/display_item_list.h"
|
| -#include "cc/playback/transform_display_item.h"
|
| #include "ui/compositor/paint_context.h"
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/gfx/path.h"
|
|
|
| namespace ui {
|
|
|
| -ClipTransformRecorder::ClipTransformRecorder(const PaintContext& context)
|
| +ClipRecorder::ClipRecorder(const PaintContext& context)
|
| : context_(context), num_closers_(0) {
|
| }
|
|
|
| -ClipTransformRecorder::~ClipTransformRecorder() {
|
| +ClipRecorder::~ClipRecorder() {
|
| for (size_t i = num_closers_; i > 0; --i) {
|
| switch (closers_[i - 1]) {
|
| case CLIP_RECT:
|
| @@ -28,21 +26,18 @@ ClipTransformRecorder::~ClipTransformRecorder() {
|
| case CLIP_PATH:
|
| context_.list_->CreateAndAppendItem<cc::EndClipPathDisplayItem>();
|
| break;
|
| - case TRANSFORM:
|
| - context_.list_->CreateAndAppendItem<cc::EndTransformDisplayItem>();
|
| - break;
|
| }
|
| }
|
| }
|
|
|
| -void ClipTransformRecorder::ClipRect(const gfx::Rect& clip_rect) {
|
| +void ClipRecorder::ClipRect(const gfx::Rect& clip_rect) {
|
| auto* item = context_.list_->CreateAndAppendItem<cc::ClipDisplayItem>();
|
| item->SetNew(clip_rect, std::vector<SkRRect>());
|
| DCHECK_LT(num_closers_, arraysize(closers_));
|
| closers_[num_closers_++] = CLIP_RECT;
|
| }
|
|
|
| -void ClipTransformRecorder::ClipPath(const gfx::Path& clip_path) {
|
| +void ClipRecorder::ClipPath(const gfx::Path& clip_path) {
|
| bool anti_alias = false;
|
| auto* item = context_.list_->CreateAndAppendItem<cc::ClipPathDisplayItem>();
|
| item->SetNew(clip_path, SkRegion::kIntersect_Op, anti_alias);
|
| @@ -50,7 +45,7 @@ void ClipTransformRecorder::ClipPath(const gfx::Path& clip_path) {
|
| closers_[num_closers_++] = CLIP_PATH;
|
| }
|
|
|
| -void ClipTransformRecorder::ClipPathWithAntiAliasing(
|
| +void ClipRecorder::ClipPathWithAntiAliasing(
|
| const gfx::Path& clip_path) {
|
| bool anti_alias = true;
|
| auto* item = context_.list_->CreateAndAppendItem<cc::ClipPathDisplayItem>();
|
| @@ -59,11 +54,4 @@ void ClipTransformRecorder::ClipPathWithAntiAliasing(
|
| closers_[num_closers_++] = CLIP_PATH;
|
| }
|
|
|
| -void ClipTransformRecorder::Transform(const gfx::Transform& transform) {
|
| - auto* item = context_.list_->CreateAndAppendItem<cc::TransformDisplayItem>();
|
| - item->SetNew(transform);
|
| - DCHECK_LT(num_closers_, arraysize(closers_));
|
| - closers_[num_closers_++] = TRANSFORM;
|
| -}
|
| -
|
| } // namespace ui
|
|
|