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

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

Issue 322123002: Remove use of kUsePathBoundsForClip_RecordingFlag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/picture.cc ('k') | skia/ext/pixel_ref_utils_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 <algorithm> 5 #include <algorithm>
6 #include <limits> 6 #include <limits>
7 7
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/base/region.h" 9 #include "cc/base/region.h"
10 #include "cc/debug/debug_colors.h" 10 #include "cc/debug/debug_colors.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 canvas->drawPaint(paint); 341 canvas->drawPaint(paint);
342 #endif // NDEBUG 342 #endif // NDEBUG
343 } 343 }
344 344
345 skia::RefPtr<SkPicture> PicturePileImpl::GetFlattenedPicture() { 345 skia::RefPtr<SkPicture> PicturePileImpl::GetFlattenedPicture() {
346 TRACE_EVENT0("cc", "PicturePileImpl::GetFlattenedPicture"); 346 TRACE_EVENT0("cc", "PicturePileImpl::GetFlattenedPicture");
347 347
348 gfx::Rect tiling_rect(tiling_.tiling_rect()); 348 gfx::Rect tiling_rect(tiling_.tiling_rect());
349 SkPictureRecorder recorder; 349 SkPictureRecorder recorder;
350 SkCanvas* canvas = 350 SkCanvas* canvas =
351 recorder.beginRecording(tiling_rect.width(), 351 recorder.beginRecording(tiling_rect.width(), tiling_rect.height());
352 tiling_rect.height(),
353 NULL,
354 SkPicture::kUsePathBoundsForClip_RecordingFlag);
355 if (!tiling_rect.IsEmpty()) 352 if (!tiling_rect.IsEmpty())
356 RasterToBitmap(canvas, tiling_rect, 1.0, NULL); 353 RasterToBitmap(canvas, tiling_rect, 1.0, NULL);
357 skia::RefPtr<SkPicture> picture = skia::AdoptRef(recorder.endRecording()); 354 skia::RefPtr<SkPicture> picture = skia::AdoptRef(recorder.endRecording());
358 355
359 return picture; 356 return picture;
360 } 357 }
361 358
362 void PicturePileImpl::AnalyzeInRect( 359 void PicturePileImpl::AnalyzeInRect(
363 const gfx::Rect& content_rect, 360 const gfx::Rect& content_rect,
364 float contents_scale, 361 float contents_scale,
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 ++it) { 450 ++it) {
454 Picture* picture = it->second.GetPicture(); 451 Picture* picture = it->second.GetPicture();
455 if (picture && (processed_pictures.count(picture) == 0)) { 452 if (picture && (processed_pictures.count(picture) == 0)) {
456 picture->EmitTraceSnapshot(); 453 picture->EmitTraceSnapshot();
457 processed_pictures.insert(picture); 454 processed_pictures.insert(picture);
458 } 455 }
459 } 456 }
460 } 457 }
461 458
462 } // namespace cc 459 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture.cc ('k') | skia/ext/pixel_ref_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698