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

Side by Side Diff: cc/output/bsp_tree.cc

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 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
« no previous file with comments | « cc/layers/tiled_layer_unittest.cc ('k') | cc/output/bsp_walk_action.h » ('j') | 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 "cc/output/bsp_tree.h" 5 #include "cc/output/bsp_tree.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "cc/base/scoped_ptr_deque.h" 10 #include "cc/base/scoped_ptr_deque.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 front_list.push_back(polygon_list->take_front().Pass()); 55 front_list.push_back(polygon_list->take_front().Pass());
56 break; 56 break;
57 case BSP_BACK: 57 case BSP_BACK:
58 back_list.push_back(polygon_list->take_front().Pass()); 58 back_list.push_back(polygon_list->take_front().Pass());
59 break; 59 break;
60 case BSP_SPLIT: 60 case BSP_SPLIT:
61 { 61 {
62 scoped_ptr<DrawPolygon> polygon; 62 scoped_ptr<DrawPolygon> polygon;
63 scoped_ptr<DrawPolygon> new_front; 63 scoped_ptr<DrawPolygon> new_front;
64 scoped_ptr<DrawPolygon> new_back; 64 scoped_ptr<DrawPolygon> new_back;
65 bool split_result = false;
66 // Time to split this geometry, *it needs to be split by node_data. 65 // Time to split this geometry, *it needs to be split by node_data.
67 polygon = polygon_list->take_front(); 66 polygon = polygon_list->take_front();
68 split_result = 67 bool split_result =
69 polygon->Split(*(node->node_data), &new_front, &new_back); 68 polygon->Split(*(node->node_data), &new_front, &new_back);
70 DCHECK(split_result); 69 DCHECK(split_result);
71 if (!split_result) { 70 if (!split_result) {
72 break; 71 break;
73 } 72 }
74 front_list.push_back(new_front.Pass()); 73 front_list.push_back(new_front.Pass());
75 back_list.push_back(new_back.Pass()); 74 back_list.push_back(new_back.Pass());
76 break; 75 break;
77 } 76 }
78 case BSP_COPLANAR_FRONT: 77 case BSP_COPLANAR_FRONT:
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 if (node.normal().z() > 0.0f) { 110 if (node.normal().z() > 0.0f) {
112 return BSP_FRONT; 111 return BSP_FRONT;
113 } 112 }
114 return BSP_BACK; 113 return BSP_BACK;
115 } 114 }
116 115
117 BspTree::~BspTree() { 116 BspTree::~BspTree() {
118 } 117 }
119 118
120 } // namespace cc 119 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer_unittest.cc ('k') | cc/output/bsp_walk_action.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698