• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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:
SamplerImpl(const gl::SamplerState & state)28     SamplerImpl(const gl::SamplerState &state) : mState(state) {}
~SamplerImpl()29     virtual ~SamplerImpl() {}
30 
onDestroy(const gl::Context * context)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   protected:
38     const gl::SamplerState &mState;
39 };
40 }  // namespace rx
41 
42 #endif  // LIBANGLE_RENDERER_SAMPLERIMPL_H_
43