| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SURFACES_DISPLAY_H_ | 5 #ifndef CC_SURFACES_DISPLAY_H_ |
| 6 #define CC_SURFACES_DISPLAY_H_ | 6 #define CC_SURFACES_DISPLAY_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 // SurfaceDamageObserver implementation. | 109 // SurfaceDamageObserver implementation. |
| 110 void OnSurfaceDamaged(const SurfaceId& surface, bool* changed) override; | 110 void OnSurfaceDamaged(const SurfaceId& surface, bool* changed) override; |
| 111 | 111 |
| 112 void SetEnlargePassTextureAmountForTesting( | 112 void SetEnlargePassTextureAmountForTesting( |
| 113 const gfx::Size& enlarge_texture_amount) { | 113 const gfx::Size& enlarge_texture_amount) { |
| 114 enlarge_texture_amount_ = enlarge_texture_amount; | 114 enlarge_texture_amount_ = enlarge_texture_amount; |
| 115 } | 115 } |
| 116 | 116 |
| 117 bool has_scheduler() const { return !!scheduler_; } | 117 bool has_scheduler() const { return !!scheduler_; } |
| 118 DirectRenderer* renderer_for_testing() const { return renderer_.get(); } | |
| 119 | 118 |
| 120 private: | 119 private: |
| 121 void InitializeRenderer(); | 120 void InitializeRenderer(); |
| 122 void UpdateRootSurfaceResourcesLocked(); | 121 void UpdateRootSurfaceResourcesLocked(); |
| 123 | 122 |
| 124 SharedBitmapManager* const bitmap_manager_; | 123 SharedBitmapManager* const bitmap_manager_; |
| 125 gpu::GpuMemoryBufferManager* const gpu_memory_buffer_manager_; | 124 gpu::GpuMemoryBufferManager* const gpu_memory_buffer_manager_; |
| 126 const RendererSettings settings_; | 125 const RendererSettings settings_; |
| 127 | 126 |
| 128 DisplayClient* client_ = nullptr; | 127 DisplayClient* client_; |
| 129 SurfaceManager* surface_manager_ = nullptr; | 128 SurfaceManager* surface_manager_; |
| 130 uint32_t compositor_surface_namespace_; | 129 uint32_t compositor_surface_namespace_; |
| 131 SurfaceId current_surface_id_; | 130 SurfaceId current_surface_id_; |
| 132 gfx::Size current_surface_size_; | 131 gfx::Size current_surface_size_; |
| 133 float device_scale_factor_ = 1.f; | 132 float device_scale_factor_ = 1.f; |
| 134 gfx::ColorSpace device_color_space_; | 133 gfx::ColorSpace device_color_space_; |
| 135 bool swapped_since_resize_ = false; | 134 bool swapped_since_resize_ = false; |
| 136 gfx::Rect external_clip_; | 135 gfx::Rect external_clip_; |
| 137 gfx::Rect external_viewport_; | 136 gfx::Rect external_viewport_; |
| 138 gfx::Size enlarge_texture_amount_; | 137 gfx::Size enlarge_texture_amount_; |
| 139 bool output_is_secure_ = false; | 138 bool output_is_secure_ = false; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 150 SoftwareRenderer* software_renderer_ = nullptr; | 149 SoftwareRenderer* software_renderer_ = nullptr; |
| 151 std::vector<ui::LatencyInfo> stored_latency_info_; | 150 std::vector<ui::LatencyInfo> stored_latency_info_; |
| 152 | 151 |
| 153 private: | 152 private: |
| 154 DISALLOW_COPY_AND_ASSIGN(Display); | 153 DISALLOW_COPY_AND_ASSIGN(Display); |
| 155 }; | 154 }; |
| 156 | 155 |
| 157 } // namespace cc | 156 } // namespace cc |
| 158 | 157 |
| 159 #endif // CC_SURFACES_DISPLAY_H_ | 158 #endif // CC_SURFACES_DISPLAY_H_ |
| OLD | NEW |