Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Side by Side Diff: content/browser/compositor/overlay_candidate_validator_ozone.cc

Issue 216633006: [Ozone] Add default case otherwise compiler complains about missing return (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698