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..ffa4aa640a7ce73b494107e8b2e08e3944f96e59 |
--- /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_ && |
+ !initializing_resource_ && |
+ resource_->id(); |
+ case SOLID_COLOR_MODE: |
+ case TRANSPARENT_MODE: |
+ case PICTURE_PILE_MODE: |
+ return true; |
+ default: |
+ NOTREACHED(); |
+ return false; |
+ } |
+} |
+ |
+} // namespace cc |