1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_TEST_FAKE_RESOURCE_PROVIDER_H_
6 #define CC_TEST_FAKE_RESOURCE_PROVIDER_H_
8 #include "cc/resources/resource_provider.h"
12 class FakeResourceProvider
: public ResourceProvider
{
14 static scoped_ptr
<FakeResourceProvider
> Create(
15 OutputSurface
* output_surface
,
16 SharedBitmapManager
* shared_bitmap_manager
) {
17 scoped_ptr
<FakeResourceProvider
> provider(
18 new FakeResourceProvider(output_surface
, shared_bitmap_manager
, nullptr,
19 nullptr, 0, false, 1, false));
20 provider
->Initialize();
24 static scoped_ptr
<FakeResourceProvider
> Create(
25 OutputSurface
* output_surface
,
26 SharedBitmapManager
* shared_bitmap_manager
,
27 gpu::GpuMemoryBufferManager
* gpu_memory_buffer_manager
) {
28 scoped_ptr
<FakeResourceProvider
> provider(new FakeResourceProvider(
29 output_surface
, shared_bitmap_manager
, gpu_memory_buffer_manager
,
30 nullptr, 0, false, 1, false));
31 provider
->Initialize();
36 FakeResourceProvider(OutputSurface
* output_surface
,
37 SharedBitmapManager
* shared_bitmap_manager
,
38 gpu::GpuMemoryBufferManager
* gpu_memory_buffer_manager
,
39 BlockingTaskRunner
* blocking_main_thread_task_runner
,
40 int highp_threshold_min
,
41 bool use_rgba_4444_texture_format
,
42 size_t id_allocation_chunk_size
,
43 bool use_persistent_map_for_gpu_memory_buffers
)
44 : ResourceProvider(output_surface
,
45 shared_bitmap_manager
,
46 gpu_memory_buffer_manager
,
47 blocking_main_thread_task_runner
,
49 use_rgba_4444_texture_format
,
50 id_allocation_chunk_size
,
51 use_persistent_map_for_gpu_memory_buffers
) {}
56 #endif // CC_TEST_FAKE_RESOURCE_PROVIDER_H_