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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 11312068: Flip android decorations vertically. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index f674e79409a99e713d494299976976e176046721..55bf72b7f7df96563c05ff121c51bcd24447f8cc 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -738,7 +738,7 @@ public class ContentViewCore implements MotionEventDelegate {
}
public Bitmap getBitmap(int width, int height) {
- if (getWidth() == 0 || getHeight() == 0) return null;
+ if (width == 0 || height == 0 || getWidth() == 0 || getHeight() == 0) return null;
Bitmap b = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
@@ -746,9 +746,9 @@ public class ContentViewCore implements MotionEventDelegate {
nativePopulateBitmapFromCompositor(mNativeContentViewCore, b)) {
// If we successfully grabbed a bitmap, check if we have to draw the Android overlay
// components as well.
- if (mContainerView.getParent() != null &&
- mContainerView.getVisibility() == View.VISIBLE) {
+ if (mContainerView.getChildCount() > 0) {
Canvas c = new Canvas(b);
+ c.scale(1, -1, width / 2, height / 2);
c.scale(width / (float) getWidth(), height / (float) getHeight());
mContainerView.draw(c);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698