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

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: 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
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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 canvas->save(); 250 canvas->save();
251 canvas->translate(SkFloatToScalar(-layer_rect_.x()), 251 canvas->translate(SkFloatToScalar(-layer_rect_.x()),
252 SkFloatToScalar(-layer_rect_.y())); 252 SkFloatToScalar(-layer_rect_.y()));
253 253
254 SkRect layer_skrect = SkRect::MakeXYWH(layer_rect_.x(), 254 SkRect layer_skrect = SkRect::MakeXYWH(layer_rect_.x(),
255 layer_rect_.y(), 255 layer_rect_.y(),
256 layer_rect_.width(), 256 layer_rect_.width(),
257 layer_rect_.height()); 257 layer_rect_.height());
258 canvas->clipRect(layer_skrect); 258 canvas->clipRect(layer_skrect);
259 259
260 gfx::RectF opaque_layer_rect; 260 painter->PaintContents(canvas.get(), layer_rect_, graphics_context_status);
261 painter->PaintContents(
262 canvas.get(), layer_rect_, &opaque_layer_rect, graphics_context_status);
263 261
264 canvas->restore(); 262 canvas->restore();
265 picture_ = skia::AdoptRef(recorder.endRecording()); 263 picture_ = skia::AdoptRef(recorder.endRecording());
266 DCHECK(picture_); 264 DCHECK(picture_);
267 265
268 if (recording) { 266 if (recording) {
269 // SkRecording requires it's the only one holding onto canvas before we 267 // SkRecording requires it's the only one holding onto canvas before we
270 // may call releasePlayback(). (This helps enforce thread-safety.) 268 // may call releasePlayback(). (This helps enforce thread-safety.)
271 canvas.clear(); 269 canvas.clear();
272 playback_.reset(recording->releasePlayback()); 270 playback_.reset(recording->releasePlayback());
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 scoped_refptr<base::debug::TracedValue> record_data = 541 scoped_refptr<base::debug::TracedValue> record_data =
544 new base::debug::TracedValue(); 542 new base::debug::TracedValue();
545 TracedValue::SetIDRef(this, record_data.get(), "picture_id"); 543 TracedValue::SetIDRef(this, record_data.get(), "picture_id");
546 record_data->BeginArray("layer_rect"); 544 record_data->BeginArray("layer_rect");
547 MathUtil::AddToTracedValue(layer_rect_, record_data.get()); 545 MathUtil::AddToTracedValue(layer_rect_, record_data.get());
548 record_data->EndArray(); 546 record_data->EndArray();
549 return record_data; 547 return record_data;
550 } 548 }
551 549
552 } // namespace cc 550 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698