Hash :
f2c00e8c
Author :
Date :
2024-01-18T18:36:33
Adding Dawn stub backend to ANGLE Bug: angleproject:8473 Change-Id: I81ea83986e4e566169aa82250b5cfb727985ed01 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5201413 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Liza Burakova <liza@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
//
// Copyright 2024 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// SurfaceWgpu.cpp:
// Implements the class methods for SurfaceWgpu.
//
#include "libANGLE/renderer/wgpu/SurfaceWgpu.h"
#include "common/debug.h"
#include "libANGLE/renderer/wgpu/FramebufferWgpu.h"
namespace rx
{
SurfaceWgpu::SurfaceWgpu(const egl::SurfaceState &surfaceState) : SurfaceImpl(surfaceState) {}
SurfaceWgpu::~SurfaceWgpu() {}
egl::Error SurfaceWgpu::initialize(const egl::Display *display)
{
return egl::NoError();
}
egl::Error SurfaceWgpu::swap(const gl::Context *context)
{
return egl::NoError();
}
egl::Error SurfaceWgpu::postSubBuffer(const gl::Context *context,
EGLint x,
EGLint y,
EGLint width,
EGLint height)
{
return egl::NoError();
}
egl::Error SurfaceWgpu::querySurfacePointerANGLE(EGLint attribute, void **value)
{
UNREACHABLE();
return egl::NoError();
}
egl::Error SurfaceWgpu::bindTexImage(const gl::Context *context,
gl::Texture *texture,
EGLint buffer)
{
return egl::NoError();
}
egl::Error SurfaceWgpu::releaseTexImage(const gl::Context *context, EGLint buffer)
{
return egl::NoError();
}
egl::Error SurfaceWgpu::getSyncValues(EGLuint64KHR *ust, EGLuint64KHR *msc, EGLuint64KHR *sbc)
{
UNIMPLEMENTED();
return egl::EglBadAccess();
}
egl::Error SurfaceWgpu::getMscRate(EGLint *numerator, EGLint *denominator)
{
UNIMPLEMENTED();
return egl::EglBadAccess();
}
void SurfaceWgpu::setSwapInterval(EGLint interval) {}
EGLint SurfaceWgpu::getWidth() const
{
// TODO(geofflang): Read from an actual window?
return 100;
}
EGLint SurfaceWgpu::getHeight() const
{
// TODO(geofflang): Read from an actual window?
return 100;
}
EGLint SurfaceWgpu::isPostSubBufferSupported() const
{
return EGL_TRUE;
}
EGLint SurfaceWgpu::getSwapBehavior() const
{
return EGL_BUFFER_PRESERVED;
}
angle::Result SurfaceWgpu::initializeContents(const gl::Context *context,
GLenum binding,
const gl::ImageIndex &imageIndex)
{
return angle::Result::Continue;
}
egl::Error SurfaceWgpu::attachToFramebuffer(const gl::Context *context,
gl::Framebuffer *framebuffer)
{
return egl::NoError();
}
egl::Error SurfaceWgpu::detachFromFramebuffer(const gl::Context *context,
gl::Framebuffer *framebuffer)
{
return egl::NoError();
}
} // namespace rx