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

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

Issue 2154473004: Add a sanity DCHECK when constructing a UIResourceRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a check that we're deleting when no bitmap is passed to the constructor. Created 4 years, 5 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
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_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 ResourceId LayerTreeImpl::ResourceIdForUIResource(UIResourceId uid) const { 1477 ResourceId LayerTreeImpl::ResourceIdForUIResource(UIResourceId uid) const {
1478 return layer_tree_host_impl_->ResourceIdForUIResource(uid); 1478 return layer_tree_host_impl_->ResourceIdForUIResource(uid);
1479 } 1479 }
1480 1480
1481 bool LayerTreeImpl::IsUIResourceOpaque(UIResourceId uid) const { 1481 bool LayerTreeImpl::IsUIResourceOpaque(UIResourceId uid) const {
1482 return layer_tree_host_impl_->IsUIResourceOpaque(uid); 1482 return layer_tree_host_impl_->IsUIResourceOpaque(uid);
1483 } 1483 }
1484 1484
1485 void LayerTreeImpl::ProcessUIResourceRequestQueue() { 1485 void LayerTreeImpl::ProcessUIResourceRequestQueue() {
1486 for (const auto& req : ui_resource_request_queue_) { 1486 for (const auto& req : ui_resource_request_queue_) {
1487 DCHECK(&req);
vmpstr 2016/07/15 21:29:23 This looks wrong. I think we can assume that the o
Donn Denman 2016/07/15 22:05:56 Removed.
1487 switch (req.GetType()) { 1488 switch (req.GetType()) {
1488 case UIResourceRequest::UI_RESOURCE_CREATE: 1489 case UIResourceRequest::UI_RESOURCE_CREATE:
1489 layer_tree_host_impl_->CreateUIResource(req.GetId(), req.GetBitmap()); 1490 layer_tree_host_impl_->CreateUIResource(req.GetId(), req.GetBitmap());
1490 break; 1491 break;
1491 case UIResourceRequest::UI_RESOURCE_DELETE: 1492 case UIResourceRequest::UI_RESOURCE_DELETE:
1492 layer_tree_host_impl_->DeleteUIResource(req.GetId()); 1493 layer_tree_host_impl_->DeleteUIResource(req.GetId());
1493 break; 1494 break;
1494 case UIResourceRequest::UI_RESOURCE_INVALID_REQUEST: 1495 case UIResourceRequest::UI_RESOURCE_INVALID_REQUEST:
1495 NOTREACHED(); 1496 NOTREACHED();
1496 break; 1497 break;
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
2012 2013
2013 void LayerTreeImpl::ResetAllChangeTracking() { 2014 void LayerTreeImpl::ResetAllChangeTracking() {
2014 layers_that_should_push_properties_.clear(); 2015 layers_that_should_push_properties_.clear();
2015 // Iterate over all layers, including masks and replicas. 2016 // Iterate over all layers, including masks and replicas.
2016 for (auto& layer : *layers_) 2017 for (auto& layer : *layers_)
2017 layer->ResetChangeTracking(); 2018 layer->ResetChangeTracking();
2018 property_trees_.ResetAllChangeTracking(); 2019 property_trees_.ResetAllChangeTracking();
2019 } 2020 }
2020 2021
2021 } // namespace cc 2022 } // namespace cc
OLDNEW
« cc/trees/layer_tree_host_impl.cc ('K') | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698