Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 | 32 |
| 33 class FlowThreadController; | 33 class FlowThreadController; |
| 34 class RenderLayerCompositor; | 34 class RenderLayerCompositor; |
| 35 class RenderQuote; | 35 class RenderQuote; |
| 36 class RenderWidget; | 36 class RenderWidget; |
| 37 | 37 |
| 38 #if ENABLE(CSS_SHADERS) && USE(3D_GRAPHICS) | 38 #if ENABLE(CSS_SHADERS) && USE(3D_GRAPHICS) |
| 39 class CustomFilterGlobalContext; | 39 class CustomFilterGlobalContext; |
| 40 #endif | 40 #endif |
| 41 | 41 |
| 42 enum CompositedScrollingUpdateMode { | |
| 43 UpdateNeedsCompositedScrolling, | |
| 44 UpdateDescendantsAreContiguousInStackingOrder | |
| 45 }; | |
| 46 | |
| 47 // This object allows postponing calls to RenderLayer::updateNeedsCompositedScro lling | |
| 48 // while any instance is in scope. When the last instance is destructed, all | |
| 49 // updates are processed. This allows us to postpone updates during layer list | |
| 50 // updates. (If we didn't postpone the updates, they would cause errors since | |
| 51 // they require clean lists). | |
| 52 struct ScopedCompositedScrollingUpdater { | |
|
jamesr
2013/04/09 21:10:00
in particular this class seems very hacky
| |
| 53 ScopedCompositedScrollingUpdater(RenderView*); | |
| 54 ScopedCompositedScrollingUpdater(RenderLayer*, CompositedScrollingUpdateMode ); | |
| 55 ~ScopedCompositedScrollingUpdater(); | |
| 56 private: | |
| 57 RenderView* m_renderView; | |
| 58 }; | |
| 59 | |
| 42 class RenderView : public RenderBlock { | 60 class RenderView : public RenderBlock { |
| 43 public: | 61 public: |
| 62 friend struct ScopedCompositedScrollingUpdater; | |
| 63 | |
| 44 explicit RenderView(Document*); | 64 explicit RenderView(Document*); |
| 45 virtual ~RenderView(); | 65 virtual ~RenderView(); |
| 46 | 66 |
| 47 bool hitTest(const HitTestRequest&, HitTestResult&); | 67 bool hitTest(const HitTestRequest&, HitTestResult&); |
| 48 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); | 68 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); |
| 49 | 69 |
| 50 virtual const char* renderName() const OVERRIDE { return "RenderView"; } | 70 virtual const char* renderName() const OVERRIDE { return "RenderView"; } |
| 51 | 71 |
| 52 virtual bool isRenderView() const OVERRIDE { return true; } | 72 virtual bool isRenderView() const OVERRIDE { return true; } |
| 53 | 73 |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 void setRenderQuoteHead(RenderQuote* head) { m_renderQuoteHead = head; } | 227 void setRenderQuoteHead(RenderQuote* head) { m_renderQuoteHead = head; } |
| 208 RenderQuote* renderQuoteHead() const { return m_renderQuoteHead; } | 228 RenderQuote* renderQuoteHead() const { return m_renderQuoteHead; } |
| 209 | 229 |
| 210 // FIXME: This is a work around because the current implementation of counte rs | 230 // FIXME: This is a work around because the current implementation of counte rs |
| 211 // requires walking the entire tree repeatedly and most pages don't actually use either | 231 // requires walking the entire tree repeatedly and most pages don't actually use either |
| 212 // feature so we shouldn't take the performance hit when not needed. Long te rm we should | 232 // feature so we shouldn't take the performance hit when not needed. Long te rm we should |
| 213 // rewrite the counter and quotes code. | 233 // rewrite the counter and quotes code. |
| 214 void addRenderCounter() { m_renderCounterCount++; } | 234 void addRenderCounter() { m_renderCounterCount++; } |
| 215 void removeRenderCounter() { ASSERT(m_renderCounterCount > 0); m_renderCount erCount--; } | 235 void removeRenderCounter() { ASSERT(m_renderCounterCount > 0); m_renderCount erCount--; } |
| 216 bool hasRenderCounters() { return m_renderCounterCount; } | 236 bool hasRenderCounters() { return m_renderCounterCount; } |
| 217 | 237 |
| 238 void cancelScheduledCompositedScrollingUpdatesForLayer(RenderLayer*); | |
| 239 | |
| 218 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) OVERRIDE; | 240 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) OVERRIDE; |
| 219 | 241 |
| 220 protected: | 242 protected: |
| 221 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const OVERRIDE; | 243 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const OVERRIDE; |
| 222 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE; | 244 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE; |
| 223 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst; | 245 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst; |
| 224 virtual bool requiresColumns(int desiredColumnCount) const OVERRIDE; | 246 virtual bool requiresColumns(int desiredColumnCount) const OVERRIDE; |
| 225 | 247 |
| 226 private: | 248 private: |
| 227 bool initializeLayoutState(LayoutState&); | 249 bool initializeLayoutState(LayoutState&); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 RenderWidgetSet m_widgets; | 331 RenderWidgetSet m_widgets; |
| 310 | 332 |
| 311 private: | 333 private: |
| 312 bool shouldUsePrintingLayout() const; | 334 bool shouldUsePrintingLayout() const; |
| 313 | 335 |
| 314 LayoutUnit m_pageLogicalHeight; | 336 LayoutUnit m_pageLogicalHeight; |
| 315 bool m_pageLogicalHeightChanged; | 337 bool m_pageLogicalHeightChanged; |
| 316 LayoutState* m_layoutState; | 338 LayoutState* m_layoutState; |
| 317 unsigned m_layoutStateDisableCount; | 339 unsigned m_layoutStateDisableCount; |
| 318 OwnPtr<RenderLayerCompositor> m_compositor; | 340 OwnPtr<RenderLayerCompositor> m_compositor; |
| 341 | |
| 342 unsigned m_scopedCompositedScrollingUpdatersCount; | |
| 343 HashSet<RenderLayer*> m_pendingCompositedScrollingUpdates; | |
| 344 HashSet<RenderLayer*> m_pendingContiguityUpdates; | |
| 345 | |
| 319 #if ENABLE(CSS_SHADERS) && USE(3D_GRAPHICS) | 346 #if ENABLE(CSS_SHADERS) && USE(3D_GRAPHICS) |
| 320 OwnPtr<CustomFilterGlobalContext> m_customFilterGlobalContext; | 347 OwnPtr<CustomFilterGlobalContext> m_customFilterGlobalContext; |
| 321 #endif | 348 #endif |
| 322 OwnPtr<FlowThreadController> m_flowThreadController; | 349 OwnPtr<FlowThreadController> m_flowThreadController; |
| 323 RefPtr<IntervalArena> m_intervalArena; | 350 RefPtr<IntervalArena> m_intervalArena; |
| 324 | 351 |
| 325 RenderQuote* m_renderQuoteHead; | 352 RenderQuote* m_renderQuoteHead; |
| 326 unsigned m_renderCounterCount; | 353 unsigned m_renderCounterCount; |
| 327 }; | 354 }; |
| 328 | 355 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 439 RenderObject::FlowThreadState m_flowThreadState; | 466 RenderObject::FlowThreadState m_flowThreadState; |
| 440 bool m_fragmenting; | 467 bool m_fragmenting; |
| 441 #ifndef NDEBUG | 468 #ifndef NDEBUG |
| 442 LayoutState* m_layoutState; | 469 LayoutState* m_layoutState; |
| 443 #endif | 470 #endif |
| 444 }; | 471 }; |
| 445 | 472 |
| 446 } // namespace WebCore | 473 } // namespace WebCore |
| 447 | 474 |
| 448 #endif // RenderView_h | 475 #endif // RenderView_h |
| OLD | NEW |