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

Side by Side Diff: cc/layers/layer_proto_converter.cc

Issue 1581693010: Add support for (de)serializing HeadsUpDisplayLayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "cc/layers/layer_proto_converter.h" 5 #include "cc/layers/layer_proto_converter.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "cc/layers/empty_content_layer_client.h" 8 #include "cc/layers/empty_content_layer_client.h"
9 #include "cc/layers/heads_up_display_layer.h"
9 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
10 #include "cc/layers/layer_settings.h" 11 #include "cc/layers/layer_settings.h"
11 #include "cc/layers/picture_layer.h" 12 #include "cc/layers/picture_layer.h"
12 #include "cc/proto/layer.pb.h" 13 #include "cc/proto/layer.pb.h"
13 #include "cc/trees/layer_tree_host_common.h" 14 #include "cc/trees/layer_tree_host_common.h"
14 #include "cc/trees/layer_tree_settings.h" 15 #include "cc/trees/layer_tree_settings.h"
15 16
16 namespace cc { 17 namespace cc {
17 18
18 LayerProtoConverter::LayerProtoConverter() {} 19 LayerProtoConverter::LayerProtoConverter() {}
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 switch (proto.type()) { 110 switch (proto.type()) {
110 // Fall through and build a base layer. This won't have any special layer 111 // Fall through and build a base layer. This won't have any special layer
111 // properties but still maintains the layer hierarchy if we run into a 112 // properties but still maintains the layer hierarchy if we run into a
112 // layer type we don't support. 113 // layer type we don't support.
113 case proto::UNKNOWN: 114 case proto::UNKNOWN:
114 case proto::LAYER: 115 case proto::LAYER:
115 return Layer::Create(LayerSettings()).get(); 116 return Layer::Create(LayerSettings()).get();
116 case proto::PICTURE_LAYER: 117 case proto::PICTURE_LAYER:
117 return PictureLayer::Create(LayerSettings(), 118 return PictureLayer::Create(LayerSettings(),
118 EmptyContentLayerClient::GetInstance()); 119 EmptyContentLayerClient::GetInstance());
120 case proto::HEADS_UP_DISPLAY_LAYER:
121 return HeadsUpDisplayLayer::Create(LayerSettings());
119 } 122 }
120 // TODO(nyquist): Add the rest of the necessary LayerTypes. This function 123 // TODO(nyquist): Add the rest of the necessary LayerTypes. This function
121 // should not return null. 124 // should not return null.
122 NOTREACHED(); 125 NOTREACHED();
123 return nullptr; 126 return nullptr;
124 } 127 }
125 128
126 } // namespace cc 129 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698