| OLD | NEW |
| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "examples/ui/tile/tile_view.h" | 6 #include "examples/ui/tile/tile_view.h" |
| 7 #include "mojo/services/geometry/cpp/geometry_util.h" | 7 #include "mojo/services/geometry/cpp/geometry_util.h" |
| 8 | 8 |
| 9 namespace examples { | 9 namespace examples { |
| 10 | 10 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 mojo::gfx::composition::Node::Combinator::FALLBACK; | 214 mojo::gfx::composition::Node::Combinator::FALLBACK; |
| 215 | 215 |
| 216 const uint32_t dim_node_id = | 216 const uint32_t dim_node_id = |
| 217 container_node_id + kViewFallbackDimLayerNodeIdOffset; | 217 container_node_id + kViewFallbackDimLayerNodeIdOffset; |
| 218 auto dim_node = mojo::gfx::composition::Node::New(); | 218 auto dim_node = mojo::gfx::composition::Node::New(); |
| 219 dim_node->combinator = mojo::gfx::composition::Node::Combinator::PRUNE; | 219 dim_node->combinator = mojo::gfx::composition::Node::Combinator::PRUNE; |
| 220 dim_node->op = mojo::gfx::composition::NodeOp::New(); | 220 dim_node->op = mojo::gfx::composition::NodeOp::New(); |
| 221 dim_node->op->set_layer(mojo::gfx::composition::LayerNodeOp::New()); | 221 dim_node->op->set_layer(mojo::gfx::composition::LayerNodeOp::New()); |
| 222 dim_node->op->get_layer()->layer_rect = extent.Clone(); | 222 dim_node->op->get_layer()->layer_rect = extent.Clone(); |
| 223 dim_node->op->get_layer()->blend = mojo::gfx::composition::Blend::New(); | 223 dim_node->op->get_layer()->blend = mojo::gfx::composition::Blend::New(); |
| 224 dim_node->op->get_layer()->blend->alpha = 200; | 224 dim_node->op->get_layer()->blend->alpha = 50; |
| 225 | 225 |
| 226 if (view_data.view_info) { | 226 if (view_data.view_info) { |
| 227 const uint32_t scene_node_id = | 227 const uint32_t scene_node_id = |
| 228 container_node_id + kViewFallbackDimSceneNodeIdOffset; | 228 container_node_id + kViewFallbackDimSceneNodeIdOffset; |
| 229 auto scene_node = mojo::gfx::composition::Node::New(); | 229 auto scene_node = mojo::gfx::composition::Node::New(); |
| 230 scene_node->op = mojo::gfx::composition::NodeOp::New(); | 230 scene_node->op = mojo::gfx::composition::NodeOp::New(); |
| 231 scene_node->op->set_scene(mojo::gfx::composition::SceneNodeOp::New()); | 231 scene_node->op->set_scene(mojo::gfx::composition::SceneNodeOp::New()); |
| 232 scene_node->op->get_scene()->scene_resource_id = scene_resource_id; | 232 scene_node->op->get_scene()->scene_resource_id = scene_resource_id; |
| 233 update->nodes.insert(scene_node_id, scene_node.Pass()); | 233 update->nodes.insert(scene_node_id, scene_node.Pass()); |
| 234 dim_node->child_node_ids.push_back(scene_node_id); | 234 dim_node->child_node_ids.push_back(scene_node_id); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 252 metadata->version = scene_version(); | 252 metadata->version = scene_version(); |
| 253 scene()->Publish(metadata.Pass()); | 253 scene()->Publish(metadata.Pass()); |
| 254 } | 254 } |
| 255 | 255 |
| 256 TileView::ViewData::ViewData(const std::string& url, uint32_t key) | 256 TileView::ViewData::ViewData(const std::string& url, uint32_t key) |
| 257 : url(url), key(key) {} | 257 : url(url), key(key) {} |
| 258 | 258 |
| 259 TileView::ViewData::~ViewData() {} | 259 TileView::ViewData::~ViewData() {} |
| 260 | 260 |
| 261 } // namespace examples | 261 } // namespace examples |
| OLD | NEW |