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 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 | 584 |
585 bool HTMLCanvasElement::originClean() const | 585 bool HTMLCanvasElement::originClean() const |
586 { | 586 { |
587 if (document().settings() && document().settings()->disableReadingFromCanvas
()) | 587 if (document().settings() && document().settings()->disableReadingFromCanvas
()) |
588 return false; | 588 return false; |
589 return m_originClean; | 589 return m_originClean; |
590 } | 590 } |
591 | 591 |
592 bool HTMLCanvasElement::shouldAccelerate(const IntSize& size) const | 592 bool HTMLCanvasElement::shouldAccelerate(const IntSize& size) const |
593 { | 593 { |
| 594 fprintf(stderr, "shouldAccelerate?\n"); |
594 if (m_context && !m_context->is2d()) | 595 if (m_context && !m_context->is2d()) |
595 return false; | 596 return false; |
596 | 597 |
597 if (m_accelerationDisabled) | 598 if (m_accelerationDisabled) |
598 return false; | 599 return false; |
599 | 600 |
600 if (RuntimeEnabledFeatures::forceDisplayList2dCanvasEnabled()) | 601 if (RuntimeEnabledFeatures::forceDisplayList2dCanvasEnabled()) |
601 return false; | 602 return false; |
602 | 603 |
603 Settings* settings = document().settings(); | 604 Settings* settings = document().settings(); |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 { | 944 { |
944 return FloatSize(width(), height()); | 945 return FloatSize(width(), height()); |
945 } | 946 } |
946 | 947 |
947 bool HTMLCanvasElement::isOpaque() const | 948 bool HTMLCanvasElement::isOpaque() const |
948 { | 949 { |
949 return m_context && !m_context->hasAlpha(); | 950 return m_context && !m_context->hasAlpha(); |
950 } | 951 } |
951 | 952 |
952 } // blink | 953 } // blink |
OLD | NEW |