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

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

Issue 1817383002: switch surface to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « src/utils/SkRGBAToYUV.cpp ('k') | tests/BlurTest.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 14 matching lines...) Expand all
25 fBitmap.allocN32Pixels(0, 0); 25 fBitmap.allocN32Pixels(0, 0);
26 } 26 }
27 27
28 SkWindow::~SkWindow() { 28 SkWindow::~SkWindow() {
29 fClicks.deleteAll(); 29 fClicks.deleteAll();
30 fMenus.deleteAll(); 30 fMenus.deleteAll();
31 } 31 }
32 32
33 SkSurface* SkWindow::createSurface() { 33 SkSurface* SkWindow::createSurface() {
34 const SkBitmap& bm = this->getBitmap(); 34 const SkBitmap& bm = this->getBitmap();
35 return SkSurface::NewRasterDirect(bm.info(), bm.getPixels(), bm.rowBytes(), &fSurfaceProps); 35 return SkSurface::MakeRasterDirect(bm.info(), bm.getPixels(), bm.rowBytes(),
36 &fSurfaceProps).release();
36 } 37 }
37 38
38 void SkWindow::setMatrix(const SkMatrix& matrix) { 39 void SkWindow::setMatrix(const SkMatrix& matrix) {
39 if (fMatrix != matrix) { 40 if (fMatrix != matrix) {
40 fMatrix = matrix; 41 fMatrix = matrix;
41 this->inval(nullptr); 42 this->inval(nullptr);
42 } 43 }
43 } 44 }
44 45
45 void SkWindow::preConcat(const SkMatrix& matrix) { 46 void SkWindow::preConcat(const SkMatrix& matrix) {
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 desc.fOrigin = kBottomLeft_GrSurfaceOrigin; 341 desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
341 desc.fSampleCnt = attachmentInfo.fSampleCount; 342 desc.fSampleCnt = attachmentInfo.fSampleCount;
342 desc.fStencilBits = attachmentInfo.fStencilBits; 343 desc.fStencilBits = attachmentInfo.fStencilBits;
343 GrGLint buffer; 344 GrGLint buffer;
344 GR_GL_GetIntegerv(interface, GR_GL_FRAMEBUFFER_BINDING, &buffer); 345 GR_GL_GetIntegerv(interface, GR_GL_FRAMEBUFFER_BINDING, &buffer);
345 desc.fRenderTargetHandle = buffer; 346 desc.fRenderTargetHandle = buffer;
346 return grContext->textureProvider()->wrapBackendRenderTarget(desc); 347 return grContext->textureProvider()->wrapBackendRenderTarget(desc);
347 } 348 }
348 349
349 #endif 350 #endif
OLDNEW
« no previous file with comments | « src/utils/SkRGBAToYUV.cpp ('k') | tests/BlurTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698