OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 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 "sky/engine/config.h" | |
6 #include "sky/engine/core/painting/CanvasImage.h" | |
7 | |
8 namespace blink { | |
9 | |
10 int CanvasImage::width() const { | |
11 return bitmap_.width(); | |
12 } | |
13 | |
14 int CanvasImage::height() const { | |
15 return bitmap_.height(); | |
16 } | |
17 | |
18 void CanvasImage::setSrc(const String& url) { | |
19 KURL newSrcURL = KURL(KURL(), url); | |
abarth-chromium
2015/05/29 23:04:11
Please add a TODO comment about using the proper b
jackson
2015/05/29 23:35:44
Acknowledged.
| |
20 if (srcURL_ != newSrcURL) { | |
21 srcURL_ = newSrcURL; | |
22 imageLoader_->Load(srcURL_); | |
23 } | |
24 } | |
25 | |
26 void CanvasImage::notifyLoadFinished(const SkBitmap& result) { | |
27 bitmap_ = result; | |
abarth-chromium
2015/05/29 23:04:11
We'll eventually need a notification pathway for w
jackson
2015/05/29 23:35:44
Acknowledged.
| |
28 } | |
29 } | |
abarth-chromium
2015/05/29 23:04:10
} // namespace blink
| |
OLD | NEW |