OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "gfx/gtk_util.h" | 5 #include "ui/gfx/gtk_util.h" |
6 | 6 |
7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/linux_util.h" | 13 #include "base/linux_util.h" |
14 #include "gfx/rect.h" | |
15 #include "third_party/skia/include/core/SkBitmap.h" | 14 #include "third_party/skia/include/core/SkBitmap.h" |
16 #include "third_party/skia/include/core/SkUnPreMultiply.h" | 15 #include "third_party/skia/include/core/SkUnPreMultiply.h" |
| 16 #include "ui/gfx/rect.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // A process wide singleton that manages our usage of gdk | 20 // A process wide singleton that manages our usage of gdk |
21 // cursors. gdk_cursor_new() hits the disk in several places and GdkCursor | 21 // cursors. gdk_cursor_new() hits the disk in several places and GdkCursor |
22 // instances can be reused throughout the process. | 22 // instances can be reused throughout the process. |
23 class GdkCursorCache { | 23 class GdkCursorCache { |
24 public: | 24 public: |
25 GdkCursorCache() {} | 25 GdkCursorCache() {} |
26 ~GdkCursorCache() { | 26 ~GdkCursorCache() { |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 new_pixels[idx + 1] = pixels[idx + 1]; | 203 new_pixels[idx + 1] = pixels[idx + 1]; |
204 new_pixels[idx + 2] = pixels[idx]; | 204 new_pixels[idx + 2] = pixels[idx]; |
205 new_pixels[idx + 3] = pixels[idx + 3]; | 205 new_pixels[idx + 3] = pixels[idx + 3]; |
206 } | 206 } |
207 } | 207 } |
208 | 208 |
209 return new_pixels; | 209 return new_pixels; |
210 } | 210 } |
211 | 211 |
212 } // namespace gfx | 212 } // namespace gfx |
OLD | NEW |