Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 | 61 |
| 62 // Adjusts the source and destination rectangles for cases where the actual | 62 // Adjusts the source and destination rectangles for cases where the actual |
| 63 // source image is a subregion of the image returned by getSourceImageForCan vas. | 63 // source image is a subregion of the image returned by getSourceImageForCan vas. |
| 64 virtual void adjustDrawRects(FloatRect* srcRect, FloatRect* dstRect) const { } | 64 virtual void adjustDrawRects(FloatRect* srcRect, FloatRect* dstRect) const { } |
| 65 | 65 |
| 66 virtual FloatSize elementSize(const FloatSize& defaultObjectSize) const = 0; | 66 virtual FloatSize elementSize(const FloatSize& defaultObjectSize) const = 0; |
| 67 virtual FloatSize defaultDestinationSize(const FloatSize& defaultObjectSize) const { return elementSize(defaultObjectSize); } | 67 virtual FloatSize defaultDestinationSize(const FloatSize& defaultObjectSize) const { return elementSize(defaultObjectSize); } |
| 68 virtual const KURL& sourceURL() const { return blankURL(); } | 68 virtual const KURL& sourceURL() const { return blankURL(); } |
| 69 virtual bool isOpaque() const { return false; } | 69 virtual bool isOpaque() const { return false; } |
| 70 | 70 |
| 71 virtual int sourceWidth() { return 0; } | |
|
Justin Novosad
2016/06/23 14:48:43
This should be pure virtual IMHO. The default beha
| |
| 72 virtual int sourceHeight() { return 0; } | |
| 73 | |
| 71 protected: | 74 protected: |
| 72 virtual ~CanvasImageSource() { } | 75 virtual ~CanvasImageSource() { } |
| 73 }; | 76 }; |
| 74 | 77 |
| 75 } // namespace blink | 78 } // namespace blink |
| 76 | 79 |
| 77 #endif | 80 #endif |
| OLD | NEW |