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

Side by Side Diff: third_party/WebKit/Source/platform/exported/WebSkImage.cpp

Issue 1467103003: Basic use implementation for MediaStream from Canvas: captureStream() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added new interface to LayoutTests. Created 5 years 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 "config.h"
6 #include "public/platform/WebSkImage.h"
7
8 #include "wtf/PassRefPtr.h"
9
10 namespace blink {
11
12 WebSkImage::WebSkImage()
13 {
14 }
15
16 WebSkImage::WebSkImage(const WebSkImage& image)
17 {
18 m_image = image.m_image;
19 }
20
21 WebSkImage::~WebSkImage()
22 {
23 m_image.reset();
24 }
25
26 int WebSkImage::width() const
27 {
28 return m_image->width();
29 }
30
31 int WebSkImage::height() const
32 {
33 return m_image->height();
34 }
35
36 bool WebSkImage::readPixels(const SkImageInfo& dstInfo,
37 void* dstPixels,
38 size_t dstRowBytes,
39 int srcX,
40 int srcY) const
41 {
42 return m_image->readPixels(dstInfo, dstPixels, dstRowBytes, srcX, srcY);
43 }
44
45 WebSkImage::WebSkImage(const PassRefPtr<SkImage>& image)
46 : m_image(image)
47 {
48 }
49
50 WebSkImage& WebSkImage::operator=(const WTF::PassRefPtr<SkImage>& image)
51 {
52 m_image = image;
53 return *this;
54 }
55
56 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/exported/WebCanvasCaptureHandler.cpp ('k') | third_party/WebKit/public/blink_headers.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698