gfx/angle/src/libANGLE/renderer/d3d/d3d11/Trim11.h
author Morris Tseng <mtseng@mozilla.com>
Thu, 08 Sep 2016 16:28:30 +0800
changeset 354509 53735145cfbeede7164416318becd8e33dca53c9
parent 298486 56db457aef33a889004f51a6211f174aa12cca2d
child 400459 2fd9927e85ae56c93a8a453910d5e5acb89c6be9
permissions -rwxr-xr-x
Bug 1297924 - Update ANGLE to chromium/2845. r=jgilbert MozReview-Commit-ID: 2H0PBFFgmDp

//
// Copyright (c) 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.
//

// Trim11.h: Trim support utility class.

#ifndef LIBANGLE_RENDERER_D3D_D3D11_TRIM11_H_
#define LIBANGLE_RENDERER_D3D_D3D11_TRIM11_H_

#include "common/angleutils.h"
#include "libANGLE/angletypes.h"
#include "libANGLE/Error.h"

#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
typedef void* EventRegistrationToken;
#else
#include <EventToken.h>
#endif

namespace rx
{
class Renderer11;

class Trim11 : angle::NonCopyable
{
  public:
    explicit Trim11(Renderer11 *renderer);
    ~Trim11();

  private:
    Renderer11 *mRenderer;
#if defined (ANGLE_ENABLE_WINDOWS_STORE)
    EventRegistrationToken mApplicationSuspendedEventToken;
#endif

    void trim();
    bool registerForRendererTrimRequest();
    void unregisterForRendererTrimRequest();
};

}

#endif   // LIBANGLE_RENDERER_D3D_D3D11_TRIM11_H_