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

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

Issue 9969020: Merge 112568 - [chromium] Ensure framebuffer exists at the start of beginDrawingFrame. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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) 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 TRACE_EVENT("CCSingleThreadProxy::~CCSingleThreadProxy", this, 0); 65 TRACE_EVENT("CCSingleThreadProxy::~CCSingleThreadProxy", this, 0);
66 ASSERT(CCProxy::isMainThread()); 66 ASSERT(CCProxy::isMainThread());
67 ASSERT(!m_layerTreeHostImpl && !m_layerTreeHost); // make sure stop() got ca lled. 67 ASSERT(!m_layerTreeHostImpl && !m_layerTreeHost); // make sure stop() got ca lled.
68 } 68 }
69 69
70 bool CCSingleThreadProxy::compositeAndReadback(void *pixels, const IntRect& rect ) 70 bool CCSingleThreadProxy::compositeAndReadback(void *pixels, const IntRect& rect )
71 { 71 {
72 TRACE_EVENT("CCSingleThreadProxy::compositeAndReadback", this, 0); 72 TRACE_EVENT("CCSingleThreadProxy::compositeAndReadback", this, 0);
73 ASSERT(CCProxy::isMainThread()); 73 ASSERT(CCProxy::isMainThread());
74 74
75 ScopedEnsureFramebufferAllocation ensureFramebuffer(m_layerTreeHostImpl->lay erRenderer());
76
77 if (!commitIfNeeded()) 75 if (!commitIfNeeded())
78 return false; 76 return false;
79 77
80 if (!doComposite()) 78 if (!doComposite())
81 return false; 79 return false;
82 80
83 m_layerTreeHostImpl->readback(pixels, rect); 81 m_layerTreeHostImpl->readback(pixels, rect);
84 82
85 if (m_layerTreeHostImpl->isContextLost()) 83 if (m_layerTreeHostImpl->isContextLost())
86 return false; 84 return false;
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 319
322 void CCSingleThreadProxy::didSwapFrame() 320 void CCSingleThreadProxy::didSwapFrame()
323 { 321 {
324 if (m_nextFrameIsNewlyCommittedFrame) { 322 if (m_nextFrameIsNewlyCommittedFrame) {
325 m_nextFrameIsNewlyCommittedFrame = false; 323 m_nextFrameIsNewlyCommittedFrame = false;
326 m_layerTreeHost->didCommitAndDrawFrame(); 324 m_layerTreeHost->didCommitAndDrawFrame();
327 } 325 }
328 } 326 }
329 327
330 } 328 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698