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

Side by Side Diff: cc/test/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 | « cc/output/in_process_context_provider.cc ('k') | gpu/command_buffer/common/capabilities.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/test/test_in_process_context_provider.h" 5 #include "cc/test/test_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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 81
82 gpu::ContextSupport* TestInProcessContextProvider::ContextSupport() { 82 gpu::ContextSupport* TestInProcessContextProvider::ContextSupport() {
83 return context_->GetImplementation(); 83 return context_->GetImplementation();
84 } 84 }
85 85
86 class GrContext* TestInProcessContextProvider::GrContext() { 86 class GrContext* TestInProcessContextProvider::GrContext() {
87 if (gr_context_) 87 if (gr_context_)
88 return gr_context_->get(); 88 return gr_context_->get();
89 89
90 gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(ContextGL())); 90 gr_context_.reset(new skia_bindings::GrContextForGLES2Interface(
91 ContextGL(), ContextCapabilities()));
91 cache_controller_->SetGrContext(gr_context_->get()); 92 cache_controller_->SetGrContext(gr_context_->get());
92 return gr_context_->get(); 93 return gr_context_->get();
93 } 94 }
94 95
95 ContextCacheController* TestInProcessContextProvider::CacheController() { 96 ContextCacheController* TestInProcessContextProvider::CacheController() {
96 return cache_controller_.get(); 97 return cache_controller_.get();
97 } 98 }
98 99
99 void TestInProcessContextProvider::InvalidateGrContext(uint32_t state) { 100 void TestInProcessContextProvider::InvalidateGrContext(uint32_t state) {
100 if (gr_context_) 101 if (gr_context_)
(...skipping 16 matching lines...) Expand all
117 capabilities.texture_format_bgra8888 = true; 118 capabilities.texture_format_bgra8888 = true;
118 break; 119 break;
119 } 120 }
120 return capabilities; 121 return capabilities;
121 } 122 }
122 123
123 void TestInProcessContextProvider::SetLostContextCallback( 124 void TestInProcessContextProvider::SetLostContextCallback(
124 const LostContextCallback& lost_context_callback) {} 125 const LostContextCallback& lost_context_callback) {}
125 126
126 } // namespace cc 127 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/in_process_context_provider.cc ('k') | gpu/command_buffer/common/capabilities.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698