| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/skia/ganesh_framebuffer_surface.h" | 5 #include "mojo/skia/ganesh_framebuffer_surface.h" |
| 6 | 6 |
| 7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 GrBackendRenderTargetDesc desc; | 27 GrBackendRenderTargetDesc desc; |
| 28 desc.fWidth = viewport[2]; | 28 desc.fWidth = viewport[2]; |
| 29 desc.fHeight = viewport[3]; | 29 desc.fHeight = viewport[3]; |
| 30 desc.fConfig = kSkia8888_GrPixelConfig; | 30 desc.fConfig = kSkia8888_GrPixelConfig; |
| 31 desc.fOrigin = kBottomLeft_GrSurfaceOrigin; | 31 desc.fOrigin = kBottomLeft_GrSurfaceOrigin; |
| 32 desc.fSampleCnt = samples; | 32 desc.fSampleCnt = samples; |
| 33 desc.fStencilBits = stencil_bits; | 33 desc.fStencilBits = stencil_bits; |
| 34 desc.fRenderTargetHandle = framebuffer_binding; | 34 desc.fRenderTargetHandle = framebuffer_binding; |
| 35 | 35 |
| 36 surface_ = ::skia::AdoptRef(SkSurface::NewFromBackendRenderTarget( | 36 surface_ = SkSurface::MakeFromBackendRenderTarget(scope.gr_context().get(), |
| 37 scope.gr_context().get(), desc, nullptr)); | 37 desc, nullptr); |
| 38 DCHECK(surface_); | 38 DCHECK(surface_); |
| 39 } | 39 } |
| 40 | 40 |
| 41 GaneshFramebufferSurface::~GaneshFramebufferSurface() {} | 41 GaneshFramebufferSurface::~GaneshFramebufferSurface() {} |
| 42 | 42 |
| 43 } // namespace skia | 43 } // namespace skia |
| 44 } // namespace mojo | 44 } // namespace mojo |
| OLD | NEW |