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

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

Issue 1921493006: Revert code to avoid AntiAliased clips now that the referenced Skia bug is fixed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 "platform/graphics/paint/ClipDisplayItem.h" 5 #include "platform/graphics/paint/ClipDisplayItem.h"
6 6
7 #include "platform/geometry/FloatRoundedRect.h" 7 #include "platform/geometry/FloatRoundedRect.h"
8 #include "platform/graphics/GraphicsContext.h" 8 #include "platform/graphics/GraphicsContext.h"
9 #include "public/platform/WebDisplayItemList.h" 9 #include "public/platform/WebDisplayItemList.h"
10 #include "third_party/skia/include/core/SkScalar.h" 10 #include "third_party/skia/include/core/SkScalar.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 void ClipDisplayItem::replay(GraphicsContext& context) const 14 void ClipDisplayItem::replay(GraphicsContext& context) const
15 { 15 {
16 context.save(); 16 context.save();
17 // TODO(chrishtr): make this AntiAliased. Not anti-aliasing here is a workar ound for a PDF rendering issue. 17 context.clipRect(m_clipRect, AntiAliased);
18 // See crbug.com/590971.
19 context.clipRect(m_clipRect, NotAntiAliased);
20 18
21 for (const FloatRoundedRect& roundedRect : m_roundedRectClips) 19 for (const FloatRoundedRect& roundedRect : m_roundedRectClips)
22 context.clipRoundedRect(roundedRect); 20 context.clipRoundedRect(roundedRect);
23 } 21 }
24 22
25 void ClipDisplayItem::appendToWebDisplayItemList(const IntRect& visualRect, WebD isplayItemList* list) const 23 void ClipDisplayItem::appendToWebDisplayItemList(const IntRect& visualRect, WebD isplayItemList* list) const
26 { 24 {
27 WebVector<SkRRect> webRoundedRects(m_roundedRectClips.size()); 25 WebVector<SkRRect> webRoundedRects(m_roundedRectClips.size());
28 for (size_t i = 0; i < m_roundedRectClips.size(); ++i) { 26 for (size_t i = 0; i < m_roundedRectClips.size(); ++i) {
29 FloatRoundedRect::Radii rectRadii = m_roundedRectClips[i].getRadii(); 27 FloatRoundedRect::Radii rectRadii = m_roundedRectClips[i].getRadii();
(...skipping 26 matching lines...) Expand all
56 #ifndef NDEBUG 54 #ifndef NDEBUG
57 void ClipDisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringBuil der) const 55 void ClipDisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringBuil der) const
58 { 56 {
59 DisplayItem::dumpPropertiesAsDebugString(stringBuilder); 57 DisplayItem::dumpPropertiesAsDebugString(stringBuilder);
60 stringBuilder.append(WTF::String::format(", clipRect: [%d,%d,%d,%d]", 58 stringBuilder.append(WTF::String::format(", clipRect: [%d,%d,%d,%d]",
61 m_clipRect.x(), m_clipRect.y(), m_clipRect.width(), m_clipRect.height()) ); 59 m_clipRect.x(), m_clipRect.y(), m_clipRect.width(), m_clipRect.height()) );
62 } 60 }
63 #endif 61 #endif
64 62
65 } // namespace blink 63 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698