Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2463)

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 12041009: [Android WebView] Migrate the rendering code to a separate set of classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upload error, re-uploading. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index a0027c3ac6c13b485b1a2bc44d6b6e837cb33444..adf23f92125b197157aaf82feda779bbee721b9c 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -320,8 +320,8 @@ public class AwContents {
public int getAwDrawGLViewContext() {
// Using the native pointer as the returned viewContext. This is matched by the
- // reinterpret_cast back to AwContents pointer in the native DrawGLFunction.
- return mNativeAwContents;
+ // reinterpret_cast back to BrowserViewRenderer pointer in the native DrawGLFunction.
+ return nativeGetAwDrawGLViewContext(mNativeAwContents);
}
public boolean onPrepareDrawGL(Canvas canvas) {
@@ -998,38 +998,6 @@ public class AwContents {
return null;
}
- /**
- * Provides a Bitmap object with a given width and height used for auxiliary rasterization.
- */
- @CalledByNative
- private static Bitmap createBitmap(int width, int height) {
- return Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
- }
-
- /**
- * Draws a provided bitmap into a canvas.
- * Used for convenience from the native side and other static helper methods.
- */
- @CalledByNative
- private static void drawBitmapIntoCanvas(Bitmap bitmap, Canvas canvas) {
- canvas.drawBitmap(bitmap, 0, 0, null);
- }
-
- /**
- * Creates a new Picture that records drawing a provided bitmap.
- * Will return an empty Picture if the Bitmap is null.
- */
- @CalledByNative
- private static Picture recordBitmapIntoPicture(Bitmap bitmap) {
- Picture picture = new Picture();
- if (bitmap != null) {
- Canvas recordingCanvas = picture.beginRecording(bitmap.getWidth(), bitmap.getHeight());
- drawBitmapIntoCanvas(bitmap, recordingCanvas);
- picture.endRecording();
- }
- return picture;
- }
-
@CalledByNative
private void handleJsAlert(String url, String message, JsResultReceiver receiver) {
mContentsClient.handleJsAlert(url, message, receiver);
@@ -1075,8 +1043,6 @@ public class AwContents {
private native void nativeAddVisitedLinks(int nativeAwContents, String[] visitedLinks);
- private native boolean nativeDrawSW(int nativeAwContents, Canvas canvas, int clipX, int clipY,
- int clipW, int clipH);
private native void nativeSetScrollForHWFrame(int nativeAwContents, int scrollX, int scrollY);
private native int nativeFindAllSync(int nativeAwContents, String searchString);
private native void nativeFindAllAsync(int nativeAwContents, String searchString);
@@ -1105,6 +1071,9 @@ public class AwContents {
private native void nativeSetWebContents(int nativeAwContents, int nativeNewWebContents);
private native void nativeFocusFirstNode(int nativeAwContents);
+ private native boolean nativeDrawSW(int nativeAwContents, Canvas canvas, int clipX, int clipY,
+ int clipW, int clipH);
+ private native int nativeGetAwDrawGLViewContext(int nativeAwContents);
private native Picture nativeCapturePicture(int nativeAwContents);
private native void nativeEnableOnNewPicture(int nativeAwContents, boolean enabled,
boolean invalidationOnly);

Powered by Google App Engine
This is Rietveld 408576698