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

Side by Side Diff: cc/layer_tree_host.cc

Issue 12185008: cc: Disable partial updates when impl-side painting is used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | « no previous file | no next file » | 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 "cc/layer_tree_host.h" 5 #include "cc/layer_tree_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // Uh oh, better tell the client that we can't do anything with this out put surface. 150 // Uh oh, better tell the client that we can't do anything with this out put surface.
151 m_client->didRecreateOutputSurface(false); 151 m_client->didRecreateOutputSurface(false);
152 return; 152 return;
153 } 153 }
154 154
155 // Update m_settings based on capabilities that we got back from the rendere r. 155 // Update m_settings based on capabilities that we got back from the rendere r.
156 m_settings.acceleratePainting = m_proxy->rendererCapabilities().usingAcceler atedPainting; 156 m_settings.acceleratePainting = m_proxy->rendererCapabilities().usingAcceler atedPainting;
157 157
158 // Update m_settings based on partial update capability. 158 // Update m_settings based on partial update capability.
159 size_t maxPartialTextureUpdates = 0; 159 size_t maxPartialTextureUpdates = 0;
160 if (m_proxy->rendererCapabilities().allowPartialTextureUpdates) 160 if (m_proxy->rendererCapabilities().allowPartialTextureUpdates && !m_setting s.implSidePainting)
161 maxPartialTextureUpdates = std::min(m_settings.maxPartialTextureUpdates, m_proxy->maxPartialTextureUpdates()); 161 maxPartialTextureUpdates = std::min(m_settings.maxPartialTextureUpdates, m_proxy->maxPartialTextureUpdates());
danakj 2013/02/03 18:24:15 Would it be better to have the embedder set maxPar
enne (OOO) 2013/02/11 20:01:57 I disagree; the caller is specifying a maximum, no
162 m_settings.maxPartialTextureUpdates = maxPartialTextureUpdates; 162 m_settings.maxPartialTextureUpdates = maxPartialTextureUpdates;
163 163
164 m_contentsTextureManager = PrioritizedResourceManager::create(m_proxy.get()) ; 164 m_contentsTextureManager = PrioritizedResourceManager::create(m_proxy.get()) ;
165 m_surfaceMemoryPlaceholder = m_contentsTextureManager->createTexture(gfx::Si ze(), GL_RGBA); 165 m_surfaceMemoryPlaceholder = m_contentsTextureManager->createTexture(gfx::Si ze(), GL_RGBA);
166 166
167 m_rendererInitialized = true; 167 m_rendererInitialized = true;
168 168
169 m_settings.defaultTileSize = gfx::Size(std::min(m_settings.defaultTileSize.w idth(), m_proxy->rendererCapabilities().maxTextureSize), 169 m_settings.defaultTileSize = gfx::Size(std::min(m_settings.defaultTileSize.w idth(), m_proxy->rendererCapabilities().maxTextureSize),
170 std::min(m_settings.defaultTileSize.h eight(), m_proxy->rendererCapabilities().maxTextureSize)); 170 std::min(m_settings.defaultTileSize.h eight(), m_proxy->rendererCapabilities().maxTextureSize));
171 m_settings.maxUntiledLayerSize = gfx::Size(std::min(m_settings.maxUntiledLay erSize.width(), m_proxy->rendererCapabilities().maxTextureSize), 171 m_settings.maxUntiledLayerSize = gfx::Size(std::min(m_settings.maxUntiledLay erSize.width(), m_proxy->rendererCapabilities().maxTextureSize),
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 867 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
868 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 868 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
869 } 869 }
870 870
871 skia::RefPtr<SkPicture> LayerTreeHost::capturePicture() 871 skia::RefPtr<SkPicture> LayerTreeHost::capturePicture()
872 { 872 {
873 return m_proxy->capturePicture(); 873 return m_proxy->capturePicture();
874 } 874 }
875 875
876 } // namespace cc 876 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698