| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 #include <X11/Xatom.h> | 9 #include <X11/Xatom.h> |
| 10 #include <X11/XKBlib.h> | 10 #include <X11/XKBlib.h> |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 image.depth = 24; | 367 image.depth = 24; |
| 368 image.bytes_per_line = bitmap.rowBytes() - bitmap.width() * 4; | 368 image.bytes_per_line = bitmap.rowBytes() - bitmap.width() * 4; |
| 369 image.bits_per_pixel = bitsPerPixel; | 369 image.bits_per_pixel = bitsPerPixel; |
| 370 return XInitImage(&image); | 370 return XInitImage(&image); |
| 371 } | 371 } |
| 372 | 372 |
| 373 void SkOSWindow::doPaint() { | 373 void SkOSWindow::doPaint() { |
| 374 if (NULL == fUnixWindow.fDisplay) { | 374 if (NULL == fUnixWindow.fDisplay) { |
| 375 return; | 375 return; |
| 376 } | 376 } |
| 377 // If we are drawing with GL, we don't need XPutImage. |
| 378 if (NULL != fUnixWindow.fGLContext) { |
| 379 return; |
| 380 } |
| 377 // Draw the bitmap to the screen. | 381 // Draw the bitmap to the screen. |
| 378 const SkBitmap& bitmap = getBitmap(); | 382 const SkBitmap& bitmap = getBitmap(); |
| 379 int width = bitmap.width(); | 383 int width = bitmap.width(); |
| 380 int height = bitmap.height(); | 384 int height = bitmap.height(); |
| 381 | 385 |
| 382 XImage image; | 386 XImage image; |
| 383 if (!convertBitmapToXImage(image, bitmap)) { | 387 if (!convertBitmapToXImage(image, bitmap)) { |
| 384 return; | 388 return; |
| 385 } | 389 } |
| 386 | 390 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 397 | 401 |
| 398 void SkEvent::SignalNonEmptyQueue() { | 402 void SkEvent::SignalNonEmptyQueue() { |
| 399 // nothing to do, since we spin on our event-queue, polling for XPending | 403 // nothing to do, since we spin on our event-queue, polling for XPending |
| 400 } | 404 } |
| 401 | 405 |
| 402 void SkEvent::SignalQueueTimer(SkMSec delay) { | 406 void SkEvent::SignalQueueTimer(SkMSec delay) { |
| 403 // just need to record the delay time. We handle waking up for it in | 407 // just need to record the delay time. We handle waking up for it in |
| 404 // MyXNextEventWithDelay() | 408 // MyXNextEventWithDelay() |
| 405 gTimerDelay = delay; | 409 gTimerDelay = delay; |
| 406 } | 410 } |
| OLD | NEW |