Mir

Merge lp:~kdub/mir/fix-1663062-step2 into lp:mir

Proposed by Kevin DuBois
Status: Merged
Approved by: Daniel van Vugt
Approved revision: no longer in the source branch.
Merged at revision: 4044
Proposed branch: lp:~kdub/mir/fix-1663062-step2
Merge into: lp:mir
Diff against target: 303 lines (+102/-31)
8 files modified
include/platform/mir/graphics/gl_format.h (+31/-0)
src/platforms/common/server/shm_buffer.cpp (+5/-7)
src/server/CMakeLists.txt (+1/-0)
src/server/graphics/nested/CMakeLists.txt (+1/-0)
src/server/graphics/nested/buffer.cpp (+36/-14)
src/server/graphics/nested/mir_client_host_connection.cpp (+3/-6)
src/server/graphics/nested/platform.cpp (+1/-4)
tests/unit-tests/platforms/nested/test_buffer.cpp (+24/-0)
To merge this branch: bzr merge lp:~kdub/mir/fix-1663062-step2
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Mir CI Bot continuous-integration Approve
Brandon Schaefer (community) Approve
Review via email: mp+317247@code.launchpad.net

Commit message

fix 1663062 for the 1.0 series by uploading ShmBuffers properly in nested servers. This re-enables the software/mesa buffer passthrough pass, while ensuring that lp: #1663062 doesn't happen.

Description of the change

fix 1663062 for the 1.0 series by uploading ShmBuffers properly in nested servers. This re-enables the software/mesa buffer passthrough pass, while ensuring that lp: #1663062 doesn't happen.

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4030
https://mir-jenkins.ubuntu.com/job/mir-ci/2996/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/3991/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4077
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4067
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4067
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4067
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4018/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4018
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4018/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4018
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4018/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4018/console
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4018/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4018
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4018/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4018/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/2996/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Small nit

19:09:59 I: mir_demo_client_animated_cursor
19:09:59 I: Smoke testing complete with returncode -1

https://bugs.launchpad.net/mir/+bug/1660889

review: Approve
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

The nit is in a diff comment, the other comment is about the CI failure!

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Nit:

#include <GLES2/gl2.h>

should be:

#include MIR_SERVER_GL_H

review: Needs Fixing
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Another nit:

+ * Authored by: Kevin DuBois <email address hidden>

Since I wrote that function (whose cpp file has Alexandros' name on it still), it would be less inaccurate to just remove the author comment(s).

Revision history for this message
Kevin DuBois (kdub) wrote :

Corrected to fit the current system of compile time gl switching.

re authorship, best I can tell, we just we need a name on it for copyright person (and canonical owns the copyright either way).
Should it be the person who created the file, or who wrote the logic behind the header, or who wrote the function header doesn't seem like a fruitful discussion. Removed to avert having to figure out (or come up with) the policy specifics.

Revision history for this message
Kevin DuBois (kdub) wrote :

and maybe we don't need names on it at all? (c) Canonical Ltd 2017 at the top might be sufficient

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4033
https://mir-jenkins.ubuntu.com/job/mir-ci/3018/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4030
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4117
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4107
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4107
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4107
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4057
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4057/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4057
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4057/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4057
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4057/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4057
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4057/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4057
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4057/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4057
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4057/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3018/rebuild

review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Great, thanks.

I haven't repeated manual testing but if anything is still broken in this area we'll notice soon enough.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'include/platform/mir/graphics/gl_format.h'
--- include/platform/mir/graphics/gl_format.h 1970-01-01 00:00:00 +0000
+++ include/platform/mir/graphics/gl_format.h 2017-02-20 13:18:16 +0000
@@ -0,0 +1,31 @@
1/*
2 * Copyright © 2017 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License version 3,
6 * as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 */
17
18#ifndef MIR_GRAPHICS_COMMON_GL_FORMAT_H_
19#define MIR_GRAPHICS_COMMON_GL_FORMAT_H_
20#include MIR_SERVER_GL_H
21#include "mir_toolkit/common.h"
22
23namespace mir
24{
25namespace graphics
26{
27bool get_gl_pixel_format(MirPixelFormat mir_format,
28 GLenum& gl_format, GLenum& gl_type);
29}
30}
31#endif /* MIR_GRAPHICS_COMMON_GL_FORMAT_H_ */
032
=== modified file 'src/platforms/common/server/shm_buffer.cpp'
--- src/platforms/common/server/shm_buffer.cpp 2017-01-18 02:29:37 +0000
+++ src/platforms/common/server/shm_buffer.cpp 2017-02-20 13:18:16 +0000
@@ -17,9 +17,11 @@
17 * Alexandros Frantzis <alexandros.frantzis@canonical.com>17 * Alexandros Frantzis <alexandros.frantzis@canonical.com>
18 */18 */
1919
20#include "mir/graphics/gl_format.h"
20#include "shm_file.h"21#include "shm_file.h"
21#include "shm_buffer.h"22#include "shm_buffer.h"
22#include "buffer_texture_binder.h"23#include "buffer_texture_binder.h"
24
23#include MIR_SERVER_GL_H25#include MIR_SERVER_GL_H
24#include MIR_SERVER_GLEXT_H26#include MIR_SERVER_GLEXT_H
2527
@@ -34,9 +36,7 @@
34namespace mgc = mir::graphics::common;36namespace mgc = mir::graphics::common;
35namespace geom = mir::geometry;37namespace geom = mir::geometry;
3638
37namespace {39bool mg::get_gl_pixel_format(MirPixelFormat mir_format,
38
39bool get_gl_pixel_format(MirPixelFormat mir_format,
40 GLenum& gl_format, GLenum& gl_type)40 GLenum& gl_format, GLenum& gl_type)
41{41{
42#if __BYTE_ORDER == __LITTLE_ENDIAN42#if __BYTE_ORDER == __LITTLE_ENDIAN
@@ -84,12 +84,10 @@
84 return gl_format != GL_INVALID_ENUM && gl_type != GL_INVALID_ENUM;84 return gl_format != GL_INVALID_ENUM && gl_type != GL_INVALID_ENUM;
85}85}
8686
87} // anonymous namespace
88
89bool mgc::ShmBuffer::supports(MirPixelFormat mir_format)87bool mgc::ShmBuffer::supports(MirPixelFormat mir_format)
90{88{
91 GLenum gl_format, gl_type;89 GLenum gl_format, gl_type;
92 return get_gl_pixel_format(mir_format, gl_format, gl_type);90 return mg::get_gl_pixel_format(mir_format, gl_format, gl_type);
93}91}
9492
95mgc::ShmBuffer::ShmBuffer(93mgc::ShmBuffer::ShmBuffer(
@@ -127,7 +125,7 @@
127{125{
128 GLenum format, type;126 GLenum format, type;
129127
130 if (get_gl_pixel_format(pixel_format_, format, type))128 if (mg::get_gl_pixel_format(pixel_format_, format, type))
131 {129 {
132 /*130 /*
133 * All existing Mir logic assumes that strides are whole multiples of131 * All existing Mir logic assumes that strides are whole multiples of
134132
=== modified file 'src/server/CMakeLists.txt'
--- src/server/CMakeLists.txt 2017-02-15 07:38:33 +0000
+++ src/server/CMakeLists.txt 2017-02-20 13:18:16 +0000
@@ -110,6 +110,7 @@
110 mirprotobuf110 mirprotobuf
111 mircookie111 mircookie
112112
113 server_platform_common
113 ${GLog_LIBRARY}114 ${GLog_LIBRARY}
114 ${GFlags_LIBRARY}115 ${GFlags_LIBRARY}
115 ${EGL_LDFLAGS} ${EGL_LIBRARIES}116 ${EGL_LDFLAGS} ${EGL_LIBRARIES}
116117
=== modified file 'src/server/graphics/nested/CMakeLists.txt'
--- src/server/graphics/nested/CMakeLists.txt 2017-02-17 07:03:56 +0000
+++ src/server/graphics/nested/CMakeLists.txt 2017-02-20 13:18:16 +0000
@@ -1,6 +1,7 @@
1include_directories(1include_directories(
2 ${PROJECT_SOURCE_DIR}/include/renderers/gl2 ${PROJECT_SOURCE_DIR}/include/renderers/gl
3 ${PROJECT_SOURCE_DIR}/include/platforms/mesa3 ${PROJECT_SOURCE_DIR}/include/platforms/mesa
4 ${PROJECT_SOURCE_DIR}/include/platforms/common
4)5)
56
6add_library(7add_library(
78
=== modified file 'src/server/graphics/nested/buffer.cpp'
--- src/server/graphics/nested/buffer.cpp 2017-02-15 07:38:33 +0000
+++ src/server/graphics/nested/buffer.cpp 2017-02-20 13:18:16 +0000
@@ -21,6 +21,7 @@
21#include "mir/renderer/gl/texture_target.h"21#include "mir/renderer/gl/texture_target.h"
22#include "mir/graphics/egl_extensions.h"22#include "mir/graphics/egl_extensions.h"
23#include "mir/graphics/buffer_ipc_message.h"23#include "mir/graphics/buffer_ipc_message.h"
24#include "mir/graphics/gl_format.h"
24#include "mir_toolkit/mir_buffer.h"25#include "mir_toolkit/mir_buffer.h"
25#include "host_connection.h"26#include "host_connection.h"
26#include "buffer.h"27#include "buffer.h"
@@ -47,10 +48,8 @@
47{48{
48public:49public:
49 TextureAccess(50 TextureAccess(
50 mgn::Buffer& buffer,
51 std::shared_ptr<mgn::NativeBuffer> const& native_buffer,51 std::shared_ptr<mgn::NativeBuffer> const& native_buffer,
52 std::shared_ptr<mgn::HostConnection> const& connection) :52 std::shared_ptr<mgn::HostConnection> const& connection) :
53 buffer(buffer),
54 native_buffer(native_buffer),53 native_buffer(native_buffer),
55 connection(connection)54 connection(connection)
56 {55 {
@@ -108,11 +107,9 @@
108 bind();107 bind();
109 }108 }
110109
111protected:110private:
112 mgn::Buffer& buffer;
113 std::shared_ptr<mgn::NativeBuffer> const native_buffer;111 std::shared_ptr<mgn::NativeBuffer> const native_buffer;
114 std::shared_ptr<mgn::HostConnection> const connection;112 std::shared_ptr<mgn::HostConnection> const connection;
115private:
116 mg::EGLExtensions extensions;113 mg::EGLExtensions extensions;
117 typedef std::pair<EGLDisplay, EGLContext> ImageResources;114 typedef std::pair<EGLDisplay, EGLContext> ImageResources;
118 typedef std::unique_ptr<EGLImageKHR, std::function<void(EGLImageKHR*)>> EGLImageUPtr;115 typedef std::unique_ptr<EGLImageKHR, std::function<void(EGLImageKHR*)>> EGLImageUPtr;
@@ -120,17 +117,20 @@
120};117};
121118
122class PixelAndTextureAccess :119class PixelAndTextureAccess :
123 public TextureAccess,120 public mg::NativeBufferBase,
124 public mrs::PixelSource121 public mrs::PixelSource,
122 public mrg::TextureSource
125{123{
126public:124public:
127 PixelAndTextureAccess(125 PixelAndTextureAccess(
128 mgn::Buffer& buffer,126 mgn::Buffer& buffer,
129 std::shared_ptr<mgn::NativeBuffer> const& native_buffer,127 std::shared_ptr<mgn::NativeBuffer> const& native_buffer) :
130 std::shared_ptr<mgn::HostConnection> const& connection) :128 buffer(buffer),
131 TextureAccess(buffer, native_buffer, connection),129 native_buffer(native_buffer),
132 stride_(geom::Stride{native_buffer->get_graphics_region()->stride})130 stride_(geom::Stride{native_buffer->get_graphics_region()->stride})
133 {131 {
132 if (!mg::get_gl_pixel_format(buffer.pixel_format(), format, type))
133 BOOST_THROW_EXCEPTION(std::logic_error("buffer cannot be used as texture"));
134 }134 }
135135
136 void write(unsigned char const* pixels, size_t pixel_size) override136 void write(unsigned char const* pixels, size_t pixel_size) override
@@ -163,17 +163,39 @@
163 return stride_;163 return stride_;
164 }164 }
165165
166 void bind() override
167 {
168 glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
169 glTexImage2D(
170 GL_TEXTURE_2D, 0, format,
171 buffer.size().width.as_int(), buffer.size().height.as_int(),
172 0, format, type, native_buffer->get_graphics_region()->vaddr);
173 }
174
175 void gl_bind_to_texture() override
176 {
177 bind();
178 }
179
180 void secure_for_render() override
181 {
182 }
183
166private:184private:
185 mgn::Buffer& buffer;
186 std::shared_ptr<mgn::NativeBuffer> const native_buffer;
167 geom::Stride const stride_;187 geom::Stride const stride_;
188 GLenum format;
189 GLenum type;
168};190};
169}191}
170192
171std::shared_ptr<mg::NativeBufferBase> mgn::Buffer::create_native_base(mg::BufferUsage const usage)193std::shared_ptr<mg::NativeBufferBase> mgn::Buffer::create_native_base(mg::BufferUsage const usage)
172{194{
173 if (usage == mg::BufferUsage::software)195 if (usage == mg::BufferUsage::software)
174 return std::make_shared<PixelAndTextureAccess>(*this, buffer, connection);196 return std::make_shared<PixelAndTextureAccess>(*this, buffer);
175 else if (usage == mg::BufferUsage::hardware)197 else if (usage == mg::BufferUsage::hardware)
176 return std::make_shared<TextureAccess>(*this, buffer, connection);198 return std::make_shared<TextureAccess>(buffer, connection);
177 else199 else
178 BOOST_THROW_EXCEPTION(std::invalid_argument("usage not supported when creating nested::Buffer"));200 BOOST_THROW_EXCEPTION(std::invalid_argument("usage not supported when creating nested::Buffer"));
179}201}
@@ -192,7 +214,7 @@
192 geom::Size size, uint32_t native_format, uint32_t native_flags) :214 geom::Size size, uint32_t native_format, uint32_t native_flags) :
193 connection(connection),215 connection(connection),
194 buffer(connection->create_buffer(size, native_format, native_flags)),216 buffer(connection->create_buffer(size, native_format, native_flags)),
195 native_base(std::make_shared<TextureAccess>(*this, buffer, connection))217 native_base(std::make_shared<TextureAccess>(buffer, connection))
196{218{
197}219}
198220
@@ -202,7 +224,7 @@
202 MirPixelFormat format) :224 MirPixelFormat format) :
203 connection(connection),225 connection(connection),
204 buffer(connection->create_buffer(size, format)),226 buffer(connection->create_buffer(size, format)),
205 native_base(std::make_shared<PixelAndTextureAccess>(*this, buffer, connection))227 native_base(std::make_shared<PixelAndTextureAccess>(*this, buffer))
206{228{
207}229}
208230
209231
=== modified file 'src/server/graphics/nested/mir_client_host_connection.cpp'
--- src/server/graphics/nested/mir_client_host_connection.cpp 2017-02-17 07:03:56 +0000
+++ src/server/graphics/nested/mir_client_host_connection.cpp 2017-02-20 13:18:16 +0000
@@ -685,13 +685,10 @@
685 return std::make_unique<SurfaceSpec>(mir_connection);685 return std::make_unique<SurfaceSpec>(mir_connection);
686}686}
687687
688bool mgn::MirClientHostConnection::supports_passthrough(mg::BufferUsage usage)688bool mgn::MirClientHostConnection::supports_passthrough(mg::BufferUsage)
689{689{
690 //FIXME: ShmBuffers currently don't upload properly. The logic here uses690 return mir_extension_android_buffer_v1(mir_connection) ||
691 // passthrough where supported (ANativeWindowBuffer and gbm_bo)691 mir_extension_gbm_buffer_v1(mir_connection);
692 // (LP: #1663062 for more details)
693 return (mir_extension_android_buffer_v1(mir_connection) ||
694 ((mir_extension_gbm_buffer_v1(mir_connection) && usage == mg::BufferUsage::hardware)));
695}692}
696693
697void mgn::MirClientHostConnection::apply_input_configuration(MirInputConfig const* config)694void mgn::MirClientHostConnection::apply_input_configuration(MirInputConfig const* config)
698695
=== modified file 'src/server/graphics/nested/platform.cpp'
--- src/server/graphics/nested/platform.cpp 2017-02-15 07:38:33 +0000
+++ src/server/graphics/nested/platform.cpp 2017-02-20 13:18:16 +0000
@@ -75,10 +75,7 @@
7575
76 std::shared_ptr<mg::Buffer> alloc_buffer(mg::BufferProperties const& properties) override76 std::shared_ptr<mg::Buffer> alloc_buffer(mg::BufferProperties const& properties) override
77 {77 {
78 if (passthrough_candidate(properties.size, properties.usage))78 return guest_allocator->alloc_buffer(properties);
79 return std::make_shared<mgn::Buffer>(connection, properties);
80 else
81 return guest_allocator->alloc_buffer(properties);
82 }79 }
8380
84 std::shared_ptr<mg::Buffer> alloc_buffer(81 std::shared_ptr<mg::Buffer> alloc_buffer(
8582
=== modified file 'tests/unit-tests/platforms/nested/test_buffer.cpp'
--- tests/unit-tests/platforms/nested/test_buffer.cpp 2017-02-15 07:38:33 +0000
+++ tests/unit-tests/platforms/nested/test_buffer.cpp 2017-02-20 13:18:16 +0000
@@ -234,6 +234,30 @@
234 texture_source->gl_bind_to_texture();234 texture_source->gl_bind_to_texture();
235}235}
236236
237TEST_F(NestedBuffer, binds_to_texture_gl_buffer)
238{
239 auto pf = sw_properties.format;
240 auto format = GL_RGBA;
241 auto type = GL_UNSIGNED_BYTE;
242
243 mgn::Buffer buffer(mt::fake_shared(mock_connection), size, pf);
244
245 auto native_base = buffer.native_buffer_base();
246 ASSERT_THAT(native_base, Ne(nullptr));
247 auto texture_source = dynamic_cast<mir::renderer::gl::TextureSource*>(native_base);
248 ASSERT_THAT(texture_source, Ne(nullptr));
249
250 EXPECT_CALL(mock_egl, glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, _))
251 .Times(0);
252
253 EXPECT_CALL(mock_gl, glPixelStorei(GL_UNPACK_ALIGNMENT, 1));
254 EXPECT_CALL(mock_gl, glTexImage2D(
255 GL_TEXTURE_2D, 0, format,
256 buffer.size().width.as_int(), buffer.size().height.as_int(),
257 0, format, type, _));
258 texture_source->gl_bind_to_texture();
259}
260
237TEST_F(NestedBuffer, just_makes_one_bind_per_display_context_pair)261TEST_F(NestedBuffer, just_makes_one_bind_per_display_context_pair)
238{262{
239 ON_CALL(*client_buffer, egl_image_creation_hints())263 ON_CALL(*client_buffer, egl_image_creation_hints())

Subscribers

People subscribed via source and target branches