OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2006, Google Inc. All rights reserved. | 2 * Copyright (c) 2006, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "GraphicsContext.h" | 32 #include "GraphicsContext.h" |
33 | 33 |
34 #include "GraphicsContextPlatformPrivate.h" | 34 #include "GraphicsContextPlatformPrivate.h" |
35 #include "GraphicsContextPrivate.h" | 35 #include "GraphicsContextPrivate.h" |
36 #include "Color.h" | 36 #include "Color.h" |
37 #include "FloatRect.h" | 37 #include "FloatRect.h" |
38 #include "Gradient.h" | 38 #include "Gradient.h" |
| 39 #include "ImageBuffer.h" |
39 #include "IntRect.h" | 40 #include "IntRect.h" |
40 #include "NativeImageSkia.h" | 41 #include "NativeImageSkia.h" |
41 #include "NotImplemented.h" | 42 #include "NotImplemented.h" |
42 #include "PlatformContextSkia.h" | 43 #include "PlatformContextSkia.h" |
43 #include "TransformationMatrix.h" | 44 #include "TransformationMatrix.h" |
44 | 45 |
45 #include "SkBitmap.h" | 46 #include "SkBitmap.h" |
46 #include "SkBlurDrawLooper.h" | 47 #include "SkBlurDrawLooper.h" |
47 #include "SkCornerPathEffect.h" | 48 #include "SkCornerPathEffect.h" |
48 #include "skia/ext/platform_canvas.h" | 49 #include "skia/ext/platform_canvas.h" |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 path.setFillType(clipRule == RULE_EVENODD ? SkPath::kEvenOdd_FillType : SkPa
th::kWinding_FillType); | 411 path.setFillType(clipRule == RULE_EVENODD ? SkPath::kEvenOdd_FillType : SkPa
th::kWinding_FillType); |
411 platformContext()->canvas()->clipPath(path); | 412 platformContext()->canvas()->clipPath(path); |
412 } | 413 } |
413 | 414 |
414 void GraphicsContext::clipToImageBuffer(const FloatRect& rect, | 415 void GraphicsContext::clipToImageBuffer(const FloatRect& rect, |
415 const ImageBuffer* imageBuffer) | 416 const ImageBuffer* imageBuffer) |
416 { | 417 { |
417 if (paintingDisabled()) | 418 if (paintingDisabled()) |
418 return; | 419 return; |
419 | 420 |
420 // FIXME: This is needed for image masking and complex text fills. | 421 #if defined(__linux__) || PLATFORM(WIN_OS) |
421 notImplemented(); | 422 platformContext()->beginLayerClippedToImage(rect, imageBuffer); |
| 423 #endif |
422 } | 424 } |
423 | 425 |
424 void GraphicsContext::concatCTM(const TransformationMatrix& xform) | 426 void GraphicsContext::concatCTM(const TransformationMatrix& xform) |
425 { | 427 { |
426 if (paintingDisabled()) | 428 if (paintingDisabled()) |
427 return; | 429 return; |
428 platformContext()->canvas()->concat(xform); | 430 platformContext()->canvas()->concat(xform); |
429 } | 431 } |
430 | 432 |
431 void GraphicsContext::drawConvexPolygon(size_t numPoints, | 433 void GraphicsContext::drawConvexPolygon(size_t numPoints, |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 void GraphicsContext::translate(float w, float h) | 1114 void GraphicsContext::translate(float w, float h) |
1113 { | 1115 { |
1114 if (paintingDisabled()) | 1116 if (paintingDisabled()) |
1115 return; | 1117 return; |
1116 | 1118 |
1117 platformContext()->canvas()->translate(WebCoreFloatToSkScalar(w), | 1119 platformContext()->canvas()->translate(WebCoreFloatToSkScalar(w), |
1118 WebCoreFloatToSkScalar(h)); | 1120 WebCoreFloatToSkScalar(h)); |
1119 } | 1121 } |
1120 | 1122 |
1121 } // namespace WebCore | 1123 } // namespace WebCore |
OLD | NEW |