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

Unified Diff: cc/layers/nine_patch_layer.cc

Issue 5831706594508800: cc: Cleanup Layer::SetNeedsDisplayInRect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/resources/image_layer_updater.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/nine_patch_layer.cc
diff --git a/cc/layers/nine_patch_layer.cc b/cc/layers/nine_patch_layer.cc
index c75316a9f43317cd396f8367f18c93942d7c4f8e..e88a95a63d21a1f11ea93bc760c37f1782b4f6cb 100644
--- a/cc/layers/nine_patch_layer.cc
+++ b/cc/layers/nine_patch_layer.cc
@@ -33,7 +33,7 @@ void NinePatchLayer::SetTexturePriorities(
resource_.reset();
if (!bitmap_.isNull())
CreateResource();
- } else if (needs_display_ && bitmap_dirty_ && DrawsContent()) {
+ } else if (bitmap_dirty_ && DrawsContent()) {
CreateResource();
}
@@ -83,8 +83,7 @@ void NinePatchLayer::CreateUpdaterIfNeeded() {
void NinePatchLayer::CreateResource() {
DCHECK(!bitmap_.isNull());
CreateUpdaterIfNeeded();
- updater_->set_bitmap(bitmap_);
- needs_display_ = false;
+ updater_->SetBitmap(bitmap_);
if (!resource_) {
resource_ = updater_->CreateResource(
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/resources/image_layer_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698