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

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

Issue 1748163003: Add rendering context and rendering 2D context to OffscreenCanvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make OffscreenCanvasRenderingContext Modules exportable" Created 4 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "core/html/canvas/OffscreenCanvas.h"
6
7 #include "wtf/MathExtras.h"
8
9 namespace blink {
10
11 OffscreenCanvas* OffscreenCanvas::create(unsigned width, unsigned height)
12 {
13 return new OffscreenCanvas(IntSize(clampTo<int>(width), clampTo<int>(height) ));
14 }
15
16 void OffscreenCanvas::setWidth(unsigned width)
17 {
18 m_size.setWidth(clampTo<int>(width));
19 }
20
21 void OffscreenCanvas::setHeight(unsigned height)
22 {
23 m_size.setHeight(clampTo<int>(height));
24 }
25
26 OffscreenCanvas::OffscreenCanvas(const IntSize& size)
27 : m_size(size)
28 {
29 }
30
31 DEFINE_TRACE(OffscreenCanvas)
32 {
33 }
34
35 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698