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

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

Issue 13581011: cc: Temporarily disable tile grid optimization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | 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
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/debug/trace_event.h" 5 #include "base/debug/trace_event.h"
6 #include "cc/debug/rendering_stats.h" 6 #include "cc/debug/rendering_stats.h"
7 #include "cc/layers/content_layer_client.h" 7 #include "cc/layers/content_layer_client.h"
8 #include "cc/resources/picture.h" 8 #include "cc/resources/picture.h"
9 #include "skia/ext/analysis_canvas.h" 9 #include "skia/ext/analysis_canvas.h"
10 #include "third_party/skia/include/core/SkCanvas.h" 10 #include "third_party/skia/include/core/SkCanvas.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 void Picture::Record(ContentLayerClient* painter, 81 void Picture::Record(ContentLayerClient* painter,
82 RenderingStats* stats, 82 RenderingStats* stats,
83 const SkTileGridPicture::TileGridInfo& tile_grid_info) { 83 const SkTileGridPicture::TileGridInfo& tile_grid_info) {
84 TRACE_EVENT2("cc", "Picture::Record", 84 TRACE_EVENT2("cc", "Picture::Record",
85 "width", layer_rect_.width(), "height", layer_rect_.height()); 85 "width", layer_rect_.width(), "height", layer_rect_.height());
86 86
87 // Record() should only be called once. 87 // Record() should only be called once.
88 DCHECK(!picture_); 88 DCHECK(!picture_);
89 DCHECK(!tile_grid_info.fTileInterval.isEmpty()); 89 DCHECK(!tile_grid_info.fTileInterval.isEmpty());
90 picture_ = skia::AdoptRef(new SkTileGridPicture( 90 // TODO(enne): Turn back on tile grid after
91 layer_rect_.width(), layer_rect_.height(), tile_grid_info)); 91 // https://code.google.com/p/skia/issues/detail?id=1209 is fixed.
92 picture_ = skia::AdoptRef(new SkPicture());
92 93
93 SkCanvas* canvas = picture_->beginRecording( 94 SkCanvas* canvas = picture_->beginRecording(
94 layer_rect_.width(), 95 layer_rect_.width(),
95 layer_rect_.height(), 96 layer_rect_.height(),
96 SkPicture::kUsePathBoundsForClip_RecordingFlag | 97 SkPicture::kUsePathBoundsForClip_RecordingFlag |
97 SkPicture::kOptimizeForClippedPlayback_RecordingFlag); 98 SkPicture::kOptimizeForClippedPlayback_RecordingFlag);
98 99
99 canvas->save(); 100 canvas->save();
100 canvas->translate(SkFloatToScalar(-layer_rect_.x()), 101 canvas->translate(SkFloatToScalar(-layer_rect_.x()),
101 SkFloatToScalar(-layer_rect_.y())); 102 SkFloatToScalar(-layer_rect_.y()));
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 if (*refs && (*refs)->getURI() && !strncmp( 173 if (*refs && (*refs)->getURI() && !strncmp(
173 (*refs)->getURI(), kLabelLazyDecoded, 4)) { 174 (*refs)->getURI(), kLabelLazyDecoded, 4)) {
174 pixel_ref_list.push_back(static_cast<skia::LazyPixelRef*>(*refs)); 175 pixel_ref_list.push_back(static_cast<skia::LazyPixelRef*>(*refs));
175 } 176 }
176 refs++; 177 refs++;
177 } 178 }
178 pixel_refs->unref(); 179 pixel_refs->unref();
179 } 180 }
180 181
181 } // namespace cc 182 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698