Bug 1316223 - Moving binding to separate folder. r=jrmuizel,kats

MozReview-Commit-ID: FLqSGebdGcH

--HG--
rename : gfx/webrender/src/bindings.rs => gfx/webrender_bindings/src/bindings.rs
rename : gfx/webrender/webrender.h => gfx/webrender_bindings/src/webrender.h
This commit is contained in:
Morris Tseng 2016-11-18 13:02:05 -05:00
Родитель ec0c858f75
Коммит c258b15697
17 изменённых файлов: 85 добавлений и 39 удалений

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

@ -10,7 +10,7 @@ include "mozilla/GfxMessageUtils.h";
include WebRenderMessages;
include protocol PCompositorBridge;
using WRImageFormat from "webrender.h";
using WRImageFormat from "mozilla/gfx/webrender.h";
using mozilla::gfx::ByteBuffer from "mozilla/layers/WebRenderTypes.h";
namespace mozilla {

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

@ -5,8 +5,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
using WRImageKey from "webrender.h";
using WRRect from "webrender.h";
using WRImageKey from "mozilla/gfx/webrender.h";
using WRRect from "mozilla/gfx/webrender.h";
using MaybeImageMask from "mozilla/layers/WebRenderTypes.h";
using mozilla::gfx::Matrix4x4 from "mozilla/gfx/Matrix.h";

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

@ -6,8 +6,8 @@
#include "WebRenderColorLayer.h"
#include "LayersLogging.h"
#include "mozilla/gfx/webrender.h"
#include "mozilla/layers/WebRenderBridgeChild.h"
#include "webrender.h"
namespace mozilla {
namespace layers {

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

@ -18,7 +18,6 @@
#include "WebRenderContainerLayer.h"
#include "WebRenderImageLayer.h"
#include "WebRenderPaintedLayer.h"
#include "webrender.h"
namespace mozilla {

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

@ -7,8 +7,8 @@
#define GFX_WEBRENDERLAYERMANAGER_H
#include "Layers.h"
#include "mozilla/gfx/webrender.h"
#include "mozilla/layers/CompositorController.h"
#include "webrender.h"
class nsIWidget;

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

@ -7,8 +7,8 @@
#define GFX_BYTEBUFFER_H
#include "chrome/common/ipc_message_utils.h"
#include "mozilla/gfx/webrender.h"
#include "mozilla/Maybe.h"
#include "webrender.h"
typedef mozilla::Maybe<WRImageMask> MaybeImageMask;

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

@ -24,7 +24,7 @@ DIRS += [
'config',
]
EXPORTS += ['webrender/webrender.h']
EXPORTS.mozilla.gfx += ['webrender_bindings/src/webrender.h']
if CONFIG['MOZ_ENABLE_SKIA']:
DIRS += ['skia']

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

@ -36,13 +36,10 @@ freetype = {version = "0.1.2", default-features = false}
[target.'cfg(target_os = "windows")'.dependencies]
dwrote = "0.1.0"
kernel32-sys = "0.2"
winapi = "0.2.8"
[target.'cfg(target_os = "macos")'.dependencies]
core-graphics = "0.4.1"
core-text = "2.0"
core-foundation = "0.2.2"
[profile.release]
panic = "abort"

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

@ -71,7 +71,6 @@ mod spring;
mod texture_cache;
mod tiling;
mod util;
pub mod bindings;
mod shader_source {
include!(concat!(env!("OUT_DIR"), "/shaders.rs"));
@ -105,18 +104,12 @@ pub mod renderer;
extern crate core_graphics;
#[cfg(target_os="macos")]
extern crate core_text;
#[cfg(target_os="macos")]
extern crate core_foundation;
#[cfg(all(unix, not(target_os="macos")))]
extern crate freetype;
#[cfg(target_os = "windows")]
extern crate dwrote;
#[cfg(target_os="windows")]
extern crate kernel32;
#[cfg(target_os="windows")]
extern crate winapi;
extern crate app_units;
extern crate bincode;

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

@ -0,0 +1,19 @@
[package]
name = "webrender_bindings"
version = "0.1.0"
authors = ["The Mozilla Project Developers"]
license = "MPL-2.0"
[dependencies]
webrender = {path = "../webrender"}
webrender_traits = {path = "../webrender_traits"}
euclid = "0.10"
app_units = "0.3"
gleam = "0.2"
[target.'cfg(target_os = "macos")'.dependencies]
core-foundation = "0.2.2"
[target.'cfg(target_os = "windows")'.dependencies]
kernel32-sys = "0.2"
winapi = "0.2.8"

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

@ -1,17 +1,15 @@
use std::path::PathBuf;
use webrender_traits::{PipelineId, AuxiliaryListsBuilder};
use renderer::{Renderer, RendererOptions};
extern crate webrender_traits;
use euclid::{Size2D, Point2D, Rect, Matrix4D};
use gleam::gl;
use std::ffi::CStr;
use std::{mem, slice};
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 std::mem;
use std::slice;
use std::os::raw::c_uchar;
use webrender::renderer::{Renderer, RendererOptions};
extern crate webrender_traits;
#[cfg(target_os = "linux")]
mod linux {
@ -473,8 +471,6 @@ pub extern fn wr_dp_push_image(state:&mut WrState, bounds: WrRect, clip : WrRect
if state.frame_builder.dl_builder.is_empty() {
return;
}
//let (width, height) = state.size;
let bounds = bounds.to_rect();
let clip = clip.to_rect();
@ -526,4 +522,4 @@ pub extern fn wr_free_buffer(vec_ptr: *mut c_uchar, length: u32, capacity: u32)
unsafe {
let rebuilt = Vec::from_raw_parts(vec_ptr, length as usize, capacity as usize);
}
}
}

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

@ -0,0 +1,20 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
extern crate webrender;
extern crate webrender_traits;
extern crate euclid;
extern crate app_units;
extern crate gleam;
#[cfg(target_os="macos")]
extern crate core_foundation;
#[cfg(target_os="windows")]
extern crate kernel32;
#[cfg(target_os="windows")]
extern crate winapi;
#[allow(non_snake_case)]
pub mod bindings;

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

17
toolkit/library/gtest/rust/Cargo.lock сгенерированный
Просмотреть файл

@ -185,7 +185,7 @@ dependencies = [
"mp4parse_capi 0.6.0",
"nsstring 0.1.0",
"rust_url_capi 0.0.1",
"webrender 0.10.0",
"webrender_bindings 0.1.0",
]
[[package]]
@ -544,7 +544,6 @@ dependencies = [
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"core-text 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"dwrote 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -552,7 +551,6 @@ dependencies = [
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"freetype 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
@ -560,6 +558,19 @@ dependencies = [
"rayon 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_traits 0.10.0",
]
[[package]]
name = "webrender_bindings"
version = "0.1.0"
dependencies = [
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender 0.10.0",
"webrender_traits 0.10.0",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]

17
toolkit/library/rust/Cargo.lock сгенерированный
Просмотреть файл

@ -183,7 +183,7 @@ dependencies = [
"mp4parse_capi 0.6.0",
"nsstring 0.1.0",
"rust_url_capi 0.0.1",
"webrender 0.10.0",
"webrender_bindings 0.1.0",
]
[[package]]
@ -531,7 +531,6 @@ dependencies = [
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"core-text 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"dwrote 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -539,7 +538,6 @@ dependencies = [
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"freetype 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
@ -547,6 +545,19 @@ dependencies = [
"rayon 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_traits 0.10.0",
]
[[package]]
name = "webrender_bindings"
version = "0.1.0"
dependencies = [
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender 0.10.0",
"webrender_traits 0.10.0",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]

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

@ -6,13 +6,13 @@ license = "MPL-2.0"
description = "Shared Rust code for libxul"
[features]
quantum_render = ["webrender"]
quantum_render = ["webrender_bindings"]
[dependencies]
mp4parse_capi = { path = "../../../../media/libstagefright/binding/mp4parse_capi" }
nsstring = { path = "../../../../xpcom/rust/nsstring" }
rust_url_capi = { path = "../../../../netwerk/base/rust-url-capi" }
webrender = { path = "../../../../gfx/webrender", optional = true }
webrender_bindings = { path = "../../../../gfx/webrender_bindings", optional = true }
[lib]
path = "lib.rs"

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

@ -6,4 +6,4 @@ extern crate mp4parse_capi;
extern crate nsstring;
extern crate rust_url_capi;
#[cfg(feature = "quantum_render")]
extern crate webrender;
extern crate webrender_bindings;