Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1350)

Side by Side Diff: third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp

Issue 2781823002: Revert of cc/paint: Remove cc::PaintSurface. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698