Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: third_party/WebKit/Source/core/html/canvas/CanvasImageSource.h

Issue 2294383002: Make OffscreenCanvas a member of CanvasImageSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // IMPORTANT: Result must be independent of whether destinationContext is 51 // IMPORTANT: Result must be independent of whether destinationContext is
52 // already tainted because this function may be used to determine whether 52 // already tainted because this function may be used to determine whether
53 // a CanvasPattern is "origin clean", and that pattern may be used on 53 // a CanvasPattern is "origin clean", and that pattern may be used on
54 // another canvas, which may not be already tainted. 54 // another canvas, which may not be already tainted.
55 virtual bool wouldTaintOrigin(SecurityOrigin* destinationSecurityOrigin) con st = 0; 55 virtual bool wouldTaintOrigin(SecurityOrigin* destinationSecurityOrigin) con st = 0;
56 56
57 virtual bool isVideoElement() const { return false; } 57 virtual bool isVideoElement() const { return false; }
58 virtual bool isCanvasElement() const { return false; } 58 virtual bool isCanvasElement() const { return false; }
59 virtual bool isSVGSource() const { return false; } 59 virtual bool isSVGSource() const { return false; }
60 virtual bool isImageBitmap() const { return false; } 60 virtual bool isImageBitmap() const { return false; }
61 virtual bool isOffscreenCanvas() const { return false; }
61 62
62 // Adjusts the source and destination rectangles for cases where the actual 63 // Adjusts the source and destination rectangles for cases where the actual
63 // source image is a subregion of the image returned by getSourceImageForCan vas. 64 // source image is a subregion of the image returned by getSourceImageForCan vas.
64 virtual void adjustDrawRects(FloatRect* srcRect, FloatRect* dstRect) const { } 65 virtual void adjustDrawRects(FloatRect* srcRect, FloatRect* dstRect) const { }
65 66
66 virtual FloatSize elementSize(const FloatSize& defaultObjectSize) const = 0; 67 virtual FloatSize elementSize(const FloatSize& defaultObjectSize) const = 0;
67 virtual FloatSize defaultDestinationSize(const FloatSize& defaultObjectSize) const { return elementSize(defaultObjectSize); } 68 virtual FloatSize defaultDestinationSize(const FloatSize& defaultObjectSize) const { return elementSize(defaultObjectSize); }
68 virtual const KURL& sourceURL() const { return blankURL(); } 69 virtual const KURL& sourceURL() const { return blankURL(); }
69 virtual bool isOpaque() const { return false; } 70 virtual bool isOpaque() const { return false; }
70 71
71 virtual int sourceWidth() = 0; 72 virtual int sourceWidth() = 0;
72 virtual int sourceHeight() = 0; 73 virtual int sourceHeight() = 0;
73 74
74 protected: 75 protected:
75 virtual ~CanvasImageSource() { } 76 virtual ~CanvasImageSource() { }
76 }; 77 };
77 78
78 } // namespace blink 79 } // namespace blink
79 80
80 #endif 81 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698