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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "cc/tiled_layer.h" | 7 #include "cc/tiled_layer.h" |
8 | 8 |
9 #include "Region.h" | 9 #include "Region.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
269 | 269 |
270 return addedTile; | 270 return addedTile; |
271 } | 271 } |
272 | 272 |
273 void TiledLayer::setNeedsDisplayRect(const gfx::RectF& dirtyRect) | 273 void TiledLayer::setNeedsDisplayRect(const gfx::RectF& dirtyRect) |
274 { | 274 { |
275 invalidateContentRect(layerRectToContentRect(dirtyRect)); | 275 invalidateContentRect(layerRectToContentRect(dirtyRect)); |
276 ContentsScalingLayer::setNeedsDisplayRect(dirtyRect); | 276 ContentsScalingLayer::setNeedsDisplayRect(dirtyRect); |
277 } | 277 } |
278 | 278 |
279 void TiledLayer::setUseLCDText(bool useLCDText) | 279 void TiledLayer::setCanUseLCDText(bool useLCDText) |
280 { | 280 { |
281 ContentsScalingLayer::setUseLCDText(useLCDText); | 281 ContentsScalingLayer::setCanUseLCDText(useLCDText); |
282 | 282 |
283 LayerTilingData::BorderTexelOption borderTexelOption; | 283 LayerTilingData::BorderTexelOption borderTexelOption; |
284 #if OS(ANDROID) | 284 #if OS(ANDROID) |
285 DCHECK(!useLCDText); | |
danakj
2012/11/07 18:15:00
This won't work well with making it a LayerTreeSet
alokp
2012/11/08 22:34:07
I realized that if-else block is not needed anymor
| |
285 // Always want border texels and GL_LINEAR due to pinch zoom. | 286 // Always want border texels and GL_LINEAR due to pinch zoom. |
286 borderTexelOption = LayerTilingData::HasBorderTexels; | 287 borderTexelOption = LayerTilingData::HasBorderTexels; |
287 #else | 288 #else |
288 borderTexelOption = useLCDText ? LayerTilingData::NoBorderTexels : LayerTili ngData::HasBorderTexels; | 289 borderTexelOption = useLCDText ? LayerTilingData::NoBorderTexels : LayerTili ngData::HasBorderTexels; |
289 #endif | 290 #endif |
290 setBorderTexelOption(borderTexelOption); | 291 setBorderTexelOption(borderTexelOption); |
291 } | 292 } |
292 | 293 |
293 void TiledLayer::invalidateContentRect(const gfx::Rect& contentRect) | 294 void TiledLayer::invalidateContentRect(const gfx::Rect& contentRect) |
294 { | 295 { |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
777 gfx::Rect prepaintRect = visibleContentRect(); | 778 gfx::Rect prepaintRect = visibleContentRect(); |
778 prepaintRect.Inset(-m_tiler->tileSize().width() * prepaintColumns, | 779 prepaintRect.Inset(-m_tiler->tileSize().width() * prepaintColumns, |
779 -m_tiler->tileSize().height() * prepaintRows); | 780 -m_tiler->tileSize().height() * prepaintRows); |
780 gfx::Rect contentRect(gfx::Point(), contentBounds()); | 781 gfx::Rect contentRect(gfx::Point(), contentBounds()); |
781 prepaintRect.Intersect(contentRect); | 782 prepaintRect.Intersect(contentRect); |
782 | 783 |
783 return prepaintRect; | 784 return prepaintRect; |
784 } | 785 } |
785 | 786 |
786 } // namespace cc | 787 } // namespace cc |
OLD | NEW |