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

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

Issue 16968002: Move implementation of WebFilterOperations into cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 // cost. 859 // cost.
860 for (size_t i = 1; i < update_list.size(); ++i) { 860 for (size_t i = 1; i < update_list.size(); ++i) {
861 Layer* render_surface_layer = update_list[i].get(); 861 Layer* render_surface_layer = update_list[i].get();
862 RenderSurface* render_surface = render_surface_layer->render_surface(); 862 RenderSurface* render_surface = render_surface_layer->render_surface();
863 863
864 size_t bytes = 864 size_t bytes =
865 Resource::MemorySizeBytes(render_surface->content_rect().size(), 865 Resource::MemorySizeBytes(render_surface->content_rect().size(),
866 GL_RGBA); 866 GL_RGBA);
867 contents_texture_bytes += bytes; 867 contents_texture_bytes += bytes;
868 868
869 if (render_surface_layer->background_filters().isEmpty()) 869 if (render_surface_layer->background_filters().IsEmpty())
870 continue; 870 continue;
871 871
872 if (bytes > max_background_texture_bytes) 872 if (bytes > max_background_texture_bytes)
873 max_background_texture_bytes = bytes; 873 max_background_texture_bytes = bytes;
874 if (!readback_bytes) { 874 if (!readback_bytes) {
875 readback_bytes = Resource::MemorySizeBytes(device_viewport_size_, 875 readback_bytes = Resource::MemorySizeBytes(device_viewport_size_,
876 GL_RGBA); 876 GL_RGBA);
877 } 877 }
878 } 878 }
879 return readback_bytes + max_background_texture_bytes + contents_texture_bytes; 879 return readback_bytes + max_background_texture_bytes + contents_texture_bytes;
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 bool start_ready_animations = true; 1080 bool start_ready_animations = true;
1081 (*iter).second->UpdateState(start_ready_animations, NULL); 1081 (*iter).second->UpdateState(start_ready_animations, NULL);
1082 } 1082 }
1083 } 1083 }
1084 1084
1085 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { 1085 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() {
1086 return proxy_->CapturePicture(); 1086 return proxy_->CapturePicture();
1087 } 1087 }
1088 1088
1089 } // namespace cc 1089 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698