Bug 1366502 - Update the thread checking for WR image functions. r=sotaro

With the video pipeline, we could call the WR image functions in compositor thread.

MozReview-Commit-ID: LtaihkLnbL3
This commit is contained in:
JerryShih 2017-06-07 23:44:03 +08:00
Родитель 45a0e9e65a
Коммит 57f874da91
1 изменённых файлов: 4 добавлений и 4 удалений

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

@ -1403,7 +1403,7 @@ pub extern "C" fn wr_dp_push_image(state: &mut WrState,
tile_spacing: WrSize,
image_rendering: WrImageRendering,
key: WrImageKey) {
assert!(unsafe { !is_in_render_thread() });
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
state.frame_builder
.dl_builder
@ -1425,7 +1425,7 @@ pub extern "C" fn wr_dp_push_yuv_planar_image(state: &mut WrState,
image_key_2: WrImageKey,
color_space: WrYuvColorSpace,
image_rendering: WrImageRendering) {
assert!(unsafe { is_in_main_thread() });
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
state.frame_builder
.dl_builder
@ -1445,7 +1445,7 @@ pub extern "C" fn wr_dp_push_yuv_NV12_image(state: &mut WrState,
image_key_1: WrImageKey,
color_space: WrYuvColorSpace,
image_rendering: WrImageRendering) {
assert!(unsafe { is_in_main_thread() });
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
state.frame_builder
.dl_builder
@ -1464,7 +1464,7 @@ pub extern "C" fn wr_dp_push_yuv_interleaved_image(state: &mut WrState,
image_key_0: WrImageKey,
color_space: WrYuvColorSpace,
image_rendering: WrImageRendering) {
assert!(unsafe { is_in_main_thread() });
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
state.frame_builder
.dl_builder