| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/compositor/clip_recorder.h" | 5 #include "ui/compositor/clip_recorder.h" |
| 6 | 6 |
| 7 #include "cc/playback/clip_display_item.h" | 7 #include "cc/playback/clip_display_item.h" |
| 8 #include "cc/playback/clip_path_display_item.h" | 8 #include "cc/playback/clip_path_display_item.h" |
| 9 #include "cc/playback/display_item_list.h" | 9 #include "cc/playback/display_item_list.h" |
| 10 #include "ui/compositor/paint_context.h" | 10 #include "ui/compositor/paint_context.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 void ClipRecorder::ClipRect(const gfx::Rect& clip_rect) { | 42 void ClipRecorder::ClipRect(const gfx::Rect& clip_rect) { |
| 43 bool antialias = false; | 43 bool antialias = false; |
| 44 context_.list_->CreateAndAppendPairedBeginItem<cc::ClipDisplayItem>( | 44 context_.list_->CreateAndAppendPairedBeginItem<cc::ClipDisplayItem>( |
| 45 clip_rect, std::vector<SkRRect>(), antialias); | 45 clip_rect, std::vector<SkRRect>(), antialias); |
| 46 RecordCloser(CLIP_RECT); | 46 RecordCloser(CLIP_RECT); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void ClipRecorder::ClipPath(const gfx::Path& clip_path) { | 49 void ClipRecorder::ClipPath(const gfx::Path& clip_path) { |
| 50 bool antialias = false; | 50 bool antialias = false; |
| 51 context_.list_->CreateAndAppendPairedBeginItem<cc::ClipPathDisplayItem>( | 51 context_.list_->CreateAndAppendPairedBeginItem<cc::ClipPathDisplayItem>( |
| 52 clip_path, kIntersect_SkClipOp, antialias); | 52 clip_path, SkClipOp::kIntersect, antialias); |
| 53 RecordCloser(CLIP_PATH); | 53 RecordCloser(CLIP_PATH); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void ClipRecorder::ClipPathWithAntiAliasing(const gfx::Path& clip_path) { | 56 void ClipRecorder::ClipPathWithAntiAliasing(const gfx::Path& clip_path) { |
| 57 bool antialias = true; | 57 bool antialias = true; |
| 58 context_.list_->CreateAndAppendPairedBeginItem<cc::ClipPathDisplayItem>( | 58 context_.list_->CreateAndAppendPairedBeginItem<cc::ClipPathDisplayItem>( |
| 59 clip_path, kIntersect_SkClipOp, antialias); | 59 clip_path, SkClipOp::kIntersect, antialias); |
| 60 RecordCloser(CLIP_PATH); | 60 RecordCloser(CLIP_PATH); |
| 61 } | 61 } |
| 62 | 62 |
| 63 } // namespace ui | 63 } // namespace ui |
| OLD | NEW |