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"); | |
595 if (m_context && !m_context->is2d()) | 594 if (m_context && !m_context->is2d()) |
596 return false; | 595 return false; |
597 | 596 |
598 if (m_accelerationDisabled) | 597 if (m_accelerationDisabled) |
599 return false; | 598 return false; |
600 | 599 |
601 if (RuntimeEnabledFeatures::forceDisplayList2dCanvasEnabled()) | 600 if (RuntimeEnabledFeatures::forceDisplayList2dCanvasEnabled()) |
602 return false; | 601 return false; |
603 | 602 |
604 Settings* settings = document().settings(); | 603 Settings* settings = document().settings(); |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 { | 943 { |
945 return FloatSize(width(), height()); | 944 return FloatSize(width(), height()); |
946 } | 945 } |
947 | 946 |
948 bool HTMLCanvasElement::isOpaque() const | 947 bool HTMLCanvasElement::isOpaque() const |
949 { | 948 { |
950 return m_context && !m_context->hasAlpha(); | 949 return m_context && !m_context->hasAlpha(); |
951 } | 950 } |
952 | 951 |
953 } // blink | 952 } // blink |
OLD | NEW |