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 #include "content/browser/compositor/overlay_candidate_validator_ozone.h" | 5 #include "content/browser/compositor/overlay_candidate_validator_ozone.h" |
6 | 6 |
7 #include "ui/ozone/public/overlay_candidates_ozone.h" | 7 #include "ui/ozone/public/overlay_candidates_ozone.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
11 static ui::SurfaceFactoryOzone::BufferFormat GetOzoneFormat( | 11 static ui::SurfaceFactoryOzone::BufferFormat GetOzoneFormat( |
12 cc::ResourceFormat overlay_format) { | 12 cc::ResourceFormat overlay_format) { |
13 switch (overlay_format) { | 13 switch (overlay_format) { |
| 14 case cc::BGRA_8888: |
| 15 return ui::SurfaceFactoryOzone::BGRA_8888; |
| 16 case cc::RGBA_4444: |
14 case cc::RGBA_8888: | 17 case cc::RGBA_8888: |
15 return ui::SurfaceFactoryOzone::RGBA_8888; | |
16 case cc::RGBA_4444: | |
17 case cc::BGRA_8888: | |
18 case cc::ALPHA_8: | 18 case cc::ALPHA_8: |
19 case cc::LUMINANCE_8: | 19 case cc::LUMINANCE_8: |
20 case cc::RGB_565: | 20 case cc::RGB_565: |
21 case cc::ETC1: | 21 case cc::ETC1: |
22 case cc::RED_8: | 22 case cc::RED_8: |
23 break; | 23 break; |
24 } | 24 } |
25 NOTREACHED(); | 25 NOTREACHED(); |
26 return ui::SurfaceFactoryOzone::UNKNOWN; | 26 return ui::SurfaceFactoryOzone::UNKNOWN; |
27 } | 27 } |
(...skipping 22 matching lines...) Expand all Loading... |
50 | 50 |
51 overlay_candidates_->CheckOverlaySupport(&ozone_surface_list); | 51 overlay_candidates_->CheckOverlaySupport(&ozone_surface_list); |
52 DCHECK_EQ(surfaces->size(), ozone_surface_list.size()); | 52 DCHECK_EQ(surfaces->size(), ozone_surface_list.size()); |
53 | 53 |
54 for (size_t i = 0; i < surfaces->size(); i++) { | 54 for (size_t i = 0; i < surfaces->size(); i++) { |
55 surfaces->at(i).overlay_handled = ozone_surface_list.at(i).overlay_handled; | 55 surfaces->at(i).overlay_handled = ozone_surface_list.at(i).overlay_handled; |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 } // namespace content | 59 } // namespace content |
OLD | NEW |