OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_ | 5 #ifndef ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_ |
6 #define ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_ | 6 #define ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include <memory> |
| 11 |
11 #include "skia/ext/refptr.h" | 12 #include "skia/ext/refptr.h" |
12 #include "ui/gfx/geometry/size.h" | 13 #include "ui/gfx/geometry/size.h" |
13 #include "ui/gfx/geometry/vector2d.h" | 14 #include "ui/gfx/geometry/vector2d.h" |
14 | 15 |
15 class SkCanvas; | 16 class SkCanvas; |
16 struct AwDrawSWFunctionTable; | 17 struct AwDrawSWFunctionTable; |
17 | 18 |
18 namespace android_webview { | 19 namespace android_webview { |
19 | 20 |
20 class SoftwareCanvasHolder { | 21 class SoftwareCanvasHolder { |
21 public: | 22 public: |
22 static scoped_ptr<SoftwareCanvasHolder> Create( | 23 static std::unique_ptr<SoftwareCanvasHolder> Create( |
23 jobject java_canvas, | 24 jobject java_canvas, |
24 const gfx::Vector2d& scroll_correction, | 25 const gfx::Vector2d& scroll_correction, |
25 const gfx::Size& auxiliary_bitmap_size, | 26 const gfx::Size& auxiliary_bitmap_size, |
26 bool force_auxiliary_bitmap); | 27 bool force_auxiliary_bitmap); |
27 | 28 |
28 virtual ~SoftwareCanvasHolder() {} | 29 virtual ~SoftwareCanvasHolder() {} |
29 | 30 |
30 // The returned SkCanvas is still owned by this holder. | 31 // The returned SkCanvas is still owned by this holder. |
31 virtual SkCanvas* GetCanvas() = 0; | 32 virtual SkCanvas* GetCanvas() = 0; |
32 }; | 33 }; |
33 | 34 |
34 void RasterHelperSetAwDrawSWFunctionTable(AwDrawSWFunctionTable* table); | 35 void RasterHelperSetAwDrawSWFunctionTable(AwDrawSWFunctionTable* table); |
35 | 36 |
36 bool RegisterJavaBrowserViewRendererHelper(JNIEnv* env); | 37 bool RegisterJavaBrowserViewRendererHelper(JNIEnv* env); |
37 | 38 |
38 } // namespace android_webview | 39 } // namespace android_webview |
39 | 40 |
40 #endif // ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_ | 41 #endif // ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_ |
OLD | NEW |