OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 #if ENABLE(HIGH_DPI_CANVAS) | 293 #if ENABLE(HIGH_DPI_CANVAS) |
294 return document()->frame() ? document()->frame()->page()->deviceScaleFactor(
) : 1; | 294 return document()->frame() ? document()->frame()->page()->deviceScaleFactor(
) : 1; |
295 #else | 295 #else |
296 return 1; | 296 return 1; |
297 #endif | 297 #endif |
298 } | 298 } |
299 | 299 |
300 bool HTMLCanvasElement::paintsIntoCanvasBuffer() const | 300 bool HTMLCanvasElement::paintsIntoCanvasBuffer() const |
301 { | 301 { |
302 ASSERT(m_context); | 302 ASSERT(m_context); |
303 #if USE(IOSURFACE_CANVAS_BACKING_STORE) | |
304 if (m_context->is2d()) | |
305 return true; | |
306 #endif | |
307 | 303 |
308 if (!m_context->isAccelerated()) | 304 if (!m_context->isAccelerated()) |
309 return true; | 305 return true; |
310 | 306 |
311 if (renderBox() && renderBox()->hasAcceleratedCompositing()) | 307 if (renderBox() && renderBox()->hasAcceleratedCompositing()) |
312 return false; | 308 return false; |
313 | 309 |
314 return true; | 310 return true; |
315 } | 311 } |
316 | 312 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 HTMLElement::reportMemoryUsage(memoryObjectInfo); | 585 HTMLElement::reportMemoryUsage(memoryObjectInfo); |
590 info.addMember(m_observers, "observers"); | 586 info.addMember(m_observers, "observers"); |
591 info.addMember(m_context, "context"); | 587 info.addMember(m_context, "context"); |
592 info.addMember(m_imageBuffer, "imageBuffer"); | 588 info.addMember(m_imageBuffer, "imageBuffer"); |
593 info.addMember(m_contextStateSaver, "contextStateSaver"); | 589 info.addMember(m_contextStateSaver, "contextStateSaver"); |
594 info.addMember(m_presentedImage, "presentedImage"); | 590 info.addMember(m_presentedImage, "presentedImage"); |
595 info.addMember(m_copiedImage, "copiedImage"); | 591 info.addMember(m_copiedImage, "copiedImage"); |
596 } | 592 } |
597 | 593 |
598 } | 594 } |
OLD | NEW |