| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 2778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2789 | 2789 |
| 2790 Image* image = cached_image->GetImage(); | 2790 Image* image = cached_image->GetImage(); |
| 2791 if (!image) | 2791 if (!image) |
| 2792 return; | 2792 return; |
| 2793 | 2793 |
| 2794 // This is a no-op if the layer doesn't have an inner layer for the image. | 2794 // This is a no-op if the layer doesn't have an inner layer for the image. |
| 2795 graphics_layer_->SetContentsToImage( | 2795 graphics_layer_->SetContentsToImage( |
| 2796 image, LayoutObject::ShouldRespectImageOrientation(&image_layout_object)); | 2796 image, LayoutObject::ShouldRespectImageOrientation(&image_layout_object)); |
| 2797 | 2797 |
| 2798 graphics_layer_->SetFilterQuality( | 2798 graphics_layer_->SetFilterQuality( |
| 2799 GetLayoutObject().Style()->ImageRendering() == kImageRenderingPixelated | 2799 GetLayoutObject().Style()->ImageRendering() == EImageRendering::kPixelated |
| 2800 ? kNone_SkFilterQuality | 2800 ? kNone_SkFilterQuality |
| 2801 : kLow_SkFilterQuality); | 2801 : kLow_SkFilterQuality); |
| 2802 | 2802 |
| 2803 // Prevent double-drawing: https://bugs.webkit.org/show_bug.cgi?id=58632 | 2803 // Prevent double-drawing: https://bugs.webkit.org/show_bug.cgi?id=58632 |
| 2804 UpdateDrawsContent(); | 2804 UpdateDrawsContent(); |
| 2805 | 2805 |
| 2806 // Image animation is "lazy", in that it automatically stops unless someone is | 2806 // Image animation is "lazy", in that it automatically stops unless someone is |
| 2807 // drawing the image. So we have to kick the animation each time; this has the | 2807 // drawing the image. So we have to kick the animation each time; this has the |
| 2808 // downside that the image will keep animating, even if its layer is not | 2808 // downside that the image will keep animating, even if its layer is not |
| 2809 // visible. | 2809 // visible. |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3662 } else if (graphics_layer == decoration_outline_layer_.get()) { | 3662 } else if (graphics_layer == decoration_outline_layer_.get()) { |
| 3663 name = "Decoration Layer"; | 3663 name = "Decoration Layer"; |
| 3664 } else { | 3664 } else { |
| 3665 NOTREACHED(); | 3665 NOTREACHED(); |
| 3666 } | 3666 } |
| 3667 | 3667 |
| 3668 return name; | 3668 return name; |
| 3669 } | 3669 } |
| 3670 | 3670 |
| 3671 } // namespace blink | 3671 } // namespace blink |
| OLD | NEW |