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

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

Issue 1273563002: Mac Overlays: Add GPU back-pressure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate review feedback Created 5 years, 4 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 #include "gpu/command_buffer/service/gl_context_virtual.h" 5 #include "gpu/command_buffer/service/gl_context_virtual.h"
6 6
7 #include "gpu/command_buffer/service/gl_state_restorer_impl.h" 7 #include "gpu/command_buffer/service/gl_state_restorer_impl.h"
8 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 8 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
9 #include "ui/gl/gl_gl_api_implementation.h"
10 #include "ui/gl/gl_surface.h" 9 #include "ui/gl/gl_surface.h"
11 #include "ui/gl/gpu_timing.h" 10 #include "ui/gl/gpu_timing.h"
11 #include "ui/gl/scoped_api.h"
12 12
13 namespace gpu { 13 namespace gpu {
14 14
15 GLContextVirtual::GLContextVirtual( 15 GLContextVirtual::GLContextVirtual(
16 gfx::GLShareGroup* share_group, 16 gfx::GLShareGroup* share_group,
17 gfx::GLContext* shared_context, 17 gfx::GLContext* shared_context,
18 base::WeakPtr<gles2::GLES2Decoder> decoder) 18 base::WeakPtr<gles2::GLES2Decoder> decoder)
19 : GLContext(share_group), 19 : GLContext(share_group),
20 shared_context_(shared_context), 20 shared_context_(shared_context),
21 decoder_(decoder) { 21 decoder_(decoder) {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 gfx::ScopedSetGLToRealGLApi scoped_set_gl_api; 120 gfx::ScopedSetGLToRealGLApi scoped_set_gl_api;
121 GetGLStateRestorer()->RestoreState(NULL); 121 GetGLStateRestorer()->RestoreState(NULL);
122 shared_context_->SetStateWasDirtiedExternally(false); 122 shared_context_->SetStateWasDirtiedExternally(false);
123 } 123 }
124 124
125 GLContextVirtual::~GLContextVirtual() { 125 GLContextVirtual::~GLContextVirtual() {
126 Destroy(); 126 Destroy();
127 } 127 }
128 128
129 } // namespace gpu 129 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698