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 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 virtual ~OutputSurface(); | 57 virtual ~OutputSurface(); |
58 | 58 |
59 struct Capabilities { | 59 struct Capabilities { |
60 Capabilities() | 60 Capabilities() |
61 : delegated_rendering(false), | 61 : delegated_rendering(false), |
62 max_frames_pending(0), | 62 max_frames_pending(0), |
63 deferred_gl_initialization(false), | 63 deferred_gl_initialization(false), |
64 draw_and_swap_full_viewport_every_frame(false), | 64 draw_and_swap_full_viewport_every_frame(false), |
65 adjust_deadline_for_parent(true), | 65 adjust_deadline_for_parent(true), |
66 uses_default_gl_framebuffer(true) {} | 66 uses_default_gl_framebuffer(true), |
| 67 flipped_output_surface(false) {} |
67 bool delegated_rendering; | 68 bool delegated_rendering; |
68 int max_frames_pending; | 69 int max_frames_pending; |
69 bool deferred_gl_initialization; | 70 bool deferred_gl_initialization; |
70 bool draw_and_swap_full_viewport_every_frame; | 71 bool draw_and_swap_full_viewport_every_frame; |
71 // This doesn't handle the <webview> case, but once BeginFrame is | 72 // This doesn't handle the <webview> case, but once BeginFrame is |
72 // supported natively, we shouldn't need adjust_deadline_for_parent. | 73 // supported natively, we shouldn't need adjust_deadline_for_parent. |
73 bool adjust_deadline_for_parent; | 74 bool adjust_deadline_for_parent; |
74 // Whether this output surface renders to the default OpenGL zero | 75 // Whether this output surface renders to the default OpenGL zero |
75 // framebuffer or to an offscreen framebuffer. | 76 // framebuffer or to an offscreen framebuffer. |
76 bool uses_default_gl_framebuffer; | 77 bool uses_default_gl_framebuffer; |
| 78 // Whether this OutputSurface is flipped or not. |
| 79 bool flipped_output_surface; |
77 }; | 80 }; |
78 | 81 |
79 const Capabilities& capabilities() const { | 82 const Capabilities& capabilities() const { |
80 return capabilities_; | 83 return capabilities_; |
81 } | 84 } |
82 | 85 |
83 virtual bool HasExternalStencilTest() const; | 86 virtual bool HasExternalStencilTest() const; |
84 | 87 |
85 // Obtain the 3d context or the software device associated with this output | 88 // Obtain the 3d context or the software device associated with this output |
86 // surface. Either of these may return a null pointer, but not both. | 89 // surface. Either of these may return a null pointer, but not both. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 bool external_stencil_test_enabled_; | 179 bool external_stencil_test_enabled_; |
177 | 180 |
178 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; | 181 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; |
179 | 182 |
180 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 183 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
181 }; | 184 }; |
182 | 185 |
183 } // namespace cc | 186 } // namespace cc |
184 | 187 |
185 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 188 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
OLD | NEW |