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

Side by Side Diff: cc/playback/float_clip_display_item.cc

Issue 2748263002: Move cc::DisplayItemList and related classes into cc/paint/ (Closed)
Patch Set: none Created 3 years, 9 months 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "cc/playback/float_clip_display_item.h"
6
7 #include <stddef.h>
8
9 #include "base/strings/stringprintf.h"
10 #include "base/trace_event/trace_event_argument.h"
11 #include "third_party/skia/include/core/SkCanvas.h"
12 #include "ui/gfx/skia_util.h"
13
14 namespace cc {
15
16 FloatClipDisplayItem::FloatClipDisplayItem(const gfx::RectF& clip_rect)
17 : DisplayItem(FLOAT_CLIP) {
18 SetNew(clip_rect);
19 }
20
21 FloatClipDisplayItem::~FloatClipDisplayItem() {
22 }
23
24 void FloatClipDisplayItem::SetNew(const gfx::RectF& clip_rect) {
25 clip_rect_ = clip_rect;
26 }
27
28 void FloatClipDisplayItem::Raster(SkCanvas* canvas,
29 SkPicture::AbortCallback* callback) const {
30 canvas->save();
31 canvas->clipRect(gfx::RectFToSkRect(clip_rect_));
32 }
33
34 EndFloatClipDisplayItem::EndFloatClipDisplayItem()
35 : DisplayItem(END_FLOAT_CLIP) {}
36
37 EndFloatClipDisplayItem::~EndFloatClipDisplayItem() {
38 }
39
40 void EndFloatClipDisplayItem::Raster(
41 SkCanvas* canvas,
42 SkPicture::AbortCallback* callback) const {
43 canvas->restore();
44 }
45
46 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698