Hash :
36ccb695
Author :
Date :
2020-10-07T14:43:01
Ensure a CGL context is current for WindowSurfaceCGL. WindowSurfaceCGL does quite a bit of emulation using GL textures and renderbuffers but some of these operations need to happen during EGL functions when there may be no native context current. Add a helper that ensures a context is current for operations that manipulate GL objects. Bug: angleproject:5138 Change-Id: Ic9f87aa26fd178a40510836c3aca8814382f92e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2456051 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
//
// Copyright 2002 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.
//
#include "compiler/translator/InitializeDll.h"
#include "compiler/translator/InitializeGlobals.h"
#include "common/platform.h"
#include <assert.h>
namespace sh
{
bool InitProcess()
{
if (!InitializePoolIndex())
{
assert(0 && "InitProcess(): Failed to initalize global pool");
return false;
}
return true;
}
void DetachProcess()
{
FreePoolIndex();
}
} // namespace sh