OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
8 #include <X11/Xatom.h> | 8 #include <X11/Xatom.h> |
9 #include <X11/XKBlib.h> | 9 #include <X11/XKBlib.h> |
10 #include <GL/glx.h> | 10 #include <GL/glx.h> |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 } | 341 } |
342 | 342 |
343 static void glXSwapInterval(Display* dsp, GLXDrawable drawable, int interval) { | 343 static void glXSwapInterval(Display* dsp, GLXDrawable drawable, int interval) { |
344 EXT_WRANGLE(glXSwapIntervalEXT, PFNGLXSWAPINTERVALEXTPROC, dsp, drawable, in
terval); | 344 EXT_WRANGLE(glXSwapIntervalEXT, PFNGLXSWAPINTERVALEXTPROC, dsp, drawable, in
terval); |
345 EXT_WRANGLE(glXSwapIntervalMESA, PFNGLXSWAPINTERVALMESAPROC, interval); | 345 EXT_WRANGLE(glXSwapIntervalMESA, PFNGLXSWAPINTERVALMESAPROC, interval); |
346 EXT_WRANGLE(glXSwapIntervalSGI, PFNGLXSWAPINTERVALSGIPROC, interval); | 346 EXT_WRANGLE(glXSwapIntervalSGI, PFNGLXSWAPINTERVALSGIPROC, interval); |
347 } | 347 } |
348 | 348 |
349 ///////////////////////////////////////////////////////////////////////// | 349 ///////////////////////////////////////////////////////////////////////// |
350 | 350 |
351 bool SkOSWindow::attach(SkBackEndTypes, int msaaSampleCount, AttachmentInfo* inf
o) { | 351 bool SkOSWindow::attach(SkBackEndTypes, int msaaSampleCount, bool deepColor, |
| 352 AttachmentInfo* info) { |
352 this->initWindow(msaaSampleCount, info); | 353 this->initWindow(msaaSampleCount, info); |
353 | 354 |
354 if (nullptr == fUnixWindow.fDisplay) { | 355 if (nullptr == fUnixWindow.fDisplay) { |
355 return false; | 356 return false; |
356 } | 357 } |
357 if (nullptr == fUnixWindow.fGLContext) { | 358 if (nullptr == fUnixWindow.fGLContext) { |
358 SkASSERT(fVi); | 359 SkASSERT(fVi); |
359 | 360 |
360 fUnixWindow.fGLContext = glXCreateContext(fUnixWindow.fDisplay, | 361 fUnixWindow.fGLContext = glXCreateContext(fUnixWindow.fDisplay, |
361 fVi, | 362 fVi, |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 | 510 |
510 void SkEvent::SignalNonEmptyQueue() { | 511 void SkEvent::SignalNonEmptyQueue() { |
511 // nothing to do, since we spin on our event-queue, polling for XPending | 512 // nothing to do, since we spin on our event-queue, polling for XPending |
512 } | 513 } |
513 | 514 |
514 void SkEvent::SignalQueueTimer(SkMSec delay) { | 515 void SkEvent::SignalQueueTimer(SkMSec delay) { |
515 // just need to record the delay time. We handle waking up for it in | 516 // just need to record the delay time. We handle waking up for it in |
516 // MyXNextEventWithDelay() | 517 // MyXNextEventWithDelay() |
517 gTimerDelay = delay; | 518 gTimerDelay = delay; |
518 } | 519 } |
OLD | NEW |