Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Unified Diff: gpu/ipc/service/gpu_memory_buffer_factory_test_template.h

Issue 1949593002: Fix gpu_ipc_service_unittests on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wrap Android-specific bits in if defined(OS_ANDROID) Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/ipc/service/gpu_channel_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/gpu_memory_buffer_factory_test_template.h
diff --git a/gpu/ipc/service/gpu_memory_buffer_factory_test_template.h b/gpu/ipc/service/gpu_memory_buffer_factory_test_template.h
index d3d42b6440cc053330c09731b29ddf6a03346d37..7fa415e7859d52b22f6f160e8d18879c23579680 100644
--- a/gpu/ipc/service/gpu_memory_buffer_factory_test_template.h
+++ b/gpu/ipc/service/gpu_memory_buffer_factory_test_template.h
@@ -8,8 +8,16 @@
#ifndef GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_TEST_TEMPLATE_H_
#define GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_TEST_TEMPLATE_H_
-#include "gpu/ipc/service/gpu_memory_buffer_factory.h"
+#if defined(OS_ANDROID)
+// TODO(markdittmer): Service code shouldn't depend on client code.
+// See crbug.com/608800.
+#include "gpu/ipc/client/android/in_process_surface_texture_manager.h"
+
+#include "gpu/ipc/common/android/surface_texture_manager.h"
+#endif
+
#include "gpu/ipc/common/gpu_memory_buffer_support.h"
+#include "gpu/ipc/service/gpu_memory_buffer_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/buffer_format_util.h"
@@ -24,6 +32,11 @@ class GpuMemoryBufferFactoryTest : public testing::Test {
TYPED_TEST_CASE_P(GpuMemoryBufferFactoryTest);
TYPED_TEST_P(GpuMemoryBufferFactoryTest, CreateGpuMemoryBuffer) {
+#if defined(OS_ANDROID)
+ SurfaceTextureManager::SetInstance(
+ InProcessSurfaceTextureManager::GetInstance());
+#endif
+
const gfx::GpuMemoryBufferId kBufferId(1);
const int kClientId = 1;
« no previous file with comments | « gpu/ipc/service/gpu_channel_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698