| 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 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 // Gives the GL internal format that should be used for calling CopyTexImage2D | 112 // Gives the GL internal format that should be used for calling CopyTexImage2D |
| 113 // when the framebuffer is bound via BindFramebuffer(). | 113 // when the framebuffer is bound via BindFramebuffer(). |
| 114 virtual uint32_t GetFramebufferCopyTextureFormat() = 0; | 114 virtual uint32_t GetFramebufferCopyTextureFormat() = 0; |
| 115 | 115 |
| 116 // Swaps the current backbuffer to the screen. For successful swaps, the | 116 // Swaps the current backbuffer to the screen. For successful swaps, the |
| 117 // implementation must call OutputSurfaceClient::DidReceiveSwapBuffersAck() | 117 // implementation must call OutputSurfaceClient::DidReceiveSwapBuffersAck() |
| 118 // after returning from this method in order to unblock the next frame. | 118 // after returning from this method in order to unblock the next frame. |
| 119 virtual void SwapBuffers(OutputSurfaceFrame frame) = 0; | 119 virtual void SwapBuffers(OutputSurfaceFrame frame) = 0; |
| 120 | 120 |
| 121 // If this returns true, then partial draw of |damage| rect is supported |
| 122 // by surface. |
| 123 virtual bool CanPartialDraw(const gfx::Rect& damage) = 0; |
| 124 |
| 121 protected: | 125 protected: |
| 122 struct OutputSurface::Capabilities capabilities_; | 126 struct OutputSurface::Capabilities capabilities_; |
| 123 scoped_refptr<ContextProvider> context_provider_; | 127 scoped_refptr<ContextProvider> context_provider_; |
| 124 scoped_refptr<VulkanContextProvider> vulkan_context_provider_; | 128 scoped_refptr<VulkanContextProvider> vulkan_context_provider_; |
| 125 std::unique_ptr<SoftwareOutputDevice> software_device_; | 129 std::unique_ptr<SoftwareOutputDevice> software_device_; |
| 126 | 130 |
| 127 private: | 131 private: |
| 128 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 132 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
| 129 }; | 133 }; |
| 130 | 134 |
| 131 } // namespace cc | 135 } // namespace cc |
| 132 | 136 |
| 133 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 137 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
| OLD | NEW |