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 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 // Subtracting two intptr_t that are known to be positive will never underfl
ow. | 737 // Subtracting two intptr_t that are known to be positive will never underfl
ow. |
738 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(externallyA
llocatedMemory - m_externallyAllocatedMemory); | 738 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(externallyA
llocatedMemory - m_externallyAllocatedMemory); |
739 m_externallyAllocatedMemory = externallyAllocatedMemory; | 739 m_externallyAllocatedMemory = externallyAllocatedMemory; |
740 } | 740 } |
741 | 741 |
742 SkCanvas* HTMLCanvasElement::drawingCanvas() const | 742 SkCanvas* HTMLCanvasElement::drawingCanvas() const |
743 { | 743 { |
744 return buffer() ? m_imageBuffer->canvas() : nullptr; | 744 return buffer() ? m_imageBuffer->canvas() : nullptr; |
745 } | 745 } |
746 | 746 |
747 SkCanvas* HTMLCanvasElement::immediateDrawingCanvas() const | 747 void HTMLCanvasElement::disableDeferral() const |
748 { | 748 { |
749 return buffer() ? m_imageBuffer->immediateCanvas() : nullptr; | 749 if (buffer()) |
| 750 m_imageBuffer->disableDeferral(); |
750 } | 751 } |
751 | 752 |
752 SkCanvas* HTMLCanvasElement::existingDrawingCanvas() const | 753 SkCanvas* HTMLCanvasElement::existingDrawingCanvas() const |
753 { | 754 { |
754 if (!hasImageBuffer()) | 755 if (!hasImageBuffer()) |
755 return nullptr; | 756 return nullptr; |
756 | 757 |
757 return m_imageBuffer->canvas(); | 758 return m_imageBuffer->canvas(); |
758 } | 759 } |
759 | 760 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 { | 892 { |
892 return FloatSize(width(), height()); | 893 return FloatSize(width(), height()); |
893 } | 894 } |
894 | 895 |
895 bool HTMLCanvasElement::isOpaque() const | 896 bool HTMLCanvasElement::isOpaque() const |
896 { | 897 { |
897 return m_context && !m_context->hasAlpha(); | 898 return m_context && !m_context->hasAlpha(); |
898 } | 899 } |
899 | 900 |
900 } // blink | 901 } // blink |
OLD | NEW |