| 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 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 // Represents the output surface for a compositor. The compositor owns | 39 // Represents the output surface for a compositor. The compositor owns |
| 40 // and manages its destruction. Its lifetime is: | 40 // and manages its destruction. Its lifetime is: |
| 41 // 1. Created on the main thread by the LayerTreeHost through its client. | 41 // 1. Created on the main thread by the LayerTreeHost through its client. |
| 42 // 2. Passed to the compositor thread and bound to a client via BindToClient. | 42 // 2. Passed to the compositor thread and bound to a client via BindToClient. |
| 43 // From here on, it will only be used on the compositor thread. | 43 // From here on, it will only be used on the compositor thread. |
| 44 // 3. If the 3D context is lost, then the compositor will delete the output | 44 // 3. If the 3D context is lost, then the compositor will delete the output |
| 45 // surface (on the compositor thread) and go back to step 1. | 45 // surface (on the compositor thread) and go back to step 1. |
| 46 class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider { | 46 class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider { |
| 47 public: | 47 public: |
| 48 OutputSurface(const scoped_refptr<ContextProvider>& context_provider, | 48 OutputSurface(scoped_refptr<ContextProvider> context_provider, |
| 49 const scoped_refptr<ContextProvider>& worker_context_provider, | 49 scoped_refptr<ContextProvider> worker_context_provider, |
| 50 scoped_ptr<SoftwareOutputDevice> software_device); | 50 scoped_ptr<SoftwareOutputDevice> software_device); |
| 51 OutputSurface(const scoped_refptr<ContextProvider>& context_provider, | 51 OutputSurface(scoped_refptr<ContextProvider> context_provider, |
| 52 const scoped_refptr<ContextProvider>& worker_context_provider); | 52 scoped_refptr<ContextProvider> worker_context_provider); |
| 53 explicit OutputSurface( | 53 explicit OutputSurface(scoped_refptr<ContextProvider> context_provider); |
| 54 const scoped_refptr<ContextProvider>& context_provider); | |
| 55 | 54 |
| 56 explicit OutputSurface(scoped_ptr<SoftwareOutputDevice> software_device); | 55 explicit OutputSurface(scoped_ptr<SoftwareOutputDevice> software_device); |
| 57 | 56 |
| 58 OutputSurface(const scoped_refptr<ContextProvider>& context_provider, | 57 OutputSurface(scoped_refptr<ContextProvider> context_provider, |
| 59 scoped_ptr<SoftwareOutputDevice> software_device); | 58 scoped_ptr<SoftwareOutputDevice> software_device); |
| 60 | 59 |
| 61 ~OutputSurface() override; | 60 ~OutputSurface() override; |
| 62 | 61 |
| 63 struct Capabilities { | 62 struct Capabilities { |
| 64 Capabilities() | 63 Capabilities() |
| 65 : delegated_rendering(false), | 64 : delegated_rendering(false), |
| 66 max_frames_pending(1), | 65 max_frames_pending(1), |
| 67 adjust_deadline_for_parent(true), | 66 adjust_deadline_for_parent(true), |
| 68 uses_default_gl_framebuffer(true), | 67 uses_default_gl_framebuffer(true), |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 198 |
| 200 bool is_secure_ = false; | 199 bool is_secure_ = false; |
| 201 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; | 200 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; |
| 202 | 201 |
| 203 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 202 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
| 204 }; | 203 }; |
| 205 | 204 |
| 206 } // namespace cc | 205 } // namespace cc |
| 207 | 206 |
| 208 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 207 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
| OLD | NEW |