blob: 623fa415d251c0868f3b18be76c31f352825e993 [file] [log] [blame]
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ANDROID_WEBVIEW_BROWSER_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_
#define ANDROID_WEBVIEW_BROWSER_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_
#include <jni.h>
#include <memory>
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/geometry/vector2d.h"
class SkCanvas;
struct AwDrawSWFunctionTable;
namespace android_webview {
class SoftwareCanvasHolder {
public:
static std::unique_ptr<SoftwareCanvasHolder> Create(
jobject java_canvas,
const gfx::Vector2d& scroll_correction,
const gfx::Size& auxiliary_bitmap_size,
bool force_auxiliary_bitmap);
virtual ~SoftwareCanvasHolder() {}
// The returned SkCanvas is still owned by this holder.
virtual SkCanvas* GetCanvas() = 0;
};
void RasterHelperSetAwDrawSWFunctionTable(AwDrawSWFunctionTable* table);
} // namespace android_webview
#endif // ANDROID_WEBVIEW_BROWSER_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_