Chromium Code Reviews| 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 UI_OZONE_COMMON_GPU_OZONE_GPU_MESSAGE_PARAMS_H_ | 5 #ifndef UI_OZONE_COMMON_GPU_OZONE_GPU_MESSAGE_PARAMS_H_ |
| 6 #define UI_OZONE_COMMON_GPU_OZONE_GPU_MESSAGE_PARAMS_H_ | 6 #define UI_OZONE_COMMON_GPU_OZONE_GPU_MESSAGE_PARAMS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 41 std::vector<DisplayMode_Params> modes; | 41 std::vector<DisplayMode_Params> modes; |
| 42 bool has_current_mode = false; | 42 bool has_current_mode = false; |
| 43 DisplayMode_Params current_mode; | 43 DisplayMode_Params current_mode; |
| 44 bool has_native_mode = false; | 44 bool has_native_mode = false; |
| 45 DisplayMode_Params native_mode; | 45 DisplayMode_Params native_mode; |
| 46 int64_t product_id = 0; | 46 int64_t product_id = 0; |
| 47 std::string string_representation; | 47 std::string string_representation; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 struct OZONE_EXPORT OverlayCheck_Params { | 50 struct OZONE_EXPORT OverlayCheck_Params { |
| 51 enum State { kTest, kInvalid, kCompatible, kOverlay }; | |
|
dnicoara
2015/11/23 19:22:54
nit: Could you please have kInvalid as the first s
| |
| 52 | |
| 51 OverlayCheck_Params(); | 53 OverlayCheck_Params(); |
| 52 OverlayCheck_Params( | 54 OverlayCheck_Params( |
| 53 const OverlayCandidatesOzone::OverlaySurfaceCandidate& candidate); | 55 const OverlayCandidatesOzone::OverlaySurfaceCandidate& candidate); |
| 56 bool operator==(const OverlayCheck_Params& param) const; | |
| 54 ~OverlayCheck_Params(); | 57 ~OverlayCheck_Params(); |
| 55 | 58 |
| 56 gfx::Size buffer_size; | 59 gfx::Size buffer_size; |
| 57 gfx::OverlayTransform transform = gfx::OVERLAY_TRANSFORM_INVALID; | 60 gfx::OverlayTransform transform = gfx::OVERLAY_TRANSFORM_INVALID; |
| 58 gfx::BufferFormat format = gfx::BufferFormat::BGRA_8888; | 61 gfx::BufferFormat format = gfx::BufferFormat::BGRA_8888; |
| 59 gfx::Rect display_rect; | 62 gfx::Rect display_rect; |
| 60 gfx::RectF crop_rect; | 63 gfx::RectF crop_rect; |
| 61 int plane_z_order = 0; | 64 int plane_z_order = 0; |
| 62 // Higher the value, the more important it is to ensure that this | 65 // Higher the value, the more important it is to ensure that this |
| 63 // overlay candidate finds a compatible free hardware plane to use. | 66 // overlay candidate finds a compatible free hardware plane to use. |
| 64 uint32_t weight; | 67 uint32_t weight; |
| 65 // Will be set in GPU process. These are unique plane ids of primary display | 68 // state can contain the following values: |
| 66 // supporting this configuration. | 69 // kTest : This is a new configuration which needs to be tested. Usually |
| 67 std::vector<uint32_t> plane_ids; | 70 // this state is set when OverlayCheck_Params is created by |
| 71 // taking OverlaySurfaceCandidate in its constructor. | |
| 72 // kInvalid : This configuration has been tested and has proven to be | |
| 73 // incompatible with the current setup. | |
| 74 // kCompatible: This configuration has been tested and we have hardware planes | |
| 75 // which can support this configuration. This doesn't mean that | |
| 76 // the overlay candidate should be promoted to use hardware | |
| 77 // planes. This depends on the weight of this candidate, | |
| 78 // available hardware resources and total no of overlay | |
| 79 // candidates. | |
| 80 // kOverlay : This configuration is compatible with the current setup and | |
| 81 // overlay candidate should be promoted to use Hardware Overlay. | |
| 82 State state; | |
| 83 // The following params are set to appropriate values by DrmOverlayCandidate | |
| 84 // after checking and validating the optimal configuration. | |
| 85 | |
| 86 // This is optimal storage format for the buffer. | |
| 87 gfx::BufferFormat optimal_format; | |
| 88 // This is the required buffer size. | |
| 89 gfx::Size required_buffer_size; | |
| 68 }; | 90 }; |
| 69 | 91 |
| 70 } // namespace ui | 92 } // namespace ui |
| 71 | 93 |
| 72 #endif // UI_OZONE_COMMON_GPU_OZONE_GPU_MESSAGE_PARAMS_H_ | 94 #endif // UI_OZONE_COMMON_GPU_OZONE_GPU_MESSAGE_PARAMS_H_ |
| 73 | 95 |
| OLD | NEW |