Chromium Code Reviews| Index: cc/picture_layer_impl.cc |
| diff --git a/cc/picture_layer_impl.cc b/cc/picture_layer_impl.cc |
| index bb608e84e00d27661ac0bb86599db4f79981bbca..0af1913bbbf817f7c492928fa2a69f1fcb6bdf6e 100644 |
| --- a/cc/picture_layer_impl.cc |
| +++ b/cc/picture_layer_impl.cc |
| @@ -96,11 +96,17 @@ void PictureLayerImpl::appendQuads(QuadSink& quadSink, |
| bool isAxisAlignedInTarget = !clipped && target_quad.IsRectilinear(); |
| bool useAA = !isAxisAlignedInTarget; |
| + bool isPixelAligned = isAxisAlignedInTarget && drawTransform().IsIdentityOrIntegerTranslation(); |
|
brianderson
2013/02/13 00:10:19
Note: the logic here reflects the logic used to de
|
| + PictureLayerTiling::LayerDeviceAlignment layerDeviceAlignment = |
| + isPixelAligned ? PictureLayerTiling::LayerAlignedToDevice |
| + : PictureLayerTiling::LayerNotAlignedToDevice; |
| + |
| if (showDebugBorders()) { |
| for (PictureLayerTilingSet::Iterator iter(tilings_.get(), |
| contentsScaleX(), |
| rect, |
| - ideal_contents_scale_); |
| + ideal_contents_scale_, |
| + layerDeviceAlignment); |
| iter; |
| ++iter) { |
| SkColor color; |
| @@ -139,7 +145,8 @@ void PictureLayerImpl::appendQuads(QuadSink& quadSink, |
| for (PictureLayerTilingSet::Iterator iter(tilings_.get(), |
| contentsScaleX(), |
| rect, |
| - ideal_contents_scale_); |
| + ideal_contents_scale_, |
| + layerDeviceAlignment); |
| iter; |
| ++iter) { |
| ResourceProvider::ResourceId resource = 0; |
| @@ -426,7 +433,8 @@ ResourceProvider::ResourceId PictureLayerImpl::contentsResourceId() const { |
| for (PictureLayerTilingSet::Iterator iter(tilings_.get(), |
| scale, |
| content_rect, |
| - ideal_contents_scale_); |
| + ideal_contents_scale_, |
| + PictureLayerTiling::LayerDeviceAlignmentUnknown); |
| iter; |
| ++iter) { |
| // Mask resource not ready yet. |
| @@ -474,7 +482,8 @@ bool PictureLayerImpl::areVisibleResourcesReady() const { |
| for (PictureLayerTiling::Iterator iter(tiling, |
| contentsScaleX(), |
| - rect); |
| + rect, |
| + PictureLayerTiling::LayerDeviceAlignmentUnknown); |
| iter; |
| ++iter) { |
| // A null tile (i.e. no recording) is considered "ready". |