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

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

Issue 13746002: Force GPU switch with CGLSetVirtualScreen only for compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up branching mess Created 7 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 | Annotate | Revision Log
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 #ifndef GPU_COMMAND_BUFFER_SERVICE_GL_CONTEXT_VIRTUAL_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GL_CONTEXT_VIRTUAL_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GL_CONTEXT_VIRTUAL_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_GL_CONTEXT_VIRTUAL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 28 matching lines...) Expand all
39 gfx::GpuPreference gpu_preference) OVERRIDE; 39 gfx::GpuPreference gpu_preference) OVERRIDE;
40 virtual void Destroy() OVERRIDE; 40 virtual void Destroy() OVERRIDE;
41 virtual bool MakeCurrent(gfx::GLSurface* surface) OVERRIDE; 41 virtual bool MakeCurrent(gfx::GLSurface* surface) OVERRIDE;
42 virtual void ReleaseCurrent(gfx::GLSurface* surface) OVERRIDE; 42 virtual void ReleaseCurrent(gfx::GLSurface* surface) OVERRIDE;
43 virtual bool IsCurrent(gfx::GLSurface* surface) OVERRIDE; 43 virtual bool IsCurrent(gfx::GLSurface* surface) OVERRIDE;
44 virtual void* GetHandle() OVERRIDE; 44 virtual void* GetHandle() OVERRIDE;
45 virtual gfx::GLStateRestorer* GetGLStateRestorer() OVERRIDE; 45 virtual gfx::GLStateRestorer* GetGLStateRestorer() OVERRIDE;
46 virtual void SetSwapInterval(int interval) OVERRIDE; 46 virtual void SetSwapInterval(int interval) OVERRIDE;
47 virtual std::string GetExtensions() OVERRIDE; 47 virtual std::string GetExtensions() OVERRIDE;
48 virtual bool GetTotalGpuMemory(size_t* bytes) OVERRIDE; 48 virtual bool GetTotalGpuMemory(size_t* bytes) OVERRIDE;
49 virtual void SetSafeToForceGpuSwitch() OVERRIDE;
49 virtual bool WasAllocatedUsingRobustnessExtension() OVERRIDE; 50 virtual bool WasAllocatedUsingRobustnessExtension() OVERRIDE;
50 51
51 protected: 52 protected:
52 virtual ~GLContextVirtual(); 53 virtual ~GLContextVirtual();
53 54
54 private: 55 private:
55 scoped_refptr<gfx::GLContext> shared_context_; 56 scoped_refptr<gfx::GLContext> shared_context_;
56 gfx::Display* display_; 57 gfx::Display* display_;
57 scoped_ptr<gfx::GLStateRestorer> state_restorer_; 58 scoped_ptr<gfx::GLStateRestorer> state_restorer_;
58 base::WeakPtr<gles2::GLES2Decoder> decoder_; 59 base::WeakPtr<gles2::GLES2Decoder> decoder_;
59 60
60 DISALLOW_COPY_AND_ASSIGN(GLContextVirtual); 61 DISALLOW_COPY_AND_ASSIGN(GLContextVirtual);
61 }; 62 };
62 63
63 } // namespace gpu 64 } // namespace gpu
64 65
65 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_CONTEXT_VIRTUAL_H_ 66 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_CONTEXT_VIRTUAL_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager_unittest.cc ('k') | gpu/command_buffer/service/gl_context_virtual.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698