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

Side by Side Diff: ui/gfx/surface/accelerated_surface_win.cc

Issue 10263025: Revert 134313 - Revert 134201 - Fix framerate jank for accelerated content on windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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) 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/gfx/surface/accelerated_surface_win.h" 5 #include "ui/gfx/surface/accelerated_surface_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 633
634 if (hr == S_FALSE) 634 if (hr == S_FALSE)
635 Sleep(1); 635 Sleep(1);
636 } while (hr == S_FALSE); 636 } while (hr == S_FALSE);
637 } 637 }
638 638
639 static const base::TimeDelta swap_delay = GetSwapDelay(); 639 static const base::TimeDelta swap_delay = GetSwapDelay();
640 if (swap_delay.ToInternalValue()) 640 if (swap_delay.ToInternalValue())
641 base::PlatformThread::Sleep(swap_delay); 641 base::PlatformThread::Sleep(swap_delay);
642 642
643 scoped_completion_runner.Release();
644 if (!completion_task.is_null())
645 completion_task.Run(true);
646
647 { 643 {
648 TRACE_EVENT0("surface", "Present"); 644 TRACE_EVENT0("surface", "Present");
649 hr = swap_chain_->Present(&rect, &rect, window_, NULL, 0); 645 hr = swap_chain_->Present(&rect, &rect, window_, NULL, 0);
650 if (FAILED(hr) && 646 if (FAILED(hr) &&
651 FAILED(present_thread_->device()->CheckDeviceState(window_))) { 647 FAILED(present_thread_->device()->CheckDeviceState(window_))) {
652 present_thread_->ResetDevice(); 648 present_thread_->ResetDevice();
653 } 649 }
654 } 650 }
655 } 651 }
656 652
(...skipping 21 matching lines...) Expand all
678 return presenter_->Present(); 674 return presenter_->Present();
679 } 675 }
680 676
681 bool AcceleratedSurface::CopyTo(const gfx::Size& size, void* buf) { 677 bool AcceleratedSurface::CopyTo(const gfx::Size& size, void* buf) {
682 return presenter_->CopyTo(size, buf); 678 return presenter_->CopyTo(size, buf);
683 } 679 }
684 680
685 void AcceleratedSurface::Suspend() { 681 void AcceleratedSurface::Suspend() {
686 presenter_->Suspend(); 682 presenter_->Suspend();
687 } 683 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698