| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 if (m_context->is3d()) { | 244 if (m_context->is3d()) { |
| 245 updateExternallyAllocatedMemory(); | 245 updateExternallyAllocatedMemory(); |
| 246 } | 246 } |
| 247 setNeedsCompositingUpdate(); | 247 setNeedsCompositingUpdate(); |
| 248 | 248 |
| 249 return m_context.get(); | 249 return m_context.get(); |
| 250 } | 250 } |
| 251 | 251 |
| 252 bool HTMLCanvasElement::shouldBeDirectComposited() const | 252 bool HTMLCanvasElement::shouldBeDirectComposited() const |
| 253 { | 253 { |
| 254 return (m_context && m_context->isAccelerated()) || (hasImageBuffer() && buf
fer()->isExpensiveToPaint()); | 254 return (m_context && m_context->isAccelerated()) || (hasImageBuffer() && buf
fer()->isExpensiveToPaint()) || (!!m_surfaceLayerBridge); |
| 255 } | 255 } |
| 256 | 256 |
| 257 bool HTMLCanvasElement::isPaintable() const | 257 bool HTMLCanvasElement::isPaintable() const |
| 258 { | 258 { |
| 259 if (!m_context) | 259 if (!m_context) |
| 260 return canCreateImageBuffer(size()); | 260 return canCreateImageBuffer(size()); |
| 261 return buffer(); | 261 return buffer(); |
| 262 } | 262 } |
| 263 | 263 |
| 264 void HTMLCanvasElement::didDraw(const FloatRect& rect) | 264 void HTMLCanvasElement::didDraw(const FloatRect& rect) |
| (...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1125 return std::make_pair(nullptr, String()); | 1125 return std::make_pair(nullptr, String()); |
| 1126 } | 1126 } |
| 1127 | 1127 |
| 1128 String HTMLCanvasElement::getIdFromControl(const Element* element) | 1128 String HTMLCanvasElement::getIdFromControl(const Element* element) |
| 1129 { | 1129 { |
| 1130 if (m_context) | 1130 if (m_context) |
| 1131 return m_context->getIdFromControl(element); | 1131 return m_context->getIdFromControl(element); |
| 1132 return String(); | 1132 return String(); |
| 1133 } | 1133 } |
| 1134 | 1134 |
| 1135 void HTMLCanvasElement::createSurfaceLayerBridge() |
| 1136 { |
| 1137 m_surfaceLayerBridge = adoptPtr(new CanvasSurfaceLayerBridge()); |
| 1138 } |
| 1139 |
| 1135 } // namespace blink | 1140 } // namespace blink |
| OLD | NEW |