#ifndef ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_
#define ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_
#include "android_webview/browser/browser_view_renderer.h"
#include "base/android/scoped_java_ref.h"
#include "base/compiler_specific.h"
namespace android_webview {
class JavaBrowserViewRendererHelper : public BrowserViewRendererJavaHelper {
public:
JavaBrowserViewRendererHelper();
virtual ~JavaBrowserViewRendererHelper();
static void SetAwDrawSWFunctionTable(AwDrawSWFunctionTable* table);
static JavaBrowserViewRendererHelper* GetInstance();
virtual bool RenderViaAuxilaryBitmapIfNeeded(
jobject java_canvas,
const gfx::Vector2d& scroll_correction,
const gfx::Rect& clip,
RenderMethod render_source) OVERRIDE;
private:
bool RenderViaAuxilaryBitmap(JNIEnv* env,
jobject java_canvas,
const gfx::Vector2d& scroll_correction,
const gfx::Rect& clip,
const RenderMethod& render_source);
bool RasterizeIntoBitmap(
JNIEnv* env,
const base::android::JavaRef<jobject>& jbitmap,
int scroll_x,
int scroll_y,
const JavaBrowserViewRendererHelper::RenderMethod& renderer);
};
bool RegisterJavaBrowserViewRendererHelper(JNIEnv* env);
}
#endif