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

Side by Side Diff: cc/tile.cc

Issue 12353003: cc: Refactored Tile::GetResourceId (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile fix Created 7 years, 9 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
« no previous file with comments | « cc/tile.h ('k') | cc/tile_manager.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/tile.h" 5 #include "cc/tile.h"
6 6
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "cc/tile_manager.h" 8 #include "cc/tile_manager.h"
9 #include "third_party/khronos/GLES2/gl2.h" 9 #include "third_party/khronos/GLES2/gl2.h"
10 10
(...skipping 27 matching lines...) Expand all
38 res->SetString("id", base::StringPrintf("%p", this)); 38 res->SetString("id", base::StringPrintf("%p", this));
39 res->SetString("picture_pile", base::StringPrintf("%p", 39 res->SetString("picture_pile", base::StringPrintf("%p",
40 picture_pile_.get())); 40 picture_pile_.get()));
41 res->SetDouble("contents_scale", contents_scale_); 41 res->SetDouble("contents_scale", contents_scale_);
42 res->Set("priority.0", priority_[ACTIVE_TREE].AsValue().release()); 42 res->Set("priority.0", priority_[ACTIVE_TREE].AsValue().release());
43 res->Set("priority.1", priority_[PENDING_TREE].AsValue().release()); 43 res->Set("priority.1", priority_[PENDING_TREE].AsValue().release());
44 res->Set("managed_state", managed_state_.AsValue().release()); 44 res->Set("managed_state", managed_state_.AsValue().release());
45 return res.PassAs<base::Value>(); 45 return res.PassAs<base::Value>();
46 } 46 }
47 47
48 bool Tile::IsReadyToDraw() const { 48 void Tile::SetPriority(WhichTree tree, const TilePriority& priority) {
49 return GetResourceId() != 0 || 49 tile_manager_->WillModifyTilePriority(this, tree, priority);
50 is_solid_color() || 50 priority_[tree] = priority;
51 is_transparent();
52 } 51 }
53 52
54 } // namespace cc 53 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tile.h ('k') | cc/tile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698