| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Computer, 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 26 matching lines...) Expand all Loading... |
| 37 bool currentFrameHasSingleSecurityOrigin() const override { return true; } | 37 bool currentFrameHasSingleSecurityOrigin() const override { return true; } |
| 38 | 38 |
| 39 bool usesContainerSize() const override { return true; } | 39 bool usesContainerSize() const override { return true; } |
| 40 bool hasRelativeSize() const override { return true; } | 40 bool hasRelativeSize() const override { return true; } |
| 41 | 41 |
| 42 IntSize size() const override { return m_size; } | 42 IntSize size() const override { return m_size; } |
| 43 | 43 |
| 44 // Assume that generated content has no decoded data we need to worry about | 44 // Assume that generated content has no decoded data we need to worry about |
| 45 void destroyDecodedData() override {} | 45 void destroyDecodedData() override {} |
| 46 | 46 |
| 47 sk_sp<SkImage> imageForCurrentFrame(const ColorBehavior&) override; | 47 sk_sp<SkImage> imageForCurrentFrame() override; |
| 48 | 48 |
| 49 protected: | 49 protected: |
| 50 void drawPattern(GraphicsContext&, | 50 void drawPattern(GraphicsContext&, |
| 51 const FloatRect&, | 51 const FloatRect&, |
| 52 const FloatSize&, | 52 const FloatSize&, |
| 53 const FloatPoint&, | 53 const FloatPoint&, |
| 54 SkBlendMode, | 54 SkBlendMode, |
| 55 const FloatRect&, | 55 const FloatRect&, |
| 56 const FloatSize& repeatSpacing) final; | 56 const FloatSize& repeatSpacing) final; |
| 57 | 57 |
| 58 // FIXME: Implement this to be less conservative. | 58 // FIXME: Implement this to be less conservative. |
| 59 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override { | 59 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override { |
| 60 return false; | 60 return false; |
| 61 } | 61 } |
| 62 | 62 |
| 63 GeneratedImage(const IntSize& size) : m_size(size) {} | 63 GeneratedImage(const IntSize& size) : m_size(size) {} |
| 64 | 64 |
| 65 virtual void drawTile(GraphicsContext&, const FloatRect&) = 0; | 65 virtual void drawTile(GraphicsContext&, const FloatRect&) = 0; |
| 66 | 66 |
| 67 IntSize m_size; | 67 IntSize m_size; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace blink | 70 } // namespace blink |
| 71 | 71 |
| 72 #endif | 72 #endif |
| OLD | NEW |