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 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1167 return std::make_pair(nullptr, String()); | 1168 return std::make_pair(nullptr, String()); |
1168 } | 1169 } |
1169 | 1170 |
1170 String HTMLCanvasElement::getIdFromControl(const Element* element) | 1171 String HTMLCanvasElement::getIdFromControl(const Element* element) |
1171 { | 1172 { |
1172 if (m_context) | 1173 if (m_context) |
1173 return m_context->getIdFromControl(element); | 1174 return m_context->getIdFromControl(element); |
1174 return String(); | 1175 return String(); |
1175 } | 1176 } |
1176 | 1177 |
1177 void HTMLCanvasElement::createSurfaceLayerBridge() | 1178 bool HTMLCanvasElement::createSurfaceLayer() |
1178 { | 1179 { |
1179 m_surfaceLayerBridge = adoptPtr(new CanvasSurfaceLayerBridge()); | 1180 DCHECK(!m_surfaceLayerBridge); |
| 1181 OwnPtr<CanvasSurfaceLayerBridgeClient> bridgeClient = adoptPtr(new CanvasSur
faceLayerBridgeClientImpl()); |
| 1182 m_surfaceLayerBridge = adoptPtr(new CanvasSurfaceLayerBridge(std::move(bridg
eClient))); |
| 1183 return m_surfaceLayerBridge->createSurfaceLayer(this->width(), this->height(
)); |
1180 } | 1184 } |
1181 | 1185 |
1182 } // namespace blink | 1186 } // namespace blink |
OLD | NEW |