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

Side by Side Diff: experimental/iOSSampleApp/SkSampleUIView.mm

Issue 1302413003: add old fix for iOS SampleApp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 months 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
« no previous file with comments | « no previous file | no next file » | 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 2015 Google Inc. 2 * Copyright 2015 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 7
8 #import "SkSampleUIView.h" 8 #import "SkSampleUIView.h"
9 9
10 //#define SKGL_CONFIG kEAGLColorFormatRGB565 10 //#define SKGL_CONFIG kEAGLColorFormatRGB565
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 glBindFramebuffer(GL_FRAMEBUFFER, fLayerFBO); 154 glBindFramebuffer(GL_FRAMEBUFFER, fLayerFBO);
155 GrBackendRenderTargetDesc desc; 155 GrBackendRenderTargetDesc desc;
156 desc.fWidth = SkScalarRoundToInt(win->width()); 156 desc.fWidth = SkScalarRoundToInt(win->width());
157 desc.fHeight = SkScalarRoundToInt(win->height()); 157 desc.fHeight = SkScalarRoundToInt(win->height());
158 desc.fConfig = kSkia8888_GrPixelConfig; 158 desc.fConfig = kSkia8888_GrPixelConfig;
159 desc.fRenderTargetHandle = fLayerFBO; 159 desc.fRenderTargetHandle = fLayerFBO;
160 desc.fSampleCnt = info.fSampleCount; 160 desc.fSampleCnt = info.fSampleCount;
161 desc.fStencilBits = info.fStencilBits; 161 desc.fStencilBits = info.fStencilBits;
162 162
163 SkSafeUnref(fCurRenderTarget); 163 SkSafeUnref(fCurRenderTarget);
164 fCurRenderTarget = fCurContext->wrapBackendRenderTarget(desc); 164 fCurRenderTarget = fCurContext->textureProvider()->wrapBackendRender Target(desc);
165 } 165 }
166 #endif 166 #endif
167 } 167 }
168 168
169 GrContext* getGrContext() override { 169 GrContext* getGrContext() override {
170 #if SK_SUPPORT_GPU 170 #if SK_SUPPORT_GPU
171 return fCurContext; 171 return fCurContext;
172 #else 172 #else
173 return NULL; 173 return NULL;
174 #endif 174 #endif
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 glBindRenderbuffer(GL_RENDERBUFFER, fGL.fRenderbuffer); 471 glBindRenderbuffer(GL_RENDERBUFFER, fGL.fRenderbuffer);
472 glGetRenderbufferParameteriv(GL_RENDERBUFFER, 472 glGetRenderbufferParameteriv(GL_RENDERBUFFER,
473 GL_RENDERBUFFER_STENCIL_SIZE, 473 GL_RENDERBUFFER_STENCIL_SIZE,
474 &info->fStencilBits); 474 &info->fStencilBits);
475 glGetRenderbufferParameteriv(GL_RENDERBUFFER, 475 glGetRenderbufferParameteriv(GL_RENDERBUFFER,
476 GL_RENDERBUFFER_SAMPLES_APPLE, 476 GL_RENDERBUFFER_SAMPLES_APPLE,
477 &info->fSampleCount); 477 &info->fSampleCount);
478 } 478 }
479 479
480 @end 480 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698