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

Side by Side Diff: Source/platform/graphics/GraphicsContextRecorder.cpp

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 28 matching lines...) Expand all
39 #include "platform/image-decoders/ImageDecoder.h" 39 #include "platform/image-decoders/ImageDecoder.h"
40 #include "platform/image-decoders/ImageFrame.h" 40 #include "platform/image-decoders/ImageFrame.h"
41 #include "platform/image-encoders/skia/PNGImageEncoder.h" 41 #include "platform/image-encoders/skia/PNGImageEncoder.h"
42 #include "third_party/skia/include/core/SkBitmapDevice.h" 42 #include "third_party/skia/include/core/SkBitmapDevice.h"
43 #include "third_party/skia/include/core/SkPictureRecorder.h" 43 #include "third_party/skia/include/core/SkPictureRecorder.h"
44 #include "third_party/skia/include/core/SkStream.h" 44 #include "third_party/skia/include/core/SkStream.h"
45 #include "wtf/HexNumber.h" 45 #include "wtf/HexNumber.h"
46 #include "wtf/text/Base64.h" 46 #include "wtf/text/Base64.h"
47 #include "wtf/text/TextEncoding.h" 47 #include "wtf/text/TextEncoding.h"
48 48
49 namespace WebCore { 49 namespace blink {
50 50
51 GraphicsContext* GraphicsContextRecorder::record(const IntSize& size, bool isCer tainlyOpaque) 51 GraphicsContext* GraphicsContextRecorder::record(const IntSize& size, bool isCer tainlyOpaque)
52 { 52 {
53 ASSERT(!m_picture); 53 ASSERT(!m_picture);
54 ASSERT(!m_recorder); 54 ASSERT(!m_recorder);
55 ASSERT(!m_context); 55 ASSERT(!m_context);
56 m_isCertainlyOpaque = isCertainlyOpaque; 56 m_isCertainlyOpaque = isCertainlyOpaque;
57 m_recorder = adoptPtr(new SkPictureRecorder); 57 m_recorder = adoptPtr(new SkPictureRecorder);
58 SkCanvas* canvas = m_recorder->beginRecording(size.width(), size.height(), 0 , 0); 58 SkCanvas* canvas = m_recorder->beginRecording(size.width(), size.height(), 0 , 0);
59 m_context = adoptPtr(new GraphicsContext(canvas)); 59 m_context = adoptPtr(new GraphicsContext(canvas));
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 145 }
146 146
147 PassRefPtr<JSONArray> GraphicsContextSnapshot::snapshotCommandLog() const 147 PassRefPtr<JSONArray> GraphicsContextSnapshot::snapshotCommandLog() const
148 { 148 {
149 LoggingCanvas canvas(m_picture->width(), m_picture->height()); 149 LoggingCanvas canvas(m_picture->width(), m_picture->height());
150 m_picture->draw(&canvas); 150 m_picture->draw(&canvas);
151 return canvas.log(); 151 return canvas.log();
152 } 152 }
153 153
154 } 154 }
OLDNEW
« no previous file with comments | « Source/platform/graphics/GraphicsContextRecorder.h ('k') | Source/platform/graphics/GraphicsContextState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698