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

Side by Side Diff: cc/CCLayerTreeHost.cpp

Issue 10915298: Add CCDelegatingRenderer, and corresponding IPCs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « cc/CCLayerTreeHost.h ('k') | cc/CCLayerTreeHostImpl.h » ('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 "CCLayerTreeHost.h" 7 #include "CCLayerTreeHost.h"
8 8
9 #include "CCFontAtlas.h" 9 #include "CCFontAtlas.h"
10 #include "CCGraphicsContext.h" 10 #include "CCGraphicsContext.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 , minimumOcclusionTrackingSize(IntSize(160, 160)) 54 , minimumOcclusionTrackingSize(IntSize(160, 160))
55 { 55 {
56 } 56 }
57 57
58 CCLayerTreeSettings::~CCLayerTreeSettings() 58 CCLayerTreeSettings::~CCLayerTreeSettings()
59 { 59 {
60 } 60 }
61 61
62 RendererCapabilities::RendererCapabilities() 62 RendererCapabilities::RendererCapabilities()
63 : bestTextureFormat(0) 63 : bestTextureFormat(0)
64 , contextHasCachedFrontBuffer(false)
65 , usingPartialSwap(false) 64 , usingPartialSwap(false)
66 , usingAcceleratedPainting(false) 65 , usingAcceleratedPainting(false)
67 , usingSetVisibility(false) 66 , usingSetVisibility(false)
68 , usingSwapCompleteCallback(false) 67 , usingSwapCompleteCallback(false)
69 , usingGpuMemoryManager(false) 68 , usingGpuMemoryManager(false)
70 , usingDiscardFramebuffer(false) 69 , usingDiscardFramebuffer(false)
71 , usingEglImage(false) 70 , usingEglImage(false)
71 , allowPartialTextureUpdates(true)
72 , maxTextureSize(0) 72 , maxTextureSize(0)
73 { 73 {
74 } 74 }
75 75
76 RendererCapabilities::~RendererCapabilities() 76 RendererCapabilities::~RendererCapabilities()
77 { 77 {
78 } 78 }
79 79
80 bool CCLayerTreeHost::anyLayerTreeHostInstanceExists() 80 bool CCLayerTreeHost::anyLayerTreeHostInstanceExists()
81 { 81 {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if (!m_proxy->initializeRenderer()) { 158 if (!m_proxy->initializeRenderer()) {
159 // Uh oh, better tell the client that we can't do anything with this con text. 159 // Uh oh, better tell the client that we can't do anything with this con text.
160 m_client->didRecreateOutputSurface(false); 160 m_client->didRecreateOutputSurface(false);
161 return; 161 return;
162 } 162 }
163 163
164 // Update m_settings based on capabilities that we got back from the rendere r. 164 // Update m_settings based on capabilities that we got back from the rendere r.
165 m_settings.acceleratePainting = m_proxy->rendererCapabilities().usingAcceler atedPainting; 165 m_settings.acceleratePainting = m_proxy->rendererCapabilities().usingAcceler atedPainting;
166 166
167 // Update m_settings based on partial update capability. 167 // Update m_settings based on partial update capability.
168 m_settings.maxPartialTextureUpdates = min(m_settings.maxPartialTextureUpdate s, m_proxy->maxPartialTextureUpdates()); 168 m_settings.maxPartialTextureUpdates = m_proxy->rendererCapabilities().allowP artialTextureUpdates ? min(m_settings.maxPartialTextureUpdates, m_proxy->maxPart ialTextureUpdates()) : 0;
169 169
170 m_contentsTextureManager = CCPrioritizedTextureManager::create(0, m_proxy->r endererCapabilities().maxTextureSize, CCRenderer::ContentPool); 170 m_contentsTextureManager = CCPrioritizedTextureManager::create(0, m_proxy->r endererCapabilities().maxTextureSize, CCRenderer::ContentPool);
171 m_surfaceMemoryPlaceholder = m_contentsTextureManager->createTexture(IntSize (), GraphicsContext3D::RGBA); 171 m_surfaceMemoryPlaceholder = m_contentsTextureManager->createTexture(IntSize (), GraphicsContext3D::RGBA);
172 172
173 m_rendererInitialized = true; 173 m_rendererInitialized = true;
174 174
175 m_settings.defaultTileSize = IntSize(min(m_settings.defaultTileSize.width(), m_proxy->rendererCapabilities().maxTextureSize), 175 m_settings.defaultTileSize = IntSize(min(m_settings.defaultTileSize.width(), m_proxy->rendererCapabilities().maxTextureSize),
176 min(m_settings.defaultTileSize.height() , m_proxy->rendererCapabilities().maxTextureSize)); 176 min(m_settings.defaultTileSize.height() , m_proxy->rendererCapabilities().maxTextureSize));
177 m_settings.maxUntiledLayerSize = IntSize(min(m_settings.maxUntiledLayerSize. width(), m_proxy->rendererCapabilities().maxTextureSize), 177 m_settings.maxUntiledLayerSize = IntSize(min(m_settings.maxUntiledLayerSize. width(), m_proxy->rendererCapabilities().maxTextureSize),
178 min(m_settings.maxUntiledLayerSize. height(), m_proxy->rendererCapabilities().maxTextureSize)); 178 min(m_settings.maxUntiledLayerSize. height(), m_proxy->rendererCapabilities().maxTextureSize));
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 else 864 else
865 layer->notifyAnimationFinished(wallClockTime); 865 layer->notifyAnimationFinished(wallClockTime);
866 } 866 }
867 } 867 }
868 868
869 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 869 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
870 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 870 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
871 } 871 }
872 872
873 } // namespace cc 873 } // namespace cc
OLDNEW
« no previous file with comments | « cc/CCLayerTreeHost.h ('k') | cc/CCLayerTreeHostImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698