tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

SurfaceImpl.cpp (3899B)


      1 //
      2 // Copyright 2002 The ANGLE Project Authors. All rights reserved.
      3 // Use of this source code is governed by a BSD-style license that can be
      4 // found in the LICENSE file.
      5 //
      6 
      7 // SurfaceImpl.cpp: Implementation of Surface stub method class
      8 
      9 #include "libANGLE/renderer/SurfaceImpl.h"
     10 
     11 namespace rx
     12 {
     13 
     14 SurfaceImpl::SurfaceImpl(const egl::SurfaceState &state) : mState(state) {}
     15 
     16 SurfaceImpl::~SurfaceImpl() {}
     17 
     18 egl::Error SurfaceImpl::makeCurrent(const gl::Context *context)
     19 {
     20    return egl::NoError();
     21 }
     22 
     23 egl::Error SurfaceImpl::unMakeCurrent(const gl::Context *context)
     24 {
     25    return egl::NoError();
     26 }
     27 
     28 egl::Error SurfaceImpl::prepareSwap(const gl::Context *)
     29 {
     30    return angle::ResultToEGL(angle::Result::Continue);
     31 }
     32 
     33 egl::Error SurfaceImpl::swapWithDamage(const gl::Context *context,
     34                                       const EGLint *rects,
     35                                       EGLint n_rects)
     36 {
     37    UNREACHABLE();
     38    return egl::EglBadSurface() << "swapWithDamage implementation missing.";
     39 }
     40 
     41 egl::Error SurfaceImpl::setPresentationTime(EGLnsecsANDROID time)
     42 {
     43    UNREACHABLE();
     44    return egl::EglBadSurface() << "setPresentationTime implementation missing.";
     45 }
     46 
     47 void SurfaceImpl::setFixedWidth(EGLint width)
     48 {
     49    UNREACHABLE();
     50 }
     51 
     52 void SurfaceImpl::setFixedHeight(EGLint height)
     53 {
     54    UNREACHABLE();
     55 }
     56 
     57 void SurfaceImpl::setTimestampsEnabled(bool enabled)
     58 {
     59    UNREACHABLE();
     60 }
     61 
     62 const angle::Format *SurfaceImpl::getD3DTextureColorFormat() const
     63 {
     64    UNREACHABLE();
     65    return nullptr;
     66 }
     67 
     68 egl::SupportedCompositorTimings SurfaceImpl::getSupportedCompositorTimings() const
     69 {
     70    UNREACHABLE();
     71    return egl::SupportedCompositorTimings();
     72 }
     73 
     74 egl::Error SurfaceImpl::getCompositorTiming(EGLint numTimestamps,
     75                                            const EGLint *names,
     76                                            EGLnsecsANDROID *values) const
     77 {
     78    UNREACHABLE();
     79    return egl::EglBadDisplay();
     80 }
     81 
     82 egl::Error SurfaceImpl::getNextFrameId(EGLuint64KHR *frameId) const
     83 {
     84    UNREACHABLE();
     85    return egl::EglBadDisplay();
     86 }
     87 
     88 egl::SupportedTimestamps SurfaceImpl::getSupportedTimestamps() const
     89 {
     90    UNREACHABLE();
     91    return egl::SupportedTimestamps();
     92 }
     93 
     94 egl::Error SurfaceImpl::getFrameTimestamps(EGLuint64KHR frameId,
     95                                           EGLint numTimestamps,
     96                                           const EGLint *timestamps,
     97                                           EGLnsecsANDROID *values) const
     98 {
     99    UNREACHABLE();
    100    return egl::EglBadDisplay();
    101 }
    102 
    103 egl::Error SurfaceImpl::swapWithFrameToken(const gl::Context *context,
    104                                           EGLFrameTokenANGLE frameToken)
    105 {
    106    UNREACHABLE();
    107    return egl::EglBadDisplay();
    108 }
    109 
    110 egl::Error SurfaceImpl::getUserWidth(const egl::Display *display, EGLint *value) const
    111 {
    112    *value = getWidth();
    113    return egl::NoError();
    114 }
    115 
    116 egl::Error SurfaceImpl::getUserHeight(const egl::Display *display, EGLint *value) const
    117 {
    118    *value = getHeight();
    119    return egl::NoError();
    120 }
    121 
    122 egl::Error SurfaceImpl::getBufferAge(const gl::Context *context, EGLint *age)
    123 {
    124    *age = 0;
    125    return egl::NoError();
    126 }
    127 
    128 egl::Error SurfaceImpl::setAutoRefreshEnabled(bool enabled)
    129 {
    130    return egl::EglBadMatch();
    131 }
    132 
    133 egl::Error SurfaceImpl::lockSurface(const egl::Display *display,
    134                                    EGLint usageHint,
    135                                    bool preservePixels,
    136                                    uint8_t **bufferPtrOut,
    137                                    EGLint *bufferPitchOut)
    138 {
    139    UNREACHABLE();
    140    return egl::EglBadMatch();
    141 }
    142 
    143 egl::Error SurfaceImpl::unlockSurface(const egl::Display *display, bool preservePixels)
    144 {
    145    UNREACHABLE();
    146    return egl::EglBadMatch();
    147 }
    148 
    149 EGLint SurfaceImpl::origin() const
    150 {
    151    return EGL_LOWER_LEFT_KHR;
    152 }
    153 
    154 egl::Error SurfaceImpl::setRenderBuffer(EGLint renderBuffer)
    155 {
    156    return egl::NoError();
    157 }
    158 }  // namespace rx