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

Side by Side Diff: ash/wm/drag_window_controller.cc

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: nit Created 3 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/wm/drag_window_controller.h" 5 #include "ash/wm/drag_window_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/public/cpp/shell_window_ids.h" 9 #include "ash/public/cpp/shell_window_ids.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 if (details->layer_owner_) { 225 if (details->layer_owner_) {
226 if (index == 0) 226 if (index == 0)
227 return details->layer_owner_.get(); 227 return details->layer_owner_.get();
228 index--; 228 index--;
229 } 229 }
230 } 230 }
231 return nullptr; 231 return nullptr;
232 } 232 }
233 233
234 void DragWindowController::RequestLayerPaintForTest() { 234 void DragWindowController::RequestLayerPaintForTest() {
235 ui::PaintContext context(nullptr, 1.0f, gfx::Rect()); 235 ui::PaintContext context(nullptr, 1.0f, gfx::Rect(), gfx::Size());
236 for (auto& details : drag_windows_) { 236 for (auto& details : drag_windows_) {
237 std::vector<ui::Layer*> layers; 237 std::vector<ui::Layer*> layers;
238 layers.push_back(details->drag_window_->layer()); 238 layers.push_back(details->drag_window_->layer());
239 while (layers.size()) { 239 while (layers.size()) {
240 ui::Layer* layer = layers.back(); 240 ui::Layer* layer = layers.back();
241 layers.pop_back(); 241 layers.pop_back();
242 if (layer->delegate()) 242 if (layer->delegate())
243 layer->delegate()->OnPaintLayer(context); 243 layer->delegate()->OnPaintLayer(context);
244 for (auto* child : layer->children()) 244 for (auto* child : layer->children())
245 layers.push_back(child); 245 layers.push_back(child);
246 } 246 }
247 } 247 }
248 } 248 }
249 249
250 } // namespace ash 250 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | cc/benchmarks/rasterize_and_record_benchmark_impl.cc » ('j') | cc/raster/raster_source.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698