зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1197811 - Extract a wrapper for setting the background color on the SurfaceView. r=rbarker
--HG-- extra : commitid : 5ZFBWj7Lofh
This commit is contained in:
Родитель
89a588ea02
Коммит
587a360099
|
@ -636,7 +636,7 @@ public class LayerRenderer implements Tabs.OnTabsChangedListener {
|
|||
mView.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mView.getChildAt(0).setBackgroundColor(Color.TRANSPARENT);
|
||||
mView.setSurfaceBackgroundColor(Color.TRANSPARENT);
|
||||
}
|
||||
});
|
||||
mView.setPaintState(LayerView.PAINT_AFTER_FIRST);
|
||||
|
@ -653,9 +653,7 @@ public class LayerRenderer implements Tabs.OnTabsChangedListener {
|
|||
// thread, so this may need to be changed if any problems appear.
|
||||
if (msg == Tabs.TabEvents.SELECTED) {
|
||||
if (mView != null) {
|
||||
if (mView.getChildAt(0) != null) {
|
||||
mView.getChildAt(0).setBackgroundColor(tab.getBackgroundColor());
|
||||
}
|
||||
mView.setSurfaceBackgroundColor(tab.getBackgroundColor());
|
||||
mView.setPaintState(LayerView.PAINT_START);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -327,6 +327,12 @@ public class LayerView extends FrameLayout implements Tabs.OnTabsChangedListener
|
|||
requestRender();
|
||||
}
|
||||
|
||||
void setSurfaceBackgroundColor(int newColor) {
|
||||
if (mSurfaceView != null) {
|
||||
mSurfaceView.setBackgroundColor(newColor);
|
||||
}
|
||||
}
|
||||
|
||||
public void setZoomConstraints(ZoomConstraints constraints) {
|
||||
mLayerClient.setZoomConstraints(constraints);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче