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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 virtual void BindToClient(OutputSurfaceClient* client) = 0; | 77 virtual void BindToClient(OutputSurfaceClient* client) = 0; |
78 | 78 |
79 virtual void EnsureBackbuffer() = 0; | 79 virtual void EnsureBackbuffer() = 0; |
80 virtual void DiscardBackbuffer() = 0; | 80 virtual void DiscardBackbuffer() = 0; |
81 | 81 |
82 // Bind the default framebuffer for drawing to, only valid for GL backed | 82 // Bind the default framebuffer for drawing to, only valid for GL backed |
83 // OutputSurfaces. | 83 // OutputSurfaces. |
84 virtual void BindFramebuffer() = 0; | 84 virtual void BindFramebuffer() = 0; |
85 | 85 |
| 86 // Marks that the given rectangle will be drawn to on the default, bound |
| 87 // framebuffer. Only valid for surfaces with set_draw_rectangle in the |
| 88 // context capabilities. |
| 89 virtual void SetDrawRectangle(const gfx::Rect& rect) {} |
| 90 |
86 // Get the class capable of informing cc of hardware overlay capability. | 91 // Get the class capable of informing cc of hardware overlay capability. |
87 virtual OverlayCandidateValidator* GetOverlayCandidateValidator() const = 0; | 92 virtual OverlayCandidateValidator* GetOverlayCandidateValidator() const = 0; |
88 | 93 |
89 // Returns true if a main image overlay plane should be scheduled. | 94 // Returns true if a main image overlay plane should be scheduled. |
90 virtual bool IsDisplayedAsOverlayPlane() const = 0; | 95 virtual bool IsDisplayedAsOverlayPlane() const = 0; |
91 | 96 |
92 // Get the texture for the main image's overlay. | 97 // Get the texture for the main image's overlay. |
93 virtual unsigned GetOverlayTextureId() const = 0; | 98 virtual unsigned GetOverlayTextureId() const = 0; |
94 | 99 |
95 // If this returns true, then the surface will not attempt to draw. | 100 // If this returns true, then the surface will not attempt to draw. |
(...skipping 23 matching lines...) Expand all Loading... |
119 scoped_refptr<VulkanContextProvider> vulkan_context_provider_; | 124 scoped_refptr<VulkanContextProvider> vulkan_context_provider_; |
120 std::unique_ptr<SoftwareOutputDevice> software_device_; | 125 std::unique_ptr<SoftwareOutputDevice> software_device_; |
121 | 126 |
122 private: | 127 private: |
123 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 128 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
124 }; | 129 }; |
125 | 130 |
126 } // namespace cc | 131 } // namespace cc |
127 | 132 |
128 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 133 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
OLD | NEW |