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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 23694031: Fix race conditions in window snapshot code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 static void LayerTreeHostImplDidBeginTracingCallback(LayerImpl* layer) { 1230 static void LayerTreeHostImplDidBeginTracingCallback(LayerImpl* layer) {
1231 layer->DidBeginTracing(); 1231 layer->DidBeginTracing();
1232 } 1232 }
1233 1233
1234 void LayerTreeHostImpl::DrawLayers(FrameData* frame, 1234 void LayerTreeHostImpl::DrawLayers(FrameData* frame,
1235 base::TimeTicks frame_begin_time) { 1235 base::TimeTicks frame_begin_time) {
1236 TRACE_EVENT0("cc", "LayerTreeHostImpl::DrawLayers"); 1236 TRACE_EVENT0("cc", "LayerTreeHostImpl::DrawLayers");
1237 DCHECK(CanDraw()); 1237 DCHECK(CanDraw());
1238 1238
1239 if (frame->has_no_damage) { 1239 if (frame->has_no_damage) {
1240 LOG(INFO) << "EarlyOut_NoDamage";
1240 TRACE_EVENT0("cc", "EarlyOut_NoDamage"); 1241 TRACE_EVENT0("cc", "EarlyOut_NoDamage");
1241 DCHECK(!output_surface_->capabilities() 1242 DCHECK(!output_surface_->capabilities()
1242 .draw_and_swap_full_viewport_every_frame); 1243 .draw_and_swap_full_viewport_every_frame);
1243 return; 1244 return;
1244 } 1245 }
1245 1246
1246 DCHECK(!frame->render_passes.empty()); 1247 DCHECK(!frame->render_passes.empty());
1247 1248
1248 int old_dropped_frame_count = fps_counter_->dropped_frame_count(); 1249 int old_dropped_frame_count = fps_counter_->dropped_frame_count();
1249 fps_counter_->SaveTimeStamp(frame_begin_time, 1250 fps_counter_->SaveTimeStamp(frame_begin_time,
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after
2577 2578
2578 ResourceProvider::ResourceId LayerTreeHostImpl::ResourceIdForUIResource( 2579 ResourceProvider::ResourceId LayerTreeHostImpl::ResourceIdForUIResource(
2579 UIResourceId uid) const { 2580 UIResourceId uid) const {
2580 UIResourceMap::const_iterator iter = ui_resource_map_.find(uid); 2581 UIResourceMap::const_iterator iter = ui_resource_map_.find(uid);
2581 if (iter != ui_resource_map_.end()) 2582 if (iter != ui_resource_map_.end())
2582 return iter->second; 2583 return iter->second;
2583 return 0; 2584 return 0;
2584 } 2585 }
2585 2586
2586 } // namespace cc 2587 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/proxy.h » ('j') | cc/trees/thread_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698