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

Side by Side Diff: sky/engine/web/WebViewImpl.cpp

Issue 803863003: Delete paint invalidation rect tracking. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/web/WebViewImpl.h ('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 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect) 682 void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect)
683 { 683 {
684 double paintStart = currentTime(); 684 double paintStart = currentTime();
685 PageWidgetDelegate::paint(m_page.get(), canvas, rect, isTransparent() ? Page WidgetDelegate::Translucent : PageWidgetDelegate::Opaque); 685 PageWidgetDelegate::paint(m_page.get(), canvas, rect, isTransparent() ? Page WidgetDelegate::Translucent : PageWidgetDelegate::Opaque);
686 double paintEnd = currentTime(); 686 double paintEnd = currentTime();
687 double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart); 687 double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart);
688 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintDurationM S", (paintEnd - paintStart) * 1000, 0, 120, 30); 688 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintDurationM S", (paintEnd - paintStart) * 1000, 0, 120, 30);
689 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintMegapixPe rSecond", pixelsPerSec / 1000000, 10, 210, 30); 689 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintMegapixPe rSecond", pixelsPerSec / 1000000, 10, 210, 30);
690 } 690 }
691 691
692 bool WebViewImpl::isTrackingRepaints() const
693 {
694 if (!page())
695 return false;
696 FrameView* view = page()->mainFrame()->view();
697 return view->isTrackingPaintInvalidations();
698 }
699
700 const WebInputEvent* WebViewImpl::m_currentInputEvent = 0; 692 const WebInputEvent* WebViewImpl::m_currentInputEvent = 0;
701 693
702 // FIXME: autogenerate this kind of code, and use it throughout Blink rather tha n 694 // FIXME: autogenerate this kind of code, and use it throughout Blink rather tha n
703 // the one-offs for subsets of these values. 695 // the one-offs for subsets of these values.
704 static String inputTypeToName(WebInputEvent::Type type) 696 static String inputTypeToName(WebInputEvent::Type type)
705 { 697 {
706 switch (type) { 698 switch (type) {
707 case WebInputEvent::MouseDown: 699 case WebInputEvent::MouseDown:
708 return EventTypeNames::mousedown; 700 return EventTypeNames::mousedown;
709 case WebInputEvent::MouseUp: 701 case WebInputEvent::MouseUp:
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
1441 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, 1433 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState,
1442 bool isInitialState) { 1434 bool isInitialState) {
1443 if (!page()) 1435 if (!page())
1444 return; 1436 return;
1445 1437
1446 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState = = WebPageVisibilityStateHidden); 1438 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState = = WebPageVisibilityStateHidden);
1447 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int> (visibilityState)), isInitialState); 1439 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int> (visibilityState)), isInitialState);
1448 } 1440 }
1449 1441
1450 } // namespace blink 1442 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698