| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_GPU_COMPOSITOR_DEPENDENCIES_H_ | 5 #ifndef CONTENT_RENDERER_GPU_COMPOSITOR_DEPENDENCIES_H_ |
| 6 #define CONTENT_RENDERER_GPU_COMPOSITOR_DEPENDENCIES_H_ | 6 #define CONTENT_RENDERER_GPU_COMPOSITOR_DEPENDENCIES_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "cc/output/renderer_settings.h" |
| 12 | 13 |
| 13 namespace base { | 14 namespace base { |
| 14 class SingleThreadTaskRunner; | 15 class SingleThreadTaskRunner; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace cc { | 18 namespace cc { |
| 18 class BeginFrameSource; | 19 class BeginFrameSource; |
| 19 class ContextProvider; | 20 class ContextProvider; |
| 20 class ImageSerializationProcessor; | 21 class ImageSerializationProcessor; |
| 21 class SharedBitmapManager; | 22 class SharedBitmapManager; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 37 virtual bool IsGpuRasterizationForced() = 0; | 38 virtual bool IsGpuRasterizationForced() = 0; |
| 38 virtual bool IsGpuRasterizationEnabled() = 0; | 39 virtual bool IsGpuRasterizationEnabled() = 0; |
| 39 virtual bool IsAsyncWorkerContextEnabled() = 0; | 40 virtual bool IsAsyncWorkerContextEnabled() = 0; |
| 40 virtual int GetGpuRasterizationMSAASampleCount() = 0; | 41 virtual int GetGpuRasterizationMSAASampleCount() = 0; |
| 41 virtual bool IsLcdTextEnabled() = 0; | 42 virtual bool IsLcdTextEnabled() = 0; |
| 42 virtual bool IsDistanceFieldTextEnabled() = 0; | 43 virtual bool IsDistanceFieldTextEnabled() = 0; |
| 43 virtual bool IsZeroCopyEnabled() = 0; | 44 virtual bool IsZeroCopyEnabled() = 0; |
| 44 virtual bool IsPartialRasterEnabled() = 0; | 45 virtual bool IsPartialRasterEnabled() = 0; |
| 45 virtual bool IsGpuMemoryBufferCompositorResourcesEnabled() = 0; | 46 virtual bool IsGpuMemoryBufferCompositorResourcesEnabled() = 0; |
| 46 virtual bool IsElasticOverscrollEnabled() = 0; | 47 virtual bool IsElasticOverscrollEnabled() = 0; |
| 47 virtual std::vector<unsigned> GetImageTextureTargets() = 0; | 48 virtual const cc::RendererSettings::ImageTextureTargetsMap& |
| 49 GetImageTextureTargets() = 0; |
| 48 virtual scoped_refptr<base::SingleThreadTaskRunner> | 50 virtual scoped_refptr<base::SingleThreadTaskRunner> |
| 49 GetCompositorMainThreadTaskRunner() = 0; | 51 GetCompositorMainThreadTaskRunner() = 0; |
| 50 // Returns null if the compositor is in single-threaded mode (ie. there is no | 52 // Returns null if the compositor is in single-threaded mode (ie. there is no |
| 51 // compositor thread). | 53 // compositor thread). |
| 52 virtual scoped_refptr<base::SingleThreadTaskRunner> | 54 virtual scoped_refptr<base::SingleThreadTaskRunner> |
| 53 GetCompositorImplThreadTaskRunner() = 0; | 55 GetCompositorImplThreadTaskRunner() = 0; |
| 54 virtual cc::SharedBitmapManager* GetSharedBitmapManager() = 0; | 56 virtual cc::SharedBitmapManager* GetSharedBitmapManager() = 0; |
| 55 virtual gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() = 0; | 57 virtual gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() = 0; |
| 56 virtual scheduler::RendererScheduler* GetRendererScheduler() = 0; | 58 virtual scheduler::RendererScheduler* GetRendererScheduler() = 0; |
| 57 // TODO(danakj): This should be part of RenderThreadImpl (or some API from it | 59 // TODO(danakj): This should be part of RenderThreadImpl (or some API from it |
| 58 // to RenderWidget). But RenderThreadImpl is null in RenderViewTest. | 60 // to RenderWidget). But RenderThreadImpl is null in RenderViewTest. |
| 59 virtual std::unique_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource( | 61 virtual std::unique_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource( |
| 60 int routing_id) = 0; | 62 int routing_id) = 0; |
| 61 virtual cc::ImageSerializationProcessor* GetImageSerializationProcessor() = 0; | 63 virtual cc::ImageSerializationProcessor* GetImageSerializationProcessor() = 0; |
| 62 virtual cc::TaskGraphRunner* GetTaskGraphRunner() = 0; | 64 virtual cc::TaskGraphRunner* GetTaskGraphRunner() = 0; |
| 63 virtual bool AreImageDecodeTasksEnabled() = 0; | 65 virtual bool AreImageDecodeTasksEnabled() = 0; |
| 64 virtual bool IsThreadedAnimationEnabled() = 0; | 66 virtual bool IsThreadedAnimationEnabled() = 0; |
| 65 | 67 |
| 66 virtual ~CompositorDependencies() {} | 68 virtual ~CompositorDependencies() {} |
| 67 }; | 69 }; |
| 68 | 70 |
| 69 } // namespace content | 71 } // namespace content |
| 70 | 72 |
| 71 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_DEPENDENCIES_H_ | 73 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_DEPENDENCIES_H_ |
| OLD | NEW |