| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| 11 #include "cc/output/software_output_device.h" | 11 #include "cc/output/software_output_device.h" |
| 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 class Rect; | 15 class Rect; |
| 16 class Size; | 16 class Size; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace cc { | 19 namespace cc { |
| 20 | 20 |
| 21 class CompositorFrame; | 21 class CompositorFrame; |
| 22 class OutputSurfaceClient; | 22 class OutputSurfaceClient; |
| 23 class OutputSurfaceCallbacks; |
| 23 struct LatencyInfo; | 24 struct LatencyInfo; |
| 24 | 25 |
| 25 // Represents the output surface for a compositor. The compositor owns | 26 // Represents the output surface for a compositor. The compositor owns |
| 26 // and manages its destruction. Its lifetime is: | 27 // and manages its destruction. Its lifetime is: |
| 27 // 1. Created on the main thread by the LayerTreeHost through its client. | 28 // 1. Created on the main thread by the LayerTreeHost through its client. |
| 28 // 2. Passed to the compositor thread and bound to a client via BindToClient. | 29 // 2. Passed to the compositor thread and bound to a client via BindToClient. |
| 29 // From here on, it will only be used on the compositor thread. | 30 // From here on, it will only be used on the compositor thread. |
| 30 // 3. If the 3D context is lost, then the compositor will delete the output | 31 // 3. If the 3D context is lost, then the compositor will delete the output |
| 31 // surface (on the compositor thread) and go back to step 1. | 32 // surface (on the compositor thread) and go back to step 1. |
| 32 class CC_EXPORT OutputSurface { | 33 class CC_EXPORT OutputSurface { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // vsync events until the callback is disabled. | 96 // vsync events until the callback is disabled. |
| 96 virtual void EnableVSyncNotification(bool enable_vsync) {} | 97 virtual void EnableVSyncNotification(bool enable_vsync) {} |
| 97 | 98 |
| 98 protected: | 99 protected: |
| 99 OutputSurfaceClient* client_; | 100 OutputSurfaceClient* client_; |
| 100 struct cc::OutputSurface::Capabilities capabilities_; | 101 struct cc::OutputSurface::Capabilities capabilities_; |
| 101 scoped_ptr<WebKit::WebGraphicsContext3D> context3d_; | 102 scoped_ptr<WebKit::WebGraphicsContext3D> context3d_; |
| 102 scoped_ptr<cc::SoftwareOutputDevice> software_device_; | 103 scoped_ptr<cc::SoftwareOutputDevice> software_device_; |
| 103 bool has_gl_discard_backbuffer_; | 104 bool has_gl_discard_backbuffer_; |
| 104 | 105 |
| 106 scoped_ptr<OutputSurfaceCallbacks> callbacks_; |
| 107 |
| 105 private: | 108 private: |
| 106 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 109 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
| 107 }; | 110 }; |
| 108 | 111 |
| 109 } // namespace cc | 112 } // namespace cc |
| 110 | 113 |
| 111 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 114 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
| OLD | NEW |