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

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

Issue 16032003: Fixing Canvas2DLayerBridge to handle lost graphics contexts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added Layout test and necessary content_shell API to test context loss Created 7 years, 6 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) 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 #include "core/page/Frame.h" 86 #include "core/page/Frame.h"
87 #include "core/page/FrameView.h" 87 #include "core/page/FrameView.h"
88 #include "core/page/Page.h" 88 #include "core/page/Page.h"
89 #include "core/page/PrintContext.h" 89 #include "core/page/PrintContext.h"
90 #include "core/page/Settings.h" 90 #include "core/page/Settings.h"
91 #include "core/page/animation/AnimationController.h" 91 #include "core/page/animation/AnimationController.h"
92 #include "core/page/scrolling/ScrollingCoordinator.h" 92 #include "core/page/scrolling/ScrollingCoordinator.h"
93 #include "core/platform/Cursor.h" 93 #include "core/platform/Cursor.h"
94 #include "core/platform/Language.h" 94 #include "core/platform/Language.h"
95 #include "core/platform/graphics/IntRect.h" 95 #include "core/platform/graphics/IntRect.h"
96 #include "core/platform/graphics/gpu/SharedGraphicsContext3D.h"
96 #include "core/rendering/RenderMenuList.h" 97 #include "core/rendering/RenderMenuList.h"
97 #include "core/rendering/RenderObject.h" 98 #include "core/rendering/RenderObject.h"
98 #include "core/rendering/RenderTreeAsText.h" 99 #include "core/rendering/RenderTreeAsText.h"
99 #include "core/rendering/RenderView.h" 100 #include "core/rendering/RenderView.h"
100 #include "core/workers/WorkerThread.h" 101 #include "core/workers/WorkerThread.h"
101 #include "weborigin/SchemeRegistry.h" 102 #include "weborigin/SchemeRegistry.h"
102 #include "wtf/dtoa.h" 103 #include "wtf/dtoa.h"
103 #include "wtf/text/StringBuffer.h" 104 #include "wtf/text/StringBuffer.h"
104 105
105 #if ENABLE(INPUT_TYPE_COLOR) 106 #if ENABLE(INPUT_TYPE_COLOR)
(...skipping 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after
1961 HTMLSelectElement* select = toHTMLSelectElement(node); 1962 HTMLSelectElement* select = toHTMLSelectElement(node);
1962 1963
1963 RenderObject* renderer = select->renderer(); 1964 RenderObject* renderer = select->renderer();
1964 if (!renderer->isMenuList()) 1965 if (!renderer->isMenuList())
1965 return false; 1966 return false;
1966 1967
1967 RenderMenuList* menuList = toRenderMenuList(renderer); 1968 RenderMenuList* menuList = toRenderMenuList(renderer);
1968 return menuList->popupIsVisible(); 1969 return menuList->popupIsVisible();
1969 } 1970 }
1970 1971
1972 bool Internals::loseSharedGraphicsContext3D()
1973 {
1974 RefPtr<GraphicsContext3D> sharedContext = SharedGraphicsContext3D::get();
1975 if (!sharedContext)
1976 return false;
1977 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB);
1978 return true;
1971 } 1979 }
1980
1981 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698