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

Side by Side Diff: cc/output/in_process_context_provider.cc

Issue 2866353002: Add workaround for Mac stencil buffer leak (Closed)
Patch Set: Fix analyze issue Created 3 years, 7 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
« no previous file with comments | « no previous file | cc/test/test_in_process_context_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "cc/output/in_process_context_provider.h" 5 #include "cc/output/in_process_context_provider.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 gpu::ContextSupport* InProcessContextProvider::ContextSupport() { 98 gpu::ContextSupport* InProcessContextProvider::ContextSupport() {
99 return context_->GetImplementation(); 99 return context_->GetImplementation();
100 } 100 }
101 101
102 class GrContext* InProcessContextProvider::GrContext() { 102 class GrContext* InProcessContextProvider::GrContext() {
103 if (gr_context_) 103 if (gr_context_)
104 return gr_context_->get(); 104 return gr_context_->get();
105 105
106 gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(ContextGL())); 106 gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(
107 ContextGL(), ContextCapabilities()));
107 return gr_context_->get(); 108 return gr_context_->get();
108 } 109 }
109 110
110 ContextCacheController* InProcessContextProvider::CacheController() { 111 ContextCacheController* InProcessContextProvider::CacheController() {
111 return cache_controller_.get(); 112 return cache_controller_.get();
112 } 113 }
113 114
114 void InProcessContextProvider::InvalidateGrContext(uint32_t state) { 115 void InProcessContextProvider::InvalidateGrContext(uint32_t state) {
115 if (gr_context_) 116 if (gr_context_)
116 gr_context_->ResetContext(state); 117 gr_context_->ResetContext(state);
(...skipping 28 matching lines...) Expand all
145 context_->SetSwapBuffersCompletionCallback(callback); 146 context_->SetSwapBuffersCompletionCallback(callback);
146 } 147 }
147 148
148 void InProcessContextProvider::SetUpdateVSyncParametersCallback( 149 void InProcessContextProvider::SetUpdateVSyncParametersCallback(
149 const gpu::InProcessCommandBuffer::UpdateVSyncParametersCallback& 150 const gpu::InProcessCommandBuffer::UpdateVSyncParametersCallback&
150 callback) { 151 callback) {
151 context_->SetUpdateVSyncParametersCallback(callback); 152 context_->SetUpdateVSyncParametersCallback(callback);
152 } 153 }
153 154
154 } // namespace cc 155 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/test/test_in_process_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698