Hash :
ebf00703
        
        Author :
  
        
        Date :
2020-12-29T16:25:54
        
      
angle_end2end_tests passes on iOS! Miscellaneous test skips and fixes for iOS. Bug: angleproject:5417 Bug: angleproject:5491 Change-Id: Id0785e6243949fc756e4d7923dbbe77a411052f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2606656 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: James Darpinian <jdarpinian@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
//
// Copyright 2020 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.
//
// IOSWindow.mm: Implementation of OSWindow for iOS
#include "util/ios/IOSWindow.h"
#include <set>
#include "anglebase/no_destructor.h"
#include "common/debug.h"
#import <UIKit/UIKit.h>
static CALayer *rootLayer()
{
    return [[[[[UIApplication sharedApplication] delegate] window] rootViewController] view].layer;
}
bool IOSWindow::initializeImpl(const std::string &name, int width, int height)
{
    resize(width, height);
    return true;
}
EGLNativeWindowType IOSWindow::getNativeWindow() const
{
    return rootLayer();
}
bool IOSWindow::setOrientation(int width, int height)
{
    UNIMPLEMENTED();
    return false;
}
bool IOSWindow::resize(int width, int height)
{
    rootLayer().frame = CGRectMake(0, 0, width, height);
    return true;
}
// static
OSWindow *OSWindow::New()
{
    return new IOSWindow;
}