mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
Rename VertexAttribs::set_from to VertexAttribs::clone_from
This commit is contained in:
parent
0018e5e6ba
commit
0814bd6699
2 changed files with 3 additions and 3 deletions
|
@ -100,7 +100,7 @@ impl OESVertexArrayObjectMethods for OESVertexArrayObject {
|
||||||
fn BindVertexArrayOES(&self, vao: Option<&WebGLVertexArrayObjectOES>) {
|
fn BindVertexArrayOES(&self, vao: Option<&WebGLVertexArrayObjectOES>) {
|
||||||
if let Some(bound_vao) = self.bound_vao.get() {
|
if let Some(bound_vao) = self.bound_vao.get() {
|
||||||
// Store buffers attached to attrib pointers
|
// Store buffers attached to attrib pointers
|
||||||
bound_vao.vertex_attribs().set_from(&self.ctx.vertex_attribs());
|
bound_vao.vertex_attribs().clone_from(&self.ctx.vertex_attribs());
|
||||||
for attrib_data in &*bound_vao.vertex_attribs().borrow() {
|
for attrib_data in &*bound_vao.vertex_attribs().borrow() {
|
||||||
if let Some(buffer) = attrib_data.buffer() {
|
if let Some(buffer) = attrib_data.buffer() {
|
||||||
buffer.add_vao_reference(bound_vao.id());
|
buffer.add_vao_reference(bound_vao.id());
|
||||||
|
@ -125,7 +125,7 @@ impl OESVertexArrayObjectMethods for OESVertexArrayObject {
|
||||||
self.bound_vao.set(Some(&vao));
|
self.bound_vao.set(Some(&vao));
|
||||||
|
|
||||||
// Restore WebGLRenderingContext current bindings
|
// Restore WebGLRenderingContext current bindings
|
||||||
self.ctx.vertex_attribs().set_from(&vao.vertex_attribs());
|
self.ctx.vertex_attribs().clone_from(&vao.vertex_attribs());
|
||||||
let element_array = vao.bound_buffer_element_array();
|
let element_array = vao.bound_buffer_element_array();
|
||||||
self.ctx.set_bound_buffer_element_array(element_array.as_ref().map(|buffer| &**buffer));
|
self.ctx.set_bound_buffer_element_array(element_array.as_ref().map(|buffer| &**buffer));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -3811,7 +3811,7 @@ impl VertexAttribs {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_from(&self, other: &Self) {
|
pub fn clone_from(&self, other: &Self) {
|
||||||
self.attribs.borrow_mut().clone_from_slice(&other.attribs.borrow());
|
self.attribs.borrow_mut().clone_from_slice(&other.attribs.borrow());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue