| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 #include "core/html/canvas/CanvasRenderingContextFactory.h" | 51 #include "core/html/canvas/CanvasRenderingContextFactory.h" |
| 52 #include "core/imagebitmap/ImageBitmapOptions.h" | 52 #include "core/imagebitmap/ImageBitmapOptions.h" |
| 53 #include "core/layout/LayoutHTMLCanvas.h" | 53 #include "core/layout/LayoutHTMLCanvas.h" |
| 54 #include "core/paint/PaintLayer.h" | 54 #include "core/paint/PaintLayer.h" |
| 55 #include "core/paint/PaintTiming.h" | 55 #include "core/paint/PaintTiming.h" |
| 56 #include "platform/Histogram.h" | 56 #include "platform/Histogram.h" |
| 57 #include "platform/MIMETypeRegistry.h" | 57 #include "platform/MIMETypeRegistry.h" |
| 58 #include "platform/RuntimeEnabledFeatures.h" | 58 #include "platform/RuntimeEnabledFeatures.h" |
| 59 #include "platform/graphics/Canvas2DImageBufferSurface.h" | 59 #include "platform/graphics/Canvas2DImageBufferSurface.h" |
| 60 #include "platform/graphics/CanvasMetrics.h" | 60 #include "platform/graphics/CanvasMetrics.h" |
| 61 #include "platform/graphics/CanvasSurfaceLayerBridgeClientImpl.h" |
| 61 #include "platform/graphics/ExpensiveCanvasHeuristicParameters.h" | 62 #include "platform/graphics/ExpensiveCanvasHeuristicParameters.h" |
| 62 #include "platform/graphics/ImageBuffer.h" | 63 #include "platform/graphics/ImageBuffer.h" |
| 63 #include "platform/graphics/RecordingImageBufferSurface.h" | 64 #include "platform/graphics/RecordingImageBufferSurface.h" |
| 64 #include "platform/graphics/StaticBitmapImage.h" | 65 #include "platform/graphics/StaticBitmapImage.h" |
| 65 #include "platform/graphics/UnacceleratedImageBufferSurface.h" | 66 #include "platform/graphics/UnacceleratedImageBufferSurface.h" |
| 66 #include "platform/graphics/gpu/AcceleratedImageBufferSurface.h" | 67 #include "platform/graphics/gpu/AcceleratedImageBufferSurface.h" |
| 67 #include "platform/transforms/AffineTransform.h" | 68 #include "platform/transforms/AffineTransform.h" |
| 68 #include "public/platform/Platform.h" | 69 #include "public/platform/Platform.h" |
| 69 #include "public/platform/WebTraceLocation.h" | 70 #include "public/platform/WebTraceLocation.h" |
| 70 #include "wtf/CheckedNumeric.h" | 71 #include "wtf/CheckedNumeric.h" |
| (...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1175 return std::make_pair(nullptr, String()); | 1176 return std::make_pair(nullptr, String()); |
| 1176 } | 1177 } |
| 1177 | 1178 |
| 1178 String HTMLCanvasElement::getIdFromControl(const Element* element) | 1179 String HTMLCanvasElement::getIdFromControl(const Element* element) |
| 1179 { | 1180 { |
| 1180 if (m_context) | 1181 if (m_context) |
| 1181 return m_context->getIdFromControl(element); | 1182 return m_context->getIdFromControl(element); |
| 1182 return String(); | 1183 return String(); |
| 1183 } | 1184 } |
| 1184 | 1185 |
| 1185 void HTMLCanvasElement::createSurfaceLayerBridge() | 1186 bool HTMLCanvasElement::createSurfaceLayer() |
| 1186 { | 1187 { |
| 1187 m_surfaceLayerBridge = adoptPtr(new CanvasSurfaceLayerBridge()); | 1188 DCHECK(!m_surfaceLayerBridge); |
| 1189 OwnPtr<CanvasSurfaceLayerBridgeClient> bridgeClient = adoptPtr(new CanvasSur
faceLayerBridgeClientImpl()); |
| 1190 m_surfaceLayerBridge = adoptPtr(new CanvasSurfaceLayerBridge(std::move(bridg
eClient))); |
| 1191 return m_surfaceLayerBridge->createSurfaceLayer(this->width(), this->height(
)); |
| 1188 } | 1192 } |
| 1189 | 1193 |
| 1190 } // namespace blink | 1194 } // namespace blink |
| OLD | NEW |