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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 19614004: Compositor hit test performance improvement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merge with trunk Created 7 years, 4 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 | « Source/core/rendering/svg/RenderSVGModelObject.cpp ('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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 #include "core/page/FrameView.h" 94 #include "core/page/FrameView.h"
95 #include "core/page/Page.h" 95 #include "core/page/Page.h"
96 #include "core/page/PagePopupController.h" 96 #include "core/page/PagePopupController.h"
97 #include "core/page/PrintContext.h" 97 #include "core/page/PrintContext.h"
98 #include "core/page/Settings.h" 98 #include "core/page/Settings.h"
99 #include "core/page/animation/AnimationController.h" 99 #include "core/page/animation/AnimationController.h"
100 #include "core/page/scrolling/ScrollingCoordinator.h" 100 #include "core/page/scrolling/ScrollingCoordinator.h"
101 #include "core/platform/ColorChooser.h" 101 #include "core/platform/ColorChooser.h"
102 #include "core/platform/Cursor.h" 102 #include "core/platform/Cursor.h"
103 #include "core/platform/Language.h" 103 #include "core/platform/Language.h"
104 #include "core/platform/chromium/TraceEvent.h"
104 #include "core/platform/graphics/GraphicsLayer.h" 105 #include "core/platform/graphics/GraphicsLayer.h"
105 #include "core/platform/graphics/IntRect.h" 106 #include "core/platform/graphics/IntRect.h"
106 #include "core/platform/graphics/filters/FilterOperation.h" 107 #include "core/platform/graphics/filters/FilterOperation.h"
107 #include "core/platform/graphics/filters/FilterOperations.h" 108 #include "core/platform/graphics/filters/FilterOperations.h"
108 #include "core/platform/graphics/gpu/SharedGraphicsContext3D.h" 109 #include "core/platform/graphics/gpu/SharedGraphicsContext3D.h"
109 #include "core/platform/mock/PlatformSpeechSynthesizerMock.h" 110 #include "core/platform/mock/PlatformSpeechSynthesizerMock.h"
110 #include "core/rendering/RenderLayerBacking.h" 111 #include "core/rendering/RenderLayerBacking.h"
111 #include "core/rendering/RenderMenuList.h" 112 #include "core/rendering/RenderMenuList.h"
112 #include "core/rendering/RenderObject.h" 113 #include "core/rendering/RenderObject.h"
113 #include "core/rendering/RenderTreeAsText.h" 114 #include "core/rendering/RenderTreeAsText.h"
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 } 1314 }
1314 1315
1315 // Do any pending layouts to ensure this really takes any previous changes i nto account. 1316 // Do any pending layouts to ensure this really takes any previous changes i nto account.
1316 document->updateLayout(); 1317 document->updateLayout();
1317 1318
1318 return m_touchEventTargetRectUpdateCount; 1319 return m_touchEventTargetRectUpdateCount;
1319 } 1320 }
1320 1321
1321 void Internals::touchEventTargetRectsChanged(const LayerHitTestRects& rects) 1322 void Internals::touchEventTargetRectsChanged(const LayerHitTestRects& rects)
1322 { 1323 {
1324 // When profiling content_shell, it can be handy to exclude this time (since it's only
1325 // present for testing / debugging).
1326 TRACE_EVENT0("input", "Internals::touchEventTargetRectsChanged");
1327
1323 m_touchEventTargetRectUpdateCount++; 1328 m_touchEventTargetRectUpdateCount++;
1324 1329
1325 // Since it's not safe to hang onto the pointers in a LayerHitTestRects, we immediately 1330 // Since it's not safe to hang onto the pointers in a LayerHitTestRects, we immediately
1326 // copy into a LayerRectList. 1331 // copy into a LayerRectList.
1327 m_currentTouchEventRects = LayerRectList::create(); 1332 m_currentTouchEventRects = LayerRectList::create();
1328 for (LayerHitTestRects::const_iterator iter = rects.begin(); iter != rects.e nd(); ++iter) { 1333 for (LayerHitTestRects::const_iterator iter = rects.begin(); iter != rects.e nd(); ++iter) {
1329 for (size_t i = 0; i < iter->value.size(); ++i) { 1334 for (size_t i = 0; i < iter->value.size(); ++i) {
1330 m_currentTouchEventRects->append(iter->key->renderer()->node(), Clie ntRect::create(enclosingIntRect(iter->value[i]))); 1335 m_currentTouchEventRects->append(iter->key->renderer()->node(), Clie ntRect::create(enclosingIntRect(iter->value[i])));
1331 } 1336 }
1332 } 1337 }
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
2075 return false; 2080 return false;
2076 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); 2081 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB);
2077 // To prevent tests that call loseSharedGraphicsContext3D from being 2082 // To prevent tests that call loseSharedGraphicsContext3D from being
2078 // flaky, we call finish so that the context is guaranteed to be lost 2083 // flaky, we call finish so that the context is guaranteed to be lost
2079 // synchronously (i.e. before returning). 2084 // synchronously (i.e. before returning).
2080 sharedContext->finish(); 2085 sharedContext->finish();
2081 return true; 2086 return true;
2082 } 2087 }
2083 2088
2084 } 2089 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGModelObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698