Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "web_content_layer_impl.h" | 5 #include "web_content_layer_impl.h" |
| 6 | 6 |
| 7 #include "SkMatrix44.h" | 7 #include "SkMatrix44.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "cc/content_layer.h" | 9 #include "cc/content_layer.h" |
| 10 #include "cc/picture_layer.h" | 10 #include "cc/picture_layer.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 bool WebContentLayerImpl::boundsContainPageScale() const | 65 bool WebContentLayerImpl::boundsContainPageScale() const |
| 66 { | 66 { |
| 67 return m_layer->layer()->boundsContainPageScale(); | 67 return m_layer->layer()->boundsContainPageScale(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void WebContentLayerImpl::setAutomaticallyComputeRasterScale(bool automatic) | 70 void WebContentLayerImpl::setAutomaticallyComputeRasterScale(bool automatic) |
| 71 { | 71 { |
| 72 m_layer->layer()->setAutomaticallyComputeRasterScale(automatic); | 72 m_layer->layer()->setAutomaticallyComputeRasterScale(automatic); |
| 73 } | 73 } |
| 74 | 74 |
| 75 // TODO(alokp): Remove this function from WebContentLayer API. | |
| 75 void WebContentLayerImpl::setUseLCDText(bool enable) | 76 void WebContentLayerImpl::setUseLCDText(bool enable) |
| 76 { | 77 { |
| 77 m_layer->layer()->setUseLCDText(enable); | |
| 78 } | 78 } |
| 79 | 79 |
| 80 void WebContentLayerImpl::setDrawCheckerboardForMissingTiles(bool enable) | 80 void WebContentLayerImpl::setDrawCheckerboardForMissingTiles(bool enable) |
| 81 { | 81 { |
| 82 m_layer->layer()->setDrawCheckerboardForMissingTiles(enable); | 82 m_layer->layer()->setDrawCheckerboardForMissingTiles(enable); |
| 83 } | 83 } |
| 84 | 84 |
| 85 | 85 |
| 86 void WebContentLayerImpl::paintContents(SkCanvas* canvas, const gfx::Rect& clip, gfx::RectF& opaque) | 86 void WebContentLayerImpl::paintContents(SkCanvas* canvas, const gfx::Rect& clip, gfx::RectF& opaque) |
| 87 { | 87 { |
| 88 if (!m_client) | 88 if (!m_client) |
| 89 return; | 89 return; |
| 90 | |
| 91 bool useLCDText = usingPictureLayer() ? | |
| 92 false : | |
|
enne (OOO)
2012/12/12 21:49:48
Oh, sad times. I'll file a bug for this.
| |
| 93 static_cast<ContentLayer*>(m_layer->layer())->useLCDText(); | |
| 90 WebFloatRect webOpaque; | 94 WebFloatRect webOpaque; |
| 91 m_client->paintContents(canvas, | 95 m_client->paintContents(canvas, |
| 92 clip, | 96 clip, |
| 93 #if WEBCONTENTLAYERCLIENT_HAS_CANPAINTLCDTEXT | 97 #if WEBCONTENTLAYERCLIENT_HAS_CANPAINTLCDTEXT |
| 94 m_layer->layer()->useLCDText(), | 98 useLCDText, |
| 95 #endif // WEBCONTENTLAYERCLIENT_HAS_CANPAINTLCDTEXT | 99 #endif // WEBCONTENTLAYERCLIENT_HAS_CANPAINTLCDTEXT |
| 96 webOpaque); | 100 webOpaque); |
| 97 opaque = webOpaque; | 101 opaque = webOpaque; |
| 98 } | 102 } |
| 99 | 103 |
| 100 } // namespace WebKit | 104 } // namespace WebKit |
| OLD | NEW |