Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove WebGL implementation, it's no longer needed. #1587

Merged
merged 1 commit into from Aug 18, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Remove WebGL implementation, it's no longer needed.

Clients use the external image APIs to provide native
WebGL handles or readback buffers.

Fixes #1353.
Fixes #607.
  • Loading branch information
gw3583 committed Aug 18, 2017
commit 5b12aced1a41a8fcb1c2ebdd3412f49ec5065627

Some generated files are not rendered by default. Learn more.

@@ -1,16 +1,15 @@
[package]
name = "webrender"
version = "0.48.1"
version = "0.49.0"
authors = ["Glenn Watson <gw@intuitionlibrary.com>"]
license = "MPL-2.0"
repository = "https://github.com/servo/webrender"
build = "build.rs"

[features]
default = ["freetype-lib", "webgl"]
default = ["freetype-lib"]
freetype-lib = ["freetype/servo-freetype-sys"]
profiler = ["thread_profiler/thread_profiler"]
webgl = ["offscreen_gl_context", "webrender_api/webgl"]

[dependencies]
app_units = "0.5"
@@ -23,7 +22,6 @@ gleam = "0.4.8"
lazy_static = "0.2"
log = "0.3"
num-traits = "0.1.32"
offscreen_gl_context = {version = "0.11", features = ["serde", "osmesa"], optional = true}
time = "0.1"
rayon = "0.8"
webrender_api = {path = "../webrender_api"}
@@ -525,12 +525,6 @@ impl Frame {
let item_rect_with_offset = item.rect().translate(&reference_frame_relative_offset);
let clip_with_offset = item.local_clip_with_offset(&reference_frame_relative_offset);
match *item.item() {
SpecificDisplayItem::WebGL(ref info) => {
context.builder.add_webgl_rectangle(clip_and_scroll,
item_rect_with_offset,
&clip_with_offset,
info.context_id);
}
SpecificDisplayItem::Image(ref info) => {
if let Some(tiling) = context.tiled_image_map.get(&info.image_key) {
// The image resource is tiled. We have to generate an image primitive
@@ -8,15 +8,15 @@ use api::{ExtendMode, FontKey, FontRenderMode, GlyphInstance, GlyphOptions, Grad
use api::{ImageKey, ImageRendering, ItemRange, LayerPoint, LayerRect, LayerSize};
use api::{LayerToScrollTransform, LayerVector2D, LayoutVector2D, LineOrientation, LineStyle};
use api::{LocalClip, PipelineId, RepeatMode, ScrollSensitivity, SubpixelDirection, TextShadow};
use api::{TileOffset, TransformStyle, WebGLContextId, WorldPixel, YuvColorSpace, YuvData};
use api::{TileOffset, TransformStyle, WorldPixel, YuvColorSpace, YuvData};
use app_units::Au;
use frame::FrameId;
use gpu_cache::GpuCache;
use internal_types::{FastHashMap, HardwareCompositeOp};
use mask_cache::{ClipMode, ClipRegion, ClipSource, MaskCacheInfo};
use plane_split::{BspSplitter, Polygon, Splitter};
use prim_store::{GradientPrimitiveCpu, ImagePrimitiveCpu, LinePrimitive, PrimitiveKind};
use prim_store::{ImagePrimitiveKind, PrimitiveContainer, PrimitiveIndex};
use prim_store::{PrimitiveContainer, PrimitiveIndex};
use prim_store::{PrimitiveStore, RadialGradientPrimitiveCpu, TextRunMode};
use prim_store::{RectanglePrimitive, TextRunPrimitiveCpu, TextShadowPrimitiveCpu};
use prim_store::{BoxShadowPrimitiveCpu, TexelRect, YuvImagePrimitiveCpu};
@@ -1205,24 +1205,6 @@ impl FrameBuilder {
}
}

pub fn add_webgl_rectangle(&mut self,
clip_and_scroll: ClipAndScrollInfo,
rect: LayerRect,
local_clip: &LocalClip,
context_id: WebGLContextId) {
let prim_cpu = ImagePrimitiveCpu {
kind: ImagePrimitiveKind::WebGL(context_id),
gpu_blocks: [ [rect.size.width, rect.size.height, 0.0, 0.0].into(),
TexelRect::invalid().into() ],
};

self.add_primitive(clip_and_scroll,
&rect,
local_clip,
&[],
PrimitiveContainer::Image(prim_cpu));
}

pub fn add_image(&mut self,
clip_and_scroll: ClipAndScrollInfo,
rect: LayerRect,
@@ -1236,10 +1218,10 @@ impl FrameBuilder {
let sub_rect_block = sub_rect.unwrap_or(TexelRect::invalid()).into();

let prim_cpu = ImagePrimitiveCpu {
kind: ImagePrimitiveKind::Image(image_key,
image_rendering,
tile,
*tile_spacing),
image_key,
image_rendering,
tile_offset: tile,
tile_spacing: *tile_spacing,
gpu_blocks: [ [ stretch_size.width,
stretch_size.height,
tile_spacing.width,
@@ -45,10 +45,6 @@ pub enum SourceTexture {
External(ExternalImageData),
CacheA8,
CacheRGBA8,
#[cfg_attr(not(feature = "webgl"), allow(dead_code))]
/// This is actually a gl::GLuint, with the shared texture id between the
/// main context and the WebGL context.
WebGL(u32),
}

pub const ORTHO_NEAR_PLANE: f32 = -1000000.0;
@@ -80,13 +80,6 @@ mod texture_cache;
mod tiling;
mod util;

#[cfg(feature = "webgl")]
mod webgl_types;

#[cfg(not(feature = "webgl"))]
#[path = "webgl_stubs.rs"]
mod webgl_types;

mod shader_source {
include!(concat!(env!("OUT_DIR"), "/shaders.rs"));
}
@@ -137,8 +130,6 @@ extern crate num_traits;
//extern crate notify;
extern crate time;
pub extern crate webrender_api;
#[cfg(feature = "webgl")]
extern crate offscreen_gl_context;
extern crate byteorder;
extern crate rayon;
extern crate plane_split;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.