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

Side by Side Diff: src/views/win/SkOSWindow_win.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/unix/SkOSWindow_Unix.cpp ('k') | tests/PathCoverageTest.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 "SkTypes.h" 8 #include "SkTypes.h"
9 9
10 #if defined(SK_BUILD_FOR_WIN) 10 #if defined(SK_BUILD_FOR_WIN)
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 extensions.getPixelFormatAttribiv(dc, 354 extensions.getPixelFormatAttribiv(dc,
355 pixelFormat, 355 pixelFormat,
356 0, 356 0,
357 1, 357 1,
358 &kSampleCountAttr, 358 &kSampleCountAttr,
359 &info->fSampleCount); 359 &info->fSampleCount);
360 } else { 360 } else {
361 info->fSampleCount = 0; 361 info->fSampleCount = 0;
362 } 362 }
363 363
364 glViewport(0, 0, SkScalarRound(this->width()), SkScalarRound(this->heigh t())); 364 glViewport(0, 0,
365 SkScalarRoundToInt(this->width()),
366 SkScalarRoundToInt(this->height()));
365 return true; 367 return true;
366 } 368 }
367 return false; 369 return false;
368 } 370 }
369 371
370 void SkOSWindow::detachGL() { 372 void SkOSWindow::detachGL() {
371 wglMakeCurrent(GetDC((HWND)fHWND), 0); 373 wglMakeCurrent(GetDC((HWND)fHWND), 0);
372 wglDeleteContext((HGLRC)fHGLRC); 374 wglDeleteContext((HGLRC)fHGLRC);
373 fHGLRC = NULL; 375 fHGLRC = NULL;
374 } 376 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 ANGLE_GL_CALL(intf, Clear(GL_STENCIL_BUFFER_BIT |GL_COLOR_BUFFER_BIT )); 495 ANGLE_GL_CALL(intf, Clear(GL_STENCIL_BUFFER_BIT |GL_COLOR_BUFFER_BIT ));
494 } 496 }
495 } 497 }
496 if (eglMakeCurrent(fDisplay, fSurface, fSurface, fContext)) { 498 if (eglMakeCurrent(fDisplay, fSurface, fSurface, fContext)) {
497 eglGetConfigAttrib(fDisplay, fConfig, EGL_STENCIL_SIZE, &info->fStencilB its); 499 eglGetConfigAttrib(fDisplay, fConfig, EGL_STENCIL_SIZE, &info->fStencilB its);
498 eglGetConfigAttrib(fDisplay, fConfig, EGL_SAMPLES, &info->fSampleCount); 500 eglGetConfigAttrib(fDisplay, fConfig, EGL_SAMPLES, &info->fSampleCount);
499 501
500 SkAutoTUnref<const GrGLInterface> intf(GrGLCreateANGLEInterface()); 502 SkAutoTUnref<const GrGLInterface> intf(GrGLCreateANGLEInterface());
501 503
502 if (intf ) { 504 if (intf ) {
503 ANGLE_GL_CALL(intf, Viewport(0, 0, SkScalarRound(this->width()), 505 ANGLE_GL_CALL(intf, Viewport(0, 0,
504 SkScalarRound(this->height()))); 506 SkScalarRoundToInt(this->width()),
507 SkScalarRoundToInt(this->height())));
505 } 508 }
506 return true; 509 return true;
507 } 510 }
508 return false; 511 return false;
509 } 512 }
510 513
511 void SkOSWindow::detachANGLE() { 514 void SkOSWindow::detachANGLE() {
512 eglMakeCurrent(fDisplay, EGL_NO_SURFACE , EGL_NO_SURFACE , EGL_NO_CONTEXT); 515 eglMakeCurrent(fDisplay, EGL_NO_SURFACE , EGL_NO_SURFACE , EGL_NO_CONTEXT);
513 516
514 eglDestroyContext(fDisplay, fContext); 517 eglDestroyContext(fDisplay, fContext);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 break; 609 break;
607 #endif // SK_ANGLE 610 #endif // SK_ANGLE
608 #endif // SK_SUPPORT_GPU 611 #endif // SK_SUPPORT_GPU
609 default: 612 default:
610 SkASSERT(false); 613 SkASSERT(false);
611 break; 614 break;
612 } 615 }
613 } 616 }
614 617
615 #endif 618 #endif
OLDNEW
« no previous file with comments | « src/views/unix/SkOSWindow_Unix.cpp ('k') | tests/PathCoverageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698