OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * | 10 * |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 page->frameHost().visualViewport().containerLayer()->addChild(m_layer.ge
t()); | 90 page->frameHost().visualViewport().containerLayer()->addChild(m_layer.ge
t()); |
91 } | 91 } |
92 | 92 |
93 FloatSize size = page->frameHost().visualViewport().size(); | 93 FloatSize size = page->frameHost().visualViewport().size(); |
94 if (size != m_layer->size()) | 94 if (size != m_layer->size()) |
95 m_layer->setSize(size); | 95 m_layer->setSize(size); |
96 | 96 |
97 m_layer->setNeedsDisplay(); | 97 m_layer->setNeedsDisplay(); |
98 } | 98 } |
99 | 99 |
100 void PageOverlay::paintContents(const GraphicsLayer* graphicsLayer, GraphicsCont
ext& gc, GraphicsLayerPaintingPhase phase, const IntRect& inClip) const | 100 void PageOverlay::paintContents(const GraphicsLayer* graphicsLayer, GraphicsCont
ext& gc, GraphicsLayerPaintingPhase phase, const IntRect* inClip) const |
101 { | |
102 paintContentsIfNeeded(graphicsLayer, gc, phase); | |
103 } | |
104 | |
105 void PageOverlay::paintContentsIfNeeded(const GraphicsLayer*, GraphicsContext& g
c, GraphicsLayerPaintingPhase) const | |
106 { | 101 { |
107 ASSERT(m_layer); | 102 ASSERT(m_layer); |
108 WebGraphicsContextImpl contextWrapper(gc, *this, DisplayItem::PageOverlay); | 103 WebGraphicsContextImpl contextWrapper(gc, *this, DisplayItem::PageOverlay); |
109 m_delegate->paintPageOverlay(&contextWrapper, expandedIntSize(m_layer->size(
))); | 104 m_delegate->paintPageOverlay(&contextWrapper, expandedIntSize(m_layer->size(
))); |
110 } | 105 } |
111 | 106 |
112 String PageOverlay::debugName(const GraphicsLayer*) | 107 String PageOverlay::debugName(const GraphicsLayer*) |
113 { | 108 { |
114 return "WebViewImpl Page Overlay Content Layer"; | 109 return "WebViewImpl Page Overlay Content Layer"; |
115 } | 110 } |
116 | 111 |
117 } // namespace blink | 112 } // namespace blink |
OLD | NEW |