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

Side by Side Diff: ui/compositor/test/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 | « services/ui/public/cpp/gpu/context_provider_command_buffer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/compositor/test/in_process_context_provider.h" 5 #include "ui/compositor/test/in_process_context_provider.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 return context_->GetImplementation(); 129 return context_->GetImplementation();
130 } 130 }
131 131
132 class GrContext* InProcessContextProvider::GrContext() { 132 class GrContext* InProcessContextProvider::GrContext() {
133 DCHECK(context_thread_checker_.CalledOnValidThread()); 133 DCHECK(context_thread_checker_.CalledOnValidThread());
134 134
135 if (gr_context_) 135 if (gr_context_)
136 return gr_context_->get(); 136 return gr_context_->get();
137 137
138 gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(ContextGL())); 138 gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(
139 ContextGL(), ContextCapabilities()));
139 cache_controller_->SetGrContext(gr_context_->get()); 140 cache_controller_->SetGrContext(gr_context_->get());
140 141
141 return gr_context_->get(); 142 return gr_context_->get();
142 } 143 }
143 144
144 cc::ContextCacheController* InProcessContextProvider::CacheController() { 145 cc::ContextCacheController* InProcessContextProvider::CacheController() {
145 DCHECK(context_thread_checker_.CalledOnValidThread()); 146 DCHECK(context_thread_checker_.CalledOnValidThread());
146 return cache_controller_.get(); 147 return cache_controller_.get();
147 } 148 }
148 149
(...skipping 16 matching lines...) Expand all
165 uint32_t InProcessContextProvider::GetCopyTextureInternalFormat() { 166 uint32_t InProcessContextProvider::GetCopyTextureInternalFormat() {
166 if (attribs_.alpha_size > 0) 167 if (attribs_.alpha_size > 0)
167 return GL_RGBA; 168 return GL_RGBA;
168 DCHECK_NE(attribs_.red_size, 0); 169 DCHECK_NE(attribs_.red_size, 0);
169 DCHECK_NE(attribs_.green_size, 0); 170 DCHECK_NE(attribs_.green_size, 0);
170 DCHECK_NE(attribs_.blue_size, 0); 171 DCHECK_NE(attribs_.blue_size, 0);
171 return GL_RGB; 172 return GL_RGB;
172 } 173 }
173 174
174 } // namespace ui 175 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/cpp/gpu/context_provider_command_buffer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698