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

Side by Side Diff: Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp

Issue 10883032: Merge 126540 - [chromium] Fix lost context when textures are evicted (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 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
« no previous file with comments | « no previous file | Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp » ('j') | 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 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 ASSERT(CCProxy::isMainThread()); 149 ASSERT(CCProxy::isMainThread());
150 ASSERT(m_contextLost); 150 ASSERT(m_contextLost);
151 151
152 OwnPtr<CCGraphicsContext> context = m_layerTreeHost->createContext(); 152 OwnPtr<CCGraphicsContext> context = m_layerTreeHost->createContext();
153 if (!context) 153 if (!context)
154 return false; 154 return false;
155 155
156 bool initialized; 156 bool initialized;
157 { 157 {
158 DebugScopedSetImplThread impl; 158 DebugScopedSetImplThread impl;
159 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl- >resourceProvider()); 159 if (!m_layerTreeHostImpl->contentsTexturesPurged())
160 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostI mpl->resourceProvider());
160 initialized = m_layerTreeHostImpl->initializeLayerRenderer(context.relea se(), UnthrottledUploader); 161 initialized = m_layerTreeHostImpl->initializeLayerRenderer(context.relea se(), UnthrottledUploader);
161 if (initialized) { 162 if (initialized) {
162 m_layerRendererCapabilitiesForMainThread = m_layerTreeHostImpl->laye rRendererCapabilities(); 163 m_layerRendererCapabilitiesForMainThread = m_layerTreeHostImpl->laye rRendererCapabilities();
163 } 164 }
164 } 165 }
165 166
166 if (initialized) 167 if (initialized)
167 m_contextLost = false; 168 m_contextLost = false;
168 169
169 return initialized; 170 return initialized;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 351
351 void CCSingleThreadProxy::didSwapFrame() 352 void CCSingleThreadProxy::didSwapFrame()
352 { 353 {
353 if (m_nextFrameIsNewlyCommittedFrame) { 354 if (m_nextFrameIsNewlyCommittedFrame) {
354 m_nextFrameIsNewlyCommittedFrame = false; 355 m_nextFrameIsNewlyCommittedFrame = false;
355 m_layerTreeHost->didCommitAndDrawFrame(); 356 m_layerTreeHost->didCommitAndDrawFrame();
356 } 357 }
357 } 358 }
358 359
359 } 360 }
OLDNEW
« no previous file with comments | « no previous file | Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698