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

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

Issue 1891473002: WTF: Implement explicit RefPtr::operator bool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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/DrawingDisplayItem.h" 5 #include "platform/graphics/paint/DrawingDisplayItem.h"
6 6
7 #include "platform/graphics/GraphicsContext.h" 7 #include "platform/graphics/GraphicsContext.h"
8 #include "public/platform/WebDisplayItemList.h" 8 #include "public/platform/WebDisplayItemList.h"
9 9
10 #if ENABLE(ASSERT) 10 #if ENABLE(ASSERT)
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 void DrawingDisplayItem::appendToWebDisplayItemList(const IntRect& visualRect, W ebDisplayItemList* list) const 25 void DrawingDisplayItem::appendToWebDisplayItemList(const IntRect& visualRect, W ebDisplayItemList* list) const
26 { 26 {
27 if (m_picture) 27 if (m_picture)
28 list->appendDrawingItem(visualRect, toSkSp(m_picture)); 28 list->appendDrawingItem(visualRect, toSkSp(m_picture));
29 } 29 }
30 30
31 bool DrawingDisplayItem::drawsContent() const 31 bool DrawingDisplayItem::drawsContent() const
32 { 32 {
33 return m_picture; 33 return m_picture.get();
34 } 34 }
35 35
36 #ifndef NDEBUG 36 #ifndef NDEBUG
37 void DrawingDisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringB uilder) const 37 void DrawingDisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringB uilder) const
38 { 38 {
39 DisplayItem::dumpPropertiesAsDebugString(stringBuilder); 39 DisplayItem::dumpPropertiesAsDebugString(stringBuilder);
40 if (m_picture) { 40 if (m_picture) {
41 stringBuilder.append(WTF::String::format(", rect: [%f,%f,%f,%f]", 41 stringBuilder.append(WTF::String::format(", rect: [%f,%f,%f,%f]",
42 m_picture->cullRect().x(), m_picture->cullRect().y(), 42 m_picture->cullRect().x(), m_picture->cullRect().y(),
43 m_picture->cullRect().width(), m_picture->cullRect().height())); 43 m_picture->cullRect().width(), m_picture->cullRect().height()));
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return bitmapIsAllZero(bitmap); 107 return bitmapIsAllZero(bitmap);
108 } 108 }
109 default: 109 default:
110 ASSERT_NOT_REACHED(); 110 ASSERT_NOT_REACHED();
111 } 111 }
112 return false; 112 return false;
113 } 113 }
114 #endif // ENABLE(ASSERT) 114 #endif // ENABLE(ASSERT)
115 115
116 } // namespace blink 116 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698