Commit 98ada3f3 authored by Brian Salomon's avatar Brian Salomon Committed by Commit Bot

Use GrBackendTexture rather than GrBackendTextureDesc in wayland code

GrBackendTextureDesc is being phased out.

Change-Id: I6e4bb519ad31cfb4796c127d2d4daecd98598c79
Reviewed-on: https://chromium-review.googlesource.com/562807
Commit-Queue: Brian Salomon <bsalomon@chromium.org>
Reviewed-by: default avatarDavid Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485284}
parent dea6441d
......@@ -22,6 +22,7 @@
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/core/SkSurface.h"
#include "third_party/skia/include/gpu/GrBackendSurface.h"
#include "third_party/skia/include/gpu/GrContext.h"
#include "third_party/skia/include/gpu/gl/GrGLAssembleInterface.h"
#include "third_party/skia/include/gpu/gl/GrGLInterface.h"
......@@ -418,16 +419,11 @@ std::unique_ptr<ClientBase::Buffer> ClientBase::CreateBuffer(
GrGLTextureInfo texture_info;
texture_info.fID = buffer->texture->get();
texture_info.fTarget = GL_TEXTURE_2D;
GrBackendTextureDesc desc;
desc.fFlags = kRenderTarget_GrBackendTextureFlag;
desc.fWidth = width_;
desc.fHeight = height_;
desc.fConfig = kGrPixelConfig;
desc.fOrigin = kTopLeft_GrSurfaceOrigin;
desc.fTextureHandle = reinterpret_cast<GrBackendObject>(&texture_info);
GrBackendTexture backend_texture(width_, height_, kGrPixelConfig,
texture_info);
buffer->sk_surface = SkSurface::MakeFromBackendTextureAsRenderTarget(
gr_context_.get(), desc, nullptr);
gr_context_.get(), backend_texture, kTopLeft_GrSurfaceOrigin,
/* sampleCnt */ 0, /* colorSpace */ nullptr, /* props */ nullptr);
DCHECK(buffer->sk_surface);
return buffer;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment