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

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

Issue 1809553002: blink: Remove unused or rarely used methods from WebGraphicsContext3D (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wgc3d
Patch Set: Created 4 years, 9 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
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 #include "core/testing/DictionaryTest.h" 119 #include "core/testing/DictionaryTest.h"
120 #include "core/testing/GCObservation.h" 120 #include "core/testing/GCObservation.h"
121 #include "core/testing/InternalRuntimeFlags.h" 121 #include "core/testing/InternalRuntimeFlags.h"
122 #include "core/testing/InternalSettings.h" 122 #include "core/testing/InternalSettings.h"
123 #include "core/testing/LayerRect.h" 123 #include "core/testing/LayerRect.h"
124 #include "core/testing/LayerRectList.h" 124 #include "core/testing/LayerRectList.h"
125 #include "core/testing/PrivateScriptTest.h" 125 #include "core/testing/PrivateScriptTest.h"
126 #include "core/testing/TypeConversions.h" 126 #include "core/testing/TypeConversions.h"
127 #include "core/testing/UnionTypesTest.h" 127 #include "core/testing/UnionTypesTest.h"
128 #include "core/workers/WorkerThread.h" 128 #include "core/workers/WorkerThread.h"
129 #include "gpu/command_buffer/client/gles2_interface.h"
129 #include "platform/Cursor.h" 130 #include "platform/Cursor.h"
130 #include "platform/Language.h" 131 #include "platform/Language.h"
131 #include "platform/PlatformKeyboardEvent.h" 132 #include "platform/PlatformKeyboardEvent.h"
132 #include "platform/RuntimeEnabledFeatures.h" 133 #include "platform/RuntimeEnabledFeatures.h"
133 #include "platform/TraceEvent.h" 134 #include "platform/TraceEvent.h"
134 #include "platform/geometry/IntRect.h" 135 #include "platform/geometry/IntRect.h"
135 #include "platform/geometry/LayoutRect.h" 136 #include "platform/geometry/LayoutRect.h"
136 #include "platform/graphics/GraphicsLayer.h" 137 #include "platform/graphics/GraphicsLayer.h"
137 #include "platform/heap/Handle.h" 138 #include "platform/heap/Handle.h"
138 #include "platform/inspector_protocol/FrontendChannel.h" 139 #include "platform/inspector_protocol/FrontendChannel.h"
(...skipping 2086 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 { 2226 {
2226 ASSERT(select); 2227 ASSERT(select);
2227 select->resetTypeAheadSessionForTesting(); 2228 select->resetTypeAheadSessionForTesting();
2228 } 2229 }
2229 2230
2230 bool Internals::loseSharedGraphicsContext3D() 2231 bool Internals::loseSharedGraphicsContext3D()
2231 { 2232 {
2232 OwnPtr<WebGraphicsContext3DProvider> sharedProvider = adoptPtr(Platform::cur rent()->createSharedOffscreenGraphicsContext3DProvider()); 2233 OwnPtr<WebGraphicsContext3DProvider> sharedProvider = adoptPtr(Platform::cur rent()->createSharedOffscreenGraphicsContext3DProvider());
2233 if (!sharedProvider) 2234 if (!sharedProvider)
2234 return false; 2235 return false;
2235 WebGraphicsContext3D* sharedContext = sharedProvider->context3d(); 2236 gpu::gles2::GLES2Interface* sharedGL = sharedProvider->contextGL();
2236 sharedContext->loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_EXT, GL_INNOCENT_ CONTEXT_RESET_EXT); 2237 sharedGL->LoseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_EXT, GL_INNOCENT_CONTE XT_RESET_EXT);
2237 // To prevent tests that call loseSharedGraphicsContext3D from being 2238 // To prevent tests that call loseSharedGraphicsContext3D from being
2238 // flaky, we call finish so that the context is guaranteed to be lost 2239 // flaky, we call finish so that the context is guaranteed to be lost
2239 // synchronously (i.e. before returning). 2240 // synchronously (i.e. before returning).
2240 sharedContext->finish(); 2241 sharedGL->Finish();
2241 return true; 2242 return true;
2242 } 2243 }
2243 2244
2244 void Internals::forceCompositingUpdate(Document* document, ExceptionState& excep tionState) 2245 void Internals::forceCompositingUpdate(Document* document, ExceptionState& excep tionState)
2245 { 2246 {
2246 ASSERT(document); 2247 ASSERT(document);
2247 if (!document->layoutView()) { 2248 if (!document->layoutView()) {
2248 exceptionState.throwDOMException(InvalidAccessError, "The document provi ded is invalid."); 2249 exceptionState.throwDOMException(InvalidAccessError, "The document provi ded is invalid.");
2249 return; 2250 return;
2250 } 2251 }
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
2572 } 2573 }
2573 2574
2574 int Internals::getScrollAnimationState(Node* node) const 2575 int Internals::getScrollAnimationState(Node* node) const
2575 { 2576 {
2576 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) 2577 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node))
2577 return static_cast<int>(scrollableArea->scrollAnimator().m_runState); 2578 return static_cast<int>(scrollableArea->scrollAnimator().m_runState);
2578 return -1; 2579 return -1;
2579 } 2580 }
2580 2581
2581 } // namespace blink 2582 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698