| 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 #ifndef PaintController_h | 5 #ifndef PaintController_h |
| 6 #define PaintController_h | 6 #define PaintController_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/RuntimeEnabledFeatures.h" | 9 #include "platform/RuntimeEnabledFeatures.h" |
| 10 #include "platform/geometry/IntRect.h" | 10 #include "platform/geometry/IntRect.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 WTF_MAKE_NONCOPYABLE(PaintController); | 36 WTF_MAKE_NONCOPYABLE(PaintController); |
| 37 USING_FAST_MALLOC(PaintController); | 37 USING_FAST_MALLOC(PaintController); |
| 38 public: | 38 public: |
| 39 static PassOwnPtr<PaintController> create() | 39 static PassOwnPtr<PaintController> create() |
| 40 { | 40 { |
| 41 return adoptPtr(new PaintController()); | 41 return adoptPtr(new PaintController()); |
| 42 } | 42 } |
| 43 | 43 |
| 44 // These methods are called during paint invalidation (or paint if SlimmingP
aintV2 is on). | 44 // These methods are called during paint invalidation (or paint if SlimmingP
aintV2 is on). |
| 45 | 45 |
| 46 void invalidate(const DisplayItemClient&); | 46 void invalidate(const DisplayItemClient&, PaintInvalidationReason, const Int
Rect& previousPaintInvalidationRect, const IntRect& newPaintInvalidationRect); |
| 47 void invalidateUntracked(const DisplayItemClient&); | 47 void invalidateUntracked(const DisplayItemClient&); |
| 48 void invalidateAll(); | 48 void invalidateAll(); |
| 49 | 49 |
| 50 // Record when paint offsets change during paint. | 50 // Record when paint offsets change during paint. |
| 51 void invalidatePaintOffset(const DisplayItemClient&); | 51 void invalidatePaintOffset(const DisplayItemClient&); |
| 52 #if ENABLE(ASSERT) | 52 #if ENABLE(ASSERT) |
| 53 bool paintOffsetWasInvalidated(const DisplayItemClient&) const; | 53 bool paintOffsetWasInvalidated(const DisplayItemClient&) const; |
| 54 #endif | 54 #endif |
| 55 | 55 |
| 56 // These methods are called during painting. | 56 // These methods are called during painting. |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 bool m_textPainted; | 257 bool m_textPainted; |
| 258 bool m_imagePainted; | 258 bool m_imagePainted; |
| 259 | 259 |
| 260 int m_skippingCacheCount; | 260 int m_skippingCacheCount; |
| 261 | 261 |
| 262 int m_numCachedNewItems; | 262 int m_numCachedNewItems; |
| 263 | 263 |
| 264 unsigned m_nextScope; | 264 unsigned m_nextScope; |
| 265 Vector<unsigned> m_scopeStack; | 265 Vector<unsigned> m_scopeStack; |
| 266 | 266 |
| 267 struct Invalidation { |
| 268 DisplayItemClient client; |
| 269 String debugName; |
| 270 IntRect rect; |
| 271 PaintInvalidationReason invalidationReason; |
| 272 }; |
| 273 |
| 274 // Record the debug names of invalidated clients for assertion and debugging
. |
| 275 Vector<Invalidation> m_invalidations; |
| 276 |
| 267 #if ENABLE(ASSERT) | 277 #if ENABLE(ASSERT) |
| 268 // Record the debug names of invalidated clients for assertion and debugging
. | |
| 269 Vector<String> m_invalidations; | |
| 270 | |
| 271 // This is used to check duplicated ids during add(). We could also check | 278 // This is used to check duplicated ids during add(). We could also check |
| 272 // during commitNewDisplayItems(), but checking during add() helps developer | 279 // during commitNewDisplayItems(), but checking during add() helps developer |
| 273 // easily find where the duplicated ids are from. | 280 // easily find where the duplicated ids are from. |
| 274 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient; | 281 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient; |
| 275 #endif | 282 #endif |
| 276 | 283 |
| 277 OwnPtr<Vector<String>> m_trackedPaintInvalidationObjects; | 284 OwnPtr<Vector<String>> m_trackedPaintInvalidationObjects; |
| 285 public: |
| 286 String m_debugName; |
| 278 }; | 287 }; |
| 279 | 288 |
| 280 } // namespace blink | 289 } // namespace blink |
| 281 | 290 |
| 282 #endif // PaintController_h | 291 #endif // PaintController_h |
| OLD | NEW |