| OLD | NEW |
| 1 /* | 1 /* |
| 2 ** Copyright 2006, Google Inc. | 2 ** Copyright 2006, Google Inc. |
| 3 ** | 3 ** |
| 4 ** Licensed under the Apache License, Version 2.0 (the "License"); | 4 ** Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 ** you may not use this file except in compliance with the License. | 5 ** you may not use this file except in compliance with the License. |
| 6 ** You may obtain a copy of the License at | 6 ** You may obtain a copy of the License at |
| 7 ** | 7 ** |
| 8 ** http://www.apache.org/licenses/LICENSE-2.0 | 8 ** http://www.apache.org/licenses/LICENSE-2.0 |
| 9 ** | 9 ** |
| 10 ** Unless required by applicable law or agreed to in writing, software | 10 ** Unless required by applicable law or agreed to in writing, software |
| 11 ** distributed under the License is distributed on an "AS IS" BASIS, | 11 ** distributed under the License is distributed on an "AS IS" BASIS, |
| 12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 ** See the License for the specific language governing permissions and | 13 ** See the License for the specific language governing permissions and |
| 14 ** limitations under the License. | 14 ** limitations under the License. |
| 15 */ | 15 */ |
| 16 | 16 |
| 17 #include "config.h" |
| 17 #include <math.h> | 18 #include <math.h> |
| 18 | 19 |
| 19 #include "config.h" | |
| 20 #include "GraphicsContext.h" | 20 #include "GraphicsContext.h" |
| 21 #include "GraphicsContextPlatformPrivate.h" | 21 #include "GraphicsContextPlatformPrivate.h" |
| 22 #include "GraphicsContextPrivate.h" | 22 #include "GraphicsContextPrivate.h" |
| 23 | 23 |
| 24 #include "Assertions.h" | 24 #include "Assertions.h" |
| 25 #include "AffineTransform.h" | 25 #include "AffineTransform.h" |
| 26 #include "Color.h" | 26 #include "Color.h" |
| 27 #include "FloatRect.h" | 27 #include "FloatRect.h" |
| 28 #include "Gradient.h" | 28 #include "Gradient.h" |
| 29 #include "IntRect.h" | 29 #include "IntRect.h" |
| 30 #include "NativeImageSkia.h" | 30 #include "NativeImageSkia.h" |
| 31 #include "NotImplemented.h" | 31 #include "NotImplemented.h" |
| 32 #include "PlatformContextSkia.h" | 32 #include "PlatformContextSkia.h" |
| 33 #include "SkBitmap.h" | 33 #include "SkBitmap.h" |
| 34 #include "SkBlurDrawLooper.h" | 34 #include "SkBlurDrawLooper.h" |
| 35 #include "SkCornerPathEffect.h" | 35 #include "SkCornerPathEffect.h" |
| 36 #include "skia/ext/platform_canvas.h" |
| 36 #include "SkiaUtils.h" | 37 #include "SkiaUtils.h" |
| 37 #include "SkShader.h" | 38 #include "SkShader.h" |
| 38 #include "wtf/MathExtras.h" | 39 #include "wtf/MathExtras.h" |
| 39 | 40 |
| 40 #include "base/gfx/platform_canvas.h" | |
| 41 | |
| 42 using namespace std; | 41 using namespace std; |
| 43 | 42 |
| 44 namespace WebCore { | 43 namespace WebCore { |
| 45 | 44 |
| 46 namespace { | 45 namespace { |
| 47 | 46 |
| 48 // "Reasonable" functions ------------------------------------------------------ | 47 // "Reasonable" functions ------------------------------------------------------ |
| 49 // | 48 // |
| 50 // These functions check certain graphics primitives for being "reasonable". | 49 // These functions check certain graphics primitives for being "reasonable". |
| 51 // We don't like to send crazy data to the graphics layer that might overflow, | 50 // We don't like to send crazy data to the graphics layer that might overflow, |
| (...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 | 1082 |
| 1084 void GraphicsContext::translate(float w, float h) | 1083 void GraphicsContext::translate(float w, float h) |
| 1085 { | 1084 { |
| 1086 if (paintingDisabled()) | 1085 if (paintingDisabled()) |
| 1087 return; | 1086 return; |
| 1088 platformContext()->canvas()->translate(WebCoreFloatToSkScalar(w), | 1087 platformContext()->canvas()->translate(WebCoreFloatToSkScalar(w), |
| 1089 WebCoreFloatToSkScalar(h)); | 1088 WebCoreFloatToSkScalar(h)); |
| 1090 } | 1089 } |
| 1091 | 1090 |
| 1092 } // namespace WebCore | 1091 } // namespace WebCore |
| OLD | NEW |