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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 0, | 268 0, |
269 static_cast<unsigned char>(opacity * 255), | 269 static_cast<unsigned char>(opacity * 255), |
270 static_cast<SkCanvas::SaveFlags>(SkCanvas::kHasAlphaLayer_SaveFlag | | 270 static_cast<SkCanvas::SaveFlags>(SkCanvas::kHasAlphaLayer_SaveFlag | |
271 SkCanvas::kFullColorLayer_SaveFlag)); | 271 SkCanvas::kFullColorLayer_SaveFlag)); |
272 } | 272 } |
273 | 273 |
274 void GraphicsContext::endTransparencyLayer() | 274 void GraphicsContext::endTransparencyLayer() |
275 { | 275 { |
276 if (paintingDisabled()) | 276 if (paintingDisabled()) |
277 return; | 277 return; |
278 | |
279 #if PLATFORM(WIN_OS) | |
280 platformContext()->canvas()->getTopPlatformDevice(). | |
281 fixupAlphaBeforeCompositing(); | |
282 #endif | |
283 platformContext()->canvas()->restore(); | 278 platformContext()->canvas()->restore(); |
284 } | 279 } |
285 | 280 |
286 // Graphics primitives --------------------------------------------------------- | 281 // Graphics primitives --------------------------------------------------------- |
287 | 282 |
288 void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness
) | 283 void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness
) |
289 { | 284 { |
290 if (paintingDisabled()) | 285 if (paintingDisabled()) |
291 return; | 286 return; |
292 | 287 |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 void GraphicsContext::translate(float w, float h) | 1130 void GraphicsContext::translate(float w, float h) |
1136 { | 1131 { |
1137 if (paintingDisabled()) | 1132 if (paintingDisabled()) |
1138 return; | 1133 return; |
1139 | 1134 |
1140 platformContext()->canvas()->translate(WebCoreFloatToSkScalar(w), | 1135 platformContext()->canvas()->translate(WebCoreFloatToSkScalar(w), |
1141 WebCoreFloatToSkScalar(h)); | 1136 WebCoreFloatToSkScalar(h)); |
1142 } | 1137 } |
1143 | 1138 |
1144 } // namespace WebCore | 1139 } // namespace WebCore |
OLD | NEW |