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

Side by Side Diff: cc/tile_drawing_info.cc

Issue 12353003: cc: Refactored Tile::GetResourceId (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed forward declare 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
« cc/tile_drawing_info.h ('K') | « cc/tile_drawing_info.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "cc/tile_drawing_info.h"
6 #include "cc/tile.h"
7
8 namespace cc {
9
10 bool TileDrawingInfo::is_ready_to_draw() const {
11 switch(mode_) {
12 case TEXTURE_MODE:
13 return tile_->managed_state_.resource &&
enne (OOO) 2013/02/27 22:13:57 This conditional should just call GetResourceId().
14 !tile_->managed_state_.resource_is_being_initialized &&
15 tile_->managed_state_.resource->id();
16 case SOLID_COLOR_MODE:
17 case TRANSPARENT_MODE:
18 case PICTURE_PILE_MODE:
19 return true;
20 default:
21 return false;
enne (OOO) 2013/02/27 22:13:57 Maybe also NOTREACHED()?
22 }
23 }
24
25 ResourceProvider::ResourceId TileDrawingInfo::get_resource_id() const {
26 DCHECK(mode_ == TEXTURE_MODE);
27 DCHECK(tile_->managed_state_.resource);
28 DCHECK(!tile_->managed_state_.resource_is_being_initialized);
29
30 return tile_->managed_state_.resource->id();
31 }
32
33 } // namespace cc
OLDNEW
« cc/tile_drawing_info.h ('K') | « cc/tile_drawing_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698