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/SkBitmap.h" | 9 #include "third_party/skia/include/core/SkBitmap.h" |
10 #include "third_party/skia/include/core/SkCanvas.h" | 10 #include "third_party/skia/include/core/SkCanvas.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 static_cast<const DrawingDisplayItem&>(other).picture(); | 104 static_cast<const DrawingDisplayItem&>(other).picture(); |
105 | 105 |
106 if (!picture && !otherPicture) | 106 if (!picture && !otherPicture) |
107 return true; | 107 return true; |
108 if (!picture || !otherPicture) | 108 if (!picture || !otherPicture) |
109 return false; | 109 return false; |
110 | 110 |
111 if (picturesEqual(picture, otherPicture)) | 111 if (picturesEqual(picture, otherPicture)) |
112 return true; | 112 return true; |
113 | 113 |
114 // Sometimes the client may produce different pictures for the same visual res
ult | 114 // Sometimes the client may produce different pictures for the same visual |
115 // which should be treated as equal. | 115 // result, which should be treated as equal. |
116 return bitmapsEqual(picture, otherPicture); | 116 return bitmapsEqual(picture, otherPicture); |
117 } | 117 } |
118 | 118 |
119 } // namespace blink | 119 } // namespace blink |
OLD | NEW |