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

Side by Side Diff: Source/platform/graphics/paint/ClipDisplayItem.cpp

Issue 723103002: Revert "Move ViewDisplayList to GraphicsLayer" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 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 "config.h"
6 #include "platform/graphics/paint/ClipDisplayItem.h"
7
8 #include "platform/geometry/RoundedRect.h"
9 #include "platform/graphics/GraphicsContext.h"
10
11 namespace blink {
12
13 void ClipDisplayItem::replay(GraphicsContext* context)
14 {
15 context->save();
16 context->clip(m_clipRect);
17 for (RoundedRect roundedRect : m_roundedRectClips)
18 context->clipRoundedRect(roundedRect);
19 }
20
21 void EndClipDisplayItem::replay(GraphicsContext* context)
22 {
23 context->restore();
24 }
25
26 #ifndef NDEBUG
27 WTF::String ClipDisplayItem::asDebugString() const
28 {
29 return String::format("{%s, type: \"%s\", clipRect: [%d,%d,%d,%d]}",
30 clientDebugString().utf8().data(), typeAsDebugString(type()).utf8().data (),
31 m_clipRect.x(), m_clipRect.y(), m_clipRect.width(), m_clipRect.height()) ;
32 }
33 #endif
34
35 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/paint/ClipDisplayItem.h ('k') | Source/platform/graphics/paint/DisplayItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698