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

Unified Diff: samplecode/SampleApp.cpp

Issue 890873003: update example (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove multiple example cruft Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/views/SkWindow.h ('k') | src/views/SkWindow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleApp.cpp
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index aa2130e8f033787795a68cbc6472327bfda1dac7..dd771cec2d47d160b634ed7e0a33d703215de7f8 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -315,20 +315,8 @@ public:
if (fCurContext) {
AttachmentInfo attachmentInfo;
win->attach(fBackend, fMSAASampleCount, &attachmentInfo);
-
- GrBackendRenderTargetDesc desc;
- desc.fWidth = SkScalarRoundToInt(win->width());
- desc.fHeight = SkScalarRoundToInt(win->height());
- desc.fConfig = kSkia8888_GrPixelConfig;
- desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
- desc.fSampleCnt = attachmentInfo.fSampleCount;
- desc.fStencilBits = attachmentInfo.fStencilBits;
- GrGLint buffer;
- GR_GL_GetIntegerv(fCurIntf, GR_GL_FRAMEBUFFER_BINDING, &buffer);
- desc.fRenderTargetHandle = buffer;
-
SkSafeUnref(fCurRenderTarget);
- fCurRenderTarget = fCurContext->wrapBackendRenderTarget(desc);
+ fCurRenderTarget = win->renderTarget(attachmentInfo, fCurIntf, fCurContext);
}
#endif
}
« no previous file with comments | « include/views/SkWindow.h ('k') | src/views/SkWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698