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

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

Issue 10199014: Merge 114800 - [chromium] Plumb a compositor surface ready notification through to the threaded com… (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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 { 122 {
123 ASSERT(CCProxy::isMainThread()); 123 ASSERT(CCProxy::isMainThread());
124 RefPtr<GraphicsContext3D> context = m_layerTreeHost->createContext(); 124 RefPtr<GraphicsContext3D> context = m_layerTreeHost->createContext();
125 if (!context) 125 if (!context)
126 return false; 126 return false;
127 ASSERT(context->hasOneRef()); 127 ASSERT(context->hasOneRef());
128 m_contextBeforeInitialization = context; 128 m_contextBeforeInitialization = context;
129 return true; 129 return true;
130 } 130 }
131 131
132 void CCSingleThreadProxy::setSurfaceReady()
133 {
134 // Scheduling is controlled by the embedder in the single thread case, so no thing to do.
135 }
136
132 bool CCSingleThreadProxy::initializeLayerRenderer() 137 bool CCSingleThreadProxy::initializeLayerRenderer()
133 { 138 {
134 ASSERT(CCProxy::isMainThread()); 139 ASSERT(CCProxy::isMainThread());
135 ASSERT(m_contextBeforeInitialization); 140 ASSERT(m_contextBeforeInitialization);
136 { 141 {
137 DebugScopedSetImplThread impl; 142 DebugScopedSetImplThread impl;
138 bool ok = m_layerTreeHostImpl->initializeLayerRenderer(m_contextBeforeIn itialization.release()); 143 bool ok = m_layerTreeHostImpl->initializeLayerRenderer(m_contextBeforeIn itialization.release());
139 if (ok) { 144 if (ok) {
140 m_layerRendererInitialized = true; 145 m_layerRendererInitialized = true;
141 m_layerRendererCapabilitiesForMainThread = m_layerTreeHostImpl->laye rRendererCapabilities(); 146 m_layerRendererCapabilitiesForMainThread = m_layerTreeHostImpl->laye rRendererCapabilities();
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 333
329 void CCSingleThreadProxy::didSwapFrame() 334 void CCSingleThreadProxy::didSwapFrame()
330 { 335 {
331 if (m_nextFrameIsNewlyCommittedFrame) { 336 if (m_nextFrameIsNewlyCommittedFrame) {
332 m_nextFrameIsNewlyCommittedFrame = false; 337 m_nextFrameIsNewlyCommittedFrame = false;
333 m_layerTreeHost->didCommitAndDrawFrame(); 338 m_layerTreeHost->didCommitAndDrawFrame();
334 } 339 }
335 } 340 }
336 341
337 } 342 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698