Route canvas layer GL state through backend
This commit is contained in:
@@ -4293,6 +4293,25 @@ void copies_framebuffer_to_texture_2d_through_dispatch(pp::tests::Harness& h)
|
||||
PP_EXPECT(h, recorded_framebuffer_texture_copy_calls[0].height == 7);
|
||||
}
|
||||
|
||||
void copies_framebuffer_to_requested_texture_target(pp::tests::Harness& h)
|
||||
{
|
||||
recorded_framebuffer_texture_copy_calls.clear();
|
||||
|
||||
const auto status = pp::renderer::gl::copy_opengl_framebuffer_to_texture_2d(
|
||||
pp::renderer::gl::OpenGlTexture2DFramebufferCopy {
|
||||
.texture_target = pp::renderer::gl::cube_face_texture_target(2U),
|
||||
.width = 4,
|
||||
.height = 4,
|
||||
},
|
||||
pp::renderer::gl::OpenGlTexture2DFramebufferCopyDispatch {
|
||||
.copy_tex_sub_image_2d = record_copy_tex_sub_image_2d,
|
||||
});
|
||||
|
||||
PP_EXPECT(h, status.ok());
|
||||
PP_EXPECT(h, recorded_framebuffer_texture_copy_calls.size() == 1U);
|
||||
PP_EXPECT(h, recorded_framebuffer_texture_copy_calls[0].target == pp::renderer::gl::cube_face_texture_target(2U));
|
||||
}
|
||||
|
||||
void skips_zero_sized_framebuffer_to_texture_copies(pp::tests::Harness& h)
|
||||
{
|
||||
recorded_framebuffer_texture_copy_calls.clear();
|
||||
@@ -5339,6 +5358,7 @@ int main()
|
||||
harness.run("rejects_invalid_pixel_buffer_dispatch", rejects_invalid_pixel_buffer_dispatch);
|
||||
harness.run("updates_texture_2d_through_dispatch", updates_texture_2d_through_dispatch);
|
||||
harness.run("copies_framebuffer_to_texture_2d_through_dispatch", copies_framebuffer_to_texture_2d_through_dispatch);
|
||||
harness.run("copies_framebuffer_to_requested_texture_target", copies_framebuffer_to_requested_texture_target);
|
||||
harness.run("skips_zero_sized_framebuffer_to_texture_copies", skips_zero_sized_framebuffer_to_texture_copies);
|
||||
harness.run("rejects_invalid_framebuffer_to_texture_copies", rejects_invalid_framebuffer_to_texture_copies);
|
||||
harness.run("generates_texture_2d_mipmaps_through_dispatch", generates_texture_2d_mipmaps_through_dispatch);
|
||||
|
||||
Reference in New Issue
Block a user