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

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

Issue 1187523005: Add support for creating texture backed images where Skia will delete the texture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tiny Created 5 years, 6 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
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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 GrBackendRenderTargetDesc desc; 354 GrBackendRenderTargetDesc desc;
355 desc.fWidth = SkScalarRoundToInt(this->width()); 355 desc.fWidth = SkScalarRoundToInt(this->width());
356 desc.fHeight = SkScalarRoundToInt(this->height()); 356 desc.fHeight = SkScalarRoundToInt(this->height());
357 desc.fConfig = kSkia8888_GrPixelConfig; 357 desc.fConfig = kSkia8888_GrPixelConfig;
358 desc.fOrigin = kBottomLeft_GrSurfaceOrigin; 358 desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
359 desc.fSampleCnt = attachmentInfo.fSampleCount; 359 desc.fSampleCnt = attachmentInfo.fSampleCount;
360 desc.fStencilBits = attachmentInfo.fStencilBits; 360 desc.fStencilBits = attachmentInfo.fStencilBits;
361 GrGLint buffer; 361 GrGLint buffer;
362 GR_GL_GetIntegerv(interface, GR_GL_FRAMEBUFFER_BINDING, &buffer); 362 GR_GL_GetIntegerv(interface, GR_GL_FRAMEBUFFER_BINDING, &buffer);
363 desc.fRenderTargetHandle = buffer; 363 desc.fRenderTargetHandle = buffer;
364 return grContext->textureProvider()->wrapBackendRenderTarget(desc); 364 return grContext->textureProvider()->wrapBackendRenderTarget(desc, kBorrow_G rWrapOwnership);
365 } 365 }
366 366
367 #endif 367 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698