| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 NULL, | 323 NULL, |
| 324 GL_TRUE); | 324 GL_TRUE); |
| 325 if (NULL == fUnixWindow.fGLContext) { | 325 if (NULL == fUnixWindow.fGLContext) { |
| 326 return false; | 326 return false; |
| 327 } | 327 } |
| 328 } | 328 } |
| 329 glXMakeCurrent(fUnixWindow.fDisplay, | 329 glXMakeCurrent(fUnixWindow.fDisplay, |
| 330 fUnixWindow.fWin, | 330 fUnixWindow.fWin, |
| 331 fUnixWindow.fGLContext); | 331 fUnixWindow.fGLContext); |
| 332 glViewport(0, 0, | 332 glViewport(0, 0, |
| 333 SkScalarRound(this->width()), SkScalarRound(this->height())); | 333 SkScalarRoundToInt(this->width()), |
| 334 SkScalarRoundToInt(this->height())); |
| 334 glClearColor(0, 0, 0, 0); | 335 glClearColor(0, 0, 0, 0); |
| 335 glClearStencil(0); | 336 glClearStencil(0); |
| 336 glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); | 337 glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); |
| 337 return true; | 338 return true; |
| 338 } | 339 } |
| 339 | 340 |
| 340 void SkOSWindow::detach() { | 341 void SkOSWindow::detach() { |
| 341 if (NULL == fUnixWindow.fDisplay || NULL == fUnixWindow.fGLContext) { | 342 if (NULL == fUnixWindow.fDisplay || NULL == fUnixWindow.fGLContext) { |
| 342 return; | 343 return; |
| 343 } | 344 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 | 414 |
| 414 void SkEvent::SignalNonEmptyQueue() { | 415 void SkEvent::SignalNonEmptyQueue() { |
| 415 // nothing to do, since we spin on our event-queue, polling for XPending | 416 // nothing to do, since we spin on our event-queue, polling for XPending |
| 416 } | 417 } |
| 417 | 418 |
| 418 void SkEvent::SignalQueueTimer(SkMSec delay) { | 419 void SkEvent::SignalQueueTimer(SkMSec delay) { |
| 419 // just need to record the delay time. We handle waking up for it in | 420 // just need to record the delay time. We handle waking up for it in |
| 420 // MyXNextEventWithDelay() | 421 // MyXNextEventWithDelay() |
| 421 gTimerDelay = delay; | 422 gTimerDelay = delay; |
| 422 } | 423 } |
| OLD | NEW |