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

Unified Diff: cc/resources/managed_tile_state.cc

Issue 793573006: Refactoring for merging ManagedTileState into Tile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix a nit Created 6 years 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/resources/managed_tile_state.h ('k') | cc/resources/picture_layer_tiling_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/managed_tile_state.cc
diff --git a/cc/resources/managed_tile_state.cc b/cc/resources/managed_tile_state.cc
deleted file mode 100644
index a60c28af82e2d3a34851d3d6d49948b8314d342b..0000000000000000000000000000000000000000
--- a/cc/resources/managed_tile_state.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// 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/resources/managed_tile_state.h"
-
-#include <limits>
-#include <string>
-
-#include "base/debug/trace_event_argument.h"
-#include "cc/base/math_util.h"
-
-namespace cc {
-
-ManagedTileState::ManagedTileState()
- : resolution(NON_IDEAL_RESOLUTION),
- priority_bin(TilePriority::EVENTUALLY),
- scheduled_priority(0) {
-}
-
-ManagedTileState::DrawInfo::DrawInfo()
- : mode_(RESOURCE_MODE), solid_color_(SK_ColorWHITE) {
-}
-
-ManagedTileState::DrawInfo::~DrawInfo() {
- DCHECK(!resource_);
-}
-
-bool ManagedTileState::DrawInfo::IsReadyToDraw() const {
- switch (mode_) {
- case RESOURCE_MODE:
- return !!resource_;
- case SOLID_COLOR_MODE:
- case PICTURE_PILE_MODE:
- return true;
- }
- NOTREACHED();
- return false;
-}
-
-ManagedTileState::~ManagedTileState() {}
-
-void ManagedTileState::AsValueInto(base::debug::TracedValue* state) const {
- bool has_resource = (draw_info.resource_.get() != 0);
- bool has_active_task = (raster_task.get() != 0);
-
- bool is_using_gpu_memory = has_resource || has_active_task;
-
- state->SetBoolean("has_resource", has_resource);
- state->SetBoolean("is_using_gpu_memory", is_using_gpu_memory);
- state->SetString("resolution", TileResolutionToString(resolution));
- state->SetString("priority_bin", TilePriorityBinToString(priority_bin));
- state->SetBoolean("is_solid_color",
- draw_info.mode_ == DrawInfo::SOLID_COLOR_MODE);
- state->SetBoolean("is_transparent",
- draw_info.mode_ == DrawInfo::SOLID_COLOR_MODE &&
- !SkColorGetA(draw_info.solid_color_));
- state->SetInteger("scheduled_priority", scheduled_priority);
-}
-
-} // namespace cc
« no previous file with comments | « cc/resources/managed_tile_state.h ('k') | cc/resources/picture_layer_tiling_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698