| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 ~OutputSurface() override; | 61 ~OutputSurface() override; |
| 62 | 62 |
| 63 struct Capabilities { | 63 struct Capabilities { |
| 64 Capabilities() | 64 Capabilities() |
| 65 : delegated_rendering(false), | 65 : delegated_rendering(false), |
| 66 max_frames_pending(1), | 66 max_frames_pending(1), |
| 67 adjust_deadline_for_parent(true), | 67 adjust_deadline_for_parent(true), |
| 68 uses_default_gl_framebuffer(true), | 68 uses_default_gl_framebuffer(true), |
| 69 flipped_output_surface(false), | 69 flipped_output_surface(false), |
| 70 can_force_reclaim_resources(false), | 70 can_force_reclaim_resources(false), |
| 71 delegated_sync_points_required(true) {} | 71 delegated_sync_points_required(true), |
| 72 schedules_overlays_without_swap(false) {} |
| 72 bool delegated_rendering; | 73 bool delegated_rendering; |
| 73 int max_frames_pending; | 74 int max_frames_pending; |
| 74 // This doesn't handle the <webview> case, but once BeginFrame is | 75 // This doesn't handle the <webview> case, but once BeginFrame is |
| 75 // supported natively, we shouldn't need adjust_deadline_for_parent. | 76 // supported natively, we shouldn't need adjust_deadline_for_parent. |
| 76 bool adjust_deadline_for_parent; | 77 bool adjust_deadline_for_parent; |
| 77 // Whether this output surface renders to the default OpenGL zero | 78 // Whether this output surface renders to the default OpenGL zero |
| 78 // framebuffer or to an offscreen framebuffer. | 79 // framebuffer or to an offscreen framebuffer. |
| 79 bool uses_default_gl_framebuffer; | 80 bool uses_default_gl_framebuffer; |
| 80 // Whether this OutputSurface is flipped or not. | 81 // Whether this OutputSurface is flipped or not. |
| 81 bool flipped_output_surface; | 82 bool flipped_output_surface; |
| 82 // Whether ForceReclaimResources can be called to reclaim all resources | 83 // Whether ForceReclaimResources can be called to reclaim all resources |
| 83 // from the OutputSurface. | 84 // from the OutputSurface. |
| 84 bool can_force_reclaim_resources; | 85 bool can_force_reclaim_resources; |
| 85 // True if sync points for resources are needed when swapping delegated | 86 // True if sync points for resources are needed when swapping delegated |
| 86 // frames. | 87 // frames. |
| 87 bool delegated_sync_points_required; | 88 bool delegated_sync_points_required; |
| 89 // Whether the surface will display overlay planes as soon as they're |
| 90 // scheduled rather than on the next swap. |
| 91 bool schedules_overlays_without_swap; |
| 88 }; | 92 }; |
| 89 | 93 |
| 90 const Capabilities& capabilities() const { | 94 const Capabilities& capabilities() const { |
| 91 return capabilities_; | 95 return capabilities_; |
| 92 } | 96 } |
| 93 | 97 |
| 94 virtual bool HasExternalStencilTest() const; | 98 virtual bool HasExternalStencilTest() const; |
| 95 | 99 |
| 96 // Obtain the 3d context or the software device associated with this output | 100 // Obtain the 3d context or the software device associated with this output |
| 97 // surface. Either of these may return a null pointer, but not both. | 101 // surface. Either of these may return a null pointer, but not both. |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 bool external_stencil_test_enabled_; | 207 bool external_stencil_test_enabled_; |
| 204 | 208 |
| 205 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; | 209 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; |
| 206 | 210 |
| 207 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 211 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
| 208 }; | 212 }; |
| 209 | 213 |
| 210 } // namespace cc | 214 } // namespace cc |
| 211 | 215 |
| 212 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 216 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
| OLD | NEW |