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

Side by Side Diff: src/views/unix/SkOSWindow_Unix.cpp

Issue 111353003: deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPREC… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « src/views/SkWindow.cpp ('k') | src/views/win/SkOSWindow_win.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/views/SkWindow.cpp ('k') | src/views/win/SkOSWindow_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698