Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
frame_interface_optimizer.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http:///www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
18 
19 #ifndef PAGESPEED_KERNEL_IMAGE_FRAME_INTERFACE_OPTIMIZER_H_
20 #define PAGESPEED_KERNEL_IMAGE_FRAME_INTERFACE_OPTIMIZER_H_
21 
22 #include <cstddef>
28 
29 namespace net_instaweb {
30 class MessageHandler;
31 }
32 
33 namespace pagespeed {
34 
35 namespace image_compression {
36 
40  public:
43  virtual ~MultipleFramePaddingReader();
44 
45  virtual ScanlineStatus Reset();
46  virtual ScanlineStatus Initialize();
47  virtual bool HasMoreFrames() const;
48  virtual bool HasMoreScanlines() const;
50  virtual ScanlineStatus ReadNextScanline(const void** out_scanline_bytes);
51  virtual ScanlineStatus GetFrameSpec(FrameSpec* frame_spec) const;
52  virtual ScanlineStatus GetImageSpec(ImageSpec* image_spec) const;
53  MessageHandler* message_handler() const;
54  virtual ScanlineStatus set_quirks_mode(QuirksMode quirks_mode);
55  virtual QuirksMode quirks_mode() const;
56 
57  private:
59 
61  ImageSpec image_spec_;
62 
64  FrameSpec impl_frame_spec_;
65 
68  FrameSpec padded_frame_spec_;
69 
71  bool frame_is_full_height_;
72 
74  bool frame_is_full_width_;
75 
80  bool frame_needs_no_padding_;
81 
84  size_px current_scanline_idx_;
85 
87  net_instaweb::scoped_array<uint8_t> current_scanline_;
88 
92  net_instaweb::scoped_array<uint8_t> scanline_template_;
93 
95  size_t bytes_per_pixel_;
96 
100  uint8_t* foreground_scanline_start_byte_;
101 
102 
103 };
104 
105 }
106 
107 }
108 
109 #endif
Definition: scanline_status.h:93
virtual ScanlineStatus Reset()
Resets the MultipleFrameReader to its initial state.
Definition: image_frame_interface.h:146
virtual ScanlineStatus GetFrameSpec(FrameSpec *frame_spec) const
virtual ScanlineStatus ReadNextScanline(const void **out_scanline_bytes)
MultipleFramePaddingReader(MultipleFrameReader *reader)
Takes ownership of reader.
Definition: scoped_ptr.h:30
Definition: frame_interface_optimizer.h:39
Definition: image_frame_interface.h:43
Definition: image_frame_interface.h:79
virtual ScanlineStatus GetImageSpec(ImageSpec *image_spec) const
Definition: message_handler.h:39