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

Unified Diff: cc/tile_drawing_info.cc

Issue 12353003: cc: Refactored Tile::GetResourceId (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: cc/tile_drawing_info.cc
diff --git a/cc/tile_drawing_info.cc b/cc/tile_drawing_info.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4eb994147da898dedb374743fabc6341ee11a861
--- /dev/null
+++ b/cc/tile_drawing_info.cc
@@ -0,0 +1,25 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/tile_drawing_info.h"
+
+namespace cc {
+
+bool TileDrawingInfo::IsReadyToDraw() const {
+ switch(mode_) {
+ case TEXTURE_MODE:
+ return resource_ &&
+ !resource_is_being_initialized_ &&
+ resource_->id();
+ case SOLID_COLOR_MODE:
+ case TRANSPARENT_MODE:
+ case PICTURE_PILE_MODE:
+ return true;
+ default:
+ NOTREACHED();
+ return false;
+ }
+}
+
+} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698