Bug 1319199 - Update gfx code to work with new webrender version. r=gfx?

The updated webrender doesn't take scroll IDs as part of the stacking context.
Instead, it has dedicated operations to push/pop scrolling layers. Since APZ
is currently disabled we don't really need this functionality. We will use it
in the future but for now we can remove the relevant code.

MozReview-Commit-ID: 9NpXvvgYSah
This commit is contained in:
Kartikaya Gupta 2016-11-22 09:53:55 -05:00
Родитель 7291362060
Коммит f801c5b483
3 изменённых файлов: 5 добавлений и 18 удалений

Просмотреть файл

@ -140,7 +140,7 @@ WebRenderBridgeParent::ProcessWebrenderCommands(InfallibleTArray<WebRenderComman
}
case WebRenderCommand::TOpPopDLBuilder: {
const OpPopDLBuilder& op = cmd.get_OpPopDLBuilder();
wr_pop_dl_builder(mWRState, op.bounds(), op.overflow(), &(op.matrix().components[0]), op.scrollid());
wr_pop_dl_builder(mWRState, op.bounds(), op.overflow(), &(op.matrix().components[0]));
break;
}
case WebRenderCommand::TOpDPPushRect: {

Просмотреть файл

@ -4,7 +4,6 @@ use std::os::raw::c_uchar;
use gleam::gl;
use euclid::{Size2D, Point2D, Rect, Matrix4D};
use webrender_traits::{PipelineId, AuxiliaryListsBuilder};
use webrender_traits::{ServoScrollRootId};
use webrender_traits::{Epoch, ColorF};
use webrender_traits::{ImageData, ImageFormat, ImageKey, ImageMask, ImageRendering, RendererKind};
use webrender::renderer::{Renderer, RendererOptions};
@ -313,9 +312,7 @@ pub extern fn wr_dp_begin(window: &mut WrWindowState, state: &mut WrState, width
let bounds = Rect::new(Point2D::new(0.0, 0.0), Size2D::new(width as f32, height as f32));
let root_stacking_context =
webrender_traits::StackingContext::new(Some(webrender_traits::ScrollLayerId::new(
state.pipeline_id, 0, ServoScrollRootId(0))),
webrender_traits::ScrollPolicy::Scrollable,
webrender_traits::StackingContext::new(webrender_traits::ScrollPolicy::Scrollable,
bounds,
bounds,
0,
@ -335,23 +332,13 @@ pub extern fn wr_push_dl_builder(state:&mut WrState)
}
#[no_mangle]
pub extern fn wr_pop_dl_builder(state: &mut WrState, bounds: WrRect, overflow: WrRect, transform: &Matrix4D<f32>, scroll_id: u64)
pub extern fn wr_pop_dl_builder(state: &mut WrState, bounds: WrRect, overflow: WrRect, transform: &Matrix4D<f32>)
{
//
state.z_index += 1;
let pipeline_id = state.frame_builder.root_pipeline_id;
let scroll_layer_id = if scroll_id == 0 {
None
} else {
Some(webrender_traits::ScrollLayerId::new(pipeline_id,
scroll_id as usize, // WR issue 489
ServoScrollRootId(0)))
};
let sc =
webrender_traits::StackingContext::new(scroll_layer_id,
webrender_traits::ScrollPolicy::Scrollable,
webrender_traits::StackingContext::new(webrender_traits::ScrollPolicy::Scrollable,
bounds.to_rect(),
overflow.to_rect(),
state.z_index,

Просмотреть файл

@ -93,7 +93,7 @@ WR_FUNC;
//XXX: matrix should use a proper type
WR_INLINE void
wr_pop_dl_builder(wrstate *wrState, WRRect bounds,
WRRect overflow, const float* matrix, uint64_t scrollId)
WRRect overflow, const float* matrix)
WR_FUNC;
WR_INLINE void