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

Unified Diff: cc/resources/display_list_recording_source.h

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/display_list_raster_source.cc ('k') | cc/resources/display_list_recording_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/display_list_recording_source.h
diff --git a/cc/resources/display_list_recording_source.h b/cc/resources/display_list_recording_source.h
new file mode 100644
index 0000000000000000000000000000000000000000..6bc82082fd9a3038d1c4b3686be9afaf655fbcca
--- /dev/null
+++ b/cc/resources/display_list_recording_source.h
@@ -0,0 +1,64 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_RESOURCES_DISPLAY_LIST_RECORDING_SOURCE_H_
+#define CC_RESOURCES_DISPLAY_LIST_RECORDING_SOURCE_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "cc/resources/recording_source.h"
+
+namespace cc {
+class DisplayItemList;
+class DisplayListRasterSource;
+
+class CC_EXPORT DisplayListRecordingSource : public RecordingSource {
+ public:
+ DisplayListRecordingSource();
+ ~DisplayListRecordingSource() override;
+
+ // RecordingSource overrides.
+ bool UpdateAndExpandInvalidation(
+ ContentLayerClient* painter,
+ Region* invalidation,
+ bool can_use_lcd_text,
+ const gfx::Size& layer_size,
+ const gfx::Rect& visible_layer_rect,
+ int frame_number,
+ Picture::RecordingMode recording_mode) override;
+ scoped_refptr<RasterSource> CreateRasterSource() const override;
+ gfx::Size GetSize() const final;
+ void SetEmptyBounds() override;
+ void SetMinContentsScale(float min_contents_scale) override;
+ void SetSlowdownRasterScaleFactor(int factor) override;
+ bool IsSuitableForGpuRasterization() const override;
+ void SetTileGridSize(const gfx::Size& tile_grid_size) override;
+ void SetUnsuitableForGpuRasterizationForTesting() override;
+ SkTileGridFactory::TileGridInfo GetTileGridInfoForTesting() const override;
+
+ protected:
+ void Clear();
+
+ gfx::Rect recorded_viewport_;
+ gfx::Size size_;
+ int slow_down_raster_scale_factor_for_debug_;
+ bool can_use_lcd_text_;
+ bool is_solid_color_;
+ SkColor solid_color_;
+ int pixel_record_distance_;
+
+ scoped_refptr<DisplayItemList> display_list_;
+
+ private:
+ friend class DisplayListRasterSource;
+
+ void DetermineIfSolidColor();
+
+ bool is_suitable_for_gpu_rasterization_;
+
+ DISALLOW_COPY_AND_ASSIGN(DisplayListRecordingSource);
+};
+
+} // namespace cc
+
+#endif // CC_RESOURCES_DISPLAY_LIST_RECORDING_SOURCE_H_
« no previous file with comments | « cc/resources/display_list_raster_source.cc ('k') | cc/resources/display_list_recording_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698