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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #include "core/imagebitmap/ImageBitmapOptions.h" | 54 #include "core/imagebitmap/ImageBitmapOptions.h" |
55 #include "core/layout/HitTestCanvasResult.h" | 55 #include "core/layout/HitTestCanvasResult.h" |
56 #include "core/layout/LayoutHTMLCanvas.h" | 56 #include "core/layout/LayoutHTMLCanvas.h" |
57 #include "core/paint/PaintLayer.h" | 57 #include "core/paint/PaintLayer.h" |
58 #include "core/paint/PaintTiming.h" | 58 #include "core/paint/PaintTiming.h" |
59 #include "platform/Histogram.h" | 59 #include "platform/Histogram.h" |
60 #include "platform/MIMETypeRegistry.h" | 60 #include "platform/MIMETypeRegistry.h" |
61 #include "platform/RuntimeEnabledFeatures.h" | 61 #include "platform/RuntimeEnabledFeatures.h" |
62 #include "platform/graphics/Canvas2DImageBufferSurface.h" | 62 #include "platform/graphics/Canvas2DImageBufferSurface.h" |
63 #include "platform/graphics/CanvasMetrics.h" | 63 #include "platform/graphics/CanvasMetrics.h" |
64 #include "platform/graphics/CanvasSurfaceLayerBridgeClientImpl.h" | |
65 #include "platform/graphics/ExpensiveCanvasHeuristicParameters.h" | 64 #include "platform/graphics/ExpensiveCanvasHeuristicParameters.h" |
66 #include "platform/graphics/ImageBuffer.h" | 65 #include "platform/graphics/ImageBuffer.h" |
67 #include "platform/graphics/RecordingImageBufferSurface.h" | 66 #include "platform/graphics/RecordingImageBufferSurface.h" |
68 #include "platform/graphics/StaticBitmapImage.h" | 67 #include "platform/graphics/StaticBitmapImage.h" |
69 #include "platform/graphics/UnacceleratedImageBufferSurface.h" | 68 #include "platform/graphics/UnacceleratedImageBufferSurface.h" |
70 #include "platform/graphics/gpu/AcceleratedImageBufferSurface.h" | 69 #include "platform/graphics/gpu/AcceleratedImageBufferSurface.h" |
71 #include "platform/transforms/AffineTransform.h" | 70 #include "platform/transforms/AffineTransform.h" |
| 71 #include "public/platform/InterfaceProvider.h" |
72 #include "public/platform/Platform.h" | 72 #include "public/platform/Platform.h" |
73 #include "public/platform/WebTraceLocation.h" | 73 #include "public/platform/WebTraceLocation.h" |
| 74 #include "public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom
-blink.h" |
74 #include "wtf/CheckedNumeric.h" | 75 #include "wtf/CheckedNumeric.h" |
75 #include "wtf/PtrUtil.h" | 76 #include "wtf/PtrUtil.h" |
76 #include <math.h> | 77 #include <math.h> |
77 #include <memory> | 78 #include <memory> |
78 #include <v8.h> | 79 #include <v8.h> |
79 | 80 |
80 namespace blink { | 81 namespace blink { |
81 | 82 |
82 using namespace HTMLNames; | 83 using namespace HTMLNames; |
83 | 84 |
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1281 String HTMLCanvasElement::getIdFromControl(const Element* element) | 1282 String HTMLCanvasElement::getIdFromControl(const Element* element) |
1282 { | 1283 { |
1283 if (m_context) | 1284 if (m_context) |
1284 return m_context->getIdFromControl(element); | 1285 return m_context->getIdFromControl(element); |
1285 return String(); | 1286 return String(); |
1286 } | 1287 } |
1287 | 1288 |
1288 bool HTMLCanvasElement::createSurfaceLayer() | 1289 bool HTMLCanvasElement::createSurfaceLayer() |
1289 { | 1290 { |
1290 DCHECK(!m_surfaceLayerBridge); | 1291 DCHECK(!m_surfaceLayerBridge); |
1291 std::unique_ptr<CanvasSurfaceLayerBridgeClient> bridgeClient = wrapUnique(ne
w CanvasSurfaceLayerBridgeClientImpl()); | 1292 mojom::blink::OffscreenCanvasSurfacePtr service; |
1292 m_surfaceLayerBridge = wrapUnique(new CanvasSurfaceLayerBridge(std::move(bri
dgeClient))); | 1293 Platform::current()->interfaceProvider()->getInterface(mojo::GetProxy(&servi
ce)); |
| 1294 m_surfaceLayerBridge = wrapUnique(new CanvasSurfaceLayerBridge(std::move(ser
vice))); |
1293 return m_surfaceLayerBridge->createSurfaceLayer(this->width(), this->height(
)); | 1295 return m_surfaceLayerBridge->createSurfaceLayer(this->width(), this->height(
)); |
1294 } | 1296 } |
1295 | 1297 |
1296 } // namespace blink | 1298 } // namespace blink |
OLD | NEW |