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/gfx/ozone/overlay_candidates_ozone.h" | 7 #include "ui/gfx/ozone/overlay_candidates_ozone.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
11 static gfx::SurfaceFactoryOzone::BufferFormat GetOzoneFormat( | 11 static gfx::SurfaceFactoryOzone::BufferFormat GetOzoneFormat( |
12 cc::ResourceFormat overlay_format) { | 12 cc::ResourceFormat overlay_format) { |
13 switch (overlay_format) { | 13 switch (overlay_format) { |
14 case cc::RGBA_8888: | 14 case cc::RGBA_8888: |
15 return gfx::SurfaceFactoryOzone::RGBA_8888; | 15 return gfx::SurfaceFactoryOzone::RGBA_8888; |
16 case cc::RGBA_4444: | 16 case cc::RGBA_4444: |
17 case cc::BGRA_8888: | 17 case cc::BGRA_8888: |
18 case cc::LUMINANCE_8: | 18 case cc::LUMINANCE_8: |
19 case cc::RGB_565: | 19 case cc::RGB_565: |
20 case cc::ETC1: { | 20 case cc::ETC1: |
21 default: | |
danakj
2014/04/03 14:25:34
instead of default, which will take away compile-t
dnicoara
2014/04/03 14:34:34
Done.
| |
21 NOTREACHED(); | 22 NOTREACHED(); |
22 return gfx::SurfaceFactoryOzone::UNKNOWN; | 23 return gfx::SurfaceFactoryOzone::UNKNOWN; |
23 } | |
24 } | 24 } |
25 } | 25 } |
26 | 26 |
27 OverlayCandidateValidatorOzone::OverlayCandidateValidatorOzone( | 27 OverlayCandidateValidatorOzone::OverlayCandidateValidatorOzone( |
28 gfx::AcceleratedWidget widget, | 28 gfx::AcceleratedWidget widget, |
29 gfx::OverlayCandidatesOzone* overlay_candidates) | 29 gfx::OverlayCandidatesOzone* overlay_candidates) |
30 : widget_(widget), overlay_candidates_(overlay_candidates) {} | 30 : widget_(widget), overlay_candidates_(overlay_candidates) {} |
31 | 31 |
32 OverlayCandidateValidatorOzone::~OverlayCandidateValidatorOzone() {} | 32 OverlayCandidateValidatorOzone::~OverlayCandidateValidatorOzone() {} |
33 | 33 |
(...skipping 13 matching lines...) Expand all Loading... | |
47 | 47 |
48 overlay_candidates_->CheckOverlaySupport(&ozone_surface_list); | 48 overlay_candidates_->CheckOverlaySupport(&ozone_surface_list); |
49 DCHECK_EQ(surfaces->size(), ozone_surface_list.size()); | 49 DCHECK_EQ(surfaces->size(), ozone_surface_list.size()); |
50 | 50 |
51 for (size_t i = 0; i < surfaces->size(); i++) { | 51 for (size_t i = 0; i < surfaces->size(); i++) { |
52 surfaces->at(i).overlay_handled = ozone_surface_list.at(i).overlay_handled; | 52 surfaces->at(i).overlay_handled = ozone_surface_list.at(i).overlay_handled; |
53 } | 53 } |
54 } | 54 } |
55 | 55 |
56 } // namespace content | 56 } // namespace content |
OLD | NEW |