OLD | NEW |
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 "cc/output/output_surface.h" | 5 #include "cc/output/output_surface.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 OutputSurface::~OutputSurface() { | 185 OutputSurface::~OutputSurface() { |
186 if (client_) | 186 if (client_) |
187 DetachFromClientInternal(); | 187 DetachFromClientInternal(); |
188 } | 188 } |
189 | 189 |
190 bool OutputSurface::HasExternalStencilTest() const { | 190 bool OutputSurface::HasExternalStencilTest() const { |
191 return external_stencil_test_enabled_; | 191 return external_stencil_test_enabled_; |
192 } | 192 } |
193 | 193 |
| 194 void OutputSurface::ApplyExternalStencil() {} |
| 195 |
194 bool OutputSurface::BindToClient(OutputSurfaceClient* client) { | 196 bool OutputSurface::BindToClient(OutputSurfaceClient* client) { |
195 DCHECK(client_thread_checker_.CalledOnValidThread()); | 197 DCHECK(client_thread_checker_.CalledOnValidThread()); |
196 DCHECK(client); | 198 DCHECK(client); |
197 DCHECK(!client_); | 199 DCHECK(!client_); |
198 client_ = client; | 200 client_ = client; |
199 bool success = true; | 201 bool success = true; |
200 | 202 |
201 if (context_provider_.get()) { | 203 if (context_provider_.get()) { |
202 success = context_provider_->BindToCurrentThread(); | 204 success = context_provider_->BindToCurrentThread(); |
203 if (success) { | 205 if (success) { |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 if (context_provider_.get()) { | 356 if (context_provider_.get()) { |
355 context_provider_->SetLostContextCallback( | 357 context_provider_->SetLostContextCallback( |
356 ContextProvider::LostContextCallback()); | 358 ContextProvider::LostContextCallback()); |
357 } | 359 } |
358 context_provider_ = nullptr; | 360 context_provider_ = nullptr; |
359 client_ = nullptr; | 361 client_ = nullptr; |
360 weak_ptr_factory_.InvalidateWeakPtrs(); | 362 weak_ptr_factory_.InvalidateWeakPtrs(); |
361 } | 363 } |
362 | 364 |
363 } // namespace cc | 365 } // namespace cc |
OLD | NEW |