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

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

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: Update unittests for RasterSource 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 if (details->layer_owner_) { 227 if (details->layer_owner_) {
228 if (index == 0) 228 if (index == 0)
229 return details->layer_owner_.get(); 229 return details->layer_owner_.get();
230 index--; 230 index--;
231 } 231 }
232 } 232 }
233 return nullptr; 233 return nullptr;
234 } 234 }
235 235
236 void DragWindowController::RequestLayerPaintForTest() { 236 void DragWindowController::RequestLayerPaintForTest() {
237 ui::PaintContext context(nullptr, 1.0f, gfx::Rect()); 237 ui::PaintContext context(nullptr, 1.0f, gfx::Rect(), gfx::Size());
238 for (auto& details : drag_windows_) { 238 for (auto& details : drag_windows_) {
239 std::vector<ui::Layer*> layers; 239 std::vector<ui::Layer*> layers;
240 layers.push_back(details->drag_window_->layer()); 240 layers.push_back(details->drag_window_->layer());
241 while (layers.size()) { 241 while (layers.size()) {
242 ui::Layer* layer = layers.back(); 242 ui::Layer* layer = layers.back();
243 layers.pop_back(); 243 layers.pop_back();
244 if (layer->delegate()) 244 if (layer->delegate())
245 layer->delegate()->OnPaintLayer(context); 245 layer->delegate()->OnPaintLayer(context);
246 for (auto* child : layer->children()) 246 for (auto* child : layer->children())
247 layers.push_back(child); 247 layers.push_back(child);
248 } 248 }
249 } 249 }
250 } 250 }
251 251
252 } // namespace ash 252 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | cc/benchmarks/rasterize_and_record_benchmark_impl.cc » ('j') | cc/paint/display_item_list.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698