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

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

Issue 22529002: [cc] Allow resources and ui resources to specify wrap mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix botched resolve 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
« no previous file with comments | « cc/test/render_pass_test_common.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('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 "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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 SetNeedsCommit(); 631 SetNeedsCommit();
632 } 632 }
633 633
634 void LayerTreeHost::SetOverhangBitmap(const SkBitmap& bitmap) { 634 void LayerTreeHost::SetOverhangBitmap(const SkBitmap& bitmap) {
635 DCHECK(bitmap.width() && bitmap.height()); 635 DCHECK(bitmap.width() && bitmap.height());
636 DCHECK_EQ(bitmap.bytesPerPixel(), 4); 636 DCHECK_EQ(bitmap.bytesPerPixel(), 4);
637 637
638 scoped_refptr<UIResourceBitmap> overhang_ui_bitmap(UIResourceBitmap::Create( 638 scoped_refptr<UIResourceBitmap> overhang_ui_bitmap(UIResourceBitmap::Create(
639 new uint8_t[bitmap.width() * bitmap.height() * bitmap.bytesPerPixel()], 639 new uint8_t[bitmap.width() * bitmap.height() * bitmap.bytesPerPixel()],
640 UIResourceBitmap::RGBA8, 640 UIResourceBitmap::RGBA8,
641 UIResourceBitmap::REPEAT,
641 gfx::Size(bitmap.width(), bitmap.height()))); 642 gfx::Size(bitmap.width(), bitmap.height())));
642 bitmap.copyPixelsTo( 643 bitmap.copyPixelsTo(
643 overhang_ui_bitmap->GetPixels(), 644 overhang_ui_bitmap->GetPixels(),
644 bitmap.width() * bitmap.height() * bitmap.bytesPerPixel(), 645 bitmap.width() * bitmap.height() * bitmap.bytesPerPixel(),
645 bitmap.width() * bitmap.bytesPerPixel()); 646 bitmap.width() * bitmap.bytesPerPixel());
646 overhang_ui_resource_ = ScopedUIResource::Create(this, overhang_ui_bitmap); 647 overhang_ui_resource_ = ScopedUIResource::Create(this, overhang_ui_bitmap);
647 } 648 }
648 649
649 void LayerTreeHost::SetVisible(bool visible) { 650 void LayerTreeHost::SetVisible(bool visible) {
650 if (visible_ == visible) 651 if (visible_ == visible)
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 void LayerTreeHost::DidLoseUIResources() { 1191 void LayerTreeHost::DidLoseUIResources() {
1191 // When output surface is lost, we need to recreate the resource. 1192 // When output surface is lost, we need to recreate the resource.
1192 for (UIResourceClientMap::iterator iter = ui_resource_client_map_.begin(); 1193 for (UIResourceClientMap::iterator iter = ui_resource_client_map_.begin();
1193 iter != ui_resource_client_map_.end(); 1194 iter != ui_resource_client_map_.end();
1194 ++iter) { 1195 ++iter) {
1195 UIResourceLost(iter->first); 1196 UIResourceLost(iter->first);
1196 } 1197 }
1197 } 1198 }
1198 1199
1199 } // namespace cc 1200 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/render_pass_test_common.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698