| 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/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
| 10 #include "core/fileapi/Blob.h" | 10 #include "core/fileapi/Blob.h" |
| 11 #include "core/frame/ImageBitmap.h" | 11 #include "core/frame/ImageBitmap.h" |
| 12 #include "core/html/ImageData.h" | 12 #include "core/html/ImageData.h" |
| 13 #include "core/html/canvas/CanvasAsyncBlobCreator.h" | 13 #include "core/html/canvas/CanvasAsyncBlobCreator.h" |
| 14 #include "core/html/canvas/CanvasContextCreationAttributes.h" | 14 #include "core/html/canvas/CanvasContextCreationAttributes.h" |
| 15 #include "core/html/canvas/CanvasRenderingContext.h" | 15 #include "core/html/canvas/CanvasRenderingContext.h" |
| 16 #include "core/html/canvas/CanvasRenderingContextFactory.h" | 16 #include "core/html/canvas/CanvasRenderingContextFactory.h" |
| 17 #include "platform/graphics/Image.h" | 17 #include "platform/graphics/Image.h" |
| 18 #include "platform/graphics/ImageBuffer.h" | 18 #include "platform/graphics/ImageBuffer.h" |
| 19 #include "platform/graphics/OffscreenCanvasFrameDispatcherImpl.h" | 19 #include "platform/graphics/OffscreenCanvasFrameDispatcherImpl.h" |
| 20 #include "platform/graphics/StaticBitmapImage.h" | 20 #include "platform/graphics/StaticBitmapImage.h" |
| 21 #include "platform/image-encoders/ImageEncoderUtils.h" | 21 #include "platform/image-encoders/ImageEncoderUtils.h" |
| 22 #include "platform/wtf/MathExtras.h" |
| 22 #include "public/platform/Platform.h" | 23 #include "public/platform/Platform.h" |
| 23 #include "third_party/skia/include/core/SkSurface.h" | 24 #include "third_party/skia/include/core/SkSurface.h" |
| 24 #include "wtf/MathExtras.h" | |
| 25 | 25 |
| 26 namespace blink { | 26 namespace blink { |
| 27 | 27 |
| 28 OffscreenCanvas::OffscreenCanvas(const IntSize& size) : size_(size) {} | 28 OffscreenCanvas::OffscreenCanvas(const IntSize& size) : size_(size) {} |
| 29 | 29 |
| 30 OffscreenCanvas* OffscreenCanvas::Create(unsigned width, unsigned height) { | 30 OffscreenCanvas* OffscreenCanvas::Create(unsigned width, unsigned height) { |
| 31 return new OffscreenCanvas( | 31 return new OffscreenCanvas( |
| 32 IntSize(clampTo<int>(width), clampTo<int>(height))); | 32 IntSize(clampTo<int>(width), clampTo<int>(height))); |
| 33 } | 33 } |
| 34 | 34 |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 } | 352 } |
| 353 | 353 |
| 354 DEFINE_TRACE(OffscreenCanvas) { | 354 DEFINE_TRACE(OffscreenCanvas) { |
| 355 visitor->Trace(context_); | 355 visitor->Trace(context_); |
| 356 visitor->Trace(execution_context_); | 356 visitor->Trace(execution_context_); |
| 357 visitor->Trace(commit_promise_resolver_); | 357 visitor->Trace(commit_promise_resolver_); |
| 358 EventTargetWithInlineData::Trace(visitor); | 358 EventTargetWithInlineData::Trace(visitor); |
| 359 } | 359 } |
| 360 | 360 |
| 361 } // namespace blink | 361 } // namespace blink |
| OLD | NEW |