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

Unified Diff: cc/layers/layer_unittest.cc

Issue 634083002: gpu: Compositor management of GpuMemoryBuffer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-pre-chromium-image-refactor
Patch Set: rebase Created 6 years, 2 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 | « cc/cc_tests.gyp ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_unittest.cc
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc
index 4c93d42092a945c921b590f5208cc6ae50ac30e2..a3ef621bb7056b69246181fe96075f4f0b53819e 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -14,6 +14,7 @@
#include "cc/test/fake_layer_tree_host_impl.h"
#include "cc/test/geometry_test_utils.h"
#include "cc/test/layer_test_common.h"
+#include "cc/test/test_gpu_memory_buffer_manager.h"
#include "cc/test/test_shared_bitmap_manager.h"
#include "cc/trees/layer_tree_host.h"
#include "cc/trees/single_thread_proxy.h"
@@ -40,7 +41,7 @@ namespace {
class MockLayerTreeHost : public LayerTreeHost {
public:
explicit MockLayerTreeHost(FakeLayerTreeHostClient* client)
- : LayerTreeHost(client, nullptr, LayerTreeSettings()) {
+ : LayerTreeHost(client, nullptr, nullptr, LayerTreeSettings()) {
InitializeSingleThreaded(client, base::MessageLoopProxy::current());
}
@@ -925,13 +926,15 @@ class LayerTreeHostFactory {
public:
LayerTreeHostFactory()
: client_(FakeLayerTreeHostClient::DIRECT_3D),
- shared_bitmap_manager_(new TestSharedBitmapManager()) {}
+ shared_bitmap_manager_(new TestSharedBitmapManager),
+ gpu_memory_buffer_manager_(new TestGpuMemoryBufferManager) {}
scoped_ptr<LayerTreeHost> Create() {
return LayerTreeHost::CreateSingleThreaded(
&client_,
&client_,
shared_bitmap_manager_.get(),
+ gpu_memory_buffer_manager_.get(),
LayerTreeSettings(),
base::MessageLoopProxy::current()).Pass();
}
@@ -941,13 +944,15 @@ class LayerTreeHostFactory {
&client_,
&client_,
shared_bitmap_manager_.get(),
+ gpu_memory_buffer_manager_.get(),
settings,
base::MessageLoopProxy::current()).Pass();
}
private:
FakeLayerTreeHostClient client_;
- scoped_ptr<SharedBitmapManager> shared_bitmap_manager_;
+ scoped_ptr<TestSharedBitmapManager> shared_bitmap_manager_;
+ scoped_ptr<TestGpuMemoryBufferManager> gpu_memory_buffer_manager_;
};
void AssertLayerTreeHostMatchesForSubtree(Layer* layer, LayerTreeHost* host) {
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698