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

Side by Side Diff: ash/laser/laser_pointer_view.cc

Issue 2807653003: Move Work From CompositorFrameSinkSupport() To Init() (Closed)
Patch Set: More Init Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/laser/laser_pointer_view.h" 5 #include "ash/laser/laser_pointer_view.h"
6 6
7 #include <GLES2/gl2.h> 7 #include <GLES2/gl2.h>
8 #include <GLES2/gl2ext.h> 8 #include <GLES2/gl2ext.h>
9 #include <GLES2/gl2extchromium.h> 9 #include <GLES2/gl2extchromium.h>
10 10
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 ->AllocateFrameSinkId()), 213 ->AllocateFrameSinkId()),
214 frame_sink_support_(this, 214 frame_sink_support_(this,
215 aura::Env::GetInstance() 215 aura::Env::GetInstance()
216 ->context_factory_private() 216 ->context_factory_private()
217 ->GetSurfaceManager(), 217 ->GetSurfaceManager(),
218 frame_sink_id_, 218 frame_sink_id_,
219 false /* is_root */, 219 false /* is_root */,
220 true /* handles_frame_sink_id_invalidation */, 220 true /* handles_frame_sink_id_invalidation */,
221 true /* needs_sync_points */), 221 true /* needs_sync_points */),
222 weak_ptr_factory_(this) { 222 weak_ptr_factory_(this) {
223 frame_sink_support_.Init();
223 widget_.reset(new views::Widget); 224 widget_.reset(new views::Widget);
224 views::Widget::InitParams params; 225 views::Widget::InitParams params;
225 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS; 226 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS;
226 params.name = "LaserOverlay"; 227 params.name = "LaserOverlay";
227 params.accept_events = false; 228 params.accept_events = false;
228 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; 229 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO;
229 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 230 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
230 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 231 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
231 params.parent = 232 params.parent =
232 Shell::GetContainer(root_window, kShellWindowId_OverlayContainer); 233 Shell::GetContainer(root_window, kShellWindowId_OverlayContainer);
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 pending_draw_surface_ = true; 721 pending_draw_surface_ = true;
721 } 722 }
722 723
723 void LaserPointerView::OnDidDrawSurface() { 724 void LaserPointerView::OnDidDrawSurface() {
724 pending_draw_surface_ = false; 725 pending_draw_surface_ = false;
725 if (needs_update_surface_) 726 if (needs_update_surface_)
726 UpdateSurface(); 727 UpdateSurface();
727 } 728 }
728 729
729 } // namespace ash 730 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698