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: experimental/SkiaExamples/SkExample.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 | « debugger/QT/SkGLWidget.cpp ('k') | include/core/SkScalar.h » ('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 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
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 */ 8 */
9 9
10 #include "SkExample.h" 10 #include "SkExample.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 fContext = GrContext::Create(kOpenGL_GrBackend, (GrBackendContext)fInterface ); 86 fContext = GrContext::Create(kOpenGL_GrBackend, (GrBackendContext)fInterface );
87 SkASSERT(NULL != fContext); 87 SkASSERT(NULL != fContext);
88 88
89 setupRenderTarget(); 89 setupRenderTarget();
90 90
91 return true; 91 return true;
92 } 92 }
93 93
94 void SkExampleWindow::setupRenderTarget() { 94 void SkExampleWindow::setupRenderTarget() {
95 GrBackendRenderTargetDesc desc; 95 GrBackendRenderTargetDesc desc;
96 desc.fWidth = SkScalarRound(width()); 96 desc.fWidth = SkScalarRoundToInt(width());
97 desc.fHeight = SkScalarRound(height()); 97 desc.fHeight = SkScalarRoundToInt(height());
98 desc.fConfig = kSkia8888_GrPixelConfig; 98 desc.fConfig = kSkia8888_GrPixelConfig;
99 desc.fOrigin = kBottomLeft_GrSurfaceOrigin; 99 desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
100 desc.fSampleCnt = fAttachmentInfo.fSampleCount; 100 desc.fSampleCnt = fAttachmentInfo.fSampleCount;
101 desc.fStencilBits = fAttachmentInfo.fStencilBits; 101 desc.fStencilBits = fAttachmentInfo.fStencilBits;
102 102
103 GrGLint buffer; 103 GrGLint buffer;
104 GR_GL_GetIntegerv(fInterface, GR_GL_FRAMEBUFFER_BINDING, &buffer); 104 GR_GL_GetIntegerv(fInterface, GR_GL_FRAMEBUFFER_BINDING, &buffer);
105 desc.fRenderTargetHandle = buffer; 105 desc.fRenderTargetHandle = buffer;
106 106
107 fRenderTarget = fContext->wrapBackendRenderTarget(desc); 107 fRenderTarget = fContext->wrapBackendRenderTarget(desc);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 SkDebugf("No SkExample that matches your query\n"); 185 SkDebugf("No SkExample that matches your query\n");
186 } 186 }
187 } 187 }
188 return true; 188 return true;
189 } 189 }
190 190
191 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { 191 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) {
192 SkCommandLineFlags::Parse(argc, argv); 192 SkCommandLineFlags::Parse(argc, argv);
193 return new SkExampleWindow(hwnd); 193 return new SkExampleWindow(hwnd);
194 } 194 }
OLDNEW
« no previous file with comments | « debugger/QT/SkGLWidget.cpp ('k') | include/core/SkScalar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698