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

Side by Side Diff: ui/ozone/platform/dri/dri_surface_factory.cc

Issue 698293002: ozone: Add PRESUBMIT.py to check patch formatting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 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 "ui/ozone/platform/dri/dri_surface_factory.h" 5 #include "ui/ozone/platform/dri/dri_surface_factory.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 int frame_delay_ms) { 116 int frame_delay_ms) {
117 cursor_widget_ = widget; 117 cursor_widget_ = widget;
118 cursor_bitmaps_ = bitmaps; 118 cursor_bitmaps_ = bitmaps;
119 cursor_location_ = location; 119 cursor_location_ = location;
120 cursor_frame_ = 0; 120 cursor_frame_ = 0;
121 cursor_frame_delay_ms_ = frame_delay_ms; 121 cursor_frame_delay_ms_ = frame_delay_ms;
122 cursor_timer_.Stop(); 122 cursor_timer_.Stop();
123 123
124 if (cursor_frame_delay_ms_) 124 if (cursor_frame_delay_ms_)
125 cursor_timer_.Start( 125 cursor_timer_.Start(
126 FROM_HERE, 126 FROM_HERE, base::TimeDelta::FromMilliseconds(cursor_frame_delay_ms_),
127 base::TimeDelta::FromMilliseconds(cursor_frame_delay_ms_), 127 this, &DriSurfaceFactory::OnCursorAnimationTimeout);
128 this,
129 &DriSurfaceFactory::OnCursorAnimationTimeout);
130 128
131 if (state_ != INITIALIZED) 129 if (state_ != INITIALIZED)
132 return; 130 return;
133 131
134 ResetCursor(); 132 ResetCursor();
135 } 133 }
136 134
137 void DriSurfaceFactory::MoveHardwareCursor(gfx::AcceleratedWidget widget, 135 void DriSurfaceFactory::MoveHardwareCursor(gfx::AcceleratedWidget widget,
138 const gfx::Point& location) { 136 const gfx::Point& location) {
139 cursor_location_ = location; 137 cursor_location_ = location;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 } 173 }
176 174
177 void DriSurfaceFactory::OnCursorAnimationTimeout() { 175 void DriSurfaceFactory::OnCursorAnimationTimeout() {
178 cursor_frame_++; 176 cursor_frame_++;
179 cursor_frame_ %= cursor_bitmaps_.size(); 177 cursor_frame_ %= cursor_bitmaps_.size();
180 178
181 ResetCursor(); 179 ResetCursor();
182 } 180 }
183 181
184 } // namespace ui 182 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_gpu_platform_support_host.cc ('k') | ui/ozone/platform/dri/dri_surface_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698