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

Side by Side Diff: cc/resources/tile_data.cc

Issue 17625002: cc: Eliminate tile.h's dependency on tile_manager.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: spacing update Created 7 years, 6 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
« cc/resources/raster_worker_pool.cc ('K') | « cc/resources/tile_data.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/resources/tile_data.h"
6
7 #include "base/memory/scoped_ptr.h"
8 #include "base/values.h"
9 #include "cc/debug/traced_value.h"
10 #include "cc/resources/tile_priority.h"
11
12 namespace cc {
13
14 scoped_ptr<base::Value> RasterModeAsValue(RasterMode raster_mode) {
15 switch (raster_mode) {
16 case HIGH_QUALITY_NO_LCD_RASTER_MODE:
17 return scoped_ptr<base::Value>(
18 base::Value::CreateStringValue("HIGH_QUALITY_NO_LCD_RASTER_MODE"));
19 case HIGH_QUALITY_RASTER_MODE:
20 return scoped_ptr<base::Value>(
21 base::Value::CreateStringValue("HIGH_QUALITY_RASTER_MODE"));
22 case LOW_QUALITY_RASTER_MODE:
23 return scoped_ptr<base::Value>(
24 base::Value::CreateStringValue("LOW_QUALITY_RASTER_MODE"));
25 case NUM_RASTER_MODES:
26 default:
27 NOTREACHED() << "Unrecognized RasterMode value " << raster_mode;
28 return scoped_ptr<base::Value>(
29 base::Value::CreateStringValue("<unknown RasterMode value>"));
30 }
31 }
32
33 scoped_ptr<base::Value> RasterTaskMetadata::AsValue() const {
34 scoped_ptr<base::DictionaryValue> res(new base::DictionaryValue());
35 res->Set("tile_id", TracedValue::CreateIDRef(tile_id).release());
36 res->SetBoolean("is_tile_in_pending_tree_now_bin",
37 is_tile_in_pending_tree_now_bin);
38 res->Set("resolution", TileResolutionAsValue(tile_resolution).release());
39 res->SetInteger("source_frame_number", source_frame_number);
40 return res.PassAs<base::Value>();
41 }
42
43 } // namespace cc
OLDNEW
« cc/resources/raster_worker_pool.cc ('K') | « cc/resources/tile_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698