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

Side by Side Diff: cc/paint/paint_canvas.cc

Issue 2768143002: Back PaintRecord with PaintOpBuffer instead of SkPicture (Closed)
Patch Set: More unit tests Created 3 years, 8 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/paint/paint_canvas.h" 5 #include "cc/paint/paint_canvas.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "cc/paint/paint_record.h" 8 #include "cc/paint/paint_record.h"
9 #include "cc/paint/paint_recorder.h" 9 #include "cc/paint/paint_recorder.h"
10 #include "third_party/skia/include/core/SkAnnotation.h" 10 #include "third_party/skia/include/core/SkAnnotation.h"
(...skipping 19 matching lines...) Expand all
30 30
31 bool IsPreviewMetafile(PaintCanvas* canvas) { 31 bool IsPreviewMetafile(PaintCanvas* canvas) {
32 bool value; 32 bool value;
33 SkMetaData& meta = canvas->getMetaData(); 33 SkMetaData& meta = canvas->getMetaData();
34 if (!meta.findBool(kIsPreviewMetafileKey, &value)) 34 if (!meta.findBool(kIsPreviewMetafileKey, &value))
35 value = false; 35 value = false;
36 return value; 36 return value;
37 } 37 }
38 #endif 38 #endif
39 39
40 void PaintCanvasAnnotateRectWithURL(PaintCanvas* canvas,
41 const SkRect& rect,
42 SkData* data) {
43 canvas->AnnotateRectWithURL(rect, data);
44 }
45
46 void PaintCanvasAnnotateNamedDestination(PaintCanvas* canvas,
47 const SkPoint& point,
48 SkData* data) {
49 canvas->AnnotateNamedDestination(point, data);
50 }
51
52 void PaintCanvasAnnotateLinkToDestination(PaintCanvas* canvas,
53 const SkRect& rect,
54 SkData* data) {
55 canvas->AnnotateLinkToDestination(rect, data);
56 }
57
58 } // namespace cc 40 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698