From 8d8ecda2c73279b23a0ada26ecf53334b87a3554 Mon Sep 17 00:00:00 2001 From: "apatrick@chromium.org" Date: Wed, 1 Jun 2011 02:13:08 +0000 Subject: Fix clang build failure introduced by r87408. Review URL: http://codereview.chromium.org/7027020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87416 0039d316-1c4b-4281-b951-d872f2087c98 --- content/common/gpu/gpu_channel.h | 2 +- gpu/command_buffer/service/surface_manager_mock.cc | 15 +++++++++++++++ gpu/command_buffer/service/surface_manager_mock.h | 5 ++++- gpu/gpu.gyp | 1 + 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 gpu/command_buffer/service/surface_manager_mock.cc diff --git a/content/common/gpu/gpu_channel.h b/content/common/gpu/gpu_channel.h index 0e39636..d0632bd 100644 --- a/content/common/gpu/gpu_channel.h +++ b/content/common/gpu/gpu_channel.h @@ -93,7 +93,7 @@ class GpuChannel : public IPC::Channel::Listener, void LoseAllContexts(); // Look up a GLSurface by ID. In this case the ID is the IPC routing ID. - gfx::GLSurface* LookupSurface(int surface_id); + virtual gfx::GLSurface* LookupSurface(int surface_id); // Get the TransportTexture by ID. TransportTexture* GetTransportTexture(int32 route_id); diff --git a/gpu/command_buffer/service/surface_manager_mock.cc b/gpu/command_buffer/service/surface_manager_mock.cc new file mode 100644 index 0000000..e472582 --- /dev/null +++ b/gpu/command_buffer/service/surface_manager_mock.cc @@ -0,0 +1,15 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "gpu/command_buffer/service/surface_manager_mock.h" + +namespace gpu { + +MockSurfaceManager::MockSurfaceManager() { +} + +MockSurfaceManager::~MockSurfaceManager() { +} + +} // namespace gpu diff --git a/gpu/command_buffer/service/surface_manager_mock.h b/gpu/command_buffer/service/surface_manager_mock.h index f707ed8..97f878e 100644 --- a/gpu/command_buffer/service/surface_manager_mock.h +++ b/gpu/command_buffer/service/surface_manager_mock.h @@ -6,12 +6,15 @@ #define GPU_COMMAND_BUFFER_SERVICE_SURFACE_MANAGER_MOCK_H_ #include "gpu/command_buffer/service/surface_manager.h" +#include "testing/gmock/include/gmock/gmock.h" namespace gpu { class MockSurfaceManager : public SurfaceManager { public: - MockSurfaceManager() {} + MockSurfaceManager(); + virtual ~MockSurfaceManager(); + MOCK_METHOD1(LookupSurface, gfx::GLSurface*(int id)); private: diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp index 0a5dd31..4cf9b82 100644 --- a/gpu/gpu.gyp +++ b/gpu/gpu.gyp @@ -295,6 +295,7 @@ 'command_buffer/service/renderbuffer_manager_unittest.cc', 'command_buffer/service/shader_manager_unittest.cc', 'command_buffer/service/shader_translator_unittest.cc', + 'command_buffer/service/surface_manager_mock.cc', 'command_buffer/service/surface_manager_mock.h', 'command_buffer/service/test_helper.cc', 'command_buffer/service/test_helper.h', -- cgit v1.1