| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 CC_OUTPUT_OUTPUT_SURFACE_H_ | 5 #ifndef CC_OUTPUT_OUTPUT_SURFACE_H_ |
| 6 #define CC_OUTPUT_OUTPUT_SURFACE_H_ | 6 #define CC_OUTPUT_OUTPUT_SURFACE_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
| 15 #include "cc/base/cc_export.h" | 15 #include "cc/base/cc_export.h" |
| 16 #include "cc/output/context_provider.h" | 16 #include "cc/output/context_provider.h" |
| 17 #include "cc/output/overlay_candidate_validator.h" | 17 #include "cc/output/overlay_candidate_validator.h" |
| 18 #include "cc/output/software_output_device.h" | 18 #include "cc/output/software_output_device.h" |
| 19 #include "cc/output/vulkan_context_provider.h" | 19 #include "cc/output/vulkan_context_provider.h" |
| 20 #include "gpu/command_buffer/common/texture_in_use_response.h" | 20 #include "gpu/command_buffer/common/texture_in_use_response.h" |
| 21 | 21 |
| 22 namespace base { class SingleThreadTaskRunner; } | 22 namespace base { class SingleThreadTaskRunner; } |
| 23 | 23 |
| 24 namespace ui { | 24 namespace ui { |
| 25 class LatencyInfo; | 25 class LatencyInfo; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace gfx { | 28 namespace gfx { |
| 29 class ColorProfile; |
| 29 class Rect; | 30 class Rect; |
| 30 class Size; | 31 class Size; |
| 31 class Transform; | 32 class Transform; |
| 32 } | 33 } |
| 33 | 34 |
| 34 namespace cc { | 35 namespace cc { |
| 35 | 36 |
| 36 class CompositorFrame; | 37 class CompositorFrame; |
| 37 class CompositorFrameAck; | 38 class CompositorFrameAck; |
| 38 struct ManagedMemoryPolicy; | 39 struct ManagedMemoryPolicy; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // not be called twice for a given OutputSurface. | 117 // not be called twice for a given OutputSurface. |
| 117 virtual bool BindToClient(OutputSurfaceClient* client); | 118 virtual bool BindToClient(OutputSurfaceClient* client); |
| 118 | 119 |
| 119 // Called by the compositor on the compositor thread. This is a place where | 120 // Called by the compositor on the compositor thread. This is a place where |
| 120 // thread-specific data for the output surface can be uninitialized. | 121 // thread-specific data for the output surface can be uninitialized. |
| 121 virtual void DetachFromClient(); | 122 virtual void DetachFromClient(); |
| 122 | 123 |
| 123 virtual void EnsureBackbuffer(); | 124 virtual void EnsureBackbuffer(); |
| 124 virtual void DiscardBackbuffer(); | 125 virtual void DiscardBackbuffer(); |
| 125 | 126 |
| 126 virtual void Reshape(const gfx::Size& size, float scale_factor, bool alpha); | 127 virtual void Reshape(const gfx::Size& size, |
| 128 float scale_factor, |
| 129 const gfx::ColorProfile& color_profile, |
| 130 bool alpha); |
| 127 gfx::Size SurfaceSize() const { return surface_size_; } | 131 gfx::Size SurfaceSize() const { return surface_size_; } |
| 128 float device_scale_factor() const { return device_scale_factor_; } | 132 float device_scale_factor() const { return device_scale_factor_; } |
| 129 | 133 |
| 130 // If supported, this causes a ReclaimResources for all resources that are | 134 // If supported, this causes a ReclaimResources for all resources that are |
| 131 // currently in use. | 135 // currently in use. |
| 132 virtual void ForceReclaimResources() {} | 136 virtual void ForceReclaimResources() {} |
| 133 | 137 |
| 134 virtual void BindFramebuffer(); | 138 virtual void BindFramebuffer(); |
| 135 // Gives the GL internal format that should be used for calling CopyTexImage2D | 139 // Gives the GL internal format that should be used for calling CopyTexImage2D |
| 136 // when the framebuffer is bound via BindFramebuffer(). | 140 // when the framebuffer is bound via BindFramebuffer(). |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 bool external_stencil_test_enabled_ = false; | 209 bool external_stencil_test_enabled_ = false; |
| 206 | 210 |
| 207 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; | 211 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; |
| 208 | 212 |
| 209 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 213 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
| 210 }; | 214 }; |
| 211 | 215 |
| 212 } // namespace cc | 216 } // namespace cc |
| 213 | 217 |
| 214 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 218 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
| OLD | NEW |