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

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2D.h

Issue 181693006: Refactoring source image usage in CanvasRenderingContext2D (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/canvas/CanvasRenderingContext2D.h
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.h b/Source/core/html/canvas/CanvasRenderingContext2D.h
index 40cb44c2c38c1a8afb11633024f767dc7ed0a7a0..7d221b3f000ff044100c40ba1a0af6fb3094199c 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.h
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.h
@@ -46,6 +46,7 @@ namespace blink { class WebLayer; }
namespace WebCore {
+class CanvasImageSource;
class CanvasGradient;
class CanvasPattern;
class CanvasStyle;
@@ -171,22 +172,10 @@ public:
void clearShadow();
- void drawImage(ImageBitmap*, float x, float y, ExceptionState&);
- void drawImage(ImageBitmap*, float x, float y, float width, float height, ExceptionState&);
- void drawImage(ImageBitmap*, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionState&);
- void drawImage(HTMLImageElement*, float x, float y, ExceptionState&);
- void drawImage(HTMLImageElement*, float x, float y, float width, float height, ExceptionState&);
- void drawImage(HTMLImageElement*, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionState&);
- void drawImage(HTMLImageElement*, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionState&);
- void drawImage(HTMLImageElement*, const FloatRect& srcRect, const FloatRect& dstRect, const CompositeOperator&, const blink::WebBlendMode&, ExceptionState&);
- void drawImage(HTMLCanvasElement*, float x, float y, ExceptionState&);
- void drawImage(HTMLCanvasElement*, float x, float y, float width, float height, ExceptionState&);
- void drawImage(HTMLCanvasElement*, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionState&);
- void drawImage(HTMLCanvasElement*, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionState&);
- void drawImage(HTMLVideoElement*, float x, float y, ExceptionState&);
- void drawImage(HTMLVideoElement*, float x, float y, float width, float height, ExceptionState&);
- void drawImage(HTMLVideoElement*, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionState&);
- void drawImage(HTMLVideoElement*, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionState&);
+ void drawImage(CanvasImageSource*, float x, float y, ExceptionState&);
+ void drawImage(CanvasImageSource*, float x, float y, float width, float height, ExceptionState&);
+ void drawImage(CanvasImageSource*, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionState&);
+ void drawImage(CanvasImageSource*, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionState&);
void drawImageFromRect(HTMLImageElement*, float sx = 0, float sy = 0, float sw = 0, float sh = 0,
float dx = 0, float dy = 0, float dw = 0, float dh = 0, const String& compositeOperation = emptyString());
@@ -197,8 +186,7 @@ public:
PassRefPtr<CanvasGradient> createLinearGradient(float x0, float y0, float x1, float y1, ExceptionState&);
PassRefPtr<CanvasGradient> createRadialGradient(float x0, float y0, float r0, float x1, float y1, float r1, ExceptionState&);
- PassRefPtr<CanvasPattern> createPattern(HTMLImageElement*, const String& repetitionType, ExceptionState&);
- PassRefPtr<CanvasPattern> createPattern(HTMLCanvasElement*, const String& repetitionType, ExceptionState&);
+ PassRefPtr<CanvasPattern> createPattern(CanvasImageSource*, const String& repetitionType, ExceptionState&);
PassRefPtr<ImageData> createImageData(PassRefPtr<ImageData>, ExceptionState&) const;
PassRefPtr<ImageData> createImageData(float width, float height, ExceptionState&) const;
@@ -292,7 +280,6 @@ private:
void applyShadow();
bool shouldDrawShadows() const;
- void drawImageInternal(Image*, const FloatRect&, const FloatRect&, const CompositeOperator&, const blink::WebBlendMode&);
bool computeDirtyRect(const FloatRect& localBounds, FloatRect*);
bool computeDirtyRect(const FloatRect& localBounds, const FloatRect& transformedClipBounds, FloatRect*);
void didDraw(const FloatRect&);

Powered by Google App Engine
This is Rietveld 408576698