OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 "android_webview/native/aw_picture.h" | 5 #include "android_webview/native/aw_picture.h" |
6 | 6 |
7 #include "android_webview/native/java_browser_view_renderer_helper.h" | 7 #include "android_webview/native/java_browser_view_renderer_helper.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "jni/AwPicture_jni.h" | 9 #include "jni/AwPicture_jni.h" |
10 #include "third_party/skia/include/core/SkPicture.h" | 10 #include "third_party/skia/include/core/SkPicture.h" |
11 | 11 |
| 12 using base::android::JavaParamRef; |
| 13 |
12 namespace android_webview { | 14 namespace android_webview { |
13 | 15 |
14 AwPicture::AwPicture(sk_sp<SkPicture> picture) | 16 AwPicture::AwPicture(sk_sp<SkPicture> picture) |
15 : picture_(std::move(picture)) { | 17 : picture_(std::move(picture)) { |
16 DCHECK(picture_); | 18 DCHECK(picture_); |
17 } | 19 } |
18 | 20 |
19 AwPicture::~AwPicture() {} | 21 AwPicture::~AwPicture() {} |
20 | 22 |
21 void AwPicture::Destroy(JNIEnv* env, const JavaParamRef<jobject>& obj) { | 23 void AwPicture::Destroy(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
(...skipping 21 matching lines...) Expand all Loading... |
43 return; | 45 return; |
44 } | 46 } |
45 picture_->playback(canvas_holder->GetCanvas()); | 47 picture_->playback(canvas_holder->GetCanvas()); |
46 } | 48 } |
47 | 49 |
48 bool RegisterAwPicture(JNIEnv* env) { | 50 bool RegisterAwPicture(JNIEnv* env) { |
49 return RegisterNativesImpl(env); | 51 return RegisterNativesImpl(env); |
50 } | 52 } |
51 | 53 |
52 } // namespace android_webview | 54 } // namespace android_webview |
OLD | NEW |