mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 777351 - Remove unnecessary getBitmap function that always returns null. r=sriram
This commit is contained in:
parent
4df9e1758d
commit
59d53a3a44
@ -609,31 +609,22 @@ abstract public class GeckoApp
|
||||
return metrics;
|
||||
}
|
||||
|
||||
public void getAndProcessThumbnailForTab(final Tab tab) {
|
||||
boolean isSelectedTab = Tabs.getInstance().isSelectedTab(tab);
|
||||
final Bitmap bitmap = isSelectedTab ? mLayerClient.getBitmap() : null;
|
||||
|
||||
void getAndProcessThumbnailForTab(final Tab tab) {
|
||||
if ("about:home".equals(tab.getURL())) {
|
||||
tab.updateThumbnail(null);
|
||||
return;
|
||||
}
|
||||
|
||||
if (bitmap != null) {
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
bitmap.compress(Bitmap.CompressFormat.PNG, 0, bos);
|
||||
processThumbnail(tab, bitmap, bos.toByteArray());
|
||||
} else {
|
||||
if (tab.getState() == Tab.STATE_DELAYED) {
|
||||
byte[] thumbnail = BrowserDB.getThumbnailForUrl(getContentResolver(), tab.getURL());
|
||||
if (thumbnail != null)
|
||||
processThumbnail(tab, null, thumbnail);
|
||||
return;
|
||||
}
|
||||
|
||||
int dw = tab.getThumbnailWidth();
|
||||
int dh = tab.getThumbnailHeight();
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createScreenshotEvent(tab.getId(), 0, 0, 0, 0, 0, 0, dw, dh, dw, dh, ScreenshotHandler.SCREENSHOT_THUMBNAIL, tab.getThumbnailBuffer()));
|
||||
if (tab.getState() == Tab.STATE_DELAYED) {
|
||||
byte[] thumbnail = BrowserDB.getThumbnailForUrl(getContentResolver(), tab.getURL());
|
||||
if (thumbnail != null)
|
||||
processThumbnail(tab, null, thumbnail);
|
||||
return;
|
||||
}
|
||||
|
||||
int dw = tab.getThumbnailWidth();
|
||||
int dh = tab.getThumbnailHeight();
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createScreenshotEvent(tab.getId(), 0, 0, 0, 0, 0, 0, dw, dh, dw, dh, ScreenshotHandler.SCREENSHOT_THUMBNAIL, tab.getThumbnailBuffer()));
|
||||
}
|
||||
|
||||
void handleThumbnailData(Tab tab, ByteBuffer data) {
|
||||
|
@ -18,7 +18,6 @@ import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PointF;
|
||||
import android.graphics.RectF;
|
||||
@ -248,10 +247,6 @@ public class GeckoLayerClient
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Window:Resize", ""));
|
||||
}
|
||||
|
||||
public Bitmap getBitmap() {
|
||||
return null;
|
||||
}
|
||||
|
||||
void viewportSizeChanged() {
|
||||
// here we send gecko a resize message. The code in browser.js is responsible for
|
||||
// picking up on that resize event, modifying the viewport as necessary, and informing
|
||||
|
Loading…
Reference in New Issue
Block a user