| 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 #include "cc/output/renderer_settings.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class SingleThreadTaskRunner; | 15 class SingleThreadTaskRunner; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace cc { | 18 namespace cc { |
| 19 class BeginFrameSource; | 19 class BeginFrameSource; |
| 20 class ContextProvider; | 20 class ContextProvider; |
| 21 class ImageSerializationProcessor; | 21 class ImageSerializationProcessor; |
| 22 class SharedBitmapManager; | 22 class SharedBitmapManager; |
| 23 class TaskGraphRunner; | 23 class TaskGraphRunner; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace gpu { | 26 namespace gpu { |
| 27 class GpuMemoryBufferManager; | 27 class GpuMemoryBufferManager; |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace blink { |
| 30 namespace scheduler { | 31 namespace scheduler { |
| 31 class RendererScheduler; | 32 class RendererScheduler; |
| 32 } | 33 } |
| 34 } |
| 33 | 35 |
| 34 namespace content { | 36 namespace content { |
| 35 | 37 |
| 36 class CompositorDependencies { | 38 class CompositorDependencies { |
| 37 public: | 39 public: |
| 38 virtual bool IsGpuRasterizationForced() = 0; | 40 virtual bool IsGpuRasterizationForced() = 0; |
| 39 virtual bool IsGpuRasterizationEnabled() = 0; | 41 virtual bool IsGpuRasterizationEnabled() = 0; |
| 40 virtual bool IsAsyncWorkerContextEnabled() = 0; | 42 virtual bool IsAsyncWorkerContextEnabled() = 0; |
| 41 virtual int GetGpuRasterizationMSAASampleCount() = 0; | 43 virtual int GetGpuRasterizationMSAASampleCount() = 0; |
| 42 virtual bool IsLcdTextEnabled() = 0; | 44 virtual bool IsLcdTextEnabled() = 0; |
| 43 virtual bool IsDistanceFieldTextEnabled() = 0; | 45 virtual bool IsDistanceFieldTextEnabled() = 0; |
| 44 virtual bool IsZeroCopyEnabled() = 0; | 46 virtual bool IsZeroCopyEnabled() = 0; |
| 45 virtual bool IsPartialRasterEnabled() = 0; | 47 virtual bool IsPartialRasterEnabled() = 0; |
| 46 virtual bool IsGpuMemoryBufferCompositorResourcesEnabled() = 0; | 48 virtual bool IsGpuMemoryBufferCompositorResourcesEnabled() = 0; |
| 47 virtual bool IsElasticOverscrollEnabled() = 0; | 49 virtual bool IsElasticOverscrollEnabled() = 0; |
| 48 virtual const cc::BufferToTextureTargetMap& GetBufferToTextureTargetMap() = 0; | 50 virtual const cc::BufferToTextureTargetMap& GetBufferToTextureTargetMap() = 0; |
| 49 virtual scoped_refptr<base::SingleThreadTaskRunner> | 51 virtual scoped_refptr<base::SingleThreadTaskRunner> |
| 50 GetCompositorMainThreadTaskRunner() = 0; | 52 GetCompositorMainThreadTaskRunner() = 0; |
| 51 // Returns null if the compositor is in single-threaded mode (ie. there is no | 53 // Returns null if the compositor is in single-threaded mode (ie. there is no |
| 52 // compositor thread). | 54 // compositor thread). |
| 53 virtual scoped_refptr<base::SingleThreadTaskRunner> | 55 virtual scoped_refptr<base::SingleThreadTaskRunner> |
| 54 GetCompositorImplThreadTaskRunner() = 0; | 56 GetCompositorImplThreadTaskRunner() = 0; |
| 55 virtual cc::SharedBitmapManager* GetSharedBitmapManager() = 0; | 57 virtual cc::SharedBitmapManager* GetSharedBitmapManager() = 0; |
| 56 virtual gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() = 0; | 58 virtual gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() = 0; |
| 57 virtual scheduler::RendererScheduler* GetRendererScheduler() = 0; | 59 virtual blink::scheduler::RendererScheduler* GetRendererScheduler() = 0; |
| 58 // TODO(danakj): This should be part of RenderThreadImpl (or some API from it | 60 // TODO(danakj): This should be part of RenderThreadImpl (or some API from it |
| 59 // to RenderWidget). But RenderThreadImpl is null in RenderViewTest. | 61 // to RenderWidget). But RenderThreadImpl is null in RenderViewTest. |
| 60 virtual std::unique_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource( | 62 virtual std::unique_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource( |
| 61 int routing_id) = 0; | 63 int routing_id) = 0; |
| 62 virtual cc::ImageSerializationProcessor* GetImageSerializationProcessor() = 0; | 64 virtual cc::ImageSerializationProcessor* GetImageSerializationProcessor() = 0; |
| 63 virtual cc::TaskGraphRunner* GetTaskGraphRunner() = 0; | 65 virtual cc::TaskGraphRunner* GetTaskGraphRunner() = 0; |
| 64 virtual bool AreImageDecodeTasksEnabled() = 0; | 66 virtual bool AreImageDecodeTasksEnabled() = 0; |
| 65 virtual bool IsThreadedAnimationEnabled() = 0; | 67 virtual bool IsThreadedAnimationEnabled() = 0; |
| 66 | 68 |
| 67 virtual ~CompositorDependencies() {} | 69 virtual ~CompositorDependencies() {} |
| 68 }; | 70 }; |
| 69 | 71 |
| 70 } // namespace content | 72 } // namespace content |
| 71 | 73 |
| 72 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_DEPENDENCIES_H_ | 74 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_DEPENDENCIES_H_ |
| OLD | NEW |