Edit

kc3-lang/angle/src/libANGLE/renderer/SurfaceImpl.cpp

Branch :

  • Show log

    Commit

  • Author : LRN
    Date : 2018-07-14 13:31:35
    Hash : 03d132eb
    Message : Support EGL_(WIDTH|HEIGHT) in eglSurfaceAttrib(), fixed resize Setting EGL_WIDTH or EGL_HEIGHT results in mFixedWidth and mFixedHeight changing their values. Whenever the swap chain is tested for needing a resize, surfaces with mFixedSize are treated as if they should be resized to mFixedWidth and mFixedHeight from their current size. This way fixed-size surfaces can be resized - it's enough to do a couple of eglSurfaceAttrib() calls and then either let ANGLE check surface for needing a resize in due course, or force that by calling eglWaitNative(). BUG=angleproject:2725 Change-Id: I2932d8ecd5a2f10500e4aa8583a169aa09bf01bb Reviewed-on: https://chromium-review.googlesource.com/1139055 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>

  • src/libANGLE/renderer/SurfaceImpl.cpp
  • //
    // Copyright (c) 2002-2014 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.
    //
    
    // SurfaceImpl.cpp: Implementation of Surface stub method class
    
    #include "libANGLE/renderer/SurfaceImpl.h"
    
    namespace rx
    {
    
    SurfaceImpl::SurfaceImpl(const egl::SurfaceState &state) : mState(state)
    {
    }
    
    SurfaceImpl::~SurfaceImpl()
    {
    }
    
    egl::Error SurfaceImpl::swapWithDamage(const gl::Context *context, EGLint *rects, EGLint n_rects)
    {
        UNREACHABLE();
        return egl::EglBadSurface() << "swapWithDamage implementation missing.";
    }
    
    egl::Error SurfaceImpl::setPresentationTime(EGLnsecsANDROID time)
    {
        UNREACHABLE();
        return egl::EglBadSurface() << "setPresentationTime implementation missing.";
    }
    
    void SurfaceImpl::setFixedWidth(EGLint width)
    {
        UNREACHABLE();
    }
    
    void SurfaceImpl::setFixedHeight(EGLint height)
    {
        UNREACHABLE();
    }
    
    }  // namespace rx