Use GpuResources in GpuTestBase and update GpuBufferMultiPoolTest

PiperOrigin-RevId: 491486495
This commit is contained in:
Camillo Lugaresi 2022-11-28 17:48:37 -08:00 committed by Copybara-Service
parent e987b69f39
commit fc526374ab

View File

@ -24,13 +24,14 @@ namespace mediapipe {
class GpuTestBase : public ::testing::Test {
protected:
GpuTestBase() { helper_.InitializeForTest(&gpu_shared_); }
GpuTestBase() { helper_.InitializeForTest(gpu_resources_.get()); }
void RunInGlContext(std::function<void(void)> gl_func) {
helper_.RunInGlContext(std::move(gl_func));
}
GpuSharedData gpu_shared_;
std::shared_ptr<GpuResources> gpu_resources_ = gpu_shared_.gpu_resources;
GlCalculatorHelper helper_;
};