Edit

kc3-lang/angle/util/ozone/OzoneWindow.h

Branch :

  • Show log

    Commit

  • Author : Jamie Madill
    Date : 2018-12-29 10:29:33
    Hash : ba319ba3
    Message : Re-land "Load entry points dynamically in tests and samples." Fixes the Android/ChromeOS/Fuchsia builds by using consistent EGL headers. This CL adds a dynamic loader generator based on XML files. It also refactors the entry point generation script to move the XML parsing into a helper class. Additionally this includes a new GLES 1.0 base header. The new header allows for function pointer types and hiding prototypes. All tests and samples now load ANGLE dynamically. In the future this will be extended to load entry points from the driver directly when possible. This will allow us to perform more accurate A/B testing. The new build configuration leads to some tests having more warnings applied. The CL includes fixes for the new warnings. Bug: angleproject:2995 Change-Id: I5a8772f41a0f89570b3736b785f44b7de1539b57 Reviewed-on: https://chromium-review.googlesource.com/c/1392382 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>

  • util/ozone/OzoneWindow.h
  • //
    // Copyright (c) 2016 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.
    //
    
    // OzoneWindow.h: Definition of the implementation of OSWindow for Ozone
    
    #ifndef UTIL_OZONE_WINDOW_H
    #define UTIL_OZONE_WINDOW_H
    
    #include <string>
    
    #include "util/OSWindow.h"
    
    class OzoneWindow : public OSWindow
    {
      public:
        OzoneWindow();
        ~OzoneWindow();
    
        bool initialize(const std::string &name, size_t width, size_t height) override;
        void destroy() override;
    
        EGLNativeWindowType getNativeWindow() const override;
        EGLNativeDisplayType getNativeDisplay() const override;
    
        void messageLoop() override;
    
        void setMousePosition(int x, int y) override;
        bool setPosition(int x, int y) override;
        bool resize(int width, int height) override;
        void setVisible(bool isVisible) override;
    
        void signalTestEvent() override;
    
      private:
        struct Native
        {
            int32_t x;
            int32_t y;
            int32_t width;
            int32_t height;
            int32_t borderWidth;
            int32_t borderHeight;
            int32_t visible;
            int32_t depth;
        };
    
        Native mNative;
        static int sLastDepth;
    };
    
    #endif  // UTIL_OZONE_WINDOW_H