| 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_SURFACE_H_ | 5 #ifndef CC_OUTPUT_SURFACE_H_ |
| 6 #define CC_OUTPUT_SURFACE_H_ | 6 #define CC_OUTPUT_SURFACE_H_ |
| 7 | 7 |
| 8 #define USE_CC_OUTPUT_SURFACE // TODO(danakj): Remove this. | 8 #define USE_CC_OUTPUT_SURFACE // TODO(danakj): Remove this. |
| 9 | 9 |
| 10 #include "cc/cc_export.h" | 10 #include "cc/cc_export.h" |
| 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorOutput
Surface.h" | 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorOutput
Surface.h" |
| 12 | 12 |
| 13 namespace WebKit { | 13 namespace WebKit { |
| 14 class WebGraphicsContext3D; | 14 class WebGraphicsContext3D; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace cc { | 17 namespace cc { |
| 18 | 18 |
| 19 class CompositorFrame; | 19 class CompositorFrame; |
| 20 class OutputSurfaceClient; | 20 class OutputSurfaceClient; |
| 21 class SoftwareOutputDevice; | 21 class SoftwareOutputDevice; |
| 22 struct LatencyInfo; |
| 22 | 23 |
| 23 // Represents the output surface for a compositor. The compositor owns | 24 // Represents the output surface for a compositor. The compositor owns |
| 24 // and manages its destruction. Its lifetime is: | 25 // and manages its destruction. Its lifetime is: |
| 25 // 1. Created on the main thread by the LayerTreeHost through its client. | 26 // 1. Created on the main thread by the LayerTreeHost through its client. |
| 26 // 2. Passed to the compositor thread and bound to a client via BindToClient. | 27 // 2. Passed to the compositor thread and bound to a client via BindToClient. |
| 27 // From here on, it will only be used on the compositor thread. | 28 // From here on, it will only be used on the compositor thread. |
| 28 // 3. If the 3D context is lost, then the compositor will delete the output | 29 // 3. If the 3D context is lost, then the compositor will delete the output |
| 29 // surface (on the compositor thread) and go back to step 1. | 30 // surface (on the compositor thread) and go back to step 1. |
| 30 class CC_EXPORT OutputSurface : public WebKit::WebCompositorOutputSurface { | 31 class CC_EXPORT OutputSurface : public WebKit::WebCompositorOutputSurface { |
| 31 public: | 32 public: |
| (...skipping 17 matching lines...) Expand all Loading... |
| 49 // Obtain the 3d context or the software device associated with this output | 50 // Obtain the 3d context or the software device associated with this output |
| 50 // surface. Either of these may return a null pointer, but not both. | 51 // surface. Either of these may return a null pointer, but not both. |
| 51 // In the event of a lost context, the entire output surface should be | 52 // In the event of a lost context, the entire output surface should be |
| 52 // recreated. | 53 // recreated. |
| 53 virtual WebKit::WebGraphicsContext3D* Context3D() const = 0; | 54 virtual WebKit::WebGraphicsContext3D* Context3D() const = 0; |
| 54 virtual SoftwareOutputDevice* SoftwareDevice() const = 0; | 55 virtual SoftwareOutputDevice* SoftwareDevice() const = 0; |
| 55 | 56 |
| 56 // Sends frame data to the parent compositor. This should only be called when | 57 // Sends frame data to the parent compositor. This should only be called when |
| 57 // capabilities().has_parent_compositor. | 58 // capabilities().has_parent_compositor. |
| 58 virtual void SendFrameToParentCompositor(const CompositorFrame&) {} | 59 virtual void SendFrameToParentCompositor(const CompositorFrame&) {} |
| 60 |
| 61 virtual void SetLatencyInfo(const LatencyInfo&) {} |
| 59 }; | 62 }; |
| 60 | 63 |
| 61 } // namespace cc | 64 } // namespace cc |
| 62 | 65 |
| 63 #endif // CC_OUTPUT_SURFACE_H_ | 66 #endif // CC_OUTPUT_SURFACE_H_ |
| OLD | NEW |