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