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

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

Issue 8479052: Merge 98185 - [chromium] Make setVisibility extension- and thread-correct (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 9 years, 1 month 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 m_layerRenderer->getFramebufferPixels(pixels, rect); 115 m_layerRenderer->getFramebufferPixels(pixels, rect);
116 } 116 }
117 117
118 void CCLayerTreeHostImpl::setRootLayer(PassRefPtr<CCLayerImpl> layer) 118 void CCLayerTreeHostImpl::setRootLayer(PassRefPtr<CCLayerImpl> layer)
119 { 119 {
120 m_rootLayerImpl = layer; 120 m_rootLayerImpl = layer;
121 } 121 }
122 122
123 void CCLayerTreeHostImpl::setVisible(bool visible) 123 void CCLayerTreeHostImpl::setVisible(bool visible)
124 { 124 {
125 if (m_layerRenderer && !visible) 125 if (m_layerRenderer)
126 m_layerRenderer->releaseRenderSurfaceTextures(); 126 m_layerRenderer->setVisible(visible);
127 } 127 }
128 128
129 bool CCLayerTreeHostImpl::initializeLayerRenderer(PassRefPtr<GraphicsContext3D> context) 129 bool CCLayerTreeHostImpl::initializeLayerRenderer(PassRefPtr<GraphicsContext3D> context)
130 { 130 {
131 OwnPtr<LayerRendererChromium> layerRenderer; 131 OwnPtr<LayerRendererChromium> layerRenderer;
132 layerRenderer = LayerRendererChromium::create(this, context); 132 layerRenderer = LayerRendererChromium::create(this, context);
133 133
134 // If creation failed, and we had asked for accelerated painting, disable ac celerated painting 134 // If creation failed, and we had asked for accelerated painting, disable ac celerated painting
135 // and try creating the renderer again. 135 // and try creating the renderer again.
136 if (!layerRenderer && m_settings.acceleratePainting) { 136 if (!layerRenderer && m_settings.acceleratePainting) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 info.scrollDelta = rootLayer()->scrollDelta(); 178 info.scrollDelta = rootLayer()->scrollDelta();
179 scrollInfo->append(info); 179 scrollInfo->append(info);
180 180
181 rootLayer()->setScrollPosition(rootLayer()->scrollPosition() + rootLayer ()->scrollDelta()); 181 rootLayer()->setScrollPosition(rootLayer()->scrollPosition() + rootLayer ()->scrollDelta());
182 rootLayer()->setScrollDelta(IntSize()); 182 rootLayer()->setScrollDelta(IntSize());
183 } 183 }
184 return scrollInfo.release(); 184 return scrollInfo.release();
185 } 185 }
186 186
187 } 187 }
OLDNEW
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h ('k') | Source/WebKit/chromium/public/WebGraphicsContext3D.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698