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

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

Issue 565043002: cc: Remove the opaque rect return-parameter from ContentLayerClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: contentlayerclientopaque: build Created 6 years, 3 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
« no previous file with comments | « cc/resources/layer_updater.h ('k') | cc/resources/prioritized_tile_set_unittest.cc » ('j') | 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 "cc/resources/picture.h" 5 #include "cc/resources/picture.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 10
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 canvas->save(); 265 canvas->save();
266 canvas->translate(SkFloatToScalar(-layer_rect_.x()), 266 canvas->translate(SkFloatToScalar(-layer_rect_.x()),
267 SkFloatToScalar(-layer_rect_.y())); 267 SkFloatToScalar(-layer_rect_.y()));
268 268
269 SkRect layer_skrect = SkRect::MakeXYWH(layer_rect_.x(), 269 SkRect layer_skrect = SkRect::MakeXYWH(layer_rect_.x(),
270 layer_rect_.y(), 270 layer_rect_.y(),
271 layer_rect_.width(), 271 layer_rect_.width(),
272 layer_rect_.height()); 272 layer_rect_.height());
273 canvas->clipRect(layer_skrect); 273 canvas->clipRect(layer_skrect);
274 274
275 gfx::RectF opaque_layer_rect; 275 painter->PaintContents(canvas.get(), layer_rect_, graphics_context_status);
276 painter->PaintContents(
277 canvas.get(), layer_rect_, &opaque_layer_rect, graphics_context_status);
278 276
279 canvas->restore(); 277 canvas->restore();
280 picture_ = skia::AdoptRef(recorder.endRecording()); 278 picture_ = skia::AdoptRef(recorder.endRecording());
281 DCHECK(picture_); 279 DCHECK(picture_);
282 280
283 if (recording) { 281 if (recording) {
284 // SkRecording requires it's the only one holding onto canvas before we 282 // SkRecording requires it's the only one holding onto canvas before we
285 // may call releasePlayback(). (This helps enforce thread-safety.) 283 // may call releasePlayback(). (This helps enforce thread-safety.)
286 canvas.clear(); 284 canvas.clear();
287 playback_.reset(recording->releasePlayback()); 285 playback_.reset(recording->releasePlayback());
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 scoped_refptr<base::debug::TracedValue> record_data = 559 scoped_refptr<base::debug::TracedValue> record_data =
562 new base::debug::TracedValue(); 560 new base::debug::TracedValue();
563 TracedValue::SetIDRef(this, record_data.get(), "picture_id"); 561 TracedValue::SetIDRef(this, record_data.get(), "picture_id");
564 record_data->BeginArray("layer_rect"); 562 record_data->BeginArray("layer_rect");
565 MathUtil::AddToTracedValue(layer_rect_, record_data.get()); 563 MathUtil::AddToTracedValue(layer_rect_, record_data.get());
566 record_data->EndArray(); 564 record_data->EndArray();
567 return record_data; 565 return record_data;
568 } 566 }
569 567
570 } // namespace cc 568 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/layer_updater.h ('k') | cc/resources/prioritized_tile_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698