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 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1177 return std::make_pair(nullptr, String()); | 1178 return std::make_pair(nullptr, String()); |
1178 } | 1179 } |
1179 | 1180 |
1180 String HTMLCanvasElement::getIdFromControl(const Element* element) | 1181 String HTMLCanvasElement::getIdFromControl(const Element* element) |
1181 { | 1182 { |
1182 if (m_context) | 1183 if (m_context) |
1183 return m_context->getIdFromControl(element); | 1184 return m_context->getIdFromControl(element); |
1184 return String(); | 1185 return String(); |
1185 } | 1186 } |
1186 | 1187 |
1187 void HTMLCanvasElement::createSurfaceLayerBridge() | 1188 bool HTMLCanvasElement::createSurfaceLayer() |
1188 { | 1189 { |
1189 m_surfaceLayerBridge = wrapUnique(new CanvasSurfaceLayerBridge()); | 1190 DCHECK(!m_surfaceLayerBridge); |
| 1191 std::unique_ptr<CanvasSurfaceLayerBridgeClient> bridgeClient = wrapUnique(ne
w CanvasSurfaceLayerBridgeClientImpl()); |
| 1192 m_surfaceLayerBridge = wrapUnique(new CanvasSurfaceLayerBridge(std::move(bri
dgeClient))); |
| 1193 return m_surfaceLayerBridge->createSurfaceLayer(this->width(), this->height(
)); |
1190 } | 1194 } |
1191 | 1195 |
1192 } // namespace blink | 1196 } // namespace blink |
OLD | NEW |