tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

SamplerImpl.h (1057B)


      1 //
      2 // Copyright 2014 The ANGLE Project Authors. All rights reserved.
      3 // Use of this source code is governed by a BSD-style license that can be
      4 // found in the LICENSE file.
      5 //
      6 
      7 // SamplerImpl.h: Defines the abstract rx::SamplerImpl class.
      8 
      9 #ifndef LIBANGLE_RENDERER_SAMPLERIMPL_H_
     10 #define LIBANGLE_RENDERER_SAMPLERIMPL_H_
     11 
     12 #include "common/angleutils.h"
     13 #include "libANGLE/Error.h"
     14 #include "libANGLE/Sampler.h"
     15 
     16 namespace gl
     17 {
     18 class Context;
     19 class SamplerState;
     20 }  // namespace gl
     21 
     22 namespace rx
     23 {
     24 
     25 class SamplerImpl : angle::NonCopyable
     26 {
     27  public:
     28    SamplerImpl(const gl::SamplerState &state) : mState(state) {}
     29    virtual ~SamplerImpl() {}
     30 
     31    virtual void onDestroy(const gl::Context *context)
     32    {
     33        // Default implementation: no-op.
     34    }
     35    virtual angle::Result syncState(const gl::Context *context, const bool dirty) = 0;
     36 
     37    angle::Result onLabelUpdate(const gl::Context *context) { return angle::Result::Continue; }
     38 
     39  protected:
     40    const gl::SamplerState &mState;
     41 };
     42 }  // namespace rx
     43 
     44 #endif  // LIBANGLE_RENDERER_SAMPLERIMPL_H_