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

Side by Side Diff: cc/layers/picture_layer_impl.cc

Issue 15774010: Add TRACE_EVENT_IS_NEW_TRACE as a way to snapshot objects at start of recording (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address enne feedback 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 | Annotate | Revision Log
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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 last_screen_space_transform_ = current_screen_space_transform; 368 last_screen_space_transform_ = current_screen_space_transform;
369 last_bounds_ = bounds(); 369 last_bounds_ = bounds();
370 last_content_scale_ = contents_scale_x(); 370 last_content_scale_ = contents_scale_x();
371 } 371 }
372 372
373 void PictureLayerImpl::DidBecomeActive() { 373 void PictureLayerImpl::DidBecomeActive() {
374 LayerImpl::DidBecomeActive(); 374 LayerImpl::DidBecomeActive();
375 tilings_->DidBecomeActive(); 375 tilings_->DidBecomeActive();
376 } 376 }
377 377
378 void PictureLayerImpl::DidBeginTracing() {
379 pile_->DidBeginTracing();
380 }
381
378 void PictureLayerImpl::DidLoseOutputSurface() { 382 void PictureLayerImpl::DidLoseOutputSurface() {
379 if (tilings_) 383 if (tilings_)
380 tilings_->RemoveAllTilings(); 384 tilings_->RemoveAllTilings();
381 385
382 ResetRasterScale(); 386 ResetRasterScale();
383 } 387 }
384 388
385 void PictureLayerImpl::CalculateContentsScale( 389 void PictureLayerImpl::CalculateContentsScale(
386 float ideal_contents_scale, 390 float ideal_contents_scale,
387 float device_scale_factor, 391 float device_scale_factor,
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 state->Set("tilings", tilings_->AsValue().release()); 1028 state->Set("tilings", tilings_->AsValue().release());
1025 state->Set("pictures", pile_->AsValue().release()); 1029 state->Set("pictures", pile_->AsValue().release());
1026 state->Set("invalidation", invalidation_.AsValue().release()); 1030 state->Set("invalidation", invalidation_.AsValue().release());
1027 } 1031 }
1028 1032
1029 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { 1033 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const {
1030 return tilings_->GPUMemoryUsageInBytes(); 1034 return tilings_->GPUMemoryUsageInBytes();
1031 } 1035 }
1032 1036
1033 } // namespace cc 1037 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/resources/picture.h » ('j') | cc/resources/picture.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698