| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BaseRenderingContext2D_h | 5 #ifndef BaseRenderingContext2D_h |
| 6 #define BaseRenderingContext2D_h | 6 #define BaseRenderingContext2D_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/UnionTypesCore.h" | 8 #include "bindings/core/v8/UnionTypesCore.h" |
| 9 #include "bindings/modules/v8/UnionTypesModules.h" | 9 #include "bindings/modules/v8/UnionTypesModules.h" |
| 10 #include "modules/ModulesExport.h" | 10 #include "modules/ModulesExport.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 void fillRect(double x, double y, double width, double height); | 106 void fillRect(double x, double y, double width, double height); |
| 107 void strokeRect(double x, double y, double width, double height); | 107 void strokeRect(double x, double y, double width, double height); |
| 108 | 108 |
| 109 void drawImage(const CanvasImageSourceUnion&, double x, double y, ExceptionS
tate&); | 109 void drawImage(const CanvasImageSourceUnion&, double x, double y, ExceptionS
tate&); |
| 110 void drawImage(const CanvasImageSourceUnion&, double x, double y, double wid
th, double height, ExceptionState&); | 110 void drawImage(const CanvasImageSourceUnion&, double x, double y, double wid
th, double height, ExceptionState&); |
| 111 void drawImage(const CanvasImageSourceUnion&, double sx, double sy, double s
w, double sh, double dx, double dy, double dw, double dh, ExceptionState&); | 111 void drawImage(const CanvasImageSourceUnion&, double sx, double sy, double s
w, double sh, double dx, double dy, double dw, double dh, ExceptionState&); |
| 112 void drawImage(CanvasImageSource*, double sx, double sy, double sw, double s
h, double dx, double dy, double dw, double dh, ExceptionState&); | 112 void drawImage(CanvasImageSource*, double sx, double sy, double sw, double s
h, double dx, double dy, double dw, double dh, ExceptionState&); |
| 113 | 113 |
| 114 CanvasGradient* createLinearGradient(double x0, double y0, double x1, double
y1); | 114 CanvasGradient* createLinearGradient(double x0, double y0, double x1, double
y1); |
| 115 CanvasGradient* createRadialGradient(double x0, double y0, double r0, double
x1, double y1, double r1, ExceptionState&); | 115 CanvasGradient* createRadialGradient(double x0, double y0, double r0, double
x1, double y1, double r1, ExceptionState&); |
| 116 CanvasPattern* createPattern(const CanvasImageSourceUnion&, const String& re
petitionType, ExceptionState&); | 116 CanvasPattern* createPattern(ScriptState*, const CanvasImageSourceUnion&, co
nst String& repetitionType, ExceptionState&); |
| 117 | 117 |
| 118 ImageData* createImageData(ImageData*, ExceptionState&) const; | 118 ImageData* createImageData(ImageData*, ExceptionState&) const; |
| 119 ImageData* createImageData(double width, double height, ExceptionState&) con
st; | 119 ImageData* createImageData(double width, double height, ExceptionState&) con
st; |
| 120 ImageData* getImageData(double sx, double sy, double sw, double sh, Exceptio
nState&) const; | 120 ImageData* getImageData(double sx, double sy, double sw, double sh, Exceptio
nState&) const; |
| 121 void putImageData(ImageData*, double dx, double dy, ExceptionState&); | 121 void putImageData(ImageData*, double dx, double dy, ExceptionState&); |
| 122 void putImageData(ImageData*, double dx, double dy, double dirtyX, double di
rtyY, double dirtyWidth, double dirtyHeight, ExceptionState&); | 122 void putImageData(ImageData*, double dx, double dy, double dirtyX, double di
rtyY, double dirtyWidth, double dirtyHeight, ExceptionState&); |
| 123 | 123 |
| 124 bool imageSmoothingEnabled() const; | 124 bool imageSmoothingEnabled() const; |
| 125 void setImageSmoothingEnabled(bool); | 125 void setImageSmoothingEnabled(bool); |
| 126 String imageSmoothingQuality() const; | 126 String imageSmoothingQuality() const; |
| 127 void setImageSmoothingQuality(const String&); | 127 void setImageSmoothingQuality(const String&); |
| 128 | 128 |
| 129 virtual bool originClean() const = 0; | 129 virtual bool originClean() const = 0; |
| 130 virtual void setOriginTainted() = 0; | 130 virtual void setOriginTainted() = 0; |
| 131 virtual bool wouldTaintOrigin(CanvasImageSource*) = 0; | 131 virtual bool wouldTaintOrigin(CanvasImageSource*, ScriptState*) = 0; |
| 132 | 132 |
| 133 virtual int width() const = 0; | 133 virtual int width() const = 0; |
| 134 virtual int height() const = 0; | 134 virtual int height() const = 0; |
| 135 | 135 |
| 136 virtual bool hasImageBuffer() const = 0; | 136 virtual bool hasImageBuffer() const = 0; |
| 137 virtual ImageBuffer* imageBuffer() const = 0; | 137 virtual ImageBuffer* imageBuffer() const = 0; |
| 138 | 138 |
| 139 virtual bool parseColorOrCurrentColor(Color&, const String& colorString) con
st = 0; | 139 virtual bool parseColorOrCurrentColor(Color&, const String& colorString) con
st = 0; |
| 140 | 140 |
| 141 virtual SkCanvas* drawingCanvas() const = 0; | 141 virtual SkCanvas* drawingCanvas() const = 0; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 foregroundPaint.setXfermodeMode(SkXfermode::kSrcOver_Mode); | 283 foregroundPaint.setXfermodeMode(SkXfermode::kSrcOver_Mode); |
| 284 c->setMatrix(ctm); | 284 c->setMatrix(ctm); |
| 285 drawFunc(c, &foregroundPaint); | 285 drawFunc(c, &foregroundPaint); |
| 286 c->restore(); | 286 c->restore(); |
| 287 c->setMatrix(ctm); | 287 c->setMatrix(ctm); |
| 288 } | 288 } |
| 289 | 289 |
| 290 } // namespace blink | 290 } // namespace blink |
| 291 | 291 |
| 292 #endif // BaseRenderingContext2D_h | 292 #endif // BaseRenderingContext2D_h |
| OLD | NEW |