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

Side by Side Diff: src/views/SkWindow.cpp

Issue 890873003: update example (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove multiple example cruft Created 5 years, 10 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 | « samplecode/SampleApp.cpp ('k') | tools/flags/SkCommandLineFlags.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 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 #include "SkWindow.h" 8 #include "SkWindow.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkOSMenu.h" 10 #include "SkOSMenu.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 fClicks.remove(index); 334 fClicks.remove(index);
335 handled = true; 335 handled = true;
336 } 336 }
337 break; 337 break;
338 default: 338 default:
339 // Do nothing 339 // Do nothing
340 break; 340 break;
341 } 341 }
342 return handled; 342 return handled;
343 } 343 }
344
345 #if SK_SUPPORT_GPU
346
347 #include "gl/GrGLInterface.h"
348 #include "gl/GrGLUtil.h"
349 #include "SkGr.h"
350
351 GrRenderTarget* SkWindow::renderTarget(const AttachmentInfo& attachmentInfo,
352 const GrGLInterface* interface, GrContext* grContext) {
353 GrBackendRenderTargetDesc desc;
354 desc.fWidth = SkScalarRoundToInt(this->width());
355 desc.fHeight = SkScalarRoundToInt(this->height());
356 desc.fConfig = kSkia8888_GrPixelConfig;
357 desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
358 desc.fSampleCnt = attachmentInfo.fSampleCount;
359 desc.fStencilBits = attachmentInfo.fStencilBits;
360 GrGLint buffer;
361 GR_GL_GetIntegerv(interface, GR_GL_FRAMEBUFFER_BINDING, &buffer);
362 desc.fRenderTargetHandle = buffer;
363 return grContext->wrapBackendRenderTarget(desc);
364 }
365
366 #endif
OLDNEW
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | tools/flags/SkCommandLineFlags.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698