Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "third_party/skia/include/core/SkPictureAnalyzer.h" | 9 #include "third_party/skia/include/core/SkPictureAnalyzer.h" |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 37 void DrawingDisplayItem::analyzeForGpuRasterization(SkPictureGpuAnalyzer& analyz er) const | 37 void DrawingDisplayItem::analyzeForGpuRasterization(SkPictureGpuAnalyzer& analyz er) const |
| 38 { | 38 { |
| 39 analyzer.analyzePicture(m_picture.get()); | 39 analyzer.analyzePicture(m_picture.get()); |
| 40 } | 40 } |
| 41 | 41 |
| 42 #ifndef NDEBUG | 42 #ifndef NDEBUG |
| 43 void DrawingDisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringB uilder) const | 43 void DrawingDisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringB uilder) const |
| 44 { | 44 { |
| 45 DisplayItem::dumpPropertiesAsDebugString(stringBuilder); | 45 DisplayItem::dumpPropertiesAsDebugString(stringBuilder); |
| 46 if (m_picture) { | 46 if (m_picture) { |
| 47 stringBuilder.append(WTF::String::format(", rect: [%f,%f,%f,%f]", | 47 stringBuilder.append(WTF::String::format(", rect: [%f,%f %fx%f]", |
|
wkorman
2016/07/01 19:04:06
Can remove WTF:: here in two places, also here and
| |
| 48 m_picture->cullRect().x(), m_picture->cullRect().y(), | 48 m_picture->cullRect().x(), m_picture->cullRect().y(), |
| 49 m_picture->cullRect().width(), m_picture->cullRect().height())); | 49 m_picture->cullRect().width(), m_picture->cullRect().height())); |
| 50 } | 50 } |
| 51 } | 51 } |
| 52 #endif | 52 #endif |
| 53 | 53 |
| 54 #if ENABLE(ASSERT) | 54 #if ENABLE(ASSERT) |
| 55 static bool bitmapIsAllZero(const SkBitmap& bitmap) | 55 static bool bitmapIsAllZero(const SkBitmap& bitmap) |
| 56 { | 56 { |
| 57 bitmap.lockPixels(); | 57 bitmap.lockPixels(); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 return bitmapIsAllZero(bitmap); | 113 return bitmapIsAllZero(bitmap); |
| 114 } | 114 } |
| 115 default: | 115 default: |
| 116 ASSERT_NOT_REACHED(); | 116 ASSERT_NOT_REACHED(); |
| 117 } | 117 } |
| 118 return false; | 118 return false; |
| 119 } | 119 } |
| 120 #endif // ENABLE(ASSERT) | 120 #endif // ENABLE(ASSERT) |
| 121 | 121 |
| 122 } // namespace blink | 122 } // namespace blink |
| OLD | NEW |