mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 952878 - LayerRenderer.drawBackground can be expensive during a pageload r=wesj
This commit is contained in:
parent
28be2ce286
commit
3fa62c5435
@ -64,6 +64,7 @@ public class LayerRenderer implements Tabs.OnTabsChangedListener {
|
||||
private RenderContext mLastPageContext;
|
||||
private int mMaxTextureSize;
|
||||
private int mBackgroundColor;
|
||||
private int mOverscrollColor;
|
||||
|
||||
private long mLastFrameTime;
|
||||
private final CopyOnWriteArrayList<RenderTask> mTasks;
|
||||
@ -134,6 +135,7 @@ public class LayerRenderer implements Tabs.OnTabsChangedListener {
|
||||
|
||||
public LayerRenderer(LayerView view) {
|
||||
mView = view;
|
||||
mOverscrollColor = view.getContext().getResources().getColor(R.color.background_normal);
|
||||
|
||||
Bitmap scrollbarImage = view.getScrollbarImage();
|
||||
IntSize size = new IntSize(scrollbarImage.getWidth(), scrollbarImage.getHeight());
|
||||
@ -587,6 +589,9 @@ public class LayerRenderer implements Tabs.OnTabsChangedListener {
|
||||
|
||||
GLES20.glDisable(GLES20.GL_SCISSOR_TEST);
|
||||
|
||||
// Draw the overscroll background area as a solid color
|
||||
clear(mOverscrollColor);
|
||||
|
||||
// Update background color.
|
||||
mBackgroundColor = mView.getBackgroundColor();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user