| OLD | NEW | 
|    1 // Copyright 2014 The Chromium Authors. All rights reserved. |    1 // Copyright 2014 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/display_list_recording_source.h" |    5 #include "cc/resources/display_list_recording_source.h" | 
|    6  |    6  | 
|    7 #include <algorithm> |    7 #include <algorithm> | 
|    8  |    8  | 
|    9 #include "cc/base/region.h" |    9 #include "cc/base/region.h" | 
|   10 #include "cc/layers/content_layer_client.h" |   10 #include "cc/layers/content_layer_client.h" | 
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  108   } |  108   } | 
|  109   display_list_->set_layer_rect(recorded_viewport_); |  109   display_list_->set_layer_rect(recorded_viewport_); | 
|  110   is_suitable_for_gpu_rasterization_ = |  110   is_suitable_for_gpu_rasterization_ = | 
|  111       display_list_->IsSuitableForGpuRasterization(); |  111       display_list_->IsSuitableForGpuRasterization(); | 
|  112  |  112  | 
|  113   DetermineIfSolidColor(); |  113   DetermineIfSolidColor(); | 
|  114   display_list_->EmitTraceSnapshot(); |  114   display_list_->EmitTraceSnapshot(); | 
|  115   return true; |  115   return true; | 
|  116 } |  116 } | 
|  117  |  117  | 
 |  118 void DisplayListRecordingSource::DidMoveToNewCompositor() { | 
 |  119   // No invalidation history to worry about here. | 
 |  120 } | 
 |  121  | 
|  118 gfx::Size DisplayListRecordingSource::GetSize() const { |  122 gfx::Size DisplayListRecordingSource::GetSize() const { | 
|  119   return size_; |  123   return size_; | 
|  120 } |  124 } | 
|  121  |  125  | 
|  122 void DisplayListRecordingSource::SetEmptyBounds() { |  126 void DisplayListRecordingSource::SetEmptyBounds() { | 
|  123   size_ = gfx::Size(); |  127   size_ = gfx::Size(); | 
|  124   Clear(); |  128   Clear(); | 
|  125 } |  129 } | 
|  126  |  130  | 
|  127 void DisplayListRecordingSource::SetSlowdownRasterScaleFactor(int factor) { |  131 void DisplayListRecordingSource::SetSlowdownRasterScaleFactor(int factor) { | 
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  169   is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); |  173   is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); | 
|  170 } |  174 } | 
|  171  |  175  | 
|  172 void DisplayListRecordingSource::Clear() { |  176 void DisplayListRecordingSource::Clear() { | 
|  173   recorded_viewport_ = gfx::Rect(); |  177   recorded_viewport_ = gfx::Rect(); | 
|  174   display_list_ = NULL; |  178   display_list_ = NULL; | 
|  175   is_solid_color_ = false; |  179   is_solid_color_ = false; | 
|  176 } |  180 } | 
|  177  |  181  | 
|  178 }  // namespace cc |  182 }  // namespace cc | 
| OLD | NEW |