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

Side by Side Diff: Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 14741004: NOT FOR REVIEW - Update comp-scrolling state at a well defined point in the pipeline. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
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 3956 matching lines...) Expand 10 before | Expand all | Expand 10 after
3967 if (context.platformContext()) 3967 if (context.platformContext())
3968 context.platformContext()->setDeviceScaleFactor(page()->deviceScaleFacto r()); 3968 context.platformContext()->setDeviceScaleFactor(page()->deviceScaleFacto r());
3969 view->paintContents(&context, contentRect); 3969 view->paintContents(&context, contentRect);
3970 double paintEnd = currentTime(); 3970 double paintEnd = currentTime();
3971 double pixelsPerSec = (contentRect.width() * contentRect.height()) / (paintE nd - paintStart); 3971 double pixelsPerSec = (contentRect.width() * contentRect.height()) / (paintE nd - paintStart);
3972 WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelRootPaint DurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30); 3972 WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelRootPaint DurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
3973 WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelRootPaint MegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30); 3973 WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelRootPaint MegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30);
3974 // The background color should have been set already in order to show up wit h the correct color in the compositor 3974 // The background color should have been set already in order to show up wit h the correct color in the compositor
3975 // frame being painted currently. This verifies the view's background color was not changed without calling 3975 // frame being painted currently. This verifies the view's background color was not changed without calling
3976 // setBackgroundColor() before this paint phase happened. 3976 // setBackgroundColor() before this paint phase happened.
3977 ASSERT(m_nonCompositedContentHost->backgroundColor() == view->documentBackgr oundColor()); 3977 //ASSERT(m_nonCompositedContentHost->backgroundColor() == view->documentBack groundColor());
3978 } 3978 }
3979 3979
3980 void WebViewImpl::setIsAcceleratedCompositingActive(bool active) 3980 void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
3981 { 3981 {
3982 WebKit::Platform::current()->histogramEnumeration("GPU.setIsAcceleratedCompo sitingActive", active * 2 + m_isAcceleratedCompositingActive, 4); 3982 WebKit::Platform::current()->histogramEnumeration("GPU.setIsAcceleratedCompo sitingActive", active * 2 + m_isAcceleratedCompositingActive, 4);
3983 3983
3984 if (m_isAcceleratedCompositingActive == active) 3984 if (m_isAcceleratedCompositingActive == active)
3985 return; 3985 return;
3986 3986
3987 if (!active) { 3987 if (!active) {
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
4209 } 4209 }
4210 4210
4211 bool WebViewImpl::shouldDisableDesktopWorkarounds() 4211 bool WebViewImpl::shouldDisableDesktopWorkarounds()
4212 { 4212 {
4213 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); 4213 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments();
4214 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom 4214 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom
4215 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); 4215 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto);
4216 } 4216 }
4217 4217
4218 } // namespace WebKit 4218 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698