OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 : m_data(size) | 56 : m_data(size) |
57 , m_size(size) | 57 , m_size(size) |
58 { | 58 { |
59 if (!m_data.m_canvas.initialize(size.width(), size.height(), false)) { | 59 if (!m_data.m_canvas.initialize(size.width(), size.height(), false)) { |
60 success = false; | 60 success = false; |
61 return; | 61 return; |
62 } | 62 } |
63 | 63 |
64 m_data.m_platformContext.setCanvas(&m_data.m_canvas); | 64 m_data.m_platformContext.setCanvas(&m_data.m_canvas); |
65 m_context.set(new GraphicsContext(&m_data.m_platformContext)); | 65 m_context.set(new GraphicsContext(&m_data.m_platformContext)); |
| 66 #if PLATFORM(WIN_OS) |
| 67 m_context->platformContext()->setDrawingToImageBuffer(true); |
| 68 #endif |
66 | 69 |
67 // Make the background transparent. It would be nice if this wasn't | 70 // Make the background transparent. It would be nice if this wasn't |
68 // required, but the canvas is currently filled with the magic transparency | 71 // required, but the canvas is currently filled with the magic transparency |
69 // color. Can we have another way to manage this? | 72 // color. Can we have another way to manage this? |
70 m_data.m_canvas.drawARGB(0, 0, 0, 0, SkPorterDuff::kClear_Mode); | 73 m_data.m_canvas.drawARGB(0, 0, 0, 0, SkPorterDuff::kClear_Mode); |
71 success = true; | 74 success = true; |
72 } | 75 } |
73 | 76 |
74 ImageBuffer::~ImageBuffer() | 77 ImageBuffer::~ImageBuffer() |
75 { | 78 { |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 } | 204 } |
202 } | 205 } |
203 | 206 |
204 String ImageBuffer::toDataURL(const String&) const | 207 String ImageBuffer::toDataURL(const String&) const |
205 { | 208 { |
206 notImplemented(); | 209 notImplemented(); |
207 return String(); | 210 return String(); |
208 } | 211 } |
209 | 212 |
210 } // namespace WebCore | 213 } // namespace WebCore |
OLD | NEW |