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

Side by Side Diff: ui/compositor/compositor.cc

Issue 251343002: Remove offscreen compositor contexts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm-offscreencontext: include Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/test/in_process_context_factory.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 (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 "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 void Compositor::DidCompleteSwapBuffers() { 390 void Compositor::DidCompleteSwapBuffers() {
391 if (g_compositor_thread) { 391 if (g_compositor_thread) {
392 NotifyEnd(); 392 NotifyEnd();
393 } else { 393 } else {
394 DCHECK_EQ(swap_state_, SWAP_POSTED); 394 DCHECK_EQ(swap_state_, SWAP_POSTED);
395 NotifyEnd(); 395 NotifyEnd();
396 swap_state_ = SWAP_COMPLETED; 396 swap_state_ = SWAP_COMPLETED;
397 } 397 }
398 } 398 }
399 399
400 scoped_refptr<cc::ContextProvider> Compositor::OffscreenContextProvider() {
401 return ContextFactory::GetInstance()->OffscreenCompositorContextProvider();
402 }
403
404 void Compositor::ScheduleComposite() { 400 void Compositor::ScheduleComposite() {
405 if (!disable_schedule_composite_) 401 if (!disable_schedule_composite_)
406 ScheduleDraw(); 402 ScheduleDraw();
407 } 403 }
408 404
409 void Compositor::ScheduleAnimation() { 405 void Compositor::ScheduleAnimation() {
410 ScheduleComposite(); 406 ScheduleComposite();
411 } 407 }
412 408
413 void Compositor::DidPostSwapBuffers() { 409 void Compositor::DidPostSwapBuffers() {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 // CompositorObservers to be notified before starting another 472 // CompositorObservers to be notified before starting another
477 // draw cycle. 473 // draw cycle.
478 ScheduleDraw(); 474 ScheduleDraw();
479 } 475 }
480 FOR_EACH_OBSERVER(CompositorObserver, 476 FOR_EACH_OBSERVER(CompositorObserver,
481 observer_list_, 477 observer_list_,
482 OnCompositingEnded(this)); 478 OnCompositingEnded(this));
483 } 479 }
484 480
485 } // namespace ui 481 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/test/in_process_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698