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

Side by Side Diff: ui/compositor/clip_recorder.cc

Issue 2575533002: SkClipOp is an enum class now (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp ('k') | ui/gfx/canvas.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp ('k') | ui/gfx/canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698