| OLD | NEW | 
|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "core/offscreencanvas/OffscreenCanvas.h" | 5 #include "core/offscreencanvas/OffscreenCanvas.h" | 
| 6 | 6 | 
| 7 #include <memory> | 7 #include <memory> | 
| 8 #include "core/dom/ExceptionCode.h" | 8 #include "core/dom/ExceptionCode.h" | 
| 9 #include "core/fileapi/Blob.h" | 9 #include "core/fileapi/Blob.h" | 
| 10 #include "core/frame/ImageBitmap.h" | 10 #include "core/frame/ImageBitmap.h" | 
| 11 #include "core/html/ImageData.h" | 11 #include "core/html/ImageData.h" | 
| 12 #include "core/html/canvas/CanvasAsyncBlobCreator.h" | 12 #include "core/html/canvas/CanvasAsyncBlobCreator.h" | 
| 13 #include "core/html/canvas/CanvasContextCreationAttributes.h" | 13 #include "core/html/canvas/CanvasContextCreationAttributes.h" | 
| 14 #include "core/html/canvas/CanvasRenderingContext.h" | 14 #include "core/html/canvas/CanvasRenderingContext.h" | 
| 15 #include "core/html/canvas/CanvasRenderingContextFactory.h" | 15 #include "core/html/canvas/CanvasRenderingContextFactory.h" | 
| 16 #include "platform/graphics/Image.h" | 16 #include "platform/graphics/Image.h" | 
| 17 #include "platform/graphics/ImageBuffer.h" | 17 #include "platform/graphics/ImageBuffer.h" | 
| 18 #include "platform/graphics/OffscreenCanvasFrameDispatcherImpl.h" | 18 #include "platform/graphics/OffscreenCanvasFrameDispatcherImpl.h" | 
| 19 #include "platform/graphics/StaticBitmapImage.h" | 19 #include "platform/graphics/StaticBitmapImage.h" | 
| 20 #include "platform/image-encoders/ImageEncoderUtils.h" | 20 #include "platform/image-encoders/ImageEncoderUtils.h" | 
| 21 #include "public/platform/Platform.h" | 21 #include "public/platform/Platform.h" | 
| 22 #include "third_party/skia/include/core/SkSurface.h" |  | 
| 23 #include "wtf/MathExtras.h" | 22 #include "wtf/MathExtras.h" | 
| 24 | 23 | 
| 25 namespace blink { | 24 namespace blink { | 
| 26 | 25 | 
| 27 OffscreenCanvas::OffscreenCanvas(const IntSize& size) : m_size(size) {} | 26 OffscreenCanvas::OffscreenCanvas(const IntSize& size) : m_size(size) {} | 
| 28 | 27 | 
| 29 OffscreenCanvas* OffscreenCanvas::create(unsigned width, unsigned height) { | 28 OffscreenCanvas* OffscreenCanvas::create(unsigned width, unsigned height) { | 
| 30   return new OffscreenCanvas( | 29   return new OffscreenCanvas( | 
| 31       IntSize(clampTo<int>(width), clampTo<int>(height))); | 30       IntSize(clampTo<int>(width), clampTo<int>(height))); | 
| 32 } | 31 } | 
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 348 } | 347 } | 
| 349 | 348 | 
| 350 DEFINE_TRACE(OffscreenCanvas) { | 349 DEFINE_TRACE(OffscreenCanvas) { | 
| 351   visitor->trace(m_context); | 350   visitor->trace(m_context); | 
| 352   visitor->trace(m_executionContext); | 351   visitor->trace(m_executionContext); | 
| 353   visitor->trace(m_commitPromiseResolver); | 352   visitor->trace(m_commitPromiseResolver); | 
| 354   EventTargetWithInlineData::trace(visitor); | 353   EventTargetWithInlineData::trace(visitor); | 
| 355 } | 354 } | 
| 356 | 355 | 
| 357 }  // namespace blink | 356 }  // namespace blink | 
| OLD | NEW | 
|---|