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

Unified Diff: cc/resources/recording_source.h

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/rasterizer.h ('k') | cc/resources/skpicture_content_layer_updater.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/recording_source.h
diff --git a/cc/resources/recording_source.h b/cc/resources/recording_source.h
new file mode 100644
index 0000000000000000000000000000000000000000..cbbeb7021e6fe04de7e909d6e70e87be7099d079
--- /dev/null
+++ b/cc/resources/recording_source.h
@@ -0,0 +1,55 @@
+// 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_RECORDING_SOURCE_H_
+#define CC_RESOURCES_RECORDING_SOURCE_H_
+
+#include "cc/base/cc_export.h"
+#include "cc/resources/picture.h"
+#include "third_party/skia/include/core/SkBBHFactory.h"
+#include "third_party/skia/include/core/SkColor.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/geometry/size.h"
+
+namespace cc {
+class ContentLayerClient;
+class Region;
+class RasterSource;
+
+class CC_EXPORT RecordingSource {
+ public:
+ virtual ~RecordingSource() {}
+ // Re-record parts of the picture that are invalid.
+ // Invalidations are in layer space, and will be expanded to cover everything
+ // that was either recorded/changed or that has no recording, leaving out only
+ // pieces that we had a recording for and it was not changed.
+ // Return true iff the pile was modified.
+ virtual bool UpdateAndExpandInvalidation(
+ ContentLayerClient* painter,
+ Region* invalidation,
+ SkColor background_color,
+ bool contents_opaque,
+ bool contents_fill_bounds_completely,
+ const gfx::Size& layer_size,
+ const gfx::Rect& visible_layer_rect,
+ int frame_number,
+ Picture::RecordingMode recording_mode) = 0;
+
+ virtual gfx::Size GetSize() const = 0;
+ virtual void SetEmptyBounds() = 0;
+ virtual void SetMinContentsScale(float min_contents_scale) = 0;
+ virtual void SetTileGridSize(const gfx::Size& tile_grid_size) = 0;
+ virtual void SetSlowdownRasterScaleFactor(int factor) = 0;
+ virtual void SetIsMask(bool is_mask) = 0;
+ virtual bool IsSuitableForGpuRasterization() const = 0;
+
+ virtual scoped_refptr<RasterSource> CreateRasterSource() const = 0;
+
+ // TODO(hendrikw): Figure out how to remove this.
+ virtual void SetUnsuitableForGpuRasterizationForTesting() = 0;
+ virtual SkTileGridFactory::TileGridInfo GetTileGridInfoForTesting() const = 0;
+};
+}
+
+#endif // CC_RESOURCES_RECORDING_SOURCE_H_
« no previous file with comments | « cc/resources/rasterizer.h ('k') | cc/resources/skpicture_content_layer_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698