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

Side by Side Diff: cc/layer_tree_host.cc

Issue 11369109: cc: Rename PrioritizedTexture to PrioritizedResource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/layer_tree_host.h ('k') | cc/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "cc/layer_tree_host.h" 7 #include "cc/layer_tree_host.h"
8 8
9 #include "Region.h" 9 #include "Region.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 m_client->didRecreateOutputSurface(false); 156 m_client->didRecreateOutputSurface(false);
157 return; 157 return;
158 } 158 }
159 159
160 // Update m_settings based on capabilities that we got back from the rendere r. 160 // Update m_settings based on capabilities that we got back from the rendere r.
161 m_settings.acceleratePainting = m_proxy->rendererCapabilities().usingAcceler atedPainting; 161 m_settings.acceleratePainting = m_proxy->rendererCapabilities().usingAcceler atedPainting;
162 162
163 // Update m_settings based on partial update capability. 163 // Update m_settings based on partial update capability.
164 m_settings.maxPartialTextureUpdates = min(m_settings.maxPartialTextureUpdate s, m_proxy->maxPartialTextureUpdates()); 164 m_settings.maxPartialTextureUpdates = min(m_settings.maxPartialTextureUpdate s, m_proxy->maxPartialTextureUpdates());
165 165
166 m_contentsTextureManager = PrioritizedTextureManager::create(0, m_proxy->ren dererCapabilities().maxTextureSize, Renderer::ContentPool); 166 m_contentsTextureManager = PrioritizedResourceManager::create(0, m_proxy->re ndererCapabilities().maxTextureSize, Renderer::ContentPool);
167 m_surfaceMemoryPlaceholder = m_contentsTextureManager->createTexture(gfx::Si ze(), GL_RGBA); 167 m_surfaceMemoryPlaceholder = m_contentsTextureManager->createTexture(gfx::Si ze(), GL_RGBA);
168 168
169 m_rendererInitialized = true; 169 m_rendererInitialized = true;
170 170
171 m_settings.defaultTileSize = gfx::Size(min(m_settings.defaultTileSize.width( ), m_proxy->rendererCapabilities().maxTextureSize), 171 m_settings.defaultTileSize = gfx::Size(min(m_settings.defaultTileSize.width( ), m_proxy->rendererCapabilities().maxTextureSize),
172 min(m_settings.defaultTileSize.height (), m_proxy->rendererCapabilities().maxTextureSize)); 172 min(m_settings.defaultTileSize.height (), m_proxy->rendererCapabilities().maxTextureSize));
173 m_settings.maxUntiledLayerSize = gfx::Size(min(m_settings.maxUntiledLayerSiz e.width(), m_proxy->rendererCapabilities().maxTextureSize), 173 m_settings.maxUntiledLayerSize = gfx::Size(min(m_settings.maxUntiledLayerSiz e.width(), m_proxy->rendererCapabilities().maxTextureSize),
174 min(m_settings.maxUntiledLayerSiz e.height(), m_proxy->rendererCapabilities().maxTextureSize)); 174 min(m_settings.maxUntiledLayerSiz e.height(), m_proxy->rendererCapabilities().maxTextureSize));
175 } 175 }
176 176
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 m_proxy->startPageScaleAnimation(targetOffset, useAnchor, scale, duration); 463 m_proxy->startPageScaleAnimation(targetOffset, useAnchor, scale, duration);
464 } 464 }
465 465
466 void LayerTreeHost::loseContext(int numTimes) 466 void LayerTreeHost::loseContext(int numTimes)
467 { 467 {
468 TRACE_EVENT1("cc", "LayerTreeHost::loseCompositorContext", "numTimes", numTi mes); 468 TRACE_EVENT1("cc", "LayerTreeHost::loseCompositorContext", "numTimes", numTi mes);
469 m_numTimesRecreateShouldFail = numTimes - 1; 469 m_numTimesRecreateShouldFail = numTimes - 1;
470 m_proxy->loseContext(); 470 m_proxy->loseContext();
471 } 471 }
472 472
473 PrioritizedTextureManager* LayerTreeHost::contentsTextureManager() const 473 PrioritizedResourceManager* LayerTreeHost::contentsTextureManager() const
474 { 474 {
475 return m_contentsTextureManager.get(); 475 return m_contentsTextureManager.get();
476 } 476 }
477 477
478 void LayerTreeHost::composite() 478 void LayerTreeHost::composite()
479 { 479 {
480 DCHECK(!ThreadProxy::implThread()); 480 DCHECK(!ThreadProxy::implThread());
481 static_cast<SingleThreadProxy*>(m_proxy.get())->compositeImmediately(); 481 static_cast<SingleThreadProxy*>(m_proxy.get())->compositeImmediately();
482 } 482 }
483 483
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 else 840 else
841 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); 841 layer->notifyAnimationFinished(wallClockTime.ToDoubleT());
842 } 842 }
843 } 843 }
844 844
845 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 845 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
846 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 846 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
847 } 847 }
848 848
849 } // namespace cc 849 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host.h ('k') | cc/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698