Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: gpu/command_buffer/service/gl_state_restorer_impl.h

Issue 2762833003: gpu: Use decoder state restoration for scoped_binders (Closed)
Patch Set: Fixed MediaColorTest failures on macOS Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file contains the GLStateRestorerImpl class. 5 // This file contains the GLStateRestorerImpl class.
6 6
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GL_STATE_RESTORER_IMPL_H_ 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GL_STATE_RESTORER_IMPL_H_
8 #define GPU_COMMAND_BUFFER_SERVICE_GL_STATE_RESTORER_IMPL_H_ 8 #define GPU_COMMAND_BUFFER_SERVICE_GL_STATE_RESTORER_IMPL_H_
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 10 matching lines...) Expand all
21 21
22 // This class implements a GLStateRestorer that forwards to a GLES2Decoder. 22 // This class implements a GLStateRestorer that forwards to a GLES2Decoder.
23 class GPU_EXPORT GLStateRestorerImpl : public gl::GLStateRestorer { 23 class GPU_EXPORT GLStateRestorerImpl : public gl::GLStateRestorer {
24 public: 24 public:
25 explicit GLStateRestorerImpl(base::WeakPtr<gles2::GLES2Decoder> decoder); 25 explicit GLStateRestorerImpl(base::WeakPtr<gles2::GLES2Decoder> decoder);
26 ~GLStateRestorerImpl() override; 26 ~GLStateRestorerImpl() override;
27 27
28 bool IsInitialized() override; 28 bool IsInitialized() override;
29 void RestoreState(const gl::GLStateRestorer* prev_state) override; 29 void RestoreState(const gl::GLStateRestorer* prev_state) override;
30 void RestoreAllTextureUnitBindings() override; 30 void RestoreAllTextureUnitBindings() override;
31 void RestoreActiveTexture() override;
31 void RestoreActiveTextureUnitBinding(unsigned int target) override; 32 void RestoreActiveTextureUnitBinding(unsigned int target) override;
32 void RestoreAllExternalTextureBindingsIfNeeded() override; 33 void RestoreAllExternalTextureBindingsIfNeeded() override;
33 void RestoreFramebufferBindings() override; 34 void RestoreFramebufferBindings() override;
35 void RestoreProgramBindings() override;
36 void RestoreBufferBinding(unsigned int target) override;
37 void RestoreVertexAttribArray(unsigned int index) override;
34 void PauseQueries() override; 38 void PauseQueries() override;
35 void ResumeQueries() override; 39 void ResumeQueries() override;
36 40
37 private: 41 private:
38 const gles2::ContextState* GetContextState() const; 42 const gles2::ContextState* GetContextState() const;
39 base::WeakPtr<gles2::GLES2Decoder> decoder_; 43 base::WeakPtr<gles2::GLES2Decoder> decoder_;
40 44
41 DISALLOW_COPY_AND_ASSIGN(GLStateRestorerImpl); 45 DISALLOW_COPY_AND_ASSIGN(GLStateRestorerImpl);
42 }; 46 };
43 47
44 } // namespace gpu 48 } // namespace gpu
45 49
46 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_STATE_RESTORER_IMPL_H_ 50 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_STATE_RESTORER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698