Skip to content

Commit

Permalink
Update to latest rust-layers
Browse files Browse the repository at this point in the history
  • Loading branch information
mrobinson committed Feb 2, 2015
1 parent 68ceb63 commit 77e1190
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 23 deletions.
6 changes: 5 additions & 1 deletion components/gfx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,13 @@ git = "https://github.com/servo/rust-core-graphics"
[dependencies.core_text]
git = "https://github.com/servo/rust-core-text"

[dependencies.skia]
git = "https://github.com/servo/skia"
branch = "upstream-2014-06-16"

[dependencies.script_traits]
path = "../script_traits"

[dependencies]
url = "0.2.16"
time = "0.1.12"
time = "0.1.12"
1 change: 1 addition & 0 deletions components/gfx/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ extern crate "net" as servo_net;
extern crate util;
extern crate "msg" as servo_msg;
extern crate style;
extern crate skia;
extern crate time;
extern crate url;

Expand Down
13 changes: 6 additions & 7 deletions components/gfx/paint_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use font_cache_task::FontCacheTask;
use font_context::FontContext;
use paint_context::PaintContext;

use azure::azure_hl::{SurfaceFormat, Color, DrawTarget, BackendType, StolenGLResources};
use azure::{AzFloat, AzGLNativeContextRef};
use azure::azure_hl::{SurfaceFormat, Color, DrawTarget, BackendType};
use azure::AzFloat;
use geom::matrix2d::Matrix2D;
use geom::point::Point2D;
use geom::rect::Rect;
Expand All @@ -25,6 +25,7 @@ use servo_msg::compositor_msg::{LayerMetadata, PaintListener, ScrollPolicy};
use servo_msg::constellation_msg::Msg as ConstellationMsg;
use servo_msg::constellation_msg::{ConstellationChan, Failure, PipelineId};
use servo_msg::constellation_msg::PipelineExitType;
use skia::SkiaGrGLNativeContextRef;
use util::geometry::{Au, ZERO_POINT};
use util::opts;
use util::smallvec::SmallVec;
Expand Down Expand Up @@ -518,7 +519,7 @@ impl WorkerThread {
// FIXME(pcwalton): Cache the components of draw targets (texture color buffer,
// paintbuffers) instead of recreating them.
let native_graphics_context =
native_graphics_context!(self) as *const _ as AzGLNativeContextRef;
native_graphics_context!(self) as *const _ as SkiaGrGLNativeContextRef;
let draw_target = DrawTarget::new_with_fbo(BackendType::Skia,
native_graphics_context,
size,
Expand Down Expand Up @@ -591,13 +592,11 @@ impl WorkerThread {

// GPU painting path:
draw_target.make_current();
let StolenGLResources {
surface: azure_surface
} = draw_target.steal_gl_resources().unwrap();

// We mark the native surface as not leaking in case the surfaces
// die on their way to the compositor task.
let mut native_surface: NativeSurface = NativeSurface::from_azure_surface(azure_surface);
let mut native_surface: NativeSurface =
NativeSurface::from_draw_target_backing(draw_target.steal_draw_target_backing());
native_surface.mark_wont_leak();

box LayerBuffer {
Expand Down
12 changes: 7 additions & 5 deletions components/servo/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions ports/cef/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions ports/gonk/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 comments on commit 77e1190

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from glennw
at mrobinson@77e1190

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging mrobinson/servo/rust-layers-update = 77e1190 into auto

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mrobinson/servo/rust-layers-update = 77e1190 merged ok, testing candidate = 6eac20d

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 6eac20d

Please sign in to comment.