From e30739a1e1d90183bc6bf7414e409e89016881f5 Mon Sep 17 00:00:00 2001 From: Timothy Liang Date: Tue, 31 Jul 2018 10:51:17 -0400 Subject: implemented copy surface as draw for metal gpu backend Bug: skia: Change-Id: Ie61bd6ad9f288b8a025d44f887a0954101a7d710 Reviewed-on: https://skia-review.googlesource.com/142687 Commit-Queue: Timothy Liang Reviewed-by: Greg Daniel --- src/gpu/mtl/GrMtlCopyPipelineState.h | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/gpu/mtl/GrMtlCopyPipelineState.h (limited to 'src/gpu/mtl/GrMtlCopyPipelineState.h') diff --git a/src/gpu/mtl/GrMtlCopyPipelineState.h b/src/gpu/mtl/GrMtlCopyPipelineState.h new file mode 100644 index 0000000000..ce4cbb2bf7 --- /dev/null +++ b/src/gpu/mtl/GrMtlCopyPipelineState.h @@ -0,0 +1,37 @@ +/* + * Copyright 2018 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef GrMtlCopyPipelineState_DEFINED +#define GrMtlCopyPipelineState_DEFINED + +#import + +class GrMtlGpu; + +class GrMtlCopyPipelineState { +public: + static GrMtlCopyPipelineState* CreateCopyPipelineState(GrMtlGpu* gpu, + MTLPixelFormat dstPixelFormat, + id vertexFunction, + id fragmentFunction, + MTLVertexDescriptor* vertexDescriptor); + + id mtlCopyPipelineState() { return fPipelineState; } + +private: + GrMtlCopyPipelineState(id pipelineState, + MTLPixelFormat pixelFormat) + : fPipelineState(pipelineState) + , fPixelFormat(pixelFormat) {} + + id fPipelineState; + MTLPixelFormat fPixelFormat; + + friend class GrMtlCopyManager; +}; + +#endif -- cgit v1.2.3